No problem, your welcome. Please send all your answers to the mailing list as well as other users might come across the same problems ...
Greetings, Lukas
On Fri, May 20, 2011 at 10:32 AM, Wiard Vasen wiard.vasen@gmail.com wrote:
By the way: A very interesting explanation you gave. I used: *declare namespace ns = "http://www.vangoghletters.org/ns/"; //ns:letDesc* *Now I understand how it works.* *Thanks!
2011/5/20 Wiard Vasen wiard.vasen@gmail.com
Hi Lukas,
*//*:fileDesc *works, and gives the whole content of the file back. Starting with the term fileDesc in 'brackets'.
When I use //*:sourceDesc or note I get a bit the same result.
But what if I want what is in the 'idno' ? <idno type="jlb">012</idno>
Or : vg:placeLetLondon</vg:placeLet>
How do I get these results?
Thanks in advance.
Regards,
Wiard
2011/5/20 Wiard Vasen wiard.vasen@gmail.com
Hey Lucas,
thanks a lot for your help! I have a look at your example.
Regards,
Wiard
2011/5/20 Lukas Kircher lukaskircher1@googlemail.com
Hi Wiard,
being neither Christian nor Andreas, I nevertheless take a shot :)
It's kinda hard to give a hint knowing that little about your case, but I think you problem might be related to namespaces.
As the root element 'TEI' declares a namespace, all descendants lie in this namespace (unless they declare another one or are linked to a prefix).
Short example - if you want to query a letDesc element you have to specify the namespace it is linked to. Just declare the prefix at the beginning of your query.
*declare namespace ns = "http://www.vangoghletters.org/ns/"; //ns:letDesc
*You can also use namespace wildcards to access nodes without a specific prefix, for example the 'fileDesc' element:
*//*:fileDesc
*Hope this helps you a little - don't hesitate to ask for more.
I also included a link to a short discussion [1]. I'm afraid I can't provide with a better tutorial about namespaces - it's a rare thing.
Regards, Lukas
[1] http://www.stylusstudio.com/xquerytalk/200608/001654.html
2011/5/20 Wiard Vasen wiard.vasen@gmail.com
Dear Christian, Andreas,
I have trouble querying the following text. Could you have a look at it and show me how I can pose different queries on the file?
I would be grateful if you did!
Thanks in advance.
Kind regards,
Wiard
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk