RE: [xsl] Shallow copy and base URI

Subject: RE: [xsl] Shallow copy and base URI
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Sat, 28 Jan 2006 01:57:32 +0100 (CET)
Michael Kay wrote:

> > But I don't understand what facility you thought about
> > in the following code that might not used often?

> Explicit setting of base URI using xml:base in a
> constructed tree fragment.

  Ok.

  I looked fo the validity of this in the XSLT 2.0
recommendation.

  I didn't find definition of the base URI in XSLT 2.0 other
than:

    '5.4.1: The concept of the base URI of a node is defined
    in Section 5.2 base-uri Accessor [Data Model]

  The referenced section in XDM stands:

    '5.2: The dm:base-uri accessor returns the base URI of a
    node as a sequence containing zero or one URI
    reference. For more information about base URIs, see
    [XML Base].

  Finally, XML Base defines in '4.2 that if an element has
an xml:base attribute, its value is the base URI of the
element.

  XSLT 2.0 itself often speaks in term of @xml:base instead
of base URI.

  So what I understand is that the base URI of the literal
element in the stylesheet is the one of the stylesheet (as
for example the XML parser sees it).  When the XSLT
processor constructs this element and add the result of its
sequence constructor, if it obtains an xml:base attribute,
its base URI changes to this new one.

  Right?

  So implemtors should be carefull to catch this special
case.  I'm surprised XSLT 2.0 points out 2 special cases for
@name ('xmlns' and 'xml:id'), but doesn't speak about the
case of 'xml:base'.

  Regards,

--drkm




















	

	
		
___________________________________________________________________________ 
Nouveau : tiliphonez moins cher avec Yahoo! Messenger ! Dicouvez les tarifs exceptionnels pour appeler la France et l'international.
Tilichargez sur http://fr.messenger.yahoo.com

Current Thread