[jdom-interest] XMLOutputter in nonewline mode
guru at edamame.stinky.com
Mon Oct 2 08:35:25 PDT 2000
Ooooh, BNF! I like it. I'll make the change to the next rev of
XMLOutputter unless I hear otherwise.
James, if you want to do it on your own file, the fix is trivial; just
change that line I mentioned before to
>  prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?
>  XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
>  VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ")
>  Eq ::= S? '=' S?
>  VersionNum ::= ([a-zA-Z0-9_.:] | '-')+
>  Misc ::= Comment | PI | S
> Important part is that XMLDecl ends with '?>' and has no need for
> whitespace afterwards, and the prolog defines the whitespace as optional
> (Misc* with class "S" as whitespace)
>  document ::= prolog element Misc*
> This shows that from the document standpoint, no whitespace needs to
> follow the prolog.
More information about the jdom-interest