[ expat-Bugs-918730 ] namespace uri's arent checked for an ending hash
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.text.xml.expat.bugs |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #918730, was opened at 2004-03-18 14:20
Message generated for change (Comment added) made by jaspervdg
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=918730&group_id=10127
Category: None
Group: None
Status: Closed
Resolution: Invalid
Priority: 5
Submitted By: Jasper (jaspervdg)
Assigned to: Nobody/Anonymous (nobody)
Summary: namespace uri's arent checked for an ending hash
Initial Comment:
With a document like this (made much shorter):
<rdf:RDF xmlns:rdf =
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc = "http://purl.org/dc/elements/1.1/"
xmlns:mm = "http://musicbrainz.org/mm/mm-2.1#">
<mm:Artist
rdf:about="http://musicbrainz.org/artist/88a6037e-87ba-492a-a54c-c927aa620cb8">
<dc:title>Earth Crisis</dc:title>
</mm:Artist>
</rdf:RDF>
The element types are resolved as follows (namespace
separator is set to a hash):
rdf:RDF ->
http://www.w3.org/1999/02/22-rdf-syntax-ns##RDF
mm:Artist -> http://musicbrainz.org/mm/mm-2.1##Artist
dc:title -> http://purl.org/dc/elements/1.1/#title
As far as I know that's not how it should be (having
two hashes as separator in the first two cases). For my
purpose I fixed it by modifying addBinding (in
xmlparse.c) to check whether the namespace URI already
ends in a hash.
I am using version 1.95.7.
----------------------------------------------------------------------
>Comment By: Jasper (jaspervdg)
Date: 2004-04-30 08:38
Message:
Logged In: YES
user_id=730345
You're right, I only found that out some time after I posted
this (it's in the RDF/XML specification for those who are
interested).
----------------------------------------------------------------------
Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2004-04-30 08:06
Message:
Logged In: YES
user_id=3066
This is related to RDFs weird combining of namespace URIs
and element/attribute names; Expat is doing the right thing,
but it's up to the application to remove the separator
character before making use of the combined URI+localName.
I'm not aware of any non-RDF applications that use the
concatenated form of URI+localName.
I'm closing this as invalid; it's not Expat's job to cater
to mixed up specifications like what RDF requires in this arena.
----------------------------------------------------------------------
Comment By: Karl Waclawek (kwaclaw)
Date: 2004-03-18 15:17
Message:
Logged In: YES
user_id=290026
AFAIK, Expat does not check URIs for conformance at all.
Maybe it should, but this is not implemented. In the case
above I think the XML Namespaces spec allows hash marks,
as they are legal in an URI reference.
So, if you pick a namespace separator that can occur in your
URIs then this is your problem, as the above looks like Expat
works as designed.
I suggest you try a character as namespace separator that
is not a legal XML character. That should always work.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=918730&group_id=10127