Hi All,
I have a string which has multiple values in it.
Example:
let $input := "abc/def/ghi"
External xml file have the following values:
<root>
<entry code="abc" value="123"/>
<entry code="def" value="456"/>
<entry code="ghi" value="789"/>
</root>
My requirement is to split the input string( "abc/def/ghi") based on the
"/" character, get the corresponding value from the external xml and then
merge them back using "/".
So the output is expected to be 123/456/789
My code :
let $input := "abc/def/ghi"
return
for $values in fn:tokenize(($input ),"\/")
let $value := fn:doc("externalFile.xml")//entry[@code =
$values]/@value/string()
return
fn:string-join(($value),"/")
This does not give me the expected result. How do I achieve this. Please
help.
Thanks,
Sini
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general