This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Upgrade Broke My XSLT


Hi Eric,

> We recently upgraded our XSLT parser and now many of our scripts are
> not working. Does anyone have an idea why this is not working? The
> names will show up formatted with no paragraphs beneath them (i've
> removed the content).
>
> XSL::
>
> <xsl:template match="bios">
>   <xsl:for-each select="bio">
>     <xsl:apply-templates select="name"/>
>     <xsl:for-each select="paragraph">
>       <xsl:apply-templates select="paragraph"/>
>     </xsl:for-each>
>   </xsl:for-each>
> </xsl:template>

This says "for each paragraph, apply templates to its paragraph
element children". From the looks of it, you don't have nested
paragraphs, so probably what you were after was actually:

<xsl:template match="bios">
  <xsl:for-each select="bio">
    <xsl:apply-templates select="name"/>
    <xsl:apply-templates select="paragraph"/>
  </xsl:for-each>
</xsl:template>

(BTW, what did you upgrade from?)

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]