[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Two implementations, different results

Subject: Two implementations, different results
From: "Terris" <terris@xxxxxxxxxx>
Date: Thu, 23 Sep 1999 12:27:22 -0700
balance account template
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.