[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Same namespace for XSD and RDF
- From: "G. Ken Holman" <gkholman@CraneSoftwrights.com>
- To: xml-dev@lists.xml.org
- Date: Fri, 20 Jul 2012 11:41:01 -0400
At 2012-07-20 17:31 +0200, Freek Dijkstra wrote:
>Our (standardisation) group has defined a schema, and wants a
>representation of it in both XML and RDF. For ease of use, we like to
>use the same namespace identifier, even at the drawback that we can't
>publish both the XSD and OWL description at that same URL. Both XML and
>RDF allow a schema name ending in a word (http://example.org/myschema),
>or add a slash or hash "#" at the end.
>
>In particular, what are the EXACT rules for adding or removing a hash
>(#) at the end of a namespace?
There are none for the general case. A namespace is a simple URI
string that is used in conjunction with an element's name or an
attribute's name to distinguish the construct from other constructs
with the same name and a different URI string.
Full stop.
>I'm asking the XML list first, because RDF already has a best practice
>document on this issue,
As it should for its own reasons of why it might overload a namespace URI.
>but XML does not.
Nor should it.
>Also, I suspect that some
>insight in the how/why of "http://www.w3.org/2001/XMLSchema#int" helps
>me understand XML namespaces better.
Not sure what to say to that ... a namespace-qualified name is a
tripartite value:
- a name (used in the lexical space and the comparison space)
- a namespace URI (used only in the comparison space)
- a prefix (used only in the lexical space)
Namespace-qualified names are expressed using the lexical components
and are compared using the comparison components. Two qualified-name
values are considered equal when there comparison values match. No
case folding or subsetting or suffixing or other changes are allowed
or involved.
There is no standard syntax for representing the combined comparison
value, though a popular one is one I've heard called the James Clark notation:
{http://www.example.com}name
In XPath a suggested way of expressing a QName value in the context
of an error code is as a URI reference where the '#' is not a part of
either the URI or the name:
http://www.w3.org/2005/xqt-errors#XPST0017
(Ref: http://www.w3.org/TR/2010/REC-xpath20-20101214/#id-identifying-errors )
I think that URI reference notation would be handy if the URL of the
URI is an XHTML document with RDDL where element names are anchors in
the document.
But that notation has no role in comparisons, I understand it is
simply an alternative notation.
It may be that you are over-thinking the role of namespaces and would
understand namespaces better if you simply regarded them as they are specified:
http://www.w3.org/TR/2006/REC-xml-names11-20060816/
How other specifications, such as RDF, overload namespaces is up to
the users of those specifications.
I hope this helps.
. . . . . . . . . Ken
--
Public XSLT, XSL-FO, UBL and code list classes in Europe -- Oct 2012
Contact us for world-wide XML consulting and instructor-led training
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/x/
G. Ken Holman mailto:gkholman@CraneSoftwrights.com
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers: http://www.CraneSoftwrights.com/legal
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]