1.

Can I Use Qualified Names In Dtds?

Answer»

Yes.
For example, the following is legal:
<!ELEMENT google:A (google:B)>
<!ATTLIST google:A
google:C CDATA #IMPLIED>
<!ELEMENT google:B (#PCDATA)>

However, because XML namespace declarations do not APPLY to DTDs , qualified NAMES in the DTD cannot be converted to universal names.

As a result, qualified names in the DTD have no SPECIAL meaning.

For example, google:A is just google:A — it is not A in the XML namespace to which the prefix google is mapped.

The reason qualified names are allowed in the DTD is so that validation will continue to work.

Yes.
For example, the following is legal:
<!ELEMENT google:A (google:B)>
<!ATTLIST google:A
google:C CDATA #IMPLIED>
<!ELEMENT google:B (#PCDATA)>

However, because XML namespace declarations do not apply to DTDs , qualified names in the DTD cannot be converted to universal names.

As a result, qualified names in the DTD have no special meaning.

For example, google:A is just google:A — it is not A in the XML namespace to which the prefix google is mapped.

The reason qualified names are allowed in the DTD is so that validation will continue to work.



Discussion

No Comment Found