Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why schema have two grammer????

 
Leo Tien
Ranch Hand
Posts: 156
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I find that the schema document have two different grammer.
One is like this:
<ElementType name="AD" content="eltOnly" model="closed">
<element type="StAd" minOccurs="0"/>
<element type="OtDe" minOccurs="0"/>
<element type="City" minOccurs="0"/>
<element type="StPr" minOccurs="0"/>
<element type="ZipPC" minOccurs="0"/>
<element type="Country" minOccurs="0"/>
<element type="AdTy" minOccurs="0"/>
<element type="OtGD" minOccurs="0"/>
</ElementType>
<ElementType name="StAd" content="textOnly" model="closed"/>
<ElementType name="OtDe" content="textOnly" model="closed"/>
<ElementType name="City" content="textOnly" model="closed"/>
<ElementType name="StPr" content="textOnly" model="closed"/>
<ElementType name="ZipPC" content="textOnly" model="closed"/>
<ElementType name="Country" content="textOnly" model="closed"/>
<ElementType name="AdTy" content="textOnly" model="closed"/>
<ElementType name="OtGD" content="textOnly" model="closed"/>

and two is:
<xsd:complexType name="USAddress">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="street" type="xsd:string"/>
<xsd:element name="city" type="xsd:string"/>
<xsd:element name="state" type="xsd:string"/>
<xsd:element name="zip" type="xsd ecimal"/>
</xsd:sequence>
<xsd:attribute name="country" type="xsd:NMTOKEN"
fixed="US"/>
</xsd:complexType>

Why ???
please tell me...
thank
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first one is not the XML schema based on http://www.w3c.org/XML/Schema
 
Lance Duncan
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the first is old one, but has some advantange over the newer one
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic