XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old August 12th, 2003, 03:52 PM
abansal_uci abansal_uci is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 1 abansal_uci User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
DTD to Schema

Hi,

I have designed an XML file, which has the following DTD. I am more inclined to make a Schema for the XML file, but are having problems designing a Schema file for my XML file.

Can anybody help me make a Schema, if I provide you the DTD file i have constructed.

Thanks,
Amit


DTD FILE for my XML FILE


<?xml encoding="UTF-8"?>
<!ELEMENT project (feature)+>

<!ELEMENT feature (corba+)>
<!ATTLIST feature name ID #REQUIRED>
<!ATTLIST feature depends IDREF #REQUIRED>

<!ELEMENT corba (description+)>
<!ATTLIST corba interface ID #REQUIRED>
<!ATTLIST corba type CDATA #REQUIRED>
<!ATTLIST corba contains CDATA #REQUIRED>

<!ELEMENT description (#PCDATA)>


P.S.:- I am also attaching my XML File.
Attached Files
File Type: xml features.xml (10.8 KB, 209 views)

Reply With Quote
  #2  
Old August 21st, 2003, 09:02 AM
raman_27 raman_27 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Chennai(Madras)
Posts: 13 raman_27 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
DTD to Schema conversion

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="corba">
<xs:complexType>
<xs:sequence>
<xs:element ref="description" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="interface" type="xs:ID" use="required"/>
<xs:attribute name="type" type="xs:string" use="required"/>
<xs:attribute name="contains" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="description" type="xs:string"/>
<xs:element name="feature">
<xs:complexType>
<xs:sequence>
<xs:element ref="corba" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" type="xs:ID" use="required"/>
<xs:attribute name="depends" type="xs:IDREF" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="project">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element ref="feature"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > DTD to Schema


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway