Read (attribute | attributeGroup)
as allowing either attribute
or attributeGroup
.
Read (attribute | attributeGroup)*
as allowing zero or more of attribute
or attributeGroup
. Each time you go back for another possible occurrence of an attribute
or attributeGroup
, you may again choose either one. Therefore, this construct allows an arbitrary sequence of zero or more attribute
or attributeGroup
in any order.
So, in full XML Schema terms, for example, the following Type
definition is supported by the BNF for complexType
:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="1.0">
<xs:attributeGroup name="AttributeGroupXY1">
<xs:attribute name="attributeX1"/>
<xs:attribute name="attributeY1"/>
</xs:attributeGroup>
<xs:attributeGroup name="AttributeGroupXY2">
<xs:attribute name="attributeX2"/>
<xs:attribute name="attributeY2"/>
</xs:attributeGroup>
<xs:complexType name="Type">
<xs:attribute name="attributeA"/>
<xs:attribute name="attributeB"/>
<xs:attributeGroup ref="AttributeGroupXY1"/>
<xs:attribute name="attributeC"/>
<xs:attributeGroup ref="AttributeGroupXY2"/>
</xs:complexType>
</xs:schema>