Sylvain Wallez wrote:
Hi all,
I found a weird behaviour in XMLSerializer: it apparently ignores
start/endElement events that are between start/endEntity events, and
only keeps character events, thus removing all the markup.
This occurs when the pipeline starts with a by parsing a file
containing entities (using the file generator) and ends with the XML
serializer with no XSL transformations inbetween. This problem doesn't
appear when an XSL is present as if buffers the SAX stream to build
its own internal DOM and then processes that DOM.
I've setup a test example to show this: update the 2.1.x branch and
point your browser to
http://localhost:8888/samples/test/serialized-entities/explain-test.html
Is this a known problem? Should we filter out start/endEntity events
in XMLSerializer?
Torsten suggested me on IM to try the serializer in the serializer
block, and... it works just fine!
Grmbl... so much time lost with Xalan issues... Should we fix them
ourselves or switch to Saxon and Pier's serializer as the default?
Sylvain
--
Sylvain Wallez Anyware Technologies
http://people.apache.org/~sylvain http://www.anyware-tech.com
Apache Software Foundation Member Research & Technology Director