[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] XPath expression to find all items with an attribute whose value is xs: hexBinary or xs:base64Binary?
Subject: Re: [xsl] XPath expression to find all items with an attribute whose value is xs: hexBinary or xs:base64Binary? From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 25 Feb 2016 15:24:38 -0000 |
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>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XPath expression to find all , Costello, Roger L. c | Thread | [xsl] Accumulator use, cmarchand@xxxxxxxxxx |
[xsl] XPath expression to find all , Costello, Roger L. c | Date | [xsl] Accumulator use, cmarchand@xxxxxxxxxx |
Month |