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

Re: getting the last value of a nodeset

Subject: Re: getting the last value of a nodeset
From: "Prasad Akella" <avlnprasad@xxxxxx>
Date: Sun, 06 Feb 2005 13:55:06 +0100
value of in xpath
hi

I am sorry i do not want to evaluate the xpath expression. i would like to have the last segment of the xpath statement as i would be using that same string to name a control in my xhtml page. thus a control in an xhtml page and the node in an xml document would be matched and i can put the value thus entered from the user browser into the respective tag. thus i have to get the last string which represents a node in an xml document and name an xhtml control with the same. i hope i am clear

with regards,
Prasad

xsl-list@xxxxxxxxxxxxxxxxxxxxxx schrieb am 06.02.05 13:50:10:
> 
> Prasad Akella wrote:
> 
> >hi,
> >
> >i would like to get the last value of an xpath expression like for example
> >
> ><xforms:bind nodeset="/Exam/ExamMetaData/Title"/>
> >
> >in this i would like to take the value of the attribute xforms:bind/@nodeset and traverse it to get the value of Title
> >  
> >
> 
> I would reiterate your question.....you want the value of the xpath 
> expression /Exam/ExamMetaData/Title (not the last value...or segment of 
> xpath statement....sorry being a bit pedantic)....the well known problem 
> here is dynamically evaluating strings as XPATH statements......in other 
> words you want to put your @nodeset attribute into a string 
> variable...then use the string variable as input of a select statement....
> 
> I would suggest looking at;
> 
> http://www.exslt.org/dyn/functions/evaluate/index.html
> 
> note: most processors, and saxon has some equivelent eval type function 
> for you to use
> 
> the only thing to be slightly careful with is if you are using 
> document() calls and extra namespaces (like xforms)..first make sure you 
> are dynamically selecting properly with whatever processor function call,
> 
> something like the following (with saxon namespace being prop declared) 
> would be an example of doing this with saxon;
> 
> <xsl:variable name="var" select="/rootelement/xforms:bind/@nodeset"/>
> 
> <xsl:value-of select="saxon:evaluate($var)"/>
> 
> note this is untested!
> 
> gl, Jim Fuller
> 


______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193

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.