[Home] [By Thread] [By Date] [Recent Entries]
Deirdre Saoirse Moen wrote:
I'm trying to learn XSL(-FO), so I'm still beating my head against the wall.
...<xsl:template match="/"> <fo:root font-family="Courier" font-size="12pt"> <xsl:apply-templates select="novel/chapter"/>
Here you use an absolute XPath, which will get you the string value of /novel/heading, something you probably expect. However, at this point you use a relative XPath (no slash "/"
in format). This means the processor will try to walk it down
from the context node, which is most likely a /novel/chapter
node. I suppose these nodes don't have a novel child, and you
wont get to the /novel/author node anyway.
You want to use
<xsl:apply-templates select="/novel/author"/>
<xsl:apply-templates select="/novel/address"/>
here.You should probably think about restructuring your processing logic. In many cases it's considered "bad style" to grab parts outside the subtree starting at the currently processed node. A way to avoid this is to use template parameters, they have their own set of drawbacks though. J.Pietschmann
|

Cart



