[xsl] XPath expression to find all items with an attribute whose value is xs: hexBinary or xs:base64Binary?

Subject: [xsl] XPath expression to find all items with an attribute whose value is xs: hexBinary or xs:base64Binary?
From: "Costello, Roger L. costello@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 25 Feb 2016 15:03:34 -0000
Hi Folks,

I am trying to create an XPath expression to find any XSD items that have an
attribute with value xs:hexBinary or xs:base64Binary. Here's the XPath that I
tried:

//xs:*[some $i in @* satisfies
  namespace-uri-from-QName(resolve-QName($i, .)) eq
'http://www.w3.org/2001/XMLSchema'
  and
  local-name-from-QName(resolve-QName($i, .)) = ('base64Binary',
'hexBinary')]

When I apply that XPath expression to the below schema, I get this mysterious
error message:

	XPath failed due to: Invalid QName {15}

Huh? What does that mean?

What's the correct way to write the XPath?  /Roger

-----------------------------------------------------------------------------
----
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>

    <xs:element name="person">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="firstname">
                    <xs:simpleType>
                        <xs:restriction base="xs:string">
                            <xs:maxLength value="15"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:element>
                <xs:element name="photo" type="xs:base64Binary"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>

Current Thread