Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Sparta: similar to XOM.

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: "O'Brien-Strain, Eamonn" <eob AT exch.hpl.hp.com>, "'xom-interest AT lists.ibiblio.org'" <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Sparta: similar to XOM.
  • Date: Sat, 28 Sep 2002 09:01:38 -0400

At 4:45 PM -0700 9/27/02, O'Brien-Strain, Eamonn wrote:


-- Sparta does not handle namespaces specially. But it does the correct thing in the usual case that the same prefix is always used for the same namespace URI. (The W3C wrapper around Sparta does however implement namespaces properly.)

No, it doesn't. It works in the case where you know the prefix in advance. That's not at all the same thing. Using Sparta I can write a generic XLink processor that finds all "xlink:href" attributes. However, I can't write an XLink processor that finds all attributes with the local name "href" and the namespace URI "http://www.w3.org/TR/1999/xlink"; regardless of prefix. At least I can't without writing my own namespace processing code to layer on top of Sparta.

Sparta appears to be an XML 1.0, pre-namespaces API. It basically ignores namespaces. They can be treated as normal attributes, and the namespace handling logic can be rolled into application code. This is essentially the SAX1/DOM1 approach. But that's really painful, which is why we have SAX2 and DOM2.
--

+-----------------------+------------------------+-------------------+
| 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