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: "Michael Kay" <mike AT saxonica.com>
  • To: "'peter murray-rust'" <pm286 AT cam.ac.uk>, "'Elliotte Harold'" <elharo AT metalab.unc.edu>
  • Cc: 'xom-interest' <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Scope of namespaces
  • Date: Tue, 7 Feb 2006 11:23:54 -0000

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

Michael Kay
http://www.saxonica.com/






Archive powered by MHonArc 2.6.24.

Top of Page