wood burning stoves 2.0*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "DTD question" Watch "DTD question" New topic
Author

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: 1167
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,
Dan


William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
 
Don't get me started about those stupid light bulbs.
 
subject: DTD question
 
Similar Threads
XML Schemas
JBoss Remote Lookup
Item - Bid Unidirectional PROBLEM !!!
Internal and External DTDs
"Could not read mapping document from file:"