XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Lesson Learned: Use namespaces for both markup and data

Roger Costello wrote

> Here is a short article I wrote describing the lesson I learned about the
> importance of using namespaces for both markup and data:
>
> http://www.xfront.com/namespaces-is-for-markup-and-data/
>
>
> Your comments are welcome.

It is an abuse of namespaces to hijack someone else's URI, surely. The
point of preventing collisions is that you use *your* domain, I use *mine*
and everything is sweet.

In your example, you are hijacking the NIST domain and you are even
implying the existance of a schema or country element that is no supported
by that web page.

Why not use an attribute?  You could use @see like Schematron does, or you
could use the element from the RDF world (foaf:page perhaps?) since it is
specifically for linked data: you want to do anything except use a Qname,
I think.

And use an attribute for values that are exceptional too:

   <countries  xmlns="urn:roger's%20schema">
      see="http://www.itl.nist.gov/fipspubs/fip10-4.htm";>
       <country >Afghanistan</country>
       <country >Albania</country>
       <country >Algeria</country>
       <country
see="http://www.youtube.com/watch?v=e8aKKF1-f-A";>Freedonia</country>
       ...
   </countries>

In your XSD, you can use the NOTATION datatype for the kind of thing you
are wanting, by the way, if you want to declare the notations available in
the schema.

Using a qname is the kind of hack that database people try to do: in XML
is it not necessary because of attributes.

Cheers
Rick Jelliffe


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS