|
> See, the different "standards" and understandings of XML are > clashing as we speak. :) > > XML is self describing data. Yes, makes sense. > XML isn't valid without a DTD. Wait, that's a contradiction to the above. You don't need a DTD to have 'valid' XML. There are two types of XML. 1. Well formed XML - where the 'syntax' of the XML is valid and no DTD is needed, for example; <account> <name>Joe</name> </account> is a valid well formed XML snippet, but; <account> <name>Joe </account> Is not well formed or valid, because there is no closing </name> tag. A checking parser will flag the XML as in error. Again no DTD is needed for this basic level of XML, and hence it's more free form, and with that you need to do extra work when dealing with the element data to validate the data yourself. But the XML stream *is* 'valid' XML. 2. Valid XML - where there is a DTD that describes the content of the XML stream. The DTD describes what the elements are, what type they are, if they can be omitted or if they are required etc. If the XML stream is well formed (as in point 1) but doesn't validate against the DTD, then the XML is flagged as invalid. I wish the W3 would have chosen a different word instead of 'valid' such as 'self-validating' which is more in line with what using a DTD is about. But as someone who has used XML, you already knew all of this. +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.