- From: Jeremy Carroll <jjc@hpl.hp.com>
- Date: Tue, 24 Apr 2007 16:59:05 +0100
- To: ogbujic@ccf.org
- CC: GRDDL Working Group <public-grddl-wg@w3.org>, Norman.Walsh@Sun.COM
xml:base="" is a no-op. i.e. its presence or absence anywhere within a document that supports xml:base should not change the meaning of that document in any way. (obviously, it's presence can invalidate a previously DTD valid document) ==== Rationale: xml:base permits relative references. e.g. xml:base=".." on the root of a document retrieved from http://example.org/a/g/h is equivalent to xml:base="http:/example.org/a/" the value "" is a same document reference. The rules governing this, which are sometimes not implemented correctly are: URI (without frag) + "" = URI (without frag) URI (with frag) + "" = URI (without frag) The other class of same document references are references consisting just of a fragment "#aaa", the rules above are sort of similar, if you squint. ==== However, I can change the code to not put the xml:base="" when there is no html:base. It's just it was easier to always generate it. Jeremy Chimezie Ogbuji wrote: > As a result of my action of helping the folks at Semantic Conference > Technology redo their schedule in hCard and vCard (I'm making good > progress, more updates later), I came across a concern related to our > recent conversation about xml:base. > > The problem surrounds the hCard profile > (http://www.w3.org/2006/03/hcard) : > > In order to match a grddl:profileTransformation assertion with the > profile URL as the subject, the result of applying > http://www.w3.org/2003/g/glean-profile to the profile needs a 'proper' > base. When I run the transformation via 4Suite XML I get: > > chimezie@otherland:~$ 4xslt http://www.w3.org/2006/03/hcard > http://www.w3.org/2003/g/glean-profile > <?xml version="1.0" encoding="utf-8"?> > <rdf:RDF xmlns:dataview="http://www.w3.org/2003/g/data-view#" > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xml:base=""> > <rdf:Description rdf:about=""> > <dataview:profileTransformation > rdf:resource="../vcard/hcard2rdf.xsl"/> > </rdf:Description> > </rdf:RDF> > > Note the xml:base="". My understanding (and this seems to be the case > with the underlying RDF parser - RDFLib) is that the empty string value > becomes the hardcoded base instead of following the XML Base mechanism > which begins with no base in the content (in which case the base would > be the profile URL). > > Without xml:base, the profileTransformation assertion matches up, with > it as an empty string, it doesn't - and so hcard2rdf.xsl is not applied > against the XHTML document which indicated that > http://www.w3.org/2006/03/hcard is its HTML profile. > > Perhaps I'm misreading this particular use of xml:base, but any > clarification would help. > -- Hewlett-Packard Limited registered Office: Cain Road, Bracknell, Berks RG12 1HN Registered No: 690597 England
Received on Tuesday, 24 April 2007 15:59:36 UTC