|
Subject: Re: [xsl] Passing custom tags to jsp via xsl From: Mike Brown <mike@xxxxxxxxxxxxxxxx> Date: Thu, 25 Apr 2002 10:13:34 -0600 (MDT) |
Denis McCarthy wrote:
> <xsl:template match="columnValue">
> <td class="listCell">
> <ramtag:loc label="
> <xsl:value-of select="."/>
> >
> </td>
> </xsl:template>
> I would like the jsp to interpret the '<ramtag' tag, but I'm getting an xsl
> error when I try it like this.
XSLT does not deal in tags. Producing output is not a matter of serially
pasting together strings of text. Leave that for lower level markup languages
like PHP and CFML, which amount to little more than server-side includes. In
XSLT you deal with node trees that are implied by the markup. You produce a
new node tree and then let the XSLT processor serialize it with whatever
markup ('tags') is appropriate for the kind of output you want. Read a good
tutorial on XPath and XSLT (Michael Kay's XSLT book is the best) for a
thorough explanation.
In the mean time, this should work for you:
<td class="listCell">
<ramtag:loc label="{.}"/>
</td>
I assume you've declared a namespace for the 'ramtag' prefix
already. xmlns:ramtag="...something..."
- Mike
____________________________________________________________________________
mike j. brown | xml/xslt: http://skew.org/xml/
denver/boulder, colorado, usa | resume: http://skew.org/~mike/resume/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Passing custom tags to jsp vi, Denis McCarthy | Thread | [xsl] How to escape invalid charact, Uslu, Cihan Y (MED) |
| [xsl] How to escape invalid charact, Uslu, Cihan Y (MED) | Date | Re: [xsl] How to escape invalid cha, David Carlisle |
| Month |