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:

“appinfo” maps as a tag value with the name “appInfoSource”:

When several annotation nodes appear on one element node, mapping shall be done as follows:

<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>


<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.
<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>