xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Nils_Kilden-Pedersen AT Countrywide.Com
- To: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] Namespaces and attributes
- Date: Wed, 26 Nov 2003 09:50:45 -0800
"Elliotte Rusty Harold" <elharo AT metalab.unc.edu> wrote on 11/25/2003
07:58:17 PM:
> At 9:25 PM -0500 11/25/03, John Cowan wrote:
>
> >I think ':' would be a better indicator: all absolute URIs have to have
':'
> >in them, and no attribute name can.
>
>
> Yes, they can. xml:lang, xml:space, xlink:href, etc. Remember XOM
> accepts qualified names as arguments. Unlike JDOM it does not take
> the prefix and local name as separate arguments.
Also these are not necessarily "real" URIs, they are namespace URIs, which
can really be anything.
>From elharo AT metalab.unc.edu Sun Nov 30 21:16:53 2003
Return-Path: <elharo AT metalab.unc.edu>
Delivered-To: xom-interest AT lists.ibiblio.org
Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206])
by happyhouse.metalab.unc.edu (Postfix) with ESMTP id 44B6020017
for <xom-interest AT lists.ibiblio.org>;
Sun, 30 Nov 2003 21:16:51 -0500 (EST)
Received: (qmail 17608 invoked from network); 1 Dec 2003 01:59:40 -0000
Received: from unknown (HELO [192.168.254.4]) ([216.254.85.72])
(envelope-sender <elharo AT metalab.unc.edu>)
by mail6.speakeasy.net (qmail-ldap-1.03) with RC4-SHA encrypted SMTP
for <xom-interest AT lists.ibiblio.org>; 1 Dec 2003 01:59:40 -0000
Mime-Version: 1.0
X-Sender: elharo AT mail.ibiblio.org
Message-Id: <p06010202bbf01f9fc8f9@[192.168.254.4]>
Date: Sun, 30 Nov 2003 17:43:01 -0500
To: xom-interest AT lists.ibiblio.org
From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
Subject: [XOM-interest] xml: prefix and namespace in XOM
X-BeenThere: xom-interest AT lists.ibiblio.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <xom-interest.lists.ibiblio.org>
List-Unsubscribe: <http://lists.ibiblio.org/mailman/listinfo/xom-interest>,
<mailto:xom-interest-request AT lists.ibiblio.org?subject=unsubscribe>
List-Archive: <https://lists.ibiblio.org/sympa/arc/xom-interest>
List-Post: <mailto:xom-interest AT lists.ibiblio.org>
List-Help: <mailto:sympa AT lists.ibiblio.org?subject=HELP>
List-Subscribe: <http://lists.ibiblio.org/mailman/listinfo/xom-interest>,
<mailto:xom-interest-request AT lists.ibiblio.org?subject=subscribe>
X-List-Received-Date: Mon, 01 Dec 2003 02:16:53 -0000
While working on another problem today I discovered some
inconsistencies with how XOM was handling elements and attributes in
the http://www.w3.org/XML/1998/namespace namespace which normally
bound to the prefix xml. The new scheme is as follows:
1. The prefix xml may only be bound to the namespace URI
http://www.w3.org/XML/1998/namespace (This was supposed to be
enforced previously, but it was possible to sneak around it.)
2. The namespace URI http://www.w3.org/XML/1998/namespace can only be
bound to the prefix xml, not to other prefixes. This is new. It's not
actually part of Namespaces 1.0, but was added in a later erratum. If
this bothers anyone, I could see taking the constraint out.
3. Elements can now begin with the prefix xml. Previously they
couldn't, though that was an unintentional bug. This feels flaky to
me. On the one hand, the xml: prefix is reserved for use by the W3C,
and they have not defined any use of xml: in element names. On the
other hand, there's nothing to say they won't in the future. I
noticed the problem when I was writing a filter to convert all
non-namespace attributes to child elements, and it got tripped up by
xml:base and xml:lang attributes.
None of these changes affect the API in any way. I'm not perfectly
comfortable with this (probably just because the xml: prefix is one
of the uglier parts of XML and no solution could be perfectly
comfortable) so if anyone has an opinion or an argument about why
doing it some other way would be better, I'm open to suggestions.
--
Elliotte Rusty Harold
elharo AT metalab.unc.edu
Effective XML (Addison-Wesley, 2003)
http://www.cafeconleche.org/books/effectivexml
http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA
-
[XOM-interest] Namespaces and attributes,
Mik Lernout, 11/25/2003
-
Re: [XOM-interest] Namespaces and attributes,
Elliotte Rusty Harold, 11/25/2003
-
Re: [XOM-interest] Namespaces and attributes,
Nils_Kilden-Pedersen, 11/25/2003
-
Re: [XOM-interest] Namespaces and attributes,
John Cowan, 11/25/2003
-
Re: [XOM-interest] Namespaces and attributes,
Elliotte Rusty Harold, 11/25/2003
- Re: [XOM-interest] Namespaces and attributes, Nils_Kilden-Pedersen, 11/26/2003
-
Re: [XOM-interest] Namespaces and attributes,
Elliotte Rusty Harold, 11/25/2003
-
Re: [XOM-interest] Namespaces and attributes,
John Cowan, 11/25/2003
-
Re: [XOM-interest] Namespaces and attributes,
Nils_Kilden-Pedersen, 11/25/2003
-
Re: [XOM-interest] Namespaces and attributes,
Elliotte Rusty Harold, 11/25/2003
Archive powered by MHonArc 2.6.24.