Subject: ANN. UX v 0.2. Grep in XSLT.( Re: path quesion ) From: Paul Tchistopolskii <paul@xxxxxxx> Date: Sun, 02 Jul 2000 00:09:23 -0700 |
----- Original Message ----- From: Kay Michael > > I am processing 2 XML files within a single xsl file. From one file > > I retreive a path value e.g. 'customer/age', from an element > > , this value > > is placed in a variable. I then want to look for the 'customer/age' > > element in the 2nd xml file, > > There is no way in standard XSLT of constructing an XPath expression from a > string (other than by writing a stylesheet to generate another stylesheet). > > You can do it in Saxon using the saxon:evaluate() extension function. I would like to say once again that I think it is bad that saxon:evaluate ( and xt:node-set ) are not in the standard. However. To those who may like to see that 'standard' way of creating one stylesheet out of another ( there are some twists there with TransformAlias ;-) Ux v 0.2 provides some version of grep, implemented in XSLT. Ux v 0.2. ( source code published at http://www.pault.com/Ux/ ) also contains String -> node-set conversion, almost 100% clean support for chaining complex transformations + many new examples of how can XSLT replace perl ;-) In the example below ( which works in Ux v 0.2 ) 'last' , 'grep' and ' x' are all XSLT stylesheets. <xsl:variable name="to-exec"> /! last | grep {login[@status='FAILED']} | x </xsl:variable> <xsl:copy-of select= "document( $to-exec )"/> Rgds.Paul. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Precompiling XSL/Xalan, Ragnar Schierholz | Thread | Re: Number formatting with <xsl:num, Jeni Tennison |
Re: Iteration, Mike Brown | Date | Re: Number formatting with <xsl:num, Jeni Tennison |
Month |