The title of this section says it all! Using the
xsi
namespace creates a dependency between the
instance documents and a specific schema technology, and this
dependency is questionable as such. One of the major strengths of XML
is the decoupling between the information available in the documents
and the applications that retrieve and process this information. If
we consider a schema validator one of these applications, including
schema features in the instance documents breaks this rule.
Another reason why the use of these features is questionable is we’ve learned that the life span of data or information is longer than the life span of the applications. We can suppose in many cases that the XML documents we create today will outlive the W3C XML Schema 1.0 technology. The Working Group started thinking about XML Schema 1.1 before 1.0 became a Recommendation, and these dependencies are potential migration issues. XML 1.0 has already seen two generations of schema languages (DTD and W3C XML Schema 1.0), and functionality bundled with the DTDs that has not been included into W3C XML Schema (such as external parsed and unparsed entities) are at risk of becoming deprecated in common use. Furthermore, there are other schema technologies; integrating your documents tightly with W3C XML Schema may close some doors that might be needed for your application.
On the other hand, these attributes are available in the instance
documents for nonschema-aware applications, and you can easily
process a xsi:type
or xsi:nil
attribute using a simple XSLT transformation.
The last thing to note about these attributes is they are attributes!
This may seem obvious, but attributes can’t be
included within attributes. This means that one cannot qualify an
attribute with xsi:nil
or
xsi:type
. This introduces a new differentiation
between elements and attributes which XML application designers might
need to consider.