[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XPath 1.0 challenge: select all XML Schema element

Subject: Re: 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
Re:  XPath 1.0 challenge: select all XML Schema element
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.