OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: More on Namespaces (also long, but also optimistic)

[ Lists Home | Date Index | Thread Index ]
  • From: Peter Murray-Rust <peter@ursus.demon.co.uk>
  • To: XML Dev <xml-dev@ic.ac.uk>
  • Date: Sun, 16 Aug 1998 19:20:22

At 17:36 16/08/98 +0200, james anderson wrote:
>Peter Murray-Rust wrote:
>> There seems to be a certain amount of gloom over namespaces. I think this
>I hope that neither the tone nor the content of my posts has contributed to
>this impression. 

Not at all. There are some people who worry about the inability to validate
documents which use namespaces. My posting was to try to clarify (at least
in my own mind) the issues involved. I personally feel that namespaces have
not prevented us from doing anything we could do already.

>> We still don't need namespaces at this stage, just unique names. But we do
>> need the tools. And these tools may have to convert DTDs quite often and
>> keep track of which ones are used.
>This point is not clear. You describe exactly the purpose which namespaces
>general) serve. Given attribute-based bindings, there is no reason to yield
>the prefix.

What I meant is that the documents could appear without the xmlns
attributes. We have identified the problem as being that of renaming names
in the DTD, which I contended was independent of whether we used an xmlns

>> The problems ONLY arise when we start trying to put some semantics/meaning
>> on the names. Since we don't have much experience at this for unqualified
>> names it's not surprising we find it hard. The main namespace problems
>> therefore are:
>>         (a) - what does FOO mean? (in <FOO> and FOO="baz")
>>         (b) - can I attach meaning through algorithms (schemas,
stylesheets, Java)
>>         (c) - can I identify the same FOO in different documents even if
it has
>> different prefixes?
>(c) is incomplete: both sameness and difference matter to identity;
>                   intra-document identity matters.
>          (c.i)  - can I identify the a FOO even if it occurrs have with
>different prefixes?
>          (c.ii) - can I identify different FOO in a given documents even if
>they occur
>                   with the same prefix?
>> Namespaces ONLY address the third concern. This may not even be important
>> if (a) and (b) are not solved.
>If (c) is not addressed, it is not possible to address (a) and (b). One
>say that the something in the given examples means "what FOO means" until one
>can say that the something "is" "FOO".

Agreed. I probably put them in the wrong order. (a) and (b) are 'harder'
problems than (c).

>Enabling architectures, for example, provide the ability to remap attributes.
>Despite the fact that the word "namespace" never appears in the standard
>document, the remapping mechanism performs exactly that function.
>> [There is another aspect to namespaces - scoping. IMO this is simply a
>> minimisation procedure.
>The issues scope and extent are not directly related to minimisation. That it

Ah. If that is true, then I need to clarify my thoughts. My understanding
was that 'scope' per se had no agreed meaning in the document other than to
bind unique names to names. If those names were explicitly prefixed, then
scope would be irrelevant. But I suspect other people put more meaning on
scope. Example
<H:HTML xmlns:H="http://w3.org/html">
  <P>An HTML paragraph</P>

<H:HTML xmlns:H="http://w3.org/html">
  <H:P>An HTML paragraph</H:P>

I regard these documents as being syntactically identical. (a) is simply a
minimised version of (b). The H:P element has the same unique name in both.
That it is within a given scope should be irrelevant to the application. As
far as the application is concerned it gets two elements with universal names:

"http://w3.org/html HTML" and
"http://w3.org/html P"

One happens to be a child of the other, that is all. The fact that P is in
the scope of the xmlns declaration seems unimportant. If I'm wrong on this,
then application programmers are going to have some tough programming. 


>> I cannot see, with the best will we have, how we can possibly build a DTD
>> that can validate this (unless it's a VERY formal document - legal, patent,
>> safety, etc.) It's an n-squared problem.
>It is not an n^2 problem. It is a On problem. Each DTD-(fragment) must be

I meant that the problem of checking unique prefixes is O(n^2).  If I have
6 namespaces in a document (or DTD) and bring in another I have to make 6
checks that the prefixes do not clash, - n(n-1)/2 in all.

>Note that the binding which effects the VHG:termEntry needs to be in the
>containing element. Otherwise a consistent mechamism cannot be used to
>determine its corresponding universal name unambiguously, given possible
>attribute defaults.
><?xml version="1.0"?>
><!DOCTYPE VanityHG [
>  <!ENTITY %VanityDTD
>           SYSTEM "http://VanityHouseAndGarden.org.uk/DTD/VHG.dtd" >
>           SYSTEM "http://VHG.org.uk/DTD/VHG.dtd" >
>  <!-- assert the prefix for Vanity... here -->
>  <?namespace  prefix=''  ns="http://VanityHouseAndGarden.org.uk" ?>
>  %VanityDTD
>  <!-- assert the prefix for VHG... here -->
>  <?namespace  prefix=''  ns="http://vhg.org.uk" ?>
>  <!-- i suggest that the scope of the preceeding namespace end here -->
><?namespace prefix='VanityHG' ns="http://VanityHouseAndGarden.org.uk" ?>

I'm lost with these PIs. I thought they had disappeared....


Thanks for taking the time to read it in detail. It may be worth rehashing
what I wrote.
Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS