Re: [xsl] XPath 1.0 challenge: select all XML Schema element declarations with type string

Subject: Re: [xsl] XPath 1.0 challenge: select all XML Schema element declarations with type string
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 24 Jul 2015 16:36:43 -0000
> On 24 Jul 2015, at 17:28, Wendell Piez wapiez@xxxxxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Hi,
>
> Here is an XPath 1.0 expression that does something other than what
> was requested (return all element declarations of type string):
>
> //xs:element[@type= concat(substring-before(name(),'element'),'stringb)

Yep, thatbs a 99.9% solution: it works so long as the same prefix is used
for xs:element and xs:string. Itbs the kind of solution that you can get
away with in code that youbre using for a one-off exercise in the privacy of
your own home, but which I couldnbt get away with in a product like Saxon.

Michael Kay
Saxonica

> ]

Current Thread