if

Top  Previous  Next

- if <container name, container name, ...>

 

When used, it means that the container that it is applied to must be present if the "other" container(s) are also present.

 

For example:

 

<MedicationPrescribed>
    <DrugDescription maxLength="105" regex="([!-~]|[ ])*[!-~]([!-~]|[ ])*">DrugDescription</DrugDescription>
    <DrugCoded minOccurs="0">
        <ProductCode maxLength="35" minOccurs="0" regex="[ !-~]*"></ProductCode>
    </DrugCoded>
    <Quantity if="DrugCoded" minOccurs="0">
        <Value maxLength="11" regex="^(^(([!-~]|[ ])*[!-~]([!-~]|[ ])*)|^([0-9]+(\.[0-9]+)?))">Value</Value>
    </Quantity>
</MedicationPrescribed>