[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Process node set generated by EXSLT tokenize
I built a simple XSL stylesheet for a css-based sidebar navigation. The navigation will appear on several co-branded sites, so each link's XML element has an attribute that specifies the link's display status. For example: <menu name="name" url="" includeSites="0"/> I use an <xsl:if> statement to compare the attribute against a "siteID" parameter. If there's a match, then the link is displayed. A <xsl:for-each> iterates through each link. No problem. My project has a new requirmenet. The includeSites attribute may have muliple, comma-delimited values. For example: <menu name="name" url="" includeSites="17,21,32"/> I utilized the EXSLT tokenize() template to build a node set out of the delimited attributes. However, I'm new to XSLT and I can't grasp how to process that node set. This is the XHTML that my stylesheet is currently generating: <ul><includeSite>0</includeSite><li><a href="">Link 1</a></li><includeSite>17</includeSite><li><a href="">Link 2</a></li>...</ul> What I want is for the node set values to be passed to an <xsl:if> statement that's iterated by an <xsl:for-each>, like I have in my single-attribute version. If this were JavaScript, I would pass the node value as a variable, but that doesn't seem possible in XSLT. I have examples of my code posted if my language isn't clear: http://www.matbergman.com/misc/xmlNav/ Is this task even within the capabilities of XSLT 1.0? Thanks, -Mat __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
|
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
|