note 71900 added to ref.xslt

From: Date: Thu, 21 Dec 2006 15:34:47 +0000
Subject: note 71900 added to ref.xslt
Groups: php.notes 
Request: Send a blank email to php-notes+get-120831@lists.php.net to get a copy of this message
I believe the xslt_process and its URI resolving behaviour, including the xslt_set_base function are violating the XSLT specification which states: <blockquote> 3.2 Base URI Every node also has an associated URI called its base URI, which is used for resolving attribute values that represent relative URIs into absolute URIs. If an element or processing instruction occurs in an external entity, the base URI of that element or processing instruction is the URI of the external entity; otherwise, the base URI is the base URI of the document. The base URI of the document node is the URI of the document entity. The base URI for a text node, a comment node, an attribute node or a namespace node is the base URI of the parent of the node. </blockquote> This implies that if stylesheet file A contains a <xsl:import href="../B.xsl" /> and stylesheet file B contains a <xsl:import href="../C.xsl" />, given that all physical paths are valid, no matter which base you set up for the XSLT extension (with xslt_set_base) the processor WILL FAIL. Simply because it uses a single base path for all its processing regardless of the context (importing file) which includes/imports. This is a violation of the above part of the specification quoted above. And it makes it very difficult to program XSLT with PHP. ---- Server IP: 62.73.196.231 Probable Submitter: 193.213.33.10 ---- Manual Page -- http://www.php.net/manual/en/ref.xslt.php Edit -- https://master.php.net/note/edit/71900 Del: integrated -- https://master.php.net/note/delete/71900/integrated Del: useless -- https://master.php.net/note/delete/71900/useless Del: bad code -- https://master.php.net/note/delete/71900/bad+code Del: spam -- https://master.php.net/note/delete/71900/spam Del: non-english -- https://master.php.net/note/delete/71900/non-english Del: in docs -- https://master.php.net/note/delete/71900/in+docs Del: other reasons-- https://master.php.net/note/delete/71900 Reject -- https://master.php.net/note/reject/71900 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#120831) next »