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

AW: How To Execute an x-path statement stored insode a

Subject: AW: How To Execute an x-path statement stored insode an var iable ?
From: Jan Kohnert <J.Kohnert@xxxxxxxxxxx>
Date: Fri, 18 Jun 2004 08:38:26 +0200
x path
thanks all.

One way to do this is to use "saxon:evaluate"

You can select the Xpath for the books isbn number by calling:
<xsl:value-of select="saxon:evaluate($GetItem/item[@name =
'ISBN']/@select)">



-----Ursprüngliche Nachricht-----
Von: Passin, Tom [mailto:tpassin@xxxxxxxxxxxx]
Gesendet: Mittwoch, 16. Juni 2004 17:00
An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Betreff: RE:  How To Execute an x-path statement stored insode an
variable ?


> From: Jan Kohnert [mailto:J.Kohnert@xxxxxxxxxxx] 
> 
> I have stored x-pathes inside an varibale:
> 
> <xsl:variable name="GetItem">
>   <!-- Statische Items -->
>   <item name="NAME" select="BOOK/@name"/>
>   <item name="ISBN" select="BOOK/@isbn"/>
> 	...
> </xsl:variable>
> 
> 
> The Idea is to store the x-path inside an variable, because 
> if the XML changes, I dont want to rewrite alle my 
> stylesheets. All I have to do is to change the contant of the 
> variable.
> 

This kind of question has just been discussed over the last day or so on
the thread "including string of value in xpath-path".

Adding to the replies in that thread, one approach is to write a
stylesheet tha takes your path expressions and writes a second
stylesheet containing the paths.  You use the second stylesheet to
perform the actual transformation you are after.

Look to the various FAQs for help in doing this (or search the list
archives).

Cheers,

Tom P

--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
--+--



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.