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

XSLT 2 I have a for-each, When there is only 1 instanc

Subject: XSLT 2 I have a for-each, When there is only 1 instance
From: "LEGAULT, PHILLIP plegault@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 5 Jul 2023 13:51:01 -0000
 XSLT 2 I have a for-each
XSLT 2 I have a for-each for consumer initials , When there is only 1 instance
I want to display just the 1 initials. If there are 2 I a want it to display
with PL, JL, etc.

Here is what I have:
            <reporterfamilyname><xsl:for-each
select="/records/sf:Consumers__r/records">
            <xsl:choose>
                <xsl:when
test="/records/sf:Product_GCC__r/sf:Locale_GCC__r/sf:Region_GCC__c = 'EMEA'">
                    <xsl:text>ANON</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of
select="substring(sf:Consumer_GCC__r/sf:FirstName/text(),1,1)"/><xsl:value-of
select="substring(sf:Consumer_GCC__r/sf:LastName/text(),1,1)"/>
                </xsl:otherwise>
            </xsl:choose></xsl:for-each>
             </reporterfamilyname>

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.