xsl-list
[Top] [All Lists]

Re: [xsl] xpath problem

2012-02-07 08:13:31
On 7 February 2012 14:00, ram <ram_kurra(_at_)yahoo(_dot_)co(_dot_)in> 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

--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


<Prev in Thread] Current Thread [Next in Thread>