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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: Namespaces Not Necessarily Unrepentant Evil

[ Lists Home | Date Index | Thread Index ]
  • From: james anderson <James.Anderson@mecomnet.de>
  • To: "xml-dev@ic.ac.uk" <xml-dev@ic.ac.uk>
  • Date: Fri, 28 Aug 1998 18:52:11 +0200

David Rosenborg wrote:

> One problem I see with names in XML is that there is really only
> type names (except for attribute names).
> In programming languages you normally have at least both variable
> names and type names. Just type names work if the data you are
> dealing with is sequential in some sense. This is often
> the case in traditional documents. For example, a document may
> consist of a sequence of chapters which in turn consist of
> sequences of paragraphs. In this case, just type is enough.
> There would be little meaning in naming the individual paragraphs.
> This is analogous to arrays in programming languages.
> The problem arises when you start to use XML for other
> kind of data (and more-than-basic documents too, for that matter).

Yes, the "name identity" problem has, for reasons which I've yet to
comprehend, been declared to pertain to attribute and element names only. That
one cannot qualify entity and notation names <em>would appear</em> to be just
as much of a problem in compound documents as that which arises with
attributes and element, but I am advised that practice does not bear this out.
In any event, the issue has little bearing on the question which you raise,
since elements can be identified independent of both position and type by
virtue of attribute values. The standard ID attributes are specified to have a
scope of and uniqueness within a document, which property, in combination with
the qualification on the attribute name, ensures that an unambiguous
interpretation is possible.

> What I would like to express is: (in pseudo language/syntax)
> In Namespace MyNS declare
>   abstract ElementType Color;
>   ElementType TextPad as
>     foreground of type Color;
>     background of type Color;
>     (TextItem*)
>   end
>  ...
> end
> ...
> Any thoughts?


You are not subtyping the color elements, but instead binding them to storage
elements named "foreground" and "background". they are not subtyped, since
neither their structure nor their behaviour is modified by the relation to the
respective name.

In this situation, either of the encodings

  <color purpose='foreground'><rgb red="0" green="0" blue="0"/>
   <!-- leaving open the option of additions/alternative color description -->
  <color purpose='background'><rgb red="0" green="0" blue="0"/></color>

  <foreground><color><rgb red="0" green="0" blue="0"/></color></foreground>
  <background><color><rgb red="0" green="0" blue="0"/></color></background>

express the relations which you describe.

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