You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Gary L Peskin <ga...@firstech.com> on 2000/09/26 05:58:42 UTC
XalanJ2 XMLSerializer problems
I've started working quite a bit with XalanJ2. I'm trying to port the
Nodeset extension function as a first project and the implementation is
going to have to be be somewhat different from XalanJ1. This is because
RTFs appear to be passed as a org.apache.xerces.dom.DocumentFragmentImpl
rather than a org.apache.xalan.xslt.ResultTreeFrag. This actually works
out better for me. I have some further testing and investigation to see
if this is always the case.
However, I came across this problem with the outputting which seems to
be in the way that XMLSerializer is used.
To recreate the problem:
------- Input XML -------
<?xml version="1.0" encoding="UTF-8"?>
<root/>
------- Input XSL -------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl
="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="greeting">abc<h1>Hello,
World!</h1>def</xsl:variable>
<xsl:template match="root">
Test of copying an RTF
*<xsl:copy-of select="$greeting"/>*
</xsl:template> -->
</xsl:stylesheet>
-------- Output XML --------
Test of copying an RTF
*abc<?xml version="1.0" encoding="UTF-8"?>
<h1>Hello, World!</h1>def*
-----------------------------
Note how the XML declaration comes in the middle of the output document,
just before the first element <h1>.
1. Is someone aware of this?
2. Is someone working on this?
3. Can you reproduce the problem?
4. Should I work on it?
Gary