Annotations for element tags : Annotation « XML Schema « XML Tutorial

Home
XML Tutorial
1.Introduction
2.Namespace
3.XML Schema
4.XPath
5.XSLT stylesheet
XML Tutorial » XML Schema » Annotation 
3.82.3.Annotations for element tags
<?xml version = "1.0" ?>
<xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema">
   <xs:annotation>
      <xs:documentation>
         Schema for customer name information.
      </xs:documentation>
   </xs:annotation>
   <xs:element name = "Customer">
       <xs:annotation>
          <xs:documentation>
             MiddleInitial is optional 
          </xs:documentation>
       </xs:annotation>
      <xs:complexType>
         <xs:group ref = "NameGroup" />
      </xs:complexType>
   </xs:element>
   <xs:group name = "NameGroup">
      <xs:sequence>
         <xs:element name = "FirstName" type = "xs:string" />
         <xs:element name = "MiddleInitial" type = "xs:string" />
         <xs:element name = "LastName" type = "xs:string" />
      </xs:sequence>
   </xs:group>
</xs:schema>
3.82.Annotation
3.82.1.Annotations provides documentation information, as well as additional application information
3.82.2.Annotating Schemas: add information about your schema or its elements.
3.82.3.Annotations for element tags
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.