aspose file tools*
The moose likes Product and Other Certifications and the fly likes Type ID in DTD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "Type ID in DTD" Watch "Type ID in DTD" New topic
Author

Type ID in DTD

Ravikiran Muvva
Greenhorn

Joined: Feb 06, 2003
Posts: 5
Hi,
This is a sample question in XML 141 sample test.Can anyone explain me why a,d are the correct answers for this??
Which of the following would raise an error if the empID attribute's data type was defined as type ID in the DTD?
a) <name empID="17563">Joe Smith</name>
b) <name empID="ft:17563">Joe Smith</name>
c) <name empID="a17563">Joe Smith</name>
d) <name empID="">Joe Smith</name>

Thanks in advance
rkmuvva
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Attributes defined as ID must contain only characters allowed for NMTOKEN (letters, digits, point [ . ] , hyphen [ - ], underline [ _ ] and colon [ : ] ) and must start with a letter.
b and c satisfy to this rule whereas a and d don't.
For more details, please consult
Zvon.org DTD tutorial
W3C XML specification


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
Attributes defined as ID must contain only characters allowed for NMTOKEN (letters, digits, point [ . ] , hyphen [ - ], underline [ _ ] and colon [ : ] ) and must start with a letter.
On the same rule, has anyone heard of Processors/Parsers giving errors because the ID value has a "." (period) in the value. Acc. to this rule, it seems to be valid.
- madhav


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Type ID in DTD
 
Similar Threads
IBM Mock Exam: 1 Information Modeling question
Questions clarification
getting error with Hibernate
Need help with a practice question
page 360 if property="*"