40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
The ``++<xs:all>++`` group element isn't supported universally among web service stacks. That means that if you use it, you may end up failing to transmit your data (in the resulting XML files) to systems that can't process it. For that reason, ``++<xs:sequence>++`` should be used instead. The only constraint imposed by the use of an ``++<xs:sequence>++`` is the order it imposes, but that is usually a benefit for human readers.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
[source,xml]
|
|
----
|
|
<xs:complexType name="fruitType">
|
|
<xs:all> <!-- Noncompliant -->
|
|
<xs:element name="name" type="xs:string"/>
|
|
<xs:element name="color" type="xs:string"/>
|
|
</xs:all>
|
|
</xs:complexType>
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
[source,xml]
|
|
----
|
|
<xs:complexType name="fruitType">
|
|
<xs:sequence>
|
|
<xs:element name="name" type="xs:string"/>
|
|
<xs:element name="color" type="xs:string"/>
|
|
</xs:sequence>
|
|
</xs:complexType>
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::message.adoc[]
|
|
|
|
include::highlighting.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|