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

Should be simple?

Subject: Should be simple?
From: "Cross, Neal - Development Controller" <ncross@xxxxxxxxx>
Date: Tue, 13 May 2003 11:31:18 +0100
neal cross
Hi,
I have this problem which is driving me nuts!

My XML is
 
<map>
<x>
    <a>040061002000000</a>
    <b>00101000</b>
    <c>0000</c>
    <d>agriculture                                         ;</d>
</x>
<x>
    <a>040061002000000</a>
    <b>00101100</b>
    <c>0000</c>
    <d>general agriculture                                 ;</d>
</x>
<x>
    <a>040061002000000</a>
    <b>00101110</b>
    <c>0000</c>
    <d>fruit farming or crop cultivation                   ;</d>
</x>
</map>

And I need to acces it as an external document using 

<xsl:template name="map item">
<xsl:param name="code"/>
<xsl:param name="item"/>
<xsl:param name="document"/>
<xsl:variable name="area" select="document('codemap.xml','')/map/x[a=$item and b=$code]"/>
    <xsl:value-of select="$area/x/d"/>
</xsl:for-each>
</xsl:template>

I am hopefully trying to get the value of 'd' so that I can add this as an attribute in my output XML.

Any ideas?
Regards,

<name>Neal Cross</name>
<role>Senior Developer</role>
<company>ICC Information Ltd.</company>
<telephone>0208 4818770</telephone>
<email>ncross@xxxxxxxxx</email>
----------------------


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


Current Thread
  • Should be simple?
    • Cross, Neal - Development Controller - Tue, 13 May 2003 06:30:22 -0400 (EDT) <=

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.