Dear BaseXers,
i've got a result from an XQuery that i don't understand and am looking for insight and guidance. i've got a collection called 'Squibble' with three documents in it. They are listed below. The query
for $rcrd in collection( 'Squibble' )//record where $rcrd/*[1] = <contentChannel><String>email</String></contentChannel> return $rcrd
returns record elements from the first two documents. This is surprising to me because the first child of the first record element in the first document is <contactMeUsing>...</contactMeUsing>, not <contentChannel>...</contentChannel>.
i was expecting it to return just the record element from the second document.
i confess, i don't know anything about XQuery. So, it could be that i don't understand how the where clause is supposed to work. Any clues would be most appreciated.
i'm running my tests using
- BaseX 6.6
- on Mac OS X 10.6.7
Best wishes,
--greg
<?xml version="1.0" encoding="UTF-8"?>
<record>
<contactMeUsing>
<String>email</String>
</contactMeUsing>
<String>{&quot;com.biosimilarity.lift.model.store.MonadicTermTypes_-Ground&quot;:{&quot;v&quot;:{&quot;@class&quot;:&quot;string&quot;,&quot;$&quot;:&quot;for the win
Mikail.Mauz@gmail.com&quot;},&quot;_-outer&quot;:{&quot;@class&quot;:&quot;com.biosimilarity.lift.model.store.PersistedMonadicTS$TheMTT$&quot;}}}</String>
</record>
<?xml version="1.0" encoding="UTF-8"?>
<record>
<contentChannel>
<String>email</String>
</contentChannel>
<String>{&quot;com.biosimilarity.lift.model.store.MonadicTermTypes_-Ground&quot;:{&quot;v&quot;:{&quot;@class&quot;:&quot;string&quot;,&quot;$&quot;:&quot;for the get
Donald.Duque@yahoo.com&quot;},&quot;_-outer&quot;:{&quot;@class&quot;:&quot;com.biosimilarity.lift.model.store.PersistedMonadicTS$TheMTT$&quot;}}}</String>
</record>
<?xml version="1.0" encoding="UTF-8"?>
<record>
<phone>
<var>cell</var>
</phone>
<String>{&quot;com.biosimilarity.lift.model.store.MonadicTermTypes_-Ground&quot;:{&quot;v&quot;:{&quot;@class&quot;:&quot;string&quot;,&quot;$&quot;:&quot;2xx.6xx.3xxx&quot;},&quot;_-outer&quot;:{&quot;@class&quot;:&quot;com.biosimilarity.lift.model.store.PersistedMonadicTS$TheMTT$&quot;}}}</String>
</record>
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
7329 39th Ave SW