You are right,

BaseX and XQuery are awesome !

And one day you should take a look at REST-XQ and XForms (like Orbeon) to 
embrace the whole picture...

Best regards,
Fabrice

-----Message d'origine-----
De : Witold E Wolski [mailto:[email protected]] 
Envoyé : mercredi 1 mars 2017 10:58
À : Fabrice ETANCHAUD <[email protected]>
Cc : [email protected]
Objet : Re: [basex-talk] querying xml with namespaces.

Awesome. Both work! Thank you.

On 1 March 2017 at 10:30, Fabrice ETANCHAUD <[email protected]> wrote:
> Hi, from what I remember,
>
> You can get rid of namespace wildcards if you just declare a default element 
> namespace for your query :
>
> declare default element namespace 
> 'http://psidev.info/psi/pi/mzIdentML/1.1';
>
> db:open("myrimatchSubset","20160312_17_B3_myrimatch_2_2_140.xml")/MzId
> entML/SequenceCollection/Peptide
>
> Another way is to declare explicitly your namespace (here named mz but you 
> could choose any other name) :
>
> declare namespace mz = 'http://psidev.info/psi/pi/mzIdentML/1.1';
>
> db:open("myrimatchSubset","20160312_17_B3_myrimatch_2_2_140.xml")/mz:M
> zIdentML/mz:SequenceCollection/mz:Peptide
>
> Best regards,
> Fabrice Etanchaud
>
> -----Message d'origine-----
> De : [email protected] 
> [mailto:[email protected]] De la part de 
> Witold E Wolski Envoyé : mercredi 1 mars 2017 10:18 À : 
> [email protected]
> Objet : [basex-talk] querying xml with namespaces.
>
> Apologies if I am hard to understand but I am new to the XML querying.
> I would like to query an XML with namespaces.
>
> As I did learn, you can do it in BaseX by including an *: in your 
> path, e.g.,
>
> db:open("myrimatchSubset","20160312_17_B3_myrimatch_2_2_140.xml")/*:Mz
> IdentML/*:SequenceCollection/*:Peptide
>
>
> But I would like to be more specific than *. I did search the schema for the 
> XML and all  I found related to the search term namespace is not brief name, 
> but:
> targetNamespace="http://psidev.info/psi/pi/mzIdentML/1.1";
>
>  I did also found the following entry on stack overflow:
> http://stackoverflow.com/questions/5239685/xml-namespace-breaking-my-x
> path
>
> And If I interpret the answer there correctly somehow one can register his 
> own acronym for a namespace?
> Is this correct? So I am wondering if I could do the same somehow in BaseX?
>
> Alternatively, I am wondering if I could tell BaseX to disable namespace 
> checking?
>
> Thank you a lot
>
> --
> Witold Eryk Wolski



--
Witold Eryk Wolski

Reply via email to