aspose file tools
The moose likes Product and Other Certifications and the fly likes javaranch mock question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Reply Bookmark "javaranch mock question" Watch "javaranch mock question" New topic
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
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: javaranch mock question
 
Similar Threads
question on mock exam
SYSTEM and Public
Please explain the mock DTD question
DTD mock questions
Help for ibm cert for XML