Subject: [xsl] Re: Namespaces, params and Xalan From: Fraser Crichton <fraser.crichton@xxxxxxxxxxxxxxxxxxxxx> Date: Tue, 28 Sep 2004 11:22:16 +1200 |
First, what is this?:
node()[(../. = /) and not(self::cmn:Comments)]
../. means the same as .., so you are trying to match any node whose parent
has a string-value that is the same as the string-value of the root node.
Getting the string-value of the root node is a pretty expensive operation,
it involves scanning the whole document. I suspect you are trying to match
the element whose parent is the root node, in which case you can write
match="/*".
And the not(self::xxx) part is much better handled by defining a
second template rule with higher priority that has match="cmn:Comments".
Secondly, in the JAXP code you are frequently using Windows filenames in places where URIs are expected. Xalan may let you get away with this (I don't know) but Saxon certainly won't.
Thirdly, this expression: [name()=name(current())] is pretty fragile in an environment with so many namespaces, because you are comparing prefixes, not URIs. Test whether the namespace-uri and local-name are both equal.
Fourthly, you don't need xalan-nodeset(). The input is already a node-set, you don't need to convert it.
Finally, for debugging try simply doing <xsl:copy-of> on the supplied parameter in your match="/" template. Displaying the result of your complex path expression simply proves that your path expression is wrong.
Attention: This email may contain information intended for the sole use of the original recipient. Please respect this when sharing or disclosing this email's contents with any third party. If you believe you have received this email in error, please delete it and notify the sender or postmaster@xxxxxxxxxxxxxxxxxxxxx as soon as possible. The content of this email does not necessarily reflect the views of SolNet Solutions Ltd.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] FW: problem integrating x, Andrew Welch | Thread | [xsl] Trouble selecting appropriate, Travis |
RE: [xsl] FW: problem integrating x, Michael Kay | Date | [xsl] Trouble selecting appropriate, Travis |
Month |