Condition coding in XML Schema?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • S?an

    #1

    Condition coding in XML Schema?

    I have an xml file that is validated through an xsd which is sent to
    one of our customers. They translate it through xsl, validate it then
    send it to another of their contractors. To clean up any errors that
    might happen, we are changing our xsd to validate our data according
    to the second xsd. However, as you can imagine, some of our xml is
    significantly changed in the xsl.

    My problem: I have a series of products that need to contain a
    discount date, so I have made this:
    xs:restriction base="xs:string "
    xs:minLength value="1"
    xs:maxLength value="12"
    xs:restriction
    xs:simpleType

    However, if the product is variable, it does not have a discount date
    value, and therefore the min length can be 0, but only in this case...

    Is there a way that I can fix my validation? Should I go back to the
    stored procedure to fix this?
Working...