xsl-list
[Top] [All Lists]

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

2015-07-24 11:36:47

On 24 Jul 2015, at 17:28, Wendell Piez wapiez(_at_)wendellpiez(_dot_)com 
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> 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'),'string’)

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

Michael Kay
Saxonica

]

--~----------------------------------------------------------------
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>