
23 Oct
2004
23 Oct
'04
12:33 p.m.
Marcello Perathoner wrote:
No. All you can define inside an XML file is the DTD (or other schema) you want to use and entities like &myentity;
That's not true. You can define a full DTD (or a subset of one) within the XML document itself if you want. The W3C gives the following example in the XML 1.0 (3rd ed.) spec: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE greeting [ <!ELEMENT greeting (#PCDATA)> ]> <greeting>Hello, world!</greeting> This is a fully valid and well-formed XML file with the DTD defined in the DOCTYPE header instead of in a separate DTD file. Of course, while you _can_ do that, it's probably not the best way. Curtis.