Subject: Re: [xsl] XPath 1.0 challenge: select all XML Schema element declarations with type string From: "Ihe Onwuka ihe.onwuka@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sun, 19 Jul 2015 20:27:07 -0000 |
On Sun, Jul 19, 2015 at 3:58 PM, Costello, Roger L. costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > The following XPath expression returns all XML Schema element declarations > with @type equal to xs:string: > > //xs:element[@type = 'xs:string'] > > However, that XPath assumes the schema file is written with a namespace > prefix, like this: > > <xs:element name="Test" type="xs:string" /> > > But the schema file could have been written like this: > > <element name="Test" type="string" /> > > The above XPath expression would fail to return that element declaration. > > Is there a way -- in XPath 1.0 -- to write an XPath expression which > returns all element declarations of type string? > > Declare xs as the default namespace, where's the problem.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XPath 1.0 challenge: sele, Ihe Onwuka ihe.onwuk | Thread | Re: [xsl] XPath 1.0 challenge: sele, Dimitre Novatchev dn |
Re: [xsl] XPath 1.0 challenge: sele, liam liam@xxxxxx | Date | Re: [xsl] XPath 1.0 challenge: sele, Ihe Onwuka ihe.onwuk |
Month |