[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Binary XML" proposals
- From: Martin Gudgin <marting@develop.com>
- To: Al Snell <alaric@alaric-snell.com>, Joe English <jenglish@flightlab.com>
- Date: Tue, 10 Apr 2001 21:24:20 -0400
----- Original Message -----
From: "Al Snell" <alaric@alaric-snell.com>
To: "Joe English" <jenglish@flightlab.com>
Cc: <xml-dev@lists.xml.org>
Sent: Tuesday, April 10, 2001 2:41 PM
Subject: Re: "Binary XML" proposals
>
> Correct me if I'm wrong - there is absolutely no semantic significance in
> the choice of namespace prefix, right?
There is no significance in the choice of namespace prefix. However, this
does not mean the namespace prefix is irrelevant, see below...
>
> <foo:hello xmlns:foo="asdf" />
>
> ...identical to...
>
> <bar:hello xmlns:bar="asdf" />
>
> ...my encoding will discard the prefixes foo and bar; will this in any way
> ever matter, even slightly?
It depends on what you're doing. If you're dealing with XML that contains
namespace qualified XPath expressions or other values that contain QNames
then you at least need to know which namespace prefixes and associated
namespace URIs are in scope for any given element.
For example in XML Schema QNames are used to refer to types;
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' >
<xs:complexType name='Person'>
<xs:sequence>
<xs:element name='Name' type='xs:string' />
<xs:element name='Age' type='xs:double' />
<xs:element name='Height' type='xs:float' />
</xs:sequence>
</xs:complexType>
</xs:schema>
Note that the type attribute on the element declarations all contain QNames.
In this case the QNames refer to types in the namespace that the xs prefix
maps to. So you need to know that xs maps to
http://www.w3.org/2001/XMLSchema
Regards
Martin Gudgin
DevelopMentor