“A bit hazy on the difference between XML and XSD”
A.S., a loyal reader, writes, “I’m a bit hazy on the difference between XML and XSD”. Well, hopefully this post will clarify the issue for you.A schema (XSD) describes what must be in the XML document. For example, it might say that every item must have one catalog number, and one name, but may have one or more sizes (e.g. 500 gram and 750 gram).
The schema (XSD) describes what must be in the XML document. For example, it might say that every item must have one catalog number, and one name, but may have one or more sizes (e.g. 500 gram and 750 gram).
The XML document would list what’s in the catalog. For example:
100
Corn Flakes
500
700
200
Bran Flakes
500
750
1000
1250
In the above case, the schema (XSD) would declare the XML file invalid if it had no catalog number – or if it had 2 or more catalog numbers.
Katriel
BTW, DITA processors generally use DTDs rather than XSDs, but that’s another post.