Three problems with XslCompiledTransform

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi there,

I have three awkward problems when using the class XslCompiledTransform for a stylesheet transformation. The original root element looks like this:
(see XSLT posted below)
<br/>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:trolltech="urn:trolltech:names:ts:document:1.0 <br/>
<br/>
Strangely enough, the stylesheet transformation doesnt work at all in this case. However, it does work fine, if I remove the namespace attributes and use the following root element:
<br/>
<br/>
<xliff version="1.2
<span><br/>
In this case, though, there are two additional problems with the transformation: <br/>
- Unix line endings in the source are converted to Windows line endings <br/>
- the XML entity &quot; gets resolved to ", but should be left as is <br/>
<br/>
This behaviour is independent of the tool I use for the transformation (I also tried Altova XMLspy).
<br/>
Has anyone come across this before? Any idea what is going on here? <br/>
<br/>
Cheers, <br/>
<br/>
Martin

<pre><?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>


<xsl:template match="@*|node()
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>[/code]
<br/>


View the full article
 
Back
Top