[
Lists Home |
Date Index |
Thread Index
]
At 4:57 PM -0800 1/19/02, Dare Obasanjo wrote:
>I believe the thrust of Nicolas' question is where to find the RDDL document
>for an XML file that utilizes names from multiple namespaces. No one has
>proposed a *concrete* answer to that question yet although the designers of
>RDDL may consider this to be beyond the design goals of RDDL which is
>reasonable.
>
There is no such document. One more time: A RDDL document describes a
namespace name, not a document.
>For instance the following is the first element in an annotated XSD mapping
>schema for creating XML views of relational data in SQL server 2000
>
><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:dt="urn:schemas-microsoft-com:datatypes"
> xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
>
>The question is where will one locate the metadata/resources/etc for
>documents of this type? Or should we be satisfied with a.) everyone MUST use
>HTTP URLs for their namespace URIs and b.) everyone must have RDDL information
>at these URIs?
>
That's up to the people who created those namespaces. If they choose
they can put RDDL documents there. If they choose not to put
documents there, or to use unresolvable URIs, that's also there
business. RDDL provides an option. It can't force anybody to use it.
>What if the developer of this new document type wants to create RDDL
>information for this type of document? Do we introduce some new construct, For
>instance perhaps a
>xml:rsrcnamespace="http://www.example.com/xmlschema/msft-datatypes/msft-mappin
>g-schema" to solve this problem?
>
The developer of the new document type is not involved in these
decisions, only the developer who creates a new namespace URI.
>So back to Nicolas's question, looking at the source of the document at
>http://www.rddl.org I see the following namespace declarations
>
> xmlns="http://www.w3.org/1999/xhtml"
> xmlns:xlink="http://www.w3.org/1999/xlink"
> xmlns:rddl="http://www.rddl.org/"
>
>So what is the algorithm to obtain all (or some) of the metadata related to
>the above namespace declarations used in the document at http://www.rddl.org ?
Go to each of the URLs and load the RDDL document that's there,
assuming the owners of the URLs have chosen to put such a document
there. (We can't force them to do that, of course.)
>Such as obtaining the W3C XML schema for validating this document or obtain
>all the normative references that apply to the document.
It may not be possible to do this. RDDL makes no guarantees about
which resources exist for any given namespace. It simply provides a
convenient way to list those resources that do exist. However, you
could try this, which would work provided all the namespace
maintainers have put RDDL documents locating schemas for their
namespace at the namespace URLs:
1. Start at the root element of the document.
2. Load the RDDL document for its namespace. Search that document for
the rddl:resource element whose xlink:role and xlink:arcrole
attributes indicate a schema of the type you want.
3. Use the xlink:href attribute of that rddl:resource element to
locate the URL for the schema that applies to the root element.
4. Apply that schema to the root element.
At this point with some schema languages, e.g. DTDs, we're
effectively done, because validity is equivalent to validity of the
root element. However, for those schema languages where this is not
the case, recursively apply the algorithm to all the child elements
of the root element (and their children, and their children's
children, and so forth)
This all assumes that the necessary RDDL documents are in the right
place and have the right rddl:resource elements that point to schemas
written in the desired schema language; that these schema documents
are syntactically correct, that the network hasn't gone down, and a
dozen other constraints, none of which RDDL addresses, but that's OK.
RDDL, like XML, is an enabling technology. It allows namespace
purveyors to implement this scheme if they choose. It does not
mandate that they do so.
Liek XML itself, we can't force people to use RDDL. Also like XML, if
a lot of people are doing similar tasks, then they'd probably rather
use RDDL and standard tools than reinvent their own solutions.
--
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| The XML Bible, 2nd Edition (Hungry Minds, 2001) |
| http://www.ibiblio.org/xml/books/bible2/ |
| http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/ |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/ |
+----------------------------------+---------------------------------+
|