for some reason I'd like to output some invalid or at least only partly valid XML from an XSL transformation.
For example, I'd like to print out
<openTag attribute="yes"> <openTag2>
without any closing tags from a template.
I tried:
<xsl:template match="//MyElement">
<xsl:text disable-output-escaping="yes">
<xsl:value-of select=<book xmlns="<openTag attribute="yes"> <openTag2>"/>
</xsl:text>
<xsl:apply-templates select="node()"/>
</xsl:template>
However, this leads to an error that the select statement must not contain a "<".
It's late and maybe I don't see the forest for the trees. Can anybody give me a tipp??
Edit:
The background of the problem is that I have an XML file named source.xml. This contains the element:
<MyElement>Text</MyElement>
I'd like to do an XSL transformation to transform this into another XML file named target.xml with the content
<openTag attribute="Text"> <openTag2>
The document will then be further processed to add the closing elements. So, the fact that the elements are not closed here, does not matter. The resulting file target.xml does not have to be valid XML.
I hope the background helps a bit.
Thanks Norbert