Another errata?
Ogievetsky, Nikita
nikita.ogievetsky at csfb.com
Tue Feb 2 23:19:41 GMT 1999
Mark Birbeck wrote:
> <xml xmlns='http://www.w3.org/TR/REC-html40'
>xmlns:bk='urn:loc.gov:books'>
> <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>
</bk:book>
</author>
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
to:
<author id="111-11-1111">
<bk:book id="1568491379">
<title>Cheaper by the Dozen</title>
</bk:book>
</author>
It should because I should freely be able to convert this XML to another
where
title is an attribute.
<author id="111-11-1111">
<bk:book id="1568491379" title="Cheaper by the Dozen"/>
</author>
equal to
<author id="111-11-1111">
<bk:book bk:id="1568491379" bk:title="Cheaper by the Dozen"/>
</author>
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
http://www.cogx.com
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list