
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.
50 lines
943 B
Plaintext
50 lines
943 B
Plaintext
== Why is this an issue?
|
|
|
|
Omitting the data type of an attribute or element leaves it to default to ``++xs:any++`` for elements, and ``++xs:anyType++`` for attributes. However there is no reason for making such a significant design decision implicit..
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,xml]
|
|
----
|
|
<xs:element name="fruit">
|
|
<xs:complexType>
|
|
<xs:sequence>
|
|
<xs:element name="color"/> <!-- Noncompliant -->
|
|
</xs:sequence>
|
|
</xs:complexType>
|
|
</xs:element>
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,xml]
|
|
----
|
|
<xs:element name="fruit">
|
|
<xs:complexType>
|
|
<xs:sequence>
|
|
<xs:element name="color" type="xs:string"/>
|
|
</xs:sequence>
|
|
</xs:complexType>
|
|
</xs:element>
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
Specify the type of this (attribute|element).
|
|
|
|
|
|
=== Highlighting
|
|
|
|
``++xs:(element|attribute)++``
|
|
|
|
|
|
endif::env-github,rspecator-view[]
|