I have this XSD element defined:
<xsd:element name="CU_FIRST_NAME">
<xsd:annotation>
<xsd:documentation>
The first name of the customer that is getting billed for the order
</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="50"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
I know this could be replaced by a single element, but I have a more complex element (a sequence) that I need to make optional.
Is there a way to make a first-child (i.e. just below <xsd:schema> in the hierarchy) element optional?
To be clear, I’d like to make the entire CU_FIRST_NAME node, along with all of its children, optional.
I ended up realizing that the element I was using was actually a ref within a higher level object.
The way I solved this was thus:
Original code:
New code:
So, really I was asking the wrong question.