|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XPath expression to find all items with an attribu
Try
> some $i in @*[. castable as xs:QName] satisfies ...
Michael Kay
Saxonica
> On 25 Feb 2016, at 15:04, Costello, Roger L. costello@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> 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>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








