Re: XMLSerializer outputs unqualified attributes?

2005-03-28 Thread Emmanouil Batsis
Emmanouil Batsis wrote: When using org.apache.xml.serialize.XMLSerializer, attributes come out unqualified (no namespace prefix) when their parent element belongs to the same namespace. The parent element however, does come out qualified. It works correctly if i specify the qname (before i was

RE: XMLSerializer

2004-02-25 Thread John Hughes
Found what was causing this. When using setPreserveSpace(false) in the OutputFormat the serializer converts '\n' to ' '. What is the rationale for this? John > -Original Message- > From: John Hughes [mailto:[EMAIL PROTECTED] > Sent: 25 February 2004 11:30 > To: [EMAIL PROTECTED] > Subje

RE: XMLSerializer attributes and carriage returns - bug?

2003-05-08 Thread Thomas Greenwood
3.   Cheers   -Original Message-From: Joseph Kesselman [mailto:[EMAIL PROTECTED]Sent: 06 May 2003 14:30To: [EMAIL PROTECTED]Subject: RE: XMLSerializer attributes and carriage returns - bug?>The resulting XSLT is then misinterpreted by Xalan (matching a space rather >than a CR o

RE: XMLSerializer attributes and carriage returns - bug?

2003-05-08 Thread Thomas Greenwood
On Tue, 2003-05-06 at 23:39, Simon Kitching wrote: > Do you mean that you have done: > > Element someElement = doc.createElement("e"); > someElement.setAttribute("foo", "abc\ndef"); > > then tried to serialize a document containing the above attribute, > hoping to get this? > > > > but inst

Re: XMLSerializer attributes and carriage returns - bug?

2003-05-06 Thread Simon Kitching
On Tue, 2003-05-06 at 22:34, Thomas Greenwood wrote: > I have an XML document that contains carriage returns and line feeds in > attributes. When I serialize this document with XMLSerializer these > carriage returns and line feeds appear in the output as exactly that - but > this then causes probl

RE: XMLSerializer attributes and carriage returns - bug?

2003-05-06 Thread Joseph Kesselman
>The resulting XSLT is then misinterpreted by Xalan (matching a space rather >than a CR or LF) You still haven't shown us the relevant portion of the document. If these characters appear in an Attribute value, that's correct parser operation per XML's rules. See http://www.w3.org/TR/REC-xml#AVNo

Re: XMLSerializer attributes and carriage returns - bug?

2003-05-06 Thread Joseph Kesselman
> When I serialize this document with XMLSerializer these > carriage returns and line feeds appear in the output as exactly that - but > this then causes problems using the document as an XSLT It's hard to offer specific advice without seeing a specific example, but: 1) Remember that XML normali

RE: XMLSerializer attributes and carriage returns - bug?

2003-05-06 Thread Thomas Greenwood
se functions never do anything different for attribute or element text. Cheers -Original Message- From: Constantine Georges [mailto:[EMAIL PROTECTED] Sent: 06 May 2003 13:52 To: [EMAIL PROTECTED] Subject: Re: XMLSerializer attributes and carriage returns - bug? Have you tried setting

Re: XMLSerializer attributes and carriage returns - bug?

2003-05-06 Thread Constantine Georges
Have you tried setting preserve space to true in the OutputFormat object? I thought that XMLSerializer normalized space unless you told it otherwise. It also truncates long lines unless you tell it otherwise. I know that line truncation is by design, so I'm assuming that space normalization is a

RE: XMLSerializer: Escaping of single quotes

2002-07-25 Thread Thomas Börkel
6:10 > To: [EMAIL PROTECTED] > Subject: Re: XMLSerializer: Escaping of single quotes > > > Hi Thomas, > > Thomas Börkel wrote: > > The XMLSerializer escapes single quotes ('). Why? If I want > to transfrom the string back into a Document object, > un-escaped si

Re: XMLSerializer: Escaping of single quotes

2002-07-23 Thread Elena Litani
Hi Thomas, Thomas Börkel wrote: > The XMLSerializer escapes single quotes ('). Why? If I want to transfrom the > string back into a Document object, un-escaped single quotes work pretty > well. Escaping <, > and & is OK, but why '? I believe this is done to avoid the problems in HTML (which Jo

Re: XMLSerializer: Escaping of single quotes

2002-07-23 Thread Joseph Kesselman
Could you provide an example where you think single quotes are being escaped unnecessarily? I haven't seen an instance of this... In text content of an element, we shouldn't have to escape them. In the value of an attribute, we may have to if the value is quoted with ' characters -- but Xalan no

RE: XmlSerializer putting xmlns="" on children of root element

2002-02-28 Thread Eric_Schwarzenbach
schke" gmx.de> cc: Subject: RE: XmlSerial

RE: XmlSerializer putting xmlns="" on children of root element

2002-02-28 Thread Julian Reschke
> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 28, 2002 11:47 PM > To: [EMAIL PROTECTED] > Subject: RE: XmlSerializer putting xmlns="" on children of root element > > > > > Hmmm. > > > If you don't want the

RE: XmlSerializer putting xmlns="" on children of root element

2002-02-28 Thread Eric_Schwarzenbach
> Hmmm. > If you don't want the "foo" prefixes, why do you specify them? Note: it's > perfectly OK not to specfiy a prefix when using createElementNS(). Maybe that is my problem? My understanding from the javadoc and what else I could find to read was that, the second argument to createElementNS

RE: XmlSerializer putting xmlns="" on children of root element

2002-02-28 Thread Julian Reschke
> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 28, 2002 10:51 PM > To: [EMAIL PROTECTED] > Subject: RE: XmlSerializer putting xmlns="" on children of root element > > > > Based on Neil Graham's comments, I'm cur

RE: XmlSerializer putting xmlns="" on children of root element

2002-02-28 Thread Eric_Schwarzenbach
xception { throw new SAXException("Parse warning: " + se.getMessage() + " at line " + se.getLineNumber() + " col " + se.getColumnNumber()); } } // inner class ErrorHandler } // class FooTest "J

RE: XmlSerializer putting xmlns="" on children of root element

2002-02-28 Thread neilg
IBM Toronto Lab Phone: 905-413-3519, T/L 969-3519 E-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] on 02/28/2002 03:53:58 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: RE: XmlSerializer putting xmlns="" on children of root element Then why does Xerces (and

RE: XmlSerializer putting xmlns="" on children of root element

2002-02-28 Thread Eric_Schwarzenbach
002 03:47 cc: PM Subject: RE: XmlSerializer putting xmlns="" on children of root element Please respond

RE: XmlSerializer putting xmlns="" on children of root element

2002-02-28 Thread neilg
NOT validate with Xerces2. The foo prefixes on the attributes at least are a problem, though the prefixes on the elements is not. Having prefixes on neither (which I'm trying to get) validates also. "Julian Reschke"

RE: XmlSerializer putting xmlns="" on children of root element

2002-02-28 Thread Julian Reschke
(which I'm trying to > get) validates also. > > > > > > > > > > "Julian Reschke" > ><[EMAIL PROTECTED]> > gmx.de> cc: > >

RE: XmlSerializer putting xmlns="" on children of root element

2002-02-28 Thread Eric_Schwarzenbach
"Julian Reschke" gmx.de> cc:

RE: XmlSerializer putting xmlns="" on children of root element

2002-02-28 Thread Julian Reschke
> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 28, 2002 6:22 PM > To: [EMAIL PROTECTED] > Subject: RE: XmlSerializer putting xmlns="" on children of root element > > > > What I want to end up with is a document that does not

RE: XmlSerializer putting xmlns="" on children of root element

2002-02-28 Thread Eric_Schwarzenbach
gmx.de> cc:

Re: XmlSerializer putting xmlns="" on children of root element

2002-02-28 Thread Eric_Schwarzenbach
cc: AM Subject: Re: XmlSerializer putting xmlns="" on children of root element

Re: XmlSerializer putting xmlns="" on children of root element

2002-02-28 Thread neilg
] [EMAIL PROTECTED] on 02/28/2002 11:33:58 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: Re: XmlSerializer putting xmlns="" on children of root element Thanks. But that doesn't seem to be the correct URL... [

Re: XmlSerializer putting xmlns="" on children of root element

2002-02-28 Thread Eric_Schwarzenbach
PM Subject: Re: XmlSerializer putting xmlns="" on children of root element Please respond t

RE: XmlSerializer putting xmlns="" on children of root element

2002-02-28 Thread Julian Reschke
To create elements that are in a particular namespace, you *need* to use createElementNS(). Using createElement() and then trying to attach a namespace attribute is not going to work (or if it does, it's a bug and not DOM-compliant). > -Original Message- > From: [EMAIL PROTECTED] > [mailto

Re: XmlSerializer putting xmlns="" on children of root element

2002-02-27 Thread neilg
Hi Eric, What version of Xerces are you using? A number of serializer bugs have been fixed recently, so it might pay to do a CVS extract to obtain the most recent code. (Or you can obtain recent jars from http://gump.covalent.net, if I have the URL correct.) Cheers, Neil Neil Graham XML Parser

RE: [Fwd: RE: XMLSerializer problem]

2002-02-22 Thread Cirip Tomas
22, 2002 3:40 PM To: [EMAIL PROTECTED] Cc: Elena Litani Subject: Re: [Fwd: RE: XMLSerializer problem] Hi Cirip, After struggling for more than an hour, Elena and I finally found the cause of the problem. And it turned out to be a very interesting one: it doesn't occur on JDK 1.2.2, and does o

Re: [Fwd: RE: XMLSerializer problem]

2002-02-22 Thread sandygao
fully when you download the new jar files next week (or tomorrow), you'll see the fix. Cheers, Sandy Gao Software Developer, IBM Canada (1-905) 413-3255 [EMAIL PROTECTED] Original Message Subject: RE: XMLSerializer problem Date: Thu, 21 Feb 2002 14:20:46 -0500 From: Cirip Tom

RE: XMLSerializer problem

2002-02-21 Thread Cirip Tomas
-Original Message- From: Elena Litani [mailto:[EMAIL PROTECTED] Sent: Thursday, Febr

Re: XMLSerializer problem

2002-02-21 Thread Elena Litani
Hi, I could not reproduce your problem with the newest jars: http://gump.covalent.net/jars/latest/xml-xerces2/ Can you verify that it is fixed in the new version? Thank you! Elena Cirip Tomas wrote: > > Hi, > > I am trying to use XMLSerializer to write XML document to a file. In the > result

RE: XMLSerializer

2001-11-19 Thread Voytenko, Dimitry
Hi Mario, I'm afraid I didn't quite understand you. String or DOM interface are represenations of XML. They are used for different purposes. You don't need DOM to generate output as String, you need to traverse through XML nodes. But if you already have it you can obtain its text representation fo

Re: XMLSerializer

2001-07-02 Thread Bob Foster
This was a problem in 1.2.2 (sometimes the output was indented properly sometimes not, with the same settings) and perhaps later but seems to be fixed in 1.4.1. Bob Foster WebGain - Original Message - From: "Markus Klann" <[EMAIL PROTECTED]> To: "xerces-j-user" <[EMAIL PROTECTED]> Sent: S

Re: XMLSerializer

2001-07-02 Thread Srinivasan D.
When you are serializing, please ensure that you have set your OutputFormat properties properly. For eg, do you have OutputFormat properties set like this OutputFormat of = new OutputFormat(doc); //Serialize DOM of.setPreserveSpace(false); of.setIndent(5); of.setLineWidth(80); it w