Hi:<br>
<br>
I am trying to enforce a uniqueness constraint within my xmlcontent XSD in opencms :<br>
<br>
....<br>
<xsd:complexType name="OpenCmsComesCurrencyRate"><br>
<xsd:all><br>
<xsd:element name="Currency" type="OpenCmsString" minOccurs="1"/><br>
<xsd:element name="CurrencyUSDRate" type="OpenCmsString"
minOccurs="1"/><br>
<xsd:element name="CurrencyBuyingRate" type="OpenCmsString"
minOccurs="1"/><br>
<xsd:element name="CurrencySellingRate" type="OpenCmsString"
minOccurs="1"/> <br>
</xsd:all><br>
<xsd:attribute name="language" type="OpenCmsLocale" use="optional"/><br>
</xsd:complexType><br clear="all">.....<br>
<br>
This section appears as nested xmlcontent, and can be repeated multiple times within the parent xml content....<br>
<br>
"Currency" is a selector which allows the user to pick a currency
type. However, i would like to enforce a constraint, that prevents<br>
the user from repeating the same currency if it has already been selected....<br>
<br>
i tried adding a xsd:unique constraint (as shown below...), but opencms
doesnt seems to recognise it , and i get marshalling xml errors....<br>
<br>
<xsd:complexType name="OpenCmsComesCurrencyRate"><br>
<xsd:all><br>
<xsd:element name="Currency" type="OpenCmsString" minOccurs="1"/><br>
<xsd:element name="CurrencyUSDRate" type="OpenCmsString"
minOccurs="1"/><br>
<xsd:element name="CurrencyBuyingRate" type="OpenCmsString"
minOccurs="1"/><br>
<xsd:element name="CurrencySellingRate" type="OpenCmsString"
minOccurs="1"/> <br>
</xsd:all><br>
<xsd:attribute name="language" type="OpenCmsLocale" use="optional"/><br>
<xsd:unique name="Currency"><br>
<xsd:selector xpath="....." /><br>
...........<br>
</xsd:unique><br>
</xsd:complexType><br clear="all">
<br>
<br>
Does OpenCMS support xsd unique constraints? Is there any other way to enforce uniqueness within opencms?<br>
<br>
thanks<br>
<br>
Ashok<br>
<br>-- <br>++++ Ashok Hariharan ++++