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

How to get a value from other node

Subject: How to get a value from other node
From: Aleksander Bracko <aleksander.bracko@xxxxxxxxx>
Date: Thu, 31 Jan 2002 08:55:44 +0100
 How to get a value from other node
I have following XML:

      <city name = "city1">
      <city name = "city2">

My XSL looks like this:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

<xsl:template match="/">
   <xsl:apply-templates />

<xsl:template match="header">
		<xsl:value-of select="location"/>      <------ After this I
want to insert another value from other node (address)
         <xsl:apply-templates />


And now my problem is:
I would like to insert another value, but from other node. I thought that i
could use a line like this one, but it doesn't work

<xsl:if test="../content/city@name[.='city2']">
	  <xsl:value-of select="../content/city/address" />

If u could please help me out.

Thanx, Alex

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.