Publicité
Converting dt ds to xml schemas
Converting dt ds to xml schemas
Converting dt ds to xml schemas
Converting dt ds to xml schemas
Publicité
Converting dt ds to xml schemas
Converting dt ds to xml schemas
Converting dt ds to xml schemas
Prochain SlideShare
Microformats and SEOMicroformats and SEO
Chargement dans ... 3
1 sur 7
Publicité

Contenu connexe

Publicité

Converting dt ds to xml schemas

  1. Prepared By: Dr.Saranya K.G Converting DTDs to XML Schemas <!ELEMENT rss (channel)> <!ATTLIST rss version CDATA #REQUIRED> <!-- must be "0.91"> --> <!ELEMENT channel (title | description | link | language | item+ | rating? | image? | textinput? | copyright? | pubDate? | lastBuildDate? | docs? | managingEditor? | webMaster? | skipHours? | skipDays?)*> <!ELEMENT title (#PCDATA)> <!ELEMENT description (#PCDATA)> <!ELEMENT link (#PCDATA)> <!ELEMENT image (title | url | link | width? | height? | description?)*> <!ELEMENT url (#PCDATA)> <!ELEMENT item (title | link | description)*> <!ELEMENT textinput (title | description | name | link)*> <!ELEMENT name (#PCDATA)> <!ELEMENT rating (#PCDATA)> <!ELEMENT language (#PCDATA)> <!ELEMENT width (#PCDATA)> <!ELEMENT height (#PCDATA)> <!ELEMENT copyright (#PCDATA)> <!ELEMENT pubDate (#PCDATA)> <!ELEMENT lastBuildDate (#PCDATA)> <!ELEMENT docs (#PCDATA)> <!ELEMENT managingEditor (#PCDATA)> <!ELEMENT webMaster (#PCDATA)> <!ELEMENT hour (#PCDATA)> <!ELEMENT day (#PCDATA)> <!ELEMENT skipHours (hour+)> <!ELEMENT skipDays (day+)>
  2. Prepared By: Dr.Saranya K.G <schema xmlns='http://www.w3.org/1999/XMLSchema' targetNamespace='http://purl.org/rss/0.91' xmlns:rss='http://purl.org/rss/0.91'> <element name='rss'> <complexType content='elementOnly'> <element ref='rss:channel'/> <attribute name='version' type='string' use='required'/> </complexType> </element> <element name='channel'> <complexType content='elementOnly'> <choice minOccurs='0' maxOccurs='unbounded'> <element ref='rss:title'/> <element ref='rss:description'/> <element ref='rss:link'/> <element ref='rss:language'/> <element ref='rss:item'/> <element ref='rss:+'/> <element ref='rss:rating'/> <element ref='rss:?'/> <element ref='rss:image'/> <element ref='rss:?'/> <element ref='rss:textinput'/> <element ref='rss:?'/> <element ref='rss:copyright'/> <element ref='rss:?'/> <element ref='rss:pubDate'/> <element ref='rss:?'/> <element ref='rss:lastBuildDate'/> <element ref='rss:?'/> <element ref='rss:docs'/> <element ref='rss:?'/> <element ref='rss:managingEditor'/> <element ref='rss:?'/> <element ref='rss:webMaster'/> <element ref='rss:?'/> <element ref='rss:skipHours'/> <element ref='rss:?'/> <element ref='rss:skipDays'/> <element ref='rss:?'/> </choice> </complexType>
  3. Prepared By: Dr.Saranya K.G </element> <element name='title'> <complexType content='mixed'> </complexType> </element> <element name='description'> <complexType content='mixed'> </complexType> </element> <element name='link'> <complexType content='mixed'> </complexType> </element> <element name='image'> <complexType content='elementOnly'> <choice minOccurs='0' maxOccurs='unbounded'> <element ref='rss:title'/> <element ref='rss:url'/> <element ref='rss:link'/> <element ref='rss:width'/> <element ref='rss:?'/> <element ref='rss:height'/> <element ref='rss:?'/> <element ref='rss:description'/> <element ref='rss:?'/> </choice> </complexType> </element> <element name='url'> <complexType content='mixed'> </complexType> </element> <element name='item'> <complexType content='elementOnly'> <choice minOccurs='0' maxOccurs='unbounded'> <element ref='rss:title'/> <element ref='rss:link'/> <element ref='rss:description'/> </choice> </complexType>
  4. Prepared By: Dr.Saranya K.G </element> <element name='textinput'> <complexType content='elementOnly'> <choice minOccurs='0' maxOccurs='unbounded'> <element ref='rss:title'/> <element ref='rss:description'/> <element ref='rss:name'/> <element ref='rss:link'/> </choice> </complexType> </element> <element name='name'> <complexType content='mixed'> </complexType> </element> <element name='rating'> <complexType content='mixed'> </complexType> </element> <element name='language'> <complexType content='mixed'> </complexType> </element> <element name='width'> <complexType content='mixed'> </complexType> </element> <element name='height'> <complexType content='mixed'> </complexType> </element> <element name='copyright'> <complexType content='mixed'> </complexType> </element> <element name='pubDate'> <complexType content='mixed'> </complexType>
  5. Prepared By: Dr.Saranya K.G </element> <element name='lastBuildDate'> <complexType content='mixed'> </complexType> </element> <element name='docs'> <complexType content='mixed'> </complexType> </element> <element name='managingEditor'> <complexType content='mixed'> </complexType> </element> <element name='webMaster'> <complexType content='mixed'> </complexType> </element> <element name='hour'> <complexType content='mixed'> </complexType> </element> <element name='day'> <complexType content='mixed'> </complexType> </element> <element name='skipHours'> <complexType content='elementOnly'> <element ref='rss:hour' maxOccurs='unbounded'/> </complexType> </element> <element name='skipDays'> <complexType content='elementOnly'> <element ref='rss:day' maxOccurs='unbounded'/> </complexType> </element> </schema>
  6. Prepared By: Dr.Saranya K.G Sample DTD <!ELEMENT root (foo|(bar,baz)+)*> <!ATTLIST root version CDATA #FIXED '1.0'> <!ELEMENT foo EMPTY> <!ELEMENT bar (#PCDATA)> <!ELEMENT baz (#PCDATA|mumble)*> <!ELEMENT mumble ANY> XML Schema grammar: <?xml version="1.0" encoding="UTF-8" ?> <!-- Generated from data/dtd/test.dtd --> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <!-- <!ELEMENT root (foo|(bar,baz)+)*> --> <xsd:element name="root"> <xsd:complexType> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:element ref="foo" /> <xsd:sequence minOccurs="1" maxOccurs="unbounded"> <xsd:element ref="bar" /> <xsd:element ref="baz" /> </xsd:sequence> </xsd:choice> <!-- <!ATTLIST root version CDATA #FIXED "1.0"> --> <xsd:attribute name="version" fixed="1.0"> <xsd:simpleType> <xsd:restriction base="xsd:string" />
  7. Prepared By: Dr.Saranya K.G </xsd:simpleType> </xsd:attribute> </xsd:complexType> </xsd:element> ... </xsd:schema>
Publicité