Subject: RE: Two implementations, different results From: Kay Michael <Michael.Kay@xxxxxxx> Date: Fri, 24 Sep 1999 09:35:27 +0100 |
> > Which implementation is right? What is <root> doing in > Oracle's output? As far as I can see the spec (section 11.3) isn't explicit about what happens when you try to copy a root (document) node into the result tree. SAXON does the same as xt here, it copies the document element. Oracle appears to be converting the root node into an element node named root, which seems a creative way of dealing with an omission in the spec. The omission of the data copied using document() is less easily explained. Mike Kay > > > 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 > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Two implementations, different , Terris | Thread | Re: Can solve the N-queens - but ca, Paul Rabin |
RE: 2 questions about textarea, Ben Robb | Date | RE: 2 questions about textarea, Kay Michael |
Month |