[jdom-interest] Standalone attribute in <?xml PI
arosen at silverstream.com
Tue Mar 12 10:17:53 PST 2002
The standalone attribute is not currently supported by XMLOutputter, but it
could easily be added, and for completeness it seems like it should be.
You'd have to allow it to be "yes" or "no" or absent altogether, so maybe
setStandaloneValue(String) would be the simplest API.
It is tempting to make the XML declaration a PI, but I don't think it's the
right thing to do. The spec defines it as not being a PI, and when parsing
it's not passed along as a PI. If you added it to your document as a PI to
control the XML delcaration, then the document that you read back in
afterwards would be different from the one you emitted (because this special
PI would no longer be there).
> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of Christian Holmqvist,
> IT, Posten
> Sent: Friday, March 08, 2002 3:27 AM
> To: Jdom-Interest (E-mail)
> Subject: [jdom-interest] Standalone attribute in <?xml PI
> I'm rather new to XML so bare with me if I don't have all the exactly
> correct terms and expressions going on yet... *smile*
> How to I add the standalone attribute to the <?xml
> ProcessInstruction (or
> more exactly xml file first line) or how do I change it from
> YES to NO and
> the other way around?
> I have been looking throgh the archive and seen some discussions about
> putting the control of this (together with encoding) in the
> thingy. The thing is that I can not see the different between this
> ProcessIntruction and other PIs (oki, parsing and well form
> ness is hard to
> do without it...). Why not let <?xml be a odernary PI that
> can be changed,
> removed and added. If it is missed when trying to pass it to
> a parser the
> parser WILL complain with some form of error msg...
> Hmm oki, thank you for your time!
> To control your jdom-interest membership:
> uraddr at yourhost.com
More information about the jdom-interest