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

How to query a temporary document in a variable

Subject: How to query a temporary document in a variable
From: Jean-Pierre Bergamin <jpbergamin@xxxxxxxxx>
Date: Mon, 10 Sep 2012 14:38:39 +0200
 How to query a temporary document in a variable
Hello xslt-users

I'm trying to use a temporary document as a lookup table with saxon
9.4 using xslt 2.0. The solution is also proposed in this
stackoverflow answer:
http://stackoverflow.com/questions/3626118/xslt-creating-a-map-in-xslt

But I'm not getting any results when I query the variable that holds
the temporary document:

<xsl:variable name="propertyMap">
	<entry key="foo">foo value</entry>
	<entry key="bar">bar value</entry>
</xsl:variable>

<xsl:template match="/">
	<xsl:value-of select="$propertyMap/entry[position() = 1]"/>
	<xsl:value-of select="$propertyMap/entry[@key='foo']"/>
	<xsl:value-of select="$propertyMap[1]"/>
</xsl:template>

The first two value-of expressions do not output anything, whereas the
third one outputs the whole propertyMap.

Any idea what I'm missing here?


Best regards,
James

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.