I'm confused about how unqualified locals in an instance document should match against node tests. Consider the following example.
Here is a schema with the default elementFormDefault of "unqualified": <?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace='http://www.test.com/test' xmlns='http://www.test.com/test' xmlns:xs='http://www.w3.org/2001/XMLSchema'> <xs:element name="test"> <xs:complexType> <xs:sequence> <xs:element name="spam" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> Here is a valid instance document: <?xml version="1.0" encoding="UTF-8"?> <tt:test xmlns:tt='http://www.test.com/test' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.test.com/test test.xsd'> <spam> Test </spam> </tt:test> Although unqualified, the element 'spam' is in the http://www.test.com/test namespace, correct? Thus, the following stylesheet should work: <?xml version="1.0"?> <xsl:stylesheet version='1.1' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:ss='http://www.test.com/test'> <xsl:template match="ss:spam"> This is a <xsl:value-of select="normalize-space()"/> </xsl:template> </xsl:stylesheet> since the 'ss:spam' element test in the stylesheet and the unqualified 'spam' element in the instance document both refer elements with the same expanded name, correct? It doesn't match in either Saxon nor Xalan. Am I missing something? For example, are unqualified locals not, in fact, a part of the target namespace of the schema? Thanks! Brian Atkins -- Brian Atkins [EMAIL PROTECTED] (970) 288-2114 Agilent Technologies 4800 Wheaton Drive Ft. Collins, CO 80525
