Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] UNDECLARED vs. CDATA

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • To: jcowan AT reutershealth.com
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] UNDECLARED vs. CDATA
  • Date: Thu, 5 Feb 2004 07:22:24 -0500

At 2:14 PM -0500 2/2/04, jcowan AT reutershealth.com wrote:

1) I think the distinction between UNDECLARED and CDATA is unmotivated, since
SAX parsers are required to return undeclared attributes as of type CDATA anyhow.
The only way AFAICT to get UNDECLARED attributes in is to add them yourself.
I suggest using CDATA only and then switching the three-argument constructor
of Attribute to imply it.

This becomes possible in SAX 2.0.1. See http://www.saxproject.org/apidoc/org/xml/sax/ext/Attributes2.html#isDeclared(int) though currently XOM doesn't take advantage of this, it may wish to in the future.


--

Elliotte Rusty Harold
elharo AT metalab.unc.edu
Effective XML (Addison-Wesley, 2003)
http://www.cafeconleche.org/books/effectivexml http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA



Archive powered by MHonArc 2.6.24.

Top of Page