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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: Namespace questions

[ Lists Home | Date Index | Thread Index ]
  • From: Peter Murray-Rust <peter@ursus.demon.co.uk>
  • To: "xml-dev@ic.ac.uk" <xml-dev@ic.ac.uk>
  • Date: Thu, 02 Jul 1998 17:39:18

Firstly, I think that there are a lot of questions about namespaces to
which the answers  are assumed but not written down in the spec. For some,
I suspect that most people will make the same assumptions, but for others
there may be differences of opinions.

It has been agreed that the XLink and other specs will have to be updated
to be namespace-aware. I think that until that is published we should
assume we are on thin ice.

At 18:04 02/07/98 +0200, james anderson wrote:
>i'm afraid i'm going to repeat myself, but ...
>Ron Bourret wrote:
>> 1) Can I have multiple prefixes in the same file that point to the same
>> namespace?  The namespace spec doesn't appear to prohibit this.
>from an implementer's point of view, "yes". different prefixes within the
>file should be able to denote the same region in the namespace.
>since all uses of a prefix are in single physical entity are "lexically
>apparent" this shouldn't lead to problems.
>since the namespace pi's can contain literals only, why would one need to
do it?

I agree that this is allowed. A possible use for it is that a document is
composed of contributions by more than one author who use different
prefixes. Example:

<?xml:namespace ns="xml-cml.org" prefix="CML"?>
<?xml:namespace ns="xml-cml.org" prefix="ChemML"?>


doc2 might contain ElementTypes of the form <ChemML:Molecule>

>> 2) How do namespaces and XLinks work together?  For example, suppose I
link to
>> the <Foo> element in another file.
>> a) If the <Foo> element is prefixed (that is, it is really <Bar:Foo>)
does my
>> pointer need to know this?
>the short answer is: "yes".

a slightly longer answer is "yes, but".

If the characters "<Foo>" appear in a file they cannot at present 'really
be "<Bar:Foo>"' (i.e. there is no scoping mechanism). I imagine that this
was not what was intended in the question, but wanted to make sure.

>> b) When I get the <Foo> element back as a result of resolving the link,
do I get
>> <Foo> or <Bar:Foo>?  And if I get <Bar:Foo>, do I also get a namespace PI
>> telling me about the Bar prefix?
This is a difficult area as it is (as ChrisM says) dependent on
implementation. You don't 'get anything back' other than a pointer or an
address (or a set of them). The spec for attr() [which at present returns a
String] is misleading [thanks to Steve De Rose, private mail] and will be
rewritten. If it returns anything it is to the address in (say) a grove
which includes attributes


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