Your test test="element(*, jsw:x)" is equivalent to test="child::element(*, jsw:x)" - it tests whether the context item has a child of that type, not whether it is itself of that type. You want test=". instance of element(*, jsw:x)", or test="self::element(*, jsw:x)".
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|