I am trying to use fn:distinct-values to get all distinct values of some element. My $body contains an <OrganisationDetails> element which contains a collection of <ContactMethod> elements. Each <ContactMethod> element has in turn a <DetailType> element that gives its type, such as "Phone" or "Email".
Using an XPath editor, instruction
distinct-values(ns1:OrganisationDetails/ns2:ContactMethod/ns2:DetailType)
correctly returns four values: Mobile, Fax, Email, Phone. Each of these is of type xs:untypedAtomic.
Using OSB, the same instruction in an Assign component returns only one value: Mobile. Incidentally this is the <DetailType> value of the first of the seven <ContactMethod> elements. The other <DetailType> values (Fax, Email, Phone) are not returned. Is this a known limitation of OSB 11.1.1.6.0 distinct-values function?
Ivan
Message was edited by: user10129406
Here is the XML contents:
<ns1:OrganisationDetails xmlns:ns1="http://www.ns1.com" xmlns:ns2="http://www.ns2.com">
<ns2:ContactMethod>
<ns2:PrimaryIndicator>false</ns2:PrimaryIndicator>
<ns2:Purpose>Business</ns2:Purpose>
<ns2:DetailType>Mobile</ns2:DetailType>
<ns2:Details>13132221548</ns2:Details>
<ns2:EffectiveDate>2013-02-01</ns2:EffectiveDate>
</ns2:ContactMethod>
<ns2:ContactMethod>
<ns2:PrimaryIndicator>false</ns2:PrimaryIndicator>
<ns2:Purpose>Home</ns2:Purpose>
<ns2:DetailType>Mobile</ns2:DetailType>
<ns2:Details>1312134</ns2:Details>
<ns2:EffectiveDate>2013-02-01</ns2:EffectiveDate>
</ns2:ContactMethod>
<ns2:ContactMethod>
<ns2:PrimaryIndicator>false</ns2:PrimaryIndicator>
<ns2:Purpose>Business</ns2:Purpose>
<ns2:DetailType>Fax</ns2:DetailType>
<ns2:Details>4545</ns2:Details>
<ns2:EffectiveDate>2013-02-01</ns2:EffectiveDate>
</ns2:ContactMethod>
<ns2:ContactMethod>
<ns2:PrimaryIndicator>true</ns2:PrimaryIndicator>
<ns2:Purpose>Personal</ns2:Purpose>
<ns2:DetailType>Email</ns2:DetailType>
<ns2:Details>hello@gmail.com</ns2:Details>
<ns2:EffectiveDate>2013-06-25</ns2:EffectiveDate>
</ns2:ContactMethod>
<ns2:ContactMethod>
<ns2:PrimaryIndicator>false</ns2:PrimaryIndicator>
<ns2:Purpose>Home</ns2:Purpose>
<ns2:DetailType>Mobile</ns2:DetailType>
<ns2:Details>13133221565343</ns2:Details>
<ns2:EffectiveDate>2013-06-25</ns2:EffectiveDate>
</ns2:ContactMethod>
<ns2:ContactMethod>
<ns2:PrimaryIndicator>false</ns2:PrimaryIndicator>
<ns2:Purpose>Home</ns2:Purpose>
<ns2:DetailType>Fax</ns2:DetailType>
<ns2:Details>45453622456</ns2:Details>
<ns2:EffectiveDate>2013-06-25</ns2:EffectiveDate>
</ns2:ContactMethod>
<ns2:ContactMethod>
<ns2:PrimaryIndicator>false</ns2:PrimaryIndicator>
<ns2:Purpose>Home</ns2:Purpose>
<ns2:DetailType>Phone</ns2:DetailType>
<ns2:Details>45467835670</ns2:Details>
<ns2:EffectiveDate>2013-06-25</ns2:EffectiveDate>
</ns2:ContactMethod>
</ns1:OrganisationDetails>