In this tutorial you learned how document validation is carried out by XML applications. More specifically, you learned about standard and validating parsers and how they fit into the validation equation. You then learned how to use some of the different validation tools available for use in validating XML documents, including both online and local tools. And finally, you found out how to track down and repair errors in XML documents.
Q&A
Q. |
Is it possible to validate HTML web pages? |
A. |
Strictly speaking, it isn't possible to validate HTML-based documents because HTML isn't actually an XML language and therefore doesn't conform to the rules of XML. However, you can code web pages in XHTML, which is a markup language that can be validated. XHTML is an XML-based language that is very similar to HTML but with the improved structure of XML. You learn all about XHTML in Tutorial 21, "Adding Structure to the Web with XHTML," including how to validate XHTML web pages. |
Q. |
Do I have to check a document for well formedness before moving on to checking it for validity? |
A. |
No. I recommend the two-stage check on a document only because it helps to clarify the different types of errors commonly found in XML documents. Your goal should be to develop enough XML coding skills to avoid most well-formedness errors, which frees you up to spend most of your time tackling the peskier validity errors. Knowing this, at some point you may decide to jump straight into the validity check for documents as you gain experience. |