Maps to a UML Comment with or without the stereotype XSDannotation. The documentation content maps to the UML Comment body (name).
“documentation” maps as a UML comment, as outlined below:
- the “content” value - the comment name.
- the “xml:lang” value – the tag “xml:lang” value.
- the source value – the tag ”source” value.
“appinfo” maps as a tag value with the name “appInfoSource”:
- the “source” value will be the tag value.
- the “content” will be documentation for the tagged value.
When several annotation nodes appear on one element node, mapping shall be done as follows:
| Panel |
|---|
| title | annotation XML representation summary |
|---|
|
<annotation id = ID {any attributes with non-schema namespace …}> Content: (anninfn I dorumpnrarioWl. </annotation> <appinfo source = anyURI> Content: ({any})*</appinfo> <documentation source = anyURI xml:lang = language> Content: ({any})*</documentation> |
| Panel |
|---|
| title | XML representations of three kinds of annotation |
|---|
|
<xs:simpleType fn:note="special"> <xs:annotation> <xs:documentation>A type for experts only</xs:documentation> <xs:appinfo> <fn:specialHandling>checkForPrimes</fn:specialHandling> </xs:appinfo> </xs:annotation> |

annotation UML model example.
| Panel |
|---|
| title | annotation XML code sample |
|---|
|
<xs:schema xmlns:nm = "http://nomagic.com" xmlns:xs = "http://www.w3.org/2001/XMLSchema" targetNamespace = "http://nomagic.com"> <xs:annotation > <xs:appinfo source = "infoSource">infoContent</xs:appinfo> <xs:documentation source = "documentation source" xml:lang = "EN">the documentation for this schema</xs:documentation> </xs:annotation> </xs:schema> |