| Author |
javaranch mock question
|
jim yin
Ranch Hand
Joined: Aug 15, 2002
Posts: 111
|
|
Which of the following code is valid? a) <!DOCTYPE SYSTEM SYSTEM "test.dtd"> <SYSTEM></SYSTEM> b) <!DOCTYPE PUBLIC SYSTEM "test.dtd"> <PUBLIC></PUBLIC> c) <!DOCTYPE PUBLIC PUBLIC "test.dtd"> <PUBLIC></PUBLIC> d) <!DOCTYPE SYSTEM PUBLIC "test.dtd"> <PUBLIC></PUBLIC> Answer : a b Can PUBLIC and SYSTEM be elements names? Why a and b are correct, not c and d?
|
 |
Jayadev Pulaparty
Ranch Hand
Joined: Mar 25, 2002
Posts: 645
|
|
I guess any name is valid as long as it is a valid xml name (w.r.t the characters it can contain) The reason why c and d are not correct is that there is nothing like PUBLIC keyword for referring to an external DTD to the best of my knowledge. Anyone please correct for any mistakes here. Thanks.
|
 |
jim yin
Ranch Hand
Joined: Aug 15, 2002
Posts: 111
|
|
I think I got it, this is from PXML2:
The use of PUBLIC identifiers should probably be limited to internal systems and SGML legacy applications.
PUBLIC cannot be used to refer to external DTDs.
|
 |
Valentin Crettaz
Gold Digger
Sheriff
Joined: Aug 26, 2001
Posts: 7610
|
|
jim, it would help if you could write a descriptive subject for the new topic you create, so that people have an idea of what your question is all about. Thank you
|
SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
|
 |
 |
|
|
subject: javaranch mock question
|
|
|