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

Concat values

Subject: Concat values
From: "James Paul" <jpaul@xxxxxxxxxxx>
Date: Mon, 12 Apr 2004 10:26:09 -0500
xsl concat
What I am trying to do is based on a value $attrName I need to check
every line item to see if this value exist in that Line Item.  If it
does exist for a particular line item I need to get the value of the
line item and pass it back and concatenate it with a | under a
particular attribute.

Hence I should produce something like this:

ExtendedAttributeDefinitionObjectLink="LineItem1|LineItem2|LineItem3"
...

Where are the Line Item names with a matching $attrName gets appended to
the Attribute above.
 


<xsl:attribute name = "ExtendedAttributeDefinitionObjectLink">
        <xsl:variable name="GroupLineItems" />

	I Loop through the line items here...
        <xsl:for-each
select="../../../../../ListOfRequestQuoteDetails/RequestQuoteDetails">
            <xsl:variable name="LineItem">

	I call the template below looping through the Reference of the
Line Item
                <xsl:apply-templates
select="RequestQuoteItemDetail/BaseItemDetail/ListOfItemReferences/ListO
fReferenceCoded/ReferenceCoded" mode="BidLineItems">

     
	Passing the template the value I have to match on.
                    <xsl:with-param name="fieldName"
select="$attrName"/>
                </xsl:apply-templates>
            </xsl:variable>

	Trying to concatenate... but of course this will not work
            <xsl:variable name="GroupLineItems"
select="concat($LineItem,'|')" />
        </xsl:for-each>
        <xsl:value-of select="$GroupLineItmes" />
</xsl:attribute>

My Template is below

<xsl:template match="ReferenceCoded" mode="BidLineItems">
    <xsl:param name="fieldName"/>
    <xsl:if test="ReferenceTypeCodedOther='QuestBidExtendedAttribute'">
        <xsl:if test="PrimaryReference/Reference/RefNum=$fieldName">
            <xsl:value-of
select="SupportingReference/Reference/RefNum"/>
        </xsl:if>
    </xsl:if>
</xsl:template>

Thanks... 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.