I haven’t taken the time to experiment, but try
where $x = (fn:tokenize('auto, kind', ','))
Tim M.
From: [email protected]
[mailto:[email protected]] On Behalf Of Frank Mortier
Sent: Monday, December 08, 2014 1:02 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Marklogic node replace of same node
results in inconsistent output
Given the following doc:
let $doc :=
<a>
<b id="car">
<c xml:lang="en">car</c>
<c xml:lang="nl">auto</c>
<c xml:lang="fr">voiture</c>
</b>
<b id="house">
<c xml:lang="en">house</c>
<c xml:lang="nl">huis</c>
<c xml:lang="fr">maison</c>
</b>
<b id= "child">
<c xml:lang="en">child</c>
<c xml:lang="nl">kind</c>
<c xml:lang="fr">enfant</c>
</b>
</a>
…….
And the following string (‘kind, car’), and language code (‘nl’), I would
like to retrieve the id attribute values.
I am looking for a simple flowr but do not seem to understand why the following
is not working.
for $x in $doc/b/c[@xml:lang eq"nl"]
where $x eq fn:tokenize('auto, kind', ',')
return
$x/../@value
Only gives the ‘id‘ whereas (‘auto’, ‘kind’) as in $x eq (‘auto’, ‘kind’)
works?
Any suggestions would be welcome.
Frank
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general