|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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> |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > DTD to Schema |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|