• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

DTD question

 
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" >
 
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
    Bookmark Topic Watch Topic
  • New Topic