Hi all
I have following xml structure. <field1> and <field2> are text fields. User enters many types and categories. The validation has to check if a type combinated with category already exist.
In this sample A1 and B2 is double in the structure. How can I set the validation in <category>?
This is my validation:
concat(../my:type, .) = ../../preceding-sibling::my:repeatingGroup1[concat(my:group2/my:type, my::group2/my:category)]
It doesn't work.
Has anybody a solution for me?
type category
-----------------------
A 1
B 2
A 1 --> validation- already exists
C 3
B 2 --> validation- already exists
<group1>
<repeatingGroup1>
<group2>
<type>A</type>
<category>1</category>
</group2>
<repeatingGroup1>
<repeatingGroup1>
<group2>
<type>B</type>
<category>2</category>
</group2>
<repeatingGroup1>
<repeatingGroup1>
<group2>
<type>A</type>
<category>1</category>
</group2>
<repeatingGroup1>
<repeatingGroup1>
<group2>
<type>C</type>
<category>3</category>
</group2>
<repeatingGroup1>
<repeatingGroup1>
<group2>
<type>B</type>
<category>2</category>
</group2>
<repeatingGroup1>
<group1>