Page 1 of 1

Generate Sample XML Omit Element and other more complex generations

Posted: Thu May 21, 2020 12:24 am
by bobstuart
  1. Using the generate sample XML I'd like to customize it to omit some of the optional elements. For the current testing they are not worth having. I could modify the schema to eliminate them but thought I should be able to set preferred number of repetitions to Zero and have it vanish.
  2. I also have more complex constraints done in schematron I'd like to be able to do things like if element X has attribute value Y then pick content value from list Z e.g.
    <responsibleParty type='company'>Apple</responsibleParty>
    or
    <responsibleParty type='person'>Bill Gates</responsibleParty>
    so When type=company pick one of (Apple, IBM, Microsoft) when type=person pick one of (Bill Gates, Steve Jobs, Charles Flint)
I'm not sure that I could modify the schema to perform number 2 right now the schema believes responsibleParty is a string and schematron has the two value lists to validate against.