|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Problem mixing path and document()
I'm having trouble using a built-up external document reference using a
path. Here's contrived example to demonstrate the problem. For each
matched ReferencedNode in the source document, the style sheet is to use the
docName and path attributes to copy the node in the referenced file
(foo.xml). (text continued below)
------ source document ------
<?xml version="1.0"?>
<References>
<ReferencedNode docName="foo.xml" path="/*[1]/*[1]"/>
</References>
------ stylesheet ------
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="ReferencedNode">
<xsl:copy-of select="document(@docName)@path"/>
</xsl:template>
</xsl:stylesheet>
------ referenced document: foo.xml ------
<?xml version="1.0"?>
<foo>
<bar1/>
<bar2/>
<bar3/>
</foo>
So I expect, in this case to see:
------ expected output ------
<bar1/>
But using using LotusXSL 0.18.2 I receive this output:
--- observed output ---
<foo>
<bar1/>
<bar2/>
<bar3/>
</foo>
I tried <xsl:copy-of select="document(@docName)/*[1]/*[1]"/> and I get the
expected output.
So, is my stylesheet syntax correct and the styler not working correctly, or
is there a better/correct way to do what I want?
Thanks,
Evan
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








