0

In an OpenCMS environment I have created a link object:

    <xsd:sequence>
        <xsd:element name="LinkTitle" type="OpenCmsString" minOccurs="1" maxOccurs="1" />
        <xsd:element name="InternalLink" type="OpenCmsVfsFile" minOccurs="0" maxOccurs="1" />
        <xsd:element name="ExternalLink" type="OpenCmsString" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>

This means that LinkTitle is always mandatory. This is correct. Given a LinkTitle, one (and only one) between InternalLink and ExternalLink must be provided. If I set minOccurs="1" for both fields doesn't makes any sense. What can I do? It should be usefull if I could create two regex (one for InternalLink and one for ExternalLink) and than make an OR (rather than the usual AND) beetween them.

BAD_SEED
  • 4,840
  • 11
  • 53
  • 110

1 Answers1

1

you can use nested XSD option. refer this link http://arquivo.bng-galiza.org/opencms/opencms/alkacon-documentation/documentation_xmlcontent/step5-nestedcontents.html

praveen
  • 11
  • 1