Another errata?

Ogievetsky, Nikita nikita.ogievetsky at
Tue Feb 2 23:19:41 GMT 1999

Mark Birbeck wrote:
>    <xml xmlns=''
>       <bk:book isbn="1568491379">
>            <bk:title>Cheaper by the Dozen</bk:title>
>        </bk:book>
>        <bk:catalogue isbn="15666529">
>            <bk:title>A list of loads of books</bk:title>
>        </bk:catalogue>
>    </xml>
>In this case, 'auto-joining' an attribute to its element's namespace
>would make 'isbn' into a *global* attribute. Handy, if you wanted to
>process all bk:isbn numbers in a document - but wrong!! In this document
>we do NOT have two instances of bk:isbn, we have one of bk:book:isbn and
>one of bk:catalogue:isbn.
>this is OK:
>	<html:a href="x">y</html:a>
>	<html:base href="x" />
>and this is not good practice at all (see Andrew Layman's comments on
>this, too):
>	<html:a html:href="x">y</html:a>
>	<html:base html:href="x" />

Seems that we should think of the namespace scope here.
Imagine if Schema designer was not creative and instead of isbn used id
And to identify authors he also used id attribute, say ssn
(being picky, one can invent a datatype for ssn: xxx-xx-xxxx)

  <author id="111-11-1111">
       <bk:book id="1568491379">
            <bk:title>Cheaper by the Dozen</bk:title>

Now how do we know if book's id belong to default namespace or to bk?
Or, if child inherits namespace from parents, should not the above be equal
  <author id="111-11-1111">
       <bk:book id="1568491379">
            <title>Cheaper by the Dozen</title>
It should because I should freely be able to convert this XML to another
title is an attribute.
  <author id="111-11-1111">
       <bk:book id="1568491379" title="Cheaper by the Dozen"/>
equal to
  <author id="111-11-1111">
       <bk:book bk:id="1568491379" bk:title="Cheaper by the Dozen"/>
so either both are valid or not. 
Now, what if inside the book we want to use default id (ssn) - for editor?
Or can't we ?
(trully I can not imagine a reasoble situation to do so...)
There is no prefix for it. Looks like a mess...

Any toughts?

Nikita Ogievetsky
Cogitech Inc


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as:
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list