469,306 Members | 2,012 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,306 developers. It's quick & easy.

DTD Definition

6
HI

l want create a DTD so that my program java can read from it, this is my source and l'm using SAX

<?xml version= "1.0" standalone = "yes"?>
<!DOCTYPE CHECKOUTLIST[
<!ELEMENT CHECKOUTLIST (OPERATOR,CUSTOMERLIST,CUSTOMER )*>

<!ELEMENT OPERATOR (#PCDATA)>
<!ATTLIST OPERATOR NAME CDATA #REQUIRED STAFFID CDATA #REQUIRED >

<!ELEMENT CUSTOMERLIST (#PCDATA)>

<!ELEMENT CUSTOMER (PAYMENT,VOUCHER,LOYALTYCARD)>

<!ATTLIST CUSTOMER CHECKINTIME CDATA #REQUIRED
CHECKOUTTIME CDATA #REQUIRED >

<!ATTLIST PAYMENT TYPE CDATA #REQUIRED AMOUNT CDATA #REQUIRED>

<!ATTLIST VOUCHERS AMOUNT CDATA #IMPLIED>

<! ATTLIST LOYALTYCARD ID CDATA #REQUIRED>

]>

<CHECKOUTLIST>

<OPERATOR NAME = "Sally Tompson" STAFFID = "334561Q"/>

<CUSTOMERLIST>

<CUSTOMER CHECKINTIME = "34556" CHECKOUTTIME = "34565"/>

<PAYMENT TYPE = "Cash" AMOUNT = "457"/>
<VOUCHERS AMOUNT ="120"/>
<LOYALTYCARD ID = "ERT558"/>

</CUSTOMER >

<CUSTOMER CHECKINTIME = "34590" CHECKOUTTIME = "34602"/>

<PAYMENT TYPE = "CreditCard" AMOUNT = "8899"/>
<VOUCHERS AMOUNT ="0"/>

</CUSTOMER >

CUSTOMER CHECKINTIME = "34604" CHECKOUTTIME = "34612"/>

<PAYMENT TYPE = "Switch" AMOUNT = "2310"/>
<VOUCHERS AMOUNT ="0"/>
<LOYALTYCARD ID = "ERU770"/>

</CUSTOMER >

CUSTOMER CHECKINTIME = "34615" CHECKOUTTIME = "34619"/>

<PAYMENT TYPE = "Switch" AMOUNT = "3455"/>
<VOUCHERS AMOUNT ="25"/>
<LOYALTYCARD ID = "ERZ669"/>

</CUSTOMER >

</CUSTOMERLIST>


</CHECKOUTLIST>
l've been working on since a week, but still doesn't work,
Please any idea
thanks
Jun 14 '07 #1
1 1120
Dököll
2,364 Expert 2GB
Hi!

Hopefully you have a little time to read this information. Looks helpful:

http://www.w3schools.com/dtd/default.asp

In a bit!
Jul 4 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Dave H | last post: by
7 posts views Thread by Neil Zanella | last post: by
19 posts views Thread by J. J. Farrell | last post: by
10 posts views Thread by Kobu | last post: by
18 posts views Thread by shaanxxx | last post: by
15 posts views Thread by vaib | last post: by
275 posts views Thread by Astley Le Jasper | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.