Interview Questions

Where can qualified names appear?

XML Interview Questions and Answers


(Continued from previous question...)

109. Where can qualified names appear?

Qualified names can appear anywhere an element type or attribute name can appear: in start and end tags, as the document element type, and in element type and attribute declarations in the DTD. For example:

<!DOCTYPE foo:A [
<!ELEMENT foo:A (foo:B)>
<!ATTLIST foo:A
foo:C CDATA #IMPLIED>
<!ELEMENT foo:B (#PCDATA)>
]>
<foo:A xmlns:foo="http://www.foo.org/" foo:C="bar">
<foo:B>abcd
<foo:A>

Qualified names cannot appear as entity names, notation names, or processing instruction targets.

(Continued on next question...)

Other Interview Questions