Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DTD question

 
Jayadev Pulaparty
Ranch Hand
Posts: 662
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic