Skip to Content.
Sympa Menu

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

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Michael Kay" <mike AT saxonica.com>
  • To: "'Wolfgang Hoschek'" <whoschek AT lbl.gov>, <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Is XML Text or CDATA that includes the zerocharacter legal?
  • Date: Thu, 28 Jul 2005 10:23:50 +0100

In XML 1.0 no C0 characters other than x9, xA, or xD are permitted.

In XML 1.1 all C0 characters other than X0 are permitted. A concession,
apparently, to people still writing in archaic programming languages that
treat 0 as a string terminator...

Michael Kay
http://www.saxonica.com/


> -----Original Message-----
> From: xom-interest-bounces AT lists.ibiblio.org
> [mailto:xom-interest-bounces AT lists.ibiblio.org] On Behalf Of
> Wolfgang Hoschek
> Sent: 28 July 2005 09:15
> To: xom-interest AT lists.ibiblio.org
> Subject: [XOM-interest] Is XML Text or CDATA that includes
> the zerocharacter legal?
>
> 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