[Your question is the type of generic XSLT question that could also be answered on XSL-list.]
<xsl:template name="contract" match="." mode="contract"> >When I transform using XML Spy, everything runs OK. When I transform >under Weblogic (XalanJ) or Jbuilder I got the error message below: >Error: >A node test that matches either NCName:* or QName was expected.; I have discovered that the XSLT in XMLspy is non-conformant in a few details. The match pattern syntax is defined in part 5.2 of the XSLT spec, and it's quite limited compared to the full path-expression syntax. An "AbbreviatedStep" like . is allowed in the full (select) syntax, but not in match patterns. However, you can say match="node()" to match any element (and text, comment, PI), which would work for you. match="*" is another possibility, which matches only elements. I see that you invoked this template via <xsl:apply-templates mode="contract" select="."> from within a template that matched RECORD in the "occ" mode. If there are no other templates in "contract" mode, you should consider using <xsl:call-template name="contract"> to be sure that you just invoke the one template. There may also be some efficiencies behind the scenes. The match pattern can be more general than the select pattern on the apply-templates. If match="*" is too broad, and match="[EMAIL PROTECTED]'OCC']" is too narrow, maybe match="RECORD" or match="[EMAIL PROTECTED]'OCC']" would fit your needs. Another variation is match="[EMAIL PROTECTED]" to say match any element named RECORD that has an attribute named name, regardless of the value of that attribute. .................David Marston
