Hey,
So this may be a strange request but I'll give it a go. I have an xml document
<?xml version="1.0" encoding="utf-8" ?>
<Page>
<ID>Site</ID>
<Object>
<ID>PostCode</ID>
<Type>div</Type>
<Class>display-label</Class>
<Value>PostCode</Value>
</Object>
<Object>
<ID>PostCodeValue</ID>
<Type>div</Type>
<Class>display-field</Class>
<Value>$PostCode</Value>
</Object>
</Page>
and I'm using this XSL to transform it into a html page
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<html>
<head>
</head>
<body>
<xsl:for-each select="Page/Object">
<<xsl:value-of select="Type"/>>
<xsl:value-of select="Value"/>
</<xsl:value-of select="Type"/>>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
As you can see I'm trying to generate the correct html tag dependent on the type node in the xml. The problem is "<" isn't accepted in the xsl and encoding it stops it from being recognised as a tag.
Any suggestions how I'd go about this?
Thanks in advance