|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl match first letter of data?
Using MSXMLDOM with XML file:
<windows>
<product>
<name>Product Name</name>
....
</product>
</windows>
and XSL:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="windows">
<xsl:for-each select="product">
<xsl:sort select="Name"/>
<xsl:if test="Category='business'">
<div class="menuitem">
<a href="{URL}"><xsl:value-of select="Name"/></a>
</div>
<div class="catdesc">
<xsl:value-of select="Description"/> [<a href="{URL}">More</a>]
</div>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Question:
What xsl:if or other tag can I use to specify that only 'products' with a 'name' beginning with the letter "a" should be displayed? Hope this makes sense, I am
fairly new to XSL but I have read for two days now and can't find a way to do this so far. Thanks!
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








