Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

writing schema for multiple elements with same name with diff. content

843834Jun 29 2004 — edited Jun 30 2004
following is the XML file,
<?xml version="1.0" encoding="utf-8"?>

<e-abstract xmlns="http://www.citicorp.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="Deed.xsd">
<deed>
<deed_type>
<deedtyp name="Quit Claim" value="Q" />
<deedtyp name="sheriff's deed" value="Sheriff" />
<deedtyp name="Warranty" value="W" />
</deed_type>
<deed>

</e-abstract>
--- end----
in this I have 3 elements of deedtyp , how i can write them in .xsd file as these elements have same name?Please help, if u have idea about this...

i have written .xsd up to deed_type,
----Deed.xsd----
<? xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.citicorp/2001/XMLSchema"
targetNamespace="http://www.citicorp.com"
xmlns="http://www.citicorp.com"
elementFormDefault="qualified">

<xs:element name="deed_type" type="string" use="required"/>
<xs:simpleType name="string">
<xs:restriction base="xs:string">

</xs:restriction>
</xs:simpleType>

</xs:schema>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 28 2004
Added on Jun 29 2004
3 comments
169 views