jQuery in Action, 3rd edition
The moose likes Product and Other Certifications and the fly likes DTD question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "DTD question" Watch "DTD question" New topic

DTD question

Jayadev Pulaparty
Ranch Hand

Joined: Mar 25, 2002
Posts: 662
Which of the following are the correct definitions for an external DTD?

<!DOCTYPE name [ ]>

<!DOCTYPE name PUBLIC "fileName.dtd" "http://" >

<!DOCTYPE name EXTERNAL "fileName.dtd" >

<!DOCTYPE name SYSTEM "fileName.dtd" >

<!DOCTYPE name SYSTEM "fileName.dtd" "http://" >

I guess these are the correct answers; any ideas??

<!DOCTYPE name PUBLIC "fileName.dtd" "http://" >
<!DOCTYPE name SYSTEM "fileName.dtd" >
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1183
The syntax in the specification is defined to be -
ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral
So, in
<!DOCTYPE name PUBLIC "fileName.dtd" "http://" >
fileName.dtd is in the position for the public ID (PubidLiteral), but it's not a public ID namewise.
The second 'argument' should be the dtd name.
So, I think this one is wrong.
Have a lovely weekend,

William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
I agree. Here's the link: http://aspose.com/file-tools
subject: DTD question
It's not a secret anymore!