|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Two implementations, different results
With the attached document and style sheet, I get the following
output with xt (http://www.jclark.com/xml/xt.html): (sansthe namespace junk)
<Accounts>
<Account>
<Balance>500</Balance>
</Account>
<Account>
<Balance>1000</Balance>
</Account>
</Accounts>
With the Oracle V2 parser (9/14 drop) I get:
<Accounts>
<root>
<Account>
<Balance>500</Balance>
</Account>
</root>
</Accounts>
Which implementation is right? What is <root> doing in Oracle's output?
The document:
<Account>
<Balance>500</Balance>
</Account>
The stylesheet:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">;
<xsl:output method="xml" indent="yes"/>
<xsl:variable name="source">
<Account>
<Balance>1000</Balance>
</Account>
</xsl:variable> <!--source of data-->
<!-- Merge two <Accounts> by appending each Account -->
<xsl:template match="/">
<Accounts>
<xsl:copy-of select="."/>
<xsl:for-each select="document('')">
<xsl:copy-of select="//xsl:variable[@name
= 'source']/*"/>
</xsl:for-each>
</Accounts>
</xsl:template>
</xsl:stylesheet>
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








