xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: peter murray-rust <pm286 AT cam.ac.uk>
- To: Elliotte Harold <elharo AT metalab.unc.edu>
- Cc: xom-interest <xom-interest AT lists.ibiblio.org>
- Subject: Re: [XOM-interest] Scope of namespaces
- Date: Mon, 06 Feb 2006 19:39:09 +0000
At 13:13 06/02/2006, Elliotte Harold wrote:
peter murray-rust wrote:
Many thanks for all the useful feedback.
Personally as a user of XOM I would find it much easier if all namespaces were easily available in all their descendant elements.
You can get a list of the namespaces in scope on an element using an XPath query such as
Nodes namespaces = element.query("namespace::node()");
I think this will do what I want.
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.
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.
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
-
Re: [XOM-interest] Scope of namespaces
, (continued)
- Re: [XOM-interest] Scope of namespaces, Michael Kay, 02/06/2006
-
Re: [XOM-interest] Scope of namespaces,
Elliotte Harold, 02/05/2006
-
Re: [XOM-interest] Scope of namespaces,
Michael Kay, 02/06/2006
- Re: [XOM-interest] Scope of namespaces, Elliotte Harold, 02/06/2006
- Re: [XOM-interest] Scope of namespaces, Elliotte Harold, 02/06/2006
- Re: [XOM-interest] Scope of namespaces, Steve Loughran, 02/06/2006
-
Re: [XOM-interest] Scope of namespaces,
Michael Kay, 02/06/2006
-
Re: [XOM-interest] Scope of namespaces,
Steve Loughran, 02/06/2006
- Re: [XOM-interest] Scope of namespaces, Elliotte Harold, 02/06/2006
- Re: [XOM-interest] Scope of namespaces, Elliotte Harold, 02/06/2006
-
Re: [XOM-interest] Scope of namespaces,
Elliotte Harold, 02/06/2006
-
Re: [XOM-interest] Scope of namespaces,
peter murray-rust, 02/06/2006
-
Re: [XOM-interest] Scope of namespaces,
Steve Loughran, 02/06/2006
- Re: [XOM-interest] Scope of namespaces, Ed Davies, 02/06/2006
-
[XOM-interest] uuid generation (was Re: Scope of namespaces),
Tatu Saloranta, 02/06/2006
-
Re: [XOM-interest] uuid generation (was Re: Scope of namespaces),
Steve Loughran, 02/07/2006
- Re: [XOM-interest] uuid generation (OT), Tatu Saloranta, 02/07/2006
-
Re: [XOM-interest] uuid generation (was Re: Scope of namespaces),
Nils Kilden-Pedersen, 02/07/2006
- Re: [XOM-interest] uuid generation (was Re: Scope of namespaces), Wolfgang Hoschek, 02/07/2006
- Re: [XOM-interest] uuid generation (was Re: Scope of namespaces), Steve Loughran, 02/07/2006
- Re: [XOM-interest] uuid generation (was Re: Scope of namespaces), Tatu Saloranta, 02/07/2006
- Re: [XOM-interest] uuid generation (was Re: Scope of namespaces), Wolfgang Hoschek, 02/07/2006
-
Re: [XOM-interest] uuid generation (was Re: Scope of namespaces),
Steve Loughran, 02/07/2006
-
Re: [XOM-interest] Scope of namespaces,
Steve Loughran, 02/06/2006
-
Re: [XOM-interest] Scope of namespaces,
peter murray-rust, 02/06/2006
Archive powered by MHonArc 2.6.24.