XML technologies / XML Schema / XML Schema element reference / xs:documentation

(Excerpt from “XML Schema” by Eric van der Vlist)

Documentation for people.

<xs:documentation
    source = xs:anyURI
    xml:lang = xml:lang
    >
    Content: ({any})*
</xs:documentation>

May occur within: xs:annotation

Description

xs:documentation is a container for human-readable documentation in plain text or structured form. Its open content model accepts any element from any namespace with validation lax; elements from W3C XML Schema supplied here must be valid. xs:documentation can hold any kind of information.

The content resembles xs:appinfo, reserved for information processed by applications, except for attribute xml:lang, allowed on xs:documentation but forbidden on xs:appinfo.

Restrictions

Foreign attributes cannot be specified for xs:documentation. Attribute source is insufficiently specified in the recommendation, possibly causing interoperability problems between applications accessing xs:documentation.

Example

<xs:element name="author" type="author">
    <xs:annotation>
        <xs:documentation xml:lang="en">The author of a book.</xs:documentation>
        <xs:documentation xml:lang="de">Der Autor eines Buches.</xs:documentation>
    </xs:annotation>
</xs:element>

Attributes

source
Can link to the information source when an excerpt is given; can also act as a semantic attribute identifying the information’s nature.

xml:lang
Documentation language.

   

 

 

 

back to top