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: Steve Loughran <steve.loughran AT gmail.com>
  • Cc: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Scope of namespaces
  • Date: Mon, 6 Feb 2006 19:49:49 +0000

On 2/6/06, peter murray-rust <pm286 AT cam.ac.uk> wrote:

> At the risk of appearing foolish, I'll outline my reason for using
> this construct. When I saw "xsd:double" etc. in XSD I assumed this
> was a useful extension of XML. Also, because QName was a defined
> dataType in XSD I assumed this was a Good Thing To Do.


People always start off by following the things their tools make easy,
and the example they set. A case in point is VB apps. Alan Cooper, in
his UI design books, complains that people used his invention, Visual
Basic, to produce apps with windows that pop up everywhere, claiming
that VB did it that way for a reason, and most other apps dont have a
valid reason. But really its his fault: VB set the example -windows
everywhere- and made it trivially easy to add and show windows. End
result: windows everywhere.

XSD is like that. It does things that cause trouble not just for the
implementors of parsers, but for everyone who copies the design or
makes use of xsd:qname datatypes. I know, I work with many specs like
that, not least being WSDL.

>
> I have a need to access (remote) objects by their ids, and as I
> cannot guarantee that they are unique across the planet (our
> community is too anarchic) I assume they are locally unique within a
> file (document) identified by a namespace. Thus:
> <scalar xmlns:foo="http://foo"; dictRef="foo:abc">1.23</scalar>
> points to the object with id="abc" within a namespace of http://foo.
> This allows any document creator to identify a document with a
> namespace (unrelated to the namespace on the elements). So there are
> times when I need to compare a namespace with the namespaces in scope
> in the document.

The other way is just to have a URI and mandate that the URI must be
unique, and use the uuid: schema in all your examples; java1.5 has an
easy (but not effficient) way to generate UUIDs for you.
> 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.
>
> P.
>
>
> Peter Murray-Rust
> Unilever Centre for Molecular Sciences Informatics
> University of Cambridge,
> Lensfield Road, Cambridge CB2 1EW, UK
> +44-1223-763069
>
> _______________________________________________
> XOM-interest mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
>




Archive powered by MHonArc 2.6.24.

Top of Page