|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Stumped on why a field isn't showing up
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








