You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by sg...@us.ibm.com on 2000/08/28 18:19:33 UTC
URNs or URLs for Namespaces
I have a couple of questions about namespaces.
Q1 - What are the relative pros and cons of identifying namespaces with a
URL vs a URN? All the W3C examples I've found use URLs for their Namespace
identifiers.
Q2 - What mechanisms exist in Xerces-J to map URNs to URLs? I have
successfully used the xsi:schemaLocation="myURN myURL" attribute and my own
EntityResolver map myURL to various things. But according to the XML
Schema Primer, section 5.6, "schemaLocation provides hints ... regarding
the location of schema documents." How would a parser acquire any
information to override those hints? Originally, I thought I could use
EntityResolver to provide a default URL for "myURN", but EntityResolver
doesn't get called if I remove the schemaLocation attribute. Is there some
other way to provide a default URN->URL mapping in Xerces? Do other XML
parsers provide such a mechanism, or is this just open-ended part of the
spec that no one yet implements?
Scott Gerard,
IBMUSM07(sgerard)
Dept. DXS
Phone 507-253-7896 Tie 553-7896
Mail on Lotus Notes: Scott Gerard/Rochester/IBM
Mail from the Internet: sgerard@us.ibm.com