<xsd:element maxOccurs="1" minOccurs="0" name="cursor">
  <xsd:complexType>
    <xsd:sequence />-------------->?
    <xsd:attribute name="numRows" type="xsd:integer" />
    <xsd:attribute name="id" type="xsd:double" />
    <xsd:attribute name="position" type="xsd:integer" />
    <xsd:attribute name="maxRows" type="xsd:integer" />
 </xsd:complexType>
</xsd:element>

What is the significance of <xsd:sequence /> in above schema? Please help.

有帮助吗?

解决方案 2

It means nothing as far as I can tell.

The cursor element can take the 4 attributes ( numRows, id, position and maxRows ) and nothing else.

Taking out the <xsd:sequence/> would have no effect whatsoever.

In general <xsd:sequence> appears around a number of other elements that must appear in the specified order

其他提示

The <xs:sequence/> is saying that the content of the element (that is, its children) must be an empty sequence of element, that is, there must be no content - the element must be empty (except of course for attributes).

This is the default content model, so it's not necessary to say this, but it often does no harm to be explicit.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top