You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "King, Christine" <CK...@hq.ileaf.com> on 2000/02/17 21:03:50 UTC

Position not returned in match pattern by StylesheetRoot.findTemp late?

What am I doing wrong??  I'm trying to use class StylesheetRoot
method findTemplate as follows:

  templateReturn = ssr.findTemplate(xei,
                                    xmlNode.getOwnerDocument(),
                                    xmlNode,
                                    mode,
					 false // useImports
					 ,null // foundStyleSheet
                                   );

--where xei is an XSLTEngineImpl, xmlNode is the DOM tree Node of an
XML element, mode is null.

This *works just fine* for most XML nodes and XSL patterns, returning
me the ElemTemplate for the style rule that applies to the given XML
node.  What fails is when my pattern includes a position indicator,
like say "Part[1]" and the XML node is the first Part node: I get the
wrong ElemTemplate back from findTemplate!  If a rule for Part exists,
I get it back instead of Part[1].  If no other rules for Part are
present, I get null back.

Using Part[position()=1] is just as bad; Part[2] also.

Help!

Using version Xalan 19.2 with Jeremy's patch of 1/28.