|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] using xsl:if to test the value of a node
I am very new to XSL, so I hope you will excuse the basic questions! I am using MS ie6 for my XSL experiments and I need to do some data sorting. I have an xml document that contains a number of "ARTICLE" nodes, each article node contains a "CODE" node. I need to only transform ARTICLE nodes where the CODE node value starts with a "J" (or a "B"). My data looks like... <ARTICLE_LIST> <ARTICLE Test="OK"> <CODE>J107_SYD-LAX-JFK.102</CODE> <PACKAGE>PK x 15</PACKAGE> <LOADPORT>SYD QFCL</LOADPORT> <ORDERED>6300</ORDERED> <DELIVERED>0</DELIVERED> <USED>0</USED> <ONHAND>0</ONHAND> <VIEWFILE>TRUE</VIEWFILE> </ARTICLE> I am trying the following... <xsl:template match="/"> <xsl:copy> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="ARTICLE_LIST"> <xsl:copy> <xsl:apply-templates> <xsl:sort select="CODE"/> <xsl:sort select="LOADPORT"/> </xsl:apply-templates> </xsl:copy> </xsl:template> <xsl:template match="ARTICLE"> <xsl:if test="child::CODE[. $lt$ 'K' and . $gte$ 'J']"> <xsl:copy> <xsl:apply-templates/> </xsl:copy> </xsl:if> </xsl:template> ..... and other combinations of anything else I can find.... any help would be greatly appreciated! 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








