- From: Jeremy Carroll <jjc@hpl.hp.com>
- Date: Tue, 08 May 2007 15:15:56 +0100
- To: ogbujic@ccf.org
- CC: GRDDL Working Group <public-grddl-wg@w3.org>, Dave Beckett <dave@dajobe.org>
Chimezie Ogbuji wrote: >> Our examples >> should demonstrate this. > > The one example he mentions explicitly seems to already demonstrate some of this: > > <!-- uri of the current XHTML page --> > <xsl:param name="this" select="//*/@xml:base[position()=1]"/> > That particular code illustrates at least two misunderstandings. I think it may be pertinent to extend the library with code to correctly set xml:base and xml:lang. Issues with the above code include: a) on an XHTML doc, the base is set by html:base element not xml:base. b) if the xml:base is relative rather than absolute then whether to take it into account or not depends on whether it occurs on the root element or not. (Since any xml:base on the root element will be taken into account by the GRDDL aware agent, and should be ignored by the transform). I am considering refactoring the library to have a separate module, say, http://www.w3.org/2003/g/base-and-lang which provides a named template that can be called to extract appropriate xml:base and xml:lang attributes for the current node. Then a stylesheet author, for GRDDL, could be encouraged to use this named template to fill in base and lang attributes, that can then be explicitly over-written when appropriate (e.g. if lang information is present in the XML source document by means other than xml:lang, e.g. as in some RSS documents) Jeremy -- Hewlett-Packard Limited registered Office: Cain Road, Bracknell, Berks RG12 1HN Registered No: 690597 England
Received on Tuesday, 8 May 2007 14:16:16 UTC