xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
[XOM-interest] Attribute type CDATA vs. UNDECLARED: how to treat them as equal if they are equal?
- From: Christoph LANGE <ch.lange AT jacobs-university.de>
- To: xom-interest AT lists.ibiblio.org
- Cc: Normen Müller <n.mueller AT jacobs-university.de>
- Subject: [XOM-interest] Attribute type CDATA vs. UNDECLARED: how to treat them as equal if they are equal?
- Date: Thu, 17 Jan 2008 09:35:52 +0100
Dear XOM developers,
in Attribute.Type, the values CDATA and UNDECLARED are distinguished -- a
feature that causes a bug in our application. The bug occurs in a situation
where some documents are originally accessed via DOM (and then converted to
XOM), and others are originally accessed via XOM. In the document from the
DOM source (parsed using the default DocumentBuilderFactory of Java 1.5) and
in the document from the XOM source (parsed using the default builder of XOM
1.2b2), there are two attributes with an identical XML representation. The
one from the DOM source gets an Attribute.Type of UNDECLARED, whereas the
other one is recognized as CDATA, which ultimately makes them unequal
according to the equals() method.
In our application (the pattern matching of the mmlproc math renderer
developed by Normen Müller (Cc); see http://kwarc.info/projects/mmlkit/), we
have so far compared attributes by comparing local name, prefix, type, and
value. Could you give a recommendation how we should compare instead? Just
ignoring the type, if one of the two types to be compared is UNDECLARED?
Thanks in advance,
Christoph
--
Christoph Lange, Jacobs Univ. Bremen, http://kwarc.info/clange, Skype duke4701
-
[XOM-interest] Attribute type CDATA vs. UNDECLARED: how to treat them as equal if they are equal?,
Christoph LANGE, 01/17/2008
-
Re: [XOM-interest] Attribute type CDATA vs. UNDECLARED: how to treat them as equal if they are equal?,
Elliotte Rusty Harold, 01/17/2008
- Re: [XOM-interest] Attribute type CDATA vs. UNDECLARED: how to treat them as equal if they are equal?, Christoph LANGE, 01/21/2008
-
Re: [XOM-interest] Attribute type CDATA vs. UNDECLARED: how to treat them as equal if they are equal?,
Elliotte Rusty Harold, 01/17/2008
Archive powered by MHonArc 2.6.24.