Jason Solan wrote:
I'm new to XSL.
The problem comes in because I don't know how to parse the parameters.
I'm in an open "<a" tag so I can't do (unless I'm mistaken) an
I'm sorry if this type of question has been answered before, I tried
searching, but didn't know what to search for to get a hit.
No problem, we all started at the basics. Your best bet is some tutorial
that guides you through the processing model of XSLT, and explains you
what nodes are, what attribute nodes are and how XSLT creates them. You
don't need to do something inside "an open tag", because tags do not
exist as far as XSLT is concerned.
A solution:
<a href="something" onclick="someFunc('{(_at_)column}');" />
where @column refers to the attribute with the name 'column' in the
current processing context.
Another solution:
<a href="something">
<xsl:attribute name="onclick">
<xsl:text>someFunc('</xsl:text>
<xsl:value-of select="@column" />
<xsl:text>');</xsl:text>
</xsl:attribute>
</a>
In the place of "xsl:value-of" you can also do an apply-templates, if
you need to parse all kinds of "column" nodes or attributes that need to
be placed as parts of your function's parameters.
There are many more ways to do this. The first approach above is,
however, by far the simplest and between the {} brackets you can
reference any element or attribute using any valid XPath. The {} part is
called an "attribute value template" (google for some more pointers on it).
Cheers,
-- Abel Braaksma
http://www.nuntia.nl
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--