From d2900100db78744647a1dc363115bdf231a8eb28 Mon Sep 17 00:00:00 2001 From: tille <> Date: Wed, 31 Dec 2003 15:36:47 +0000 Subject: [PATCH] added example to xmllint. --- .../LDP-Author-Guide/tools-validate.xml | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/LDP/guide/docbook/LDP-Author-Guide/tools-validate.xml b/LDP/guide/docbook/LDP-Author-Guide/tools-validate.xml index 822489f5..5a8392ec 100644 --- a/LDP/guide/docbook/LDP-Author-Guide/tools-validate.xml +++ b/LDP/guide/docbook/LDP-Author-Guide/tools-validate.xml @@ -455,6 +455,38 @@ DTDDECL "-//Conectiva SA//DTD livros V1.0//EN" "publicacoes/livro xmllint. More information is available from: . +
Debugging example using xmllint +The example below shows how you can use xmllint to check your documents. I've created some errors that I made a lot, as a beginning XML writer. At first, the document doesn't come through, and errors are shown: + +bash$ xmllint ldp-history.xml +ldp-history.xml:22: error: Opening and ending tag mismatch: articlinfo line 6 and articleinfo +</articleinfo> + ^ +ldp-history.xml:37: error: Opening and ending tag mismatch: listitem line 36 and orderedlist +</orderedlist> + ^ +ldp-history.xml:39: error: Opening and ending tag mismatch: orderedlist line 34 and sect2 +</sect2> + ^ +ldp-history.xml:46: error: Opening and ending tag mismatch: sect1 line 41 and para +for many authors to contribute their part in their area of specialization. +Now, as we already mentioned, don't worry about anything except the first error. The first error says there is an inconsistency between the tags on line 6 and line 22 in the file. Indeed, on line 6 we left out the e in articleinfo. Fix the error, and run xmllint again. The first complaint now is about the offending line 37, where the closing tag for list items has been forgotten. Fix the error and run the validation tool again, until all errors are gone. Most common errors include forgetting to open or close the paragraph tag, spelling errors in tags and messed up sections. + +