xsl-list
[Top] [All Lists]

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

2016-02-25 09:03:41
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>
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>
  • [xsl] XPath expression to find all items with an attribute whose value is xs: hexBinary or xs:base64Binary?, Costello, Roger L. costello(_at_)mitre(_dot_)org <=