|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] filtering descendent text nodes
hi, i am new to xslt. Given below is the files i am using. <?xml version="1.0" ?> <custdet> <customer> <name> <firstname>FIRST1</firstname> <secondname>NAME1 <secondname1>SECONDNAME1</secondname1> </secondname> </name> </customer> </custdet> ------------------- I AM TRYING TO FILTER OUT ALL DESCENDENT TEXT NODES VALUES (I.E. FIRST1,NAME1,SECONDNAME1) AND AM USING THE FOLLOWING XSL FOR THAT. ------------------- <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> <xsl:template match="*"> <xsl:apply-templates/> </xsl:template> <xsl:template match="text()"> <xsl:apply-templates/> </xsl:template> <!-- --> <xsl:template match="customer//node()"> First Name : <b><i> <font color="red"> <xsl:value-of select="." /> <br/> </font> </i></b> </xsl:template> <!----> </xsl:stylesheet> THE expected result is three lines with "FIRST NAME:" prefix and the corresponding text value attached. The output i am getting is as follows First Name : First Name : FIRST1 NAME1 SECONDNAME1 First Name : First Name : 20one1 First Name Could somebody explain what actually is happening and also some light on the difference between child nodes and descendent nodes. Thanks Aseef.J __________________________________________________ Do You Yahoo!? Yahoo! Sports - live college hoops coverage http://sports.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
|

Cart








