This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Non-validating XSL processors


Matthew Bentley writes:
 > >But the simple way to solve the problem (assuming that it's a real problem
 > >and not imagined) is to preprocess the source XML to replace the ampersands
 > >with something else, and then postprocess the output to put them back
 > again.
 > 
 > Thanks Mike - this is actually what I've been doing - I translate from '&'
 > to '$!$' - I was just wondering whether theres an alternative-
 > Matt

put 

<!ENTITY foo "<Entity name='foo'>">

in the XML (ie redefine them) and then

<xsl:template match="Entity">
 <xsl:value-of  disable-output-escaping="yes" select="'&amp;"/>
 <xsl:value-of select="@name"/>
 <xsl:value-of  disable-output-escaping="yes" select=";"/>
</xsl:template>

in your XSL.

Dirty, isnt it.

Sebastian


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]