eXist DB & XQuery: xml-root with attribute leads to no results

Vhecxqhluz

New Member
I'm completely new to both eXist DB and XQuery. I've installed eXist and it's working correctly. Now I tried to query some xml files with XQuery in the eXist Query Dialog which is part of the eXist Admin client.The xml file looks like this (downloaded from Oxford Text Archive):\[code\]<TEI xmlns="http://www.tei-c.org/ns/1.0"> <teiHeader> <fileDesc> <titleStmt> <title>THE Taming of the Shrew.</title> <author>Shakespeare, William, 1564-1616</author> </titleStmt> <publicationStmt> <distributor>...</TEI>\[/code\]My basic XQuery looks like this:\[code\]doc('/db/myCollection/taming.xml')//teiHeader\[/code\]this brings no result ("found 0 items"). Why? I fiddled around a little and found out that if I remove the attribute "xmlns" from the TEI element then the query works perfectly. How do I have to change my query so that I don't have to remove the attribute? What is causing the trouble with this attribute?Thanx for any hints!
 
Back
Top