Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XOM and the infoset

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: "Michael Fitzgerald" <mike AT wyeast.net>, "XOM" <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] XOM and the infoset
  • Date: Fri, 11 Oct 2002 09:05:59 -0400

At 12:35 PM -0700 10/10/02, Michael Fitzgerald wrote:
This is merely an exercise in curiosity.

I've been thinking about whether it's possible to use XOM to
straightforwardly* extract values related to the infoset's 54 properties. I
am somewhat familiar with XOM's interface, so I took a stab at what I think
it can do. Each property is annotated with a 'yes' or 'no', answering
whether I think XOM can get the desired value. I certainly may be off in my
assessments. So far, XOM scores 32 gettable properties of 54 (59%). If
anyone can up the percentage, that'd be great.

There's a lot of crud in the InfoSet I deliberately avoid. In particular, the InfoSet mixes in lots of syntax with the model. XOM is scrupulous about not confusing the two.

*by /straightforwardly/ I mean it has classes and methods with a direct or
indirect relationship to the property, which allow one to determine a value.

2.1. The Document Information Item
[children] yes
[document element] yes
[notations] no
[unparsed entities] no

I originally thought I might want to add this, but then it occurred to me that JDOM doesn't have them and that in more than two years, not one person has ever asked for them. I also noticed that whenever I explain these things in my books, the examples are extremely stretched.

I'll probably add this if anybody ever asks for them, but until then I think I'll keep the API simpler.

[base URI] yes
[character encoding scheme] yes

I don't think you can get this.

2.5. Unexpanded Entity Reference Information Items
[name] no
[system identifier] no
[public identifier] no
[declaration base URI] no
[parent] no

This is a little different. There are no Unexpanded Entity Reference Information Items in XOM. XOM always resolves all entities or throws an exception. Thus XOM supports access to the properties for every Unexpanded Entity Reference Information Item that exists (which is the empty set).

2.6. Character Information Items
[character code] yes, sort of
[element content whitespace] yes, sort of

I don't think this is available.
--

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo AT metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| XML in a Nutshell, 2nd Edition (O'Reilly, 2002) |
| http://www.cafeconleche.org/books/xian2/ |
| http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/ |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+




Archive powered by MHonArc 2.6.24.

Top of Page