XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Tadd StuartSubject: Attribute Value Concatenation
Author: Tadd Stuart
Date: 06 Mar 2008 11:11 AM
Originally Posted: 06 Mar 2008 11:09 AM
Is there a way to obtain all values of a specific set of attributes into a single <xsl:variable>?

XML Sample:
<?xml version="1.0"?>
<c i="2" desc="DataTable">
<m i="55" v="1"/>
<m i="6" v="0.60"/>
<m i="10" v="RA"/>
<m i="11" v="90"/>
<m i="14" v="PRIMARY"/>
<m i="15" v="GT 100"/>
<m i="16" v="65"/>
<m i="17" v="RESIDENT"/>
<m i="57" v="12M"/>
<m i="19" v="Y"/>
<m i="20" v="12"/>

XPath Sample:

Variable Sample:
<xsl:variable name="AllText" select="//c/m/@v"/>

But this only gives me the first value and I am looking for all values of @v concatenated together.

James DurningSubject: Attribute Value Concatenation
Author: James Durning
Date: 10 Mar 2008 11:17 AM
<xsl:variable name="AllText">
<xsl:for-each select="//c/m/@v">
<xsl:value-of select="."/>

Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.