aspose file tools*
The moose likes XML and Related Technologies and the fly likes why schema have two grammer???? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "why schema have two grammer????" Watch "why schema have two grammer????" New topic
Author

why schema have two grammer????

Leo Tien
Ranch Hand

Joined: Sep 10, 2002
Posts: 156
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

Joined: Jul 13, 2001
Posts: 3150
The first one is not the XML schema based on http://www.w3c.org/XML/Schema


Spritle Software Blogs
Lance Duncan
Ranch Hand

Joined: Jul 28, 2003
Posts: 39
the first is old one, but has some advantange over the newer one
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why schema have two grammer????