Subject: [xsl] Can one <xsl:choose> <xsl:output>? From: "Sudhir Malhotra" <sudhirmalhotra123@xxxxxxxxxxx> Date: Mon, 07 May 2001 19:30:00 -0500 |
<response TYPE="Table"> <data>1</data> <data>15.2</data> </response>
The output of the transformation could be directed to a Chart, or To a Table, depending on the TYPE attribute. Chart has ABChartData.dtd, and Table has ABTableData.dtd.
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>
Questions: 1. How can this be done? 2. I am using Xalan Java API. Is there any way to pass the value of doctype-system attribute to the transform? Assuming that I am able to determine the value through some other means before doing the transform.
The API for supplying the xml (after transformation) to Chart or to Table requires that the XML be of the form:
<!--For Chart --> <?xml version="1.0"?> <!DOCTYPE ABChartData SYSTEM "ABChartData.dtd"> <ABChartData Name="Item Code vs Price" > <PointLabel> Mercury </PointLabel> <Series> <SeriesLabel>Price</SeriesLabel> <XData>1</Xdata> <YData>15.2</YData> </Series> </ABChartData>
<!--For Table --> <?xml version="1.0" > <!DOCTYPE ABTableData SYSTEM "ABTableData.dtd"> <ABTableData >
<ColumnLabel>Item Code</ColumnLabel> <ColumnLabel>Price</ColumnLabel> <Row> <RowLabel/> <Cell>1</Cell> <Cell>15.2</Cell> </Row> </ABTableData> === END ===
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] wysiwyg xml editing, Dan Diebolt | Thread | RE: [xsl] Can one <xsl:choose> <xsl, Tim Watts |
RE: [xsl] wysiwyg xml editing, Scott N. Smith | Date | RE: [xsl] Can one <xsl:choose> <xsl, Tim Watts |
Month |