[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Substring Misunderstood?
Substring has two forms: substring(value,start) substring(value,start,length) Your usage of <<substring($idvalue,1)>> is grabbing the whole string. Since $idval is just the content of <id>, <xsl:variable name="idvalue" select="id"/> what is the point of this processing? Try the attached example and tie future questions to what a realistic sample of the XML document you are processing looks like. Regards, Dan File:Samways4May2001.xml <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="Samways4May2001.xsl"?> <root> <employee> <id>1_1</id> <name>Susan</name> </employee> <employee> <id>1_2</id> <name>Mary</name> </employee> </root> File:Samways4May2001.xsl <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:apply-templates select="root"/> </xsl:template> <xsl:template match="root"> <xsl:apply-templates select="employee"/> </xsl:template> <xsl:template match="employee"> <div align="left"> <xsl:value-of select="id"/> - <xsl:value-of select="name"/> - <xsl:value-of select="position()"/> </div> </xsl:template> </xsl:stylesheet> __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|