Re: [bdbxml] Document modifications are not applied
John Snelson <[email protected]>
| Newsgroups | gmane.comp.db.dbxml.general |
|---|---|
| Message-ID | <[email protected]> |
Without quotes, your string "dXXX" where XXX is a number will parse as a
path expression, and try to look for child of the context item called
"dXXX". There will almost certainly not be one, and this expression will
return an empty sequence.
John
Stephan Korthoff wrote:
> We have many other queries without quotes wich work, but we tried to add
> quotes but it made no difference.
>
> Btw: we modified the query as follows:
>
> ...
> String docId = "d"+ String.valueOf(intDocId);
> ...
> XmlQueryExpression BerkQExp =
> BerkManager.prepare("collection('xmachberk.dbxml')/kenndaten[@doc_id=" +
> docId + "]/felder_als_attribute/@double_feld_r", context);
> ...
>
>
> Stephan
>
>
> John wrote:
>
>>In that case, you need to add quotes to your query, around that string:
>>
>>"collection('xmachberk.dbxml')/kenndaten[@doc_id='d"
>>+ String.valueOf(intDocId) +
>>"']/felder_als_attribute/@double_feld_r"
>>
>>John
>>
>>Stephan Korthoff wrote:
>>
>>>The "d" after the "=" in "@doc_id=d" is part of our internal document
>>>identifier. Our documents start with the prefix "d", the full naming
>>
>>scheme
>>
>>>is d??? where ??? is an integer from 1 to 500.
>>>
>>>Stephan
>>>
>>>
>>>
>>>>> XmlQueryExpression BerkQExp =
>>>>>BerkManager.prepare("collection('xmachberk.dbxml')/kenndaten[@doc_id=d"
>>>>
>>>>+
>>>>
>>>>What is the "d" after the "=" in "@doc_id=d"? I don't think that should
>>>>be there...
>>>>
>>>>
>>>>
>>>>> String.valueOf(intDocId) +
>>>>>"]/felder_als_attribute/@double_feld_r", context);
>>>>
>>>>John
>>>>
>>>>
>>>
>>>
>
>
------------------------------------------
To remove yourself from this list, send an
email to [email protected]