Evil_Giraffe
Sep 4th, 2002, 05:24 AM
I am trying to write an XSL Template that transforms some raw XML into an alternative form. It is a little difficult to describe: -
I am trying to insert some plain text tags into the XML output. So, I have an xsl:choose setup with three different scenarios. If you imagine I have header and body data. Each time I hit a certain tag I want to close one section and create a new section. So I have as below: -
<xsl:choose>
<xsl:when test="headeritem">
'''''''''''''''some code
</xsl:when>
<xsl:when test="line item">
'''''''''''''''some code
</xsl:when>
<xsl:otherwise>
<!-- here I want to now add a closing tag to a section above -->
</body>
<header>
<body>
</xsl:when>
what happens is the XML parser says that the /body tag doesn't match the xsl:otherwise tag. Does anybody know how I can output random tags where and when I want to?
Please please help!
I am trying to insert some plain text tags into the XML output. So, I have an xsl:choose setup with three different scenarios. If you imagine I have header and body data. Each time I hit a certain tag I want to close one section and create a new section. So I have as below: -
<xsl:choose>
<xsl:when test="headeritem">
'''''''''''''''some code
</xsl:when>
<xsl:when test="line item">
'''''''''''''''some code
</xsl:when>
<xsl:otherwise>
<!-- here I want to now add a closing tag to a section above -->
</body>
<header>
<body>
</xsl:when>
what happens is the XML parser says that the /body tag doesn't match the xsl:otherwise tag. Does anybody know how I can output random tags where and when I want to?
Please please help!