Subject: Re: [xsl] Can axis specifiers be used inside fo:flow? From: David Carlisle <davidc@xxxxxxxxx> Date: Tue, 17 Oct 2006 17:58:03 +0100 |
> Can Axis Specifiers be used inside fo:flow? there is no connection (other than history) between XSLT and XSL FO, An FO rendering engine just takes as input an XMl tree of FO elements it does not know or care whether those elements were generated by XSLT. Similarly the XSLT proces is just creating an output tree of elements, it has no special knowledge about the XSL FO namepsace elements, they are just "literal result elements" and as far as XSLt knows they work the same way as SVg or XHTML or your own locally made element names. <xsl:when test="/root/element1[following-sibling::image]"> That test is legal but probably not what you want to do, it is an absolute path starting from / so it is a test that will have the same value wherever it is executed, if the root element has a child element1, and a later child element image, then this test will be true, wherever you are in the current document.If it is true, you do <xsl:apply-templates select="/root/element1/image> which applies templates to image children that are children (not siblings) of element1. I would guess you don't need a test at all, just <xsl:apply-templates select="/root/element1/image> or <xsl:apply-templates select="/root/element1/following-sibling::image> depending on which you meant. If the image is not there, it will do nothing, there is no need to test for that case. David
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Can axis specifiers be used i, ms | Thread | Re: [xsl] Can axis specifiers be us, Mukul Gandhi |
Re: [xsl] Determining if an optiona, Sam Carleton | Date | Re: [xsl] XSL and XML Help, David Carlisle |
Month |