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

Re: xpath problem

Subject: Re: xpath problem
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Tue, 7 Feb 2012 14:13:19 +0000
Re:  xpath problem
On 7 February 2012 14:00, ram <ram_kurra@xxxxxxxxxxx> wrote:
> Hi,
>     I was trying to do xpath like following.
>
>
> <xsl:variable name='abc'
select="normalize-space($var1/*[local-name()='source']/text())"/>
>
> the $var1 contains a node set something like this.
>
>
> <plan>
>   <sourc>asfasfs</source>
>   <value>adadf</value>
> </plan>
>
>    when i run the above line i am not getting any result. is there anything
wrong with the statement.

Don't forget if you have a variable like this:

<xsl:variable name="var1">
  <plan>
    <source>

then $var1 returns the document-node containing <plan> element, so to
access the <source> element you need either $var1/plan/source, or set
the sequence type of the variable to be element(plan), then use
$var1/source.


--
Andrew Welch
http://andrewjwelch.com

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.