[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Process node set generated by EXSLT tokenize

Subject: Process node set generated by EXSLT tokenize
From: Mat Bergman <matbergman@xxxxxxxxx>
Date: Thu, 9 Jun 2005 10:12:22 -0700 (PDT)
zak nixon
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 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.