This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Can I access elements in the output tree?


does Xalan supports the node-set function?

Carlos

-----Original Message-----
From: owner-xsl-list@mulberrytech.com
[mailto:owner-xsl-list@mulberrytech.com]On Behalf Of Kay Michael
Sent: Friday, October 27, 2000 6:11 AM
To: 'xsl-list@mulberrytech.com'
Subject: RE: Can I access elements in the output tree?


> Would it be possible to insert elements in the output tree 
> and subsequently access them? If so, would there be any restrictions?

You can create a result tree fragment and then access it using the
node-set() extension function that comes with most popular XSLT processors.
You can't access data once it's written to the final result tree, though.
(There's a good reason for this, most processors don't actually construct
the result tree in memory, they serialize each node as soon as it is
written). But that's not a restriction, you write:

<xsl:template match="/">
<xsl:variable name="xxx">
   ... normal processing ...
</xsl:variable>
<xsl:apply-templates select="xx:node-set($xxx)" mode="phase2"/>
<xsl:copy-of select="$xxx"/>
</xsl:template>

This has the effect you describe.

Mike Kay 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]