Greetings. I have discussed this issue in the users group with Mr. Flanagan but haven't got to a conclusion. We disagree as to specs interpretation.
The DOMSource description states that any node with a subtree can be used as a root node (root meaning the XPath definition or "/"). In a current application, however, I discovered that Xalan is not calling the root template (<template match="/">) except when the root node is a Document or a DocumentFragment. When providing a Element as root node, Xalan does not call the root tamplate, but call a template matching the document element instead -- it should not, the document element template should only be called by the (provided or default) root template. I saw nothing in the XPath that demands that the root node is a DOM Document[Fragment] object, nor DOMSource docs state so. I also cannot see any technical reason for limiting the root node type, since it is not used by itself, it is only a starting point for expressions that begin with "/". Can you please verify the conformity of this behaviour and my asuumptions? I don't think Xalan should act as thus, but instead should call the root template independently of the root node type (and *not* call the children templates if my stylesheet defines a root template). Thanks. ============================================= Marcelo Jaccoud Amaral Petrobras - TI - Neg�cios Eletr�nicos mailto:jaccoud [at] petrobras.com.br voice: +55 21 2534-3485 fax: +55 21 2534-1809 ============================================= There are only 10 kinds of people in the world: those who understand binary and those who don't.
