The annotation Element
The annotation element provides a mechanism
for documenting most other schema elements. Unlike an XML comment,
which looks like <!-- comment text -->,
the annotation is part of the schema component. An annotation provides
for human documentation in one or more languages, as well as programmatic
documentation, such as
meaningful URIs.
<xsd:element name="pmb"
type="xsd:string"
substitutionGroup="addressLine"
minOccurs="1"
maxOccurs="1">
<xsd:annotation id="customerRecord.annotation.pmb">
<xsd:documentation
source="http://new.usps.com/cgi-bin/uspsbv/scripts/content.jsp?D=13647"
xml:lang="en">
A PMB is a "Private Mail Box" that is provided
by an entity other than the U S Postal Service.
</xsd:documentation>
<xsd:documentation xml:lang="en">
Developer Note: Someone should probably come up
with a way to actually validate PMBs. In fact,
it would be great if we could validate
every <pmb/> and <POBox/> element.
</xsd:documentation>
<xsd:appinfo
source="http://www.XMLSchemaReference.com/extractJava">
// A PMB is a "Private Mail Box" that is provided
// by an entity other than the U S Postal Service.
// -- create a class for the pmb
public class pmb
{
...
}
</xsd:appinfo>
<xsd:appinfo
source="http://www.XMLSchemaReference.com/extractPerl">
# A PMB is a "Private Mail Box" that is provided
# by an entity other than the U S Postal Service.
# -- create a variable for the PMB
$pmb=""
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
|