xsl-list
[Top] [All Lists]

RE: concat - node set or a string

2004-03-05 02:24:27
concat() creates a string. You seem to be using it to construct an XPath
expression. You won't get a node-set unless you evaluate this XPath
expression, which you aren't even attempting to do. 

Standard XSLT doesn't allow you to evaluate an XPath expression constructed
dynamically as a string, but some products have an extension (xx:evaluate())
that permits it.

But I don't think you need dynamic evaluation here. You can use the standard
technique:

Select="$self_quirxi/globals/pers_datas/pers_data/*[name()=$qadmin_table]"

Michael Kay

# -----Original Message-----
# From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
[mailto:owner-xsl-
# list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of Markus Hanel
# Sent: 05 March 2004 07:21
# To: xsl mailinglist
# Subject: [xsl] concat - node set or a string
# 
# I would like to write a node set that allows me to automatically show the
# elements of a pers data.
# Therefore I defined 2 variables: self_quirxi and qadmin_table
# ...
# <xsl:variable name="self_quirxi"
# select="document('/qxml/quirxi.xml')/quirxi" />
# ...
# <xsl:variable name="qadmin_table" select="." /> selects surname,
# lastname,...
# 
# Here I want to give out the node set, but it is only a string!
# <xsl:value-of
# select="concat($self_quirxi,'/globals/pers_datas/pers_data/',$qadmin_table
# )" />
# 
# Where is the bug?
# markus
# 
# 
#  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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



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