
Inline adoc files when they are included exactly once. Also fix language tags because this inlining gives us better information on what language the code is written in.
48 lines
1.1 KiB
Plaintext
48 lines
1.1 KiB
Plaintext
== Why is this an issue?
|
|
|
|
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)
|
|
|
|
=== Message
|
|
|
|
Use a "sequence" here instead.
|
|
|
|
|
|
=== Highlighting
|
|
|
|
``++xs:all++``
|
|
|
|
|
|
endif::env-github,rspecator-view[]
|