[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Another errata?

  • From: "Ogievetsky, Nikita" <nikita.ogievetsky@csfb.com>
  • To: "'xml-dev@ic.ac.uk'" <xml-dev@ic.ac.uk>
  • Date: Tue, 2 Feb 1999 18:17:57 -0500

RE: Another errata?
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@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)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.