Hi,

I am trying to retirieve distinct values of attributes through xquery in Saxonica  . Sample xml is as follows:

<presentationLink xlink:role="http://www.biovail.com/2008-12-31/role/DocumentandEntityInformation" xlink:type="extended">
  <loc xlink:href="http://taxonomies.xbrl.us/us-gaap/2009/non-gaap/dei-2009-01-31.xsd#dei_EntityRegistrantName" xlink:label="EntityRegistrantName" xlink:type="locator" />
  <loc xlink:href="bvf-20081231.xsd#bvf_DocumentAndEntityInformationAbstract" xlink:label="DocumentAndEntityInformationAbstract" xlink:type="locator" />
  <presentationArc order="10" use="optional" xlink:arcrole="http://www.xbrl.org/2003/arcrole/parent-child" xlink:from="DocumentAndEntityInformationAbstract" xlink:to="EntityRegistrantName" xlink:title="presentation:DocumentAndEntityInformationAbstract to EntityRegistrantName" xlink:type="arc" />
  <loc xlink:href="http://taxonomies.xbrl.us/us-gaap/2009/non-gaap/dei-2009-01-31.xsd#dei_EntityCentralIndexKey" xlink:label="EntityCentralIndexKey" xlink:type="locator" />
  <presentationArc order="20" use="optional" xlink:arcrole="http://www.xbrl.org/2003/arcrole/parent-child" xlink:from="DocumentAndEntityInformationAbstract" xlink:to="EntityCentralIndexKey" xlink:title="presentation:DocumentAndEntityInformationAbstract to EntityCentralIndexKey" xlink:type="arc" /> 
</presentationLink>

For each presentationLink i want to find out presentationArc  which has duplicate values of @order attribute and the corresponding line number, for each i have to give duplicate order value error.

Please suggest how can I do this.

Thanks

Sweta