Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Scope of namespaces

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: peter murray-rust <pm286 AT cam.ac.uk>
  • To: "Michael Kay" <mike AT saxonica.com>, "'Elliotte Harold'" <elharo AT metalab.unc.edu>
  • Cc: 'xom-interest' <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Scope of namespaces
  • Date: Wed, 08 Feb 2006 06:41:25 +0000

At 11:23 07/02/2006, Michael Kay wrote:
> Recent discussion suggests that namespaced attribute and content
> values are considered harmful. It is possible to construct a system
> which does the same independently of XML machinery but it is more
> work and I thought I was gaining something from XML that helped.

Using namespace prefixes in content is a very natural thing to do: if they
make sense in names, then they make sense in content, because if objects are
identified by QNames then you want to use those QNames within your content
to refer to those objects. You can't keep data and metadata separate. That's
why XSLT and XML Schema use this device so extensively. But it's true that
it gives you problems, because it means that your content is dependent on
namespace prefixes in a way that isn't apparent to the XML parser (even in
the case where you have a schema that declares it as an xs:QName).

So it's simplistic to say "don't do it". Just be aware of the consequences.

Many thanks to everyone. Michael's post echoes my current feelings; having raised this issue and (partially) understood it I am happy to follow and accept what XOM comes up with. "foo:bar" in content is extremely useful, memorable (unlike a UUID or a namespaceURI+id) and is robust enough for our applications. I am not at this stage worried about performance - Jumbo is a reference implementation and validation system.

P.

Peter Murray-Rust
Unilever Centre for Molecular Sciences Informatics
University of Cambridge,
Lensfield Road, Cambridge CB2 1EW, UK
+44-1223-763069




Archive powered by MHonArc 2.6.24.

Top of Page