Looking for a DTD for developing an application

HI, I have to develop an app in Java which has to do with a DTD (Document type definition) a program that recognises all XML files which fits with that DTD.

The main problem is that I don磘 know where to look for an interesting DTD. Some help? Thanks.

PD: I know this isn't exactly a Java Programation question but as it is the biggest forum of programation I know I thougt that it would be very useful to me.

PD2: Sorry if my English is wrong.

[469 byte] By [Orwell83a] at [2007-11-27 10:00:48]
# 1
Do you use the scheme to replace the DTD?The DTD spec is too fussy to me.The scheme is used to check the xml document.
Stone.lia at 2007-7-13 0:32:22 > top of Java-index,Java Essentials,Java Programming...
# 2

Ask and you shall receive...

<?xml version="1.0"?>

<!DOCTYPE VCMAPIMessage [

><!ELEMENT VCMAPIMessage ( Message )>

<!ELEMENT Message (Ack | AddFunds | Buy | RAI | Register | RTH | Response | RemoveFunds | Sell | Terminate | TickerRequest)>

<!ATTLIST Message Type (ACK | ADDFUNDS | BUY | RAI | REGISTER | RTH | RESPONSE | REMOVEFUNDS | SELL | TERMINATE | TICKERREQ) #REQUIRED>

<!ELEMENT Ack (Status)>

<!ELEMENT Status (#PCDATA)>

<!ELEMENT AddFunds (AccountInformation, PersonalInformation, PaymentInformation, Amount)>

<!ELEMENT AccountInformation (AccountID, Password?, SecurityHash?)>

<!ELEMENT PersonalInformation (#PCDATA)>

<!ELEMENT PaymentInformation (#PCDATA)>

<!ELEMENT Amount (#PCDATA)>

<!ELEMENT AccountID (#PCDATA)>

<!ELEMENT Password (#PCDATA)>

<!ELEMENT SecurityHash (#PCDATA)>

<!ELEMENT Buy (BuyType, BuyOccurence, AccountInformation, TerminationDate?, Price?, PoolID, MinQuantity, MaxQuantity)>

<!ELEMENT BuyType (#PCDATA)>

<!ELEMENT BuyOccurence (#PCDATA)>

<!ELEMENT TerminationDate (Year, Month, Day, Hour, Minute)>

<!ELEMENT Year (#PCDATA)>

<!ELEMENT Month (#PCDATA)>

<!ELEMENT Day (#PCDATA)>

<!ELEMENT Hour (#PCDATA)>

<!ELEMENT Minute (#PCDATA)>

<!ELEMENT Price (#PCDATA)>

<!ELEMENT PoolID (#PCDATA)>

<!ELEMENT MinQuantity (#PCDATA)>

<!ELEMENT MaxQuantity (#PCDATA)>

<!ELEMENT RAI (AccountInformation)>

<!ELEMENT RTH (AccountInformation)>

<!ELEMENT Register (AccountInformation, TransactionID?)>

<!ELEMENT Response (AccountInformation?, TransactionID?, Information*, ParseErrors*)>

<!ELEMENT RemoveFunds (AccountInformation, PersonalInformation, PaymentInformation, Amount)>

<!ELEMENT Sell (TransactionID, SellType, SellOccurance, AccountInformation, TerminationDate?, Price?, PoolID, MinQuantity, MaxQuantity)>

<!ELEMENT SellType (#PCDATA)>

<!ELEMENT SellOccurance (#PCDATA)>

<!ELEMENT Terminate (AccountInformation, TransactionID)>

<!ELEMENT TransactionID (#PCDATA)>

<!ELEMENT TickerRequest (AccountInformation, Destination, Format?)>

<!ELEMENT Destination (#PCDATA)>

<!ELEMENT Format (#PCDATA)>

<!ELEMENT Information (#PCDATA)>

<!ELEMENT ParseErrors (#PCDATA)>

<!ELEMENT Signal (#PCDATA)>

<!ELEMENT Comments (#PCDATA)>

]>

FYI, so far as I know, if you're using SAX, you'll need to manually prepend the DTD to the beginning of your XML document. You might also consider using XML schema instead, as it is more powerful.

dcaudella at 2007-7-13 0:32:22 > top of Java-index,Java Essentials,Java Programming...