[MarkLogic Dev General] values of attributes with same name in Marklogic!!?

Srinivas Mandadapu srinivas.mandadapu at gmail.com
Thu Oct 29 07:55:55 PST 2009


All,

I am having  a problem figuring out where I am going wrong with the 
below on ML:

let $sampleArticle :=
<article>
    <article-meta>
        <related-article related-article-type="companion" 
xlink:href="doc1" xmlns:xlink="http://www.w3.org/1999/xlink"/>
        <related-article related-article-type="companion" 
xlink:href="doc2" xmlns:xlink="http://www.w3.org/1999/xlink"/>
    </article-meta>
</article>

Below is my snippet trying to retrieve doc1 & doc2 values of attribute 
xlink:href

for $v in $sampleArticle/article/article-meta/related-article/@xlink:href
        return $v

I see below error in logs:

*XDMP-DUPATTR: (err:XQDY0025) $v -- Two attributes with the same name*

Can someone educate me as to how to go about it!!?. I really appreciate 
your help.

Thanks,
Srini



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20091029/04afa06f/attachment-0001.html


More information about the General mailing list