Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Is XML Text or CDATA that includes the zero character legal?

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Wolfgang Hoschek <whoschek AT lbl.gov>
  • To: Wolfgang Hoschek <whoschek AT lbl.gov>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Is XML Text or CDATA that includes the zero character legal?
  • Date: Thu, 28 Jul 2005 01:30:13 -0700

Sorry, on a second look XOM seems to agree with Saxon and Xerces wrt. Text. My mistake.

The question then becomes: Is it legal to have the zero character *anywhere* in a string used in a XOM document? That, is, perhaps inside element names, attribute names, attribute values, CDATA, comments, pis, namespace prefix or URI, DTD subset, etc?
I'm hoping the answer may be that it's not legal anywhere in XML...

Wolfgang.

On Jul 28, 2005, at 1:15 AM, Wolfgang Hoschek wrote:

Is it legal to have XML Text or CDATA that includes the zero character?
For example, is this legal?

char c = (char)0;
new Text(String.valueOf(c));

XOM's Verifier seems to say it's legal, whereas the Xerces and Saxon
method XMLChar.isContent() suggest it's not legal.

Further, am I right in that a zero character must not appear in a
surrogate?

Any advice or clarification? Thanks,
Wolfgang.
_______________________________________________
XOM-interest mailing list
XOM-interest AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/xom-interest






Archive powered by MHonArc 2.6.24.

Top of Page