[xml-dev] Vocabulary Combination
by Arjun Ray other posts by this author
May 29 2003 5:41AM messages near this date
Re: [xml-dev] data definition
|
Re: [xml-dev] Looking for an example of a name colliision
We have it from unimpeachable authority that the Namespace mechanism isn't
really for "vocabulary combination" (even though the "Motivation" section
of the spec would seem to suggest that it might be). Thus in
http://www.xml.com/pub/a/1999/01/namespaces.html
it is written: "The only reason namespaces exist, once again, is to give
elements and attributes programmer-friendly names that will be unique
across the whole Internet."
Nevertheless, the use of namespaced names raises interesting questions
from the perspective of vocabulary combination. Consider the example from
the article cited above:
<h:html xmlns:xdc="http://www.xml.com/books"
xmlns:h="http://www.w3.org/HTML/1998/html4">
<h:head> <h:title>Book Review</h:title></h:head>
<h:body>
<xdc:bookreview>
<xdc:title> XML: A Primer</xdc:title>
<h:table>
<h:tr align="center">
<h:td> Author</h:td><h:td>Price</h:td>
<h:td> Pages</h:td><h:td>Date</h:td></h:tr>
<h:tr align="left">
<h:td> <xdc:author>Simon St. Laurent</xdc:author></h:td>
<h:td> <xdc:price>31.98</xdc:price></h:td>
<h:td> <xdc:pages>352</xdc:pages></h:td>
<h:td> <xdc:date>1998/01</xdc:date></h:td>
</h:tr>
</h:table>
</xdc:bookreview>
</h:body>
</h:html>
Let's suppose I want to reconstruct an "html view" and a "books view" of
this document. One reason for this could be that I have dedicated modules
for the html and books vocabularies (assuming, of course, that a namespace
entitles me to think of a vocabulary), and I would like a parser-level
filter to feed each module separately with only the input it's designed to
handle. Or I have just one module - say for the books vocabulary - and
I'd like to filter out irrelevant junk.
Judging from the intent of the example, I hypothesize that the relevant
views are, for the html-vocabulary:
<html
<body>
XML: A Primer
<table>
<tr align="center">
<td> Author</td><td>Price</td>
<td> Pages</td><td>Date</td></tr>
<tr align="left">
<td> Simon St. Laurent</td>
<td> 31.98</td>
<td> 352</td>
<td> 1998/01</td>
</tr>
</table>
</body>
</html>
and for the books-vocabulary:
<bookreview>
<title> XML: A Primer</title>
<author> Simon St. Laurent</author>
<price> 31.98</price>
<pages> 352</pages>
<date> 1998/01</date>
</bookreview>
If this is acceptable, then my question is: What is the decision procedure
by which a generic parser-level filter could generate these views, if it's
to take namespaced names as a guide?
"It can't be done" is an acceptable answer, btw.
-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org> , an
initiative of OASIS <http://www.oasis-open.org>
The list archives are at http://lists.xml.org/archives/xml-dev/
To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>
Thread:
Arjun Ray
Rick Jelliffe
james anderson
james anderson
K. Ari Krupnikov
Bob Foster
Arjun Ray
Thomas B. Passin
Thomas B. Passin
Bob Foster
Arjun Ray
K. Ari Krupnikov
Arjun Ray
K. Ari Krupnikov
Thomas B. Passin
Simon St.Laurent
Jonathan Borden
Thomas B. Passin
K. Ari Krupnikov
Arjun Ray
Simon St.Laurent
Chiusano Joseph
Arjun Ray
Chiusano Joseph
Chiusano Joseph
Arjun Ray
Thomas B. Passin
K. Ari Krupnikov
Arjun Ray
John Cowan
Arjun Ray
Bob Foster
W. E. Perry
Arjun Ray
Chiusano Joseph
Chiusano Joseph
Chiusano Joseph
W. E. Perry
Chiusano Joseph
Thomas B. Passin
Arjun Ray
John Cowan
Arjun Ray
John Cowan
Arjun Ray
K. Ari Krupnikov
james anderson
Arjun Ray
james anderson
Arjun Ray
Rick Jelliffe
james anderson
Arjun Ray
Jonathan Borden
=?ISO-8859-1?Q?Bill_de_h=D3ra?=
Arjun Ray
W. E. Perry
Arjun Ray
Rick Jelliffe
james anderson
Arjun Ray
Rick Jelliffe
Arjun Ray
Rick Jelliffe
Arjun Ray
james anderson
Simon St.Laurent
james anderson
Rich Salz
Jaywanth
Seairth Jacobs
Joe Gregorio
Arjun Ray
Arjun Ray
John Cowan
Simon St.Laurent
Arjun Ray
Paul Prescod
Arjun Ray
Paul Prescod
Arjun Ray
Tim Bray
MURATA Makoto
Arjun Ray
J.Pietschmann
Arjun Ray
Jason Diamond
Tim Bray
Tim Bray
Simon St.Laurent
Joe Gregorio
Paul Prescod
W. E. Perry
james anderson
james anderson
james anderson
Jonathan Borden
Miles Sabin
Simon St.Laurent
Jonathan Borden
Simon St.Laurent
W. E. Perry
Jonathan Borden
Simon St.Laurent
Thomas B. Passin
Jonathan Borden
Miles Sabin
Simon St.Laurent
Simon St.Laurent
Simon St.Laurent
Simon St.Laurent
Simon St.Laurent
Jonathan Borden
=?ISO-8859-1?Q?Bill_de_h=D3ra?=
Jonathan Borden
Miles Sabin
=?ISO-8859-1?Q?Bill_de_h=D3ra?=
james anderson
=?ISO-8859-1?Q?Bill_de_h=D3ra?=
Tim Bray
james anderson
John Cowan
=?ISO-8859-1?Q?Bill_de_h=D3ra?=
Arjun Ray
W. E. Perry
james anderson
=?ISO-8859-1?Q?Bill_de_h=D3ra?=
Joe Gregorio
Joe English
Paul Prescod
Joe English
Arjun Ray
=?ISO-8859-1?Q?Bill_de_h=D3ra?=
Simon St.Laurent
Arjun Ray
Joe English
Simon St.Laurent
Simon St.Laurent
Arjun Ray
|