The use of a ``++targetNamespace++`` in an XSD means that all the elements described in the XSD are restricted to that namespace, rather than landing in the global namespace. This provides clarity, and makes the schema easier to use in concert with other schemas that might define elements with the same names. 


== Noncompliant Code Example

[source,xml]
----
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           elementFormDefault="qualified" version="1">  <!-- Noncompliant -->
...
----


== Compliant Solution

[source,xml]
----
<xs:schema targetNamespace="http://www.codeSamples.com/fruit"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           elementFormDefault="qualified" version="1">
...
----

ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

include::message.adoc[]

include::highlighting.adoc[]

endif::env-github,rspecator-view[]
