Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


ANN. UX v 0.2. Grep in XSLT.( Re: path quesion )

From: Paul Tchistopolskii <paul@------->
To:
Date: 7/1/2000 5:09:00 PM
----- 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


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent