|
Subject: RE: [xsl] Can one <xsl:choose> <xsl:output>? From: "Tim Watts" <timw@xxxxxxx> Date: Tue, 8 May 2001 10:52:43 +1000 |
I'm not sure this can be done, but you could try by using Choose to set a
variable, as I have shown below.
I think the <xsl:output> would have to be before any templates are defined
so I think you would be best to try and find some other solution completely.
Tim
Using Choose to set a variable:
<xsl:choose>
<xsl:when test="response[@TYPE='Table']">
<xsl:variable name="dtdname" select="TableData.dtd" />
</xsl:when>
<xsl:otherwise>
<xsl:variable name="dtdname" select="ChartData.dtd" />
</xsl:otherwise>
</xsl:choose>
<xsl:output doctype-system="{$dtdname}" />
-----Original Message-----
Sent: Tuesday, 8 May 2001 10:30 AM
Subject: [xsl] Can one <xsl:choose> <xsl:output>?
The output of the transformation could be directed to a Chart, or
to a Table, depending on the TYPE attribute.
In the xsl, I want to do something like:
<xsl:choose>
<xsl:when test="response/@TYPE='Table'">
<xsl:output doctype-system="TableData.dtd"/>
</xsl:when>
<xsl:otherwise>
<xsl:output doctype-system="ChartData.dtd"/>
</xsl:otherwise>
</xsl:choose>
I get an error saying the tag <xsl:output> is not allowed in this location.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Can one <xsl:choose> <xsl:out, Sudhir Malhotra | Thread | RE: [xsl] Can one <xsl:choose> <xsl, Tim Watts |
| [xsl] Can one <xsl:choose> <xsl:out, Sudhir Malhotra | Date | RE: [xsl] [ANN] Inline SVG, Tim Watts |
| Month |