Stanimir Stamenkov wrote:
Mon, 23 Nov 2009 11:20:23 +, /Chris Simmons/:
I raised a bug (which included a patch) over two
years ago due to different behaviour between the Xerces/Xalan
LSSerializer but it has seemingly been ignored.
https://issues.apache.org/jira/browse/XALANJ-2409
I wonder
Mon, 23 Nov 2009 11:20:23 +, /Chris Simmons/:
I raised a bug (which included a patch) over two
years ago due to different behaviour between the Xerces/Xalan
LSSerializer but it has seemingly been ignored.
https://issues.apache.org/jira/browse/XALANJ-2409
I wonder if LSSerializer bugs are f
Chris Simmons wrote on 11/23/2009 06:20:23 AM:
> > It is in Xalan. Their serializer started as a copy of the Xerces one
> > (even has similar package names: org.apache.xml.serialize vs.
> > org.apache.xml.serializer). We didn't want to duplicate the effort
> > anymore and decided to combine forc
It is in Xalan. Their serializer started as a copy of the Xerces one
(even has similar package names: org.apache.xml.serialize vs.
org.apache.xml.serializer). We didn't want to duplicate the effort
anymore and decided to combine forces and the Xalan one was chosen as
the common codebase becau
Right, that's exactly how it works:
public LSSerializer createLSSerializer() {
try {
Class serializerClass = ObjectFactory.findProviderClass(
"org.apache.xml.serializer.dom3.LSSerializerImpl",
ObjectFactory.findClassLoader(), true);
Hi Benson,
As Michael notes, Xerces is now shipped with the serializer.jar
(which contains the xalan serializer). If you have this on your
classpath it will be used.
If you leave it out, then xerces will fall back to it's own
(deprecated) one.
regards
Dick Deneer
Op 22-nov-2009, om 21:54
Hi Michael,
So, if I put Xerces and not Xalan into classpath, and ask a document for
it's implementation, and ask that for the DOMImplementationLS, what do I
get? Whatever Sun tossed into the pot? And if I then add Xalan, do I get the
right one?
--benson
On Sat, Nov 21, 2009 at 10:24 PM, Michae
(Copying xalan-j-users to this thread.)
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org
Michael Glavassevich wrote on 11/22/2009 10:30:49 AM:
> Dick Deneer wrote on 11/22/2009
> 06:33:28 AM:
>
> > Michael,
> >
> > Thank you fo
Dick Deneer wrote on 11/22/2009
06:33:28 AM:
> Michael,
>
> Thank you for this suggestion.
> I can use this. Before I call the serializer I will strip off all
> whitespace in "whitespace-only" complex nodes because otherwise I do
> not get a pretty-print:
> For example:
> String xml = "" +
> "
Michael,
Thank you for this suggestion.
I can use this. Before I call the serializer I will strip off all
whitespace in "whitespace-only" complex nodes because otherwise I do
not get a pretty-print:
For example:
String xml = "" +
" textchild1> ";
resul
Hi Benson,
We're talking about two different implementations of the DOM Level 3
LSSerializer, the more recently developed one in Xalan (serializer.jar
which Xerces now ships and shares with Xalan) and the much older deprecated
one in Xerces. If you're curious about the history on that, there's an
Could I please ask for a bit of clarification? The only LSSerializer I'm
aware of is the DOM level 3 stuff, which, I thought, was the opposite of
obsolete. As someone pointed out here, unlike TraX, it will serialize
doctypes and do other handy things. In general, I'm beginning to prefer the
DOMImpl
You should also be able to control whether spaces are preserved by
registering an LSSerializerFilter.
When I added one to your test program:
if (useXerces)
{
domWriter = new DOMSerializerImpl();
domWriter.setFilter(new LSSerializerFilter() {
Hi Jake,
I just tried your suggestion and the spaces are indeed preserved.
But still, I woud prefer another solution. I do not have any clue
about the xml (I use xerces in a xml editor) and I do not want to
change the xml.
And also I would like to stay with the LSSerializer (it also
serila
Have you tried xml:space="preserve"?
Jake
On 11/20/2009 4:36 PM, Dick Deneer wrote:
I am still using the deprecated LSSerializer because the xalan
serializer has issues with the pretty print.
But when I have simple elements with only space, the serializer produces
empty elements. Is there a twe
I am still using the deprecated LSSerializer because the xalan serializer has issues with the pretty print.But when I have simple elements with only space, the serializer produces empty elements. Is there a tweak to keep the spaces in this elements?Sample xml:text I attached a simple test progra
16 matches
Mail list logo