1

I have been asked to document an XML Schema file. I am required to include business and technical descriptions for each of the schema elements. Looking at our guidelines and the W3C XML Schema recommendation, I find myself wondering what exactly the best practice would be.

Our guidelines state that the annotation tag should have the following format:

<xs:annotation>
    <xs:documentation source="BusinessDescription">This is the business description</xs:documentation>
    <xs:documentation source="TechnicalDescription">This is the business description</xs:documentation>
</xs:annotation>

The XML recommendation states that the source attribute should be of type "xs:anyURI". Obviously "BuinessDescription" and "TechnicalDescription" are not URI's and will be repeated numerous throughout the schema. Therefore, is it really correct to use the source attribute as a semantic attribute?

In XML Schema http://shop.oreilly.com/product/9780596002527.do Eric van der Vlist suggests that this is acceptable but also contradicts this view by stating that it could lead to interoperability issues.

1 Answers1

3

You can put well formed xml in there instead of just text, so instead of bastardising a known standard attribute. Just have <Business>This is the business...</Business><Technical>This is the technical....</Tecnhical> nodes in there.

Tony Hopkinson
  • 20,172
  • 3
  • 31
  • 39