[
Lists Home |
Date Index |
Thread Index
]
- To: <james.anderson@setf.de>,<xml-dev@lists.xml.org>
- Subject: RE: [xml-dev] Mapping URLs to Qnames to Schema types
- From: "Manos Batsis" <m.batsis@bsnet.gr>
- Date: Tue, 13 Aug 2002 22:48:23 +0300
- Thread-index: AcJC2j/HiY8xmbeCRcaybaIvqtaNLQAIz6Jn
- Thread-topic: [xml-dev] Mapping URLs to Qnames to Schema types
Title: RE: [xml-dev] Mapping URLs to Qnames to Schema types
Thanks for the reply James.
I do consider URLs eligible to be used as universal names :-)
This is related to the ability of a URL to be used as both a name and a location for a resource, as some recent posts suggest.
I am looking for a reliable way to map a URL, a QName and a Schema type. By Schema type, I mean any complex or simple type in XSD terms, or a Class or Property by RDF terms etc. I would like that mapping to be Schema Language neutral. My bet is on an foo:ID attribute.
Consider the following XML Schema fragment belonging to a document located at http://www.foo.org/mySchema.xsd. I'm looking for a reliable way to map
<xs:complexType name="myType" mm:id="myTypeID">
<!-- rest of definition here -->
</xs:complexType>
to something like
http://www.foo.org/mySchema.xsd#myTypeID
Consider the target namespace for the above schema to be it's location, that is, http://www.foo.org/mySchema.xsd.
Now, when I use that namespace in an instance document as
<root xmlns:bla="http://www.foo.org/mySchema.xsd">
and while knowing the schema location, I want the app to be aware that the QName bla:myTypeID maps to the above type.
Sure, there are many holes and pitfalls to the above (heh, many flames may arise); that's why I requested for comments and advice; I am just trying to give a picture of what I want.
Perhaps it would be wise to avoid the use of xmlns declarations for the above mappings and just come up with an XML application with it's own attributes (like I did with the mm:ID above) to use within other vocabularies and just implement some processor for it.
Some points about the above examples. The use of the mm:ID should be suffisient as long as it is unique in each schema document (although xs:include may be trouble) and the rest of the URL is build using the schema location. As for the URLs, I am only thinking about URLs that point to a type in that schema using it's location; so it is requiered for the schema to be accesible over the network (either the internet or intranet). The trick is pointing to the type in the document using the mm:ID.
Now, for the QName, the trick is to safelly map the namespace prefix to the URI pointing to the schema location (hence my initial thought of using the xmlns declaration or some other attribute to aid to that) and the name to the type ID.
So... what do you think? I just want to implement some stable functionality without breaking anything down to really ugly hacks.
Regards,
Manos
-----Original Message-----
From: james anderson [mailto:james.anderson@setf.de]
Sent: Tue 8/13/2002 6:10 PM
To: Manos Batsis
Cc:
Subject: Re: [xml-dev] Mapping URLs to Qnames to Schema types
?
how about describing the issue a bit more? my initial response is that, in
general, no single url value is sufficient to identify a universal name. unless
you're suggesting articulating a fragment and a root? or?
Manos Batsis wrote:
>
> I would appreciate any pointers to work on this issue. No debate here,
> just existing approaches.
>
> Thanks,
>
> Manos
>
> -----------------------------------------------------------------
> 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>
|