View Single Post
  #2 (permalink)  
Old August 20th, 2014, 01:01 AM
JohnBampton JohnBampton is offline
Friend of Wrox
Points: 533, Level: 8
Points: 533, Level: 8 Points: 533, Level: 8 Points: 533, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2009
Posts: 119
Thanks: 25
Thanked 3 Times in 3 Posts
Default

I figured it out myself. The code was like this:

<xsl:character-map name="a">
<xsl:output-character character="&lt;" string="&lt;"/>
<xsl:output-character character="&gt;" string="&gt;"/>
</xsl:character-map>

<xsl:output omit-xml-declaration="yes" indent="no" encoding="UTF-16" use-character-maps="a"></xsl:output>


<xsl:template match="hl7:linkHtml | linkHtml">
<xsl:text>&lt;a</xsl:text>
<xsl:for-each select="attribute::*">
<xsl:text> </xsl:text>
<xsl:value-of select="name(.)"></xsl:value-of>
<xsl:text>=""</xsl:text>
<xsl:value-of select="."></xsl:value-of>
<xsl:text>""</xsl:text>
</xsl:for-each>
<xsl:text>&gt;</xsl:text>
<xsl:apply-templates mode="serialize"/>
<xsl:text>&lt;/a</xsl:text>
<xsl:text>&gt;</xsl:text>
</xsl:template>