When you have finished writing, you should validate your work:
For a single file, you can use the following command line: xmllint --noout --nonet --valid your-file.xml. This command displays nothing if your file is OK. When an error is found it will show a message indicating the kind of error and where in your file it was encountered.
This command can be used for quickly checking an xml file. It can miss or may not find some errors. In case of external references to other files it also may show incorrect error messages, because this command only checks a single file.
(Editorul Kate are o opțiune (un modul) pentru a valida un fișier xml activ.)
When you want to check multiple files or the whole gimp-help repository you should run make validate-en. You should get a „No error” message.
If not, a list of validity errors is displayed with line numbers referring to the en.xml log file that you can find in the /log folder.
Open this en.xml file in a text editor, use the „jump to line” command of your editor (the Kate editor command is Ctrl+G), and enter the line number to jump to the concerned line in the en.xml file. There, you will find the error.
If you have worked on several XML files, look above in the en.xml file to find (in the „xml:base” field of the „id” tag), in which xml file the error is.
Reparați eroarea. Nu uitați să salvați fișierul și executați make validate-en din nou.
Notă | |
---|---|
A common mistake is editing the en.xml log file instead of the XML file. |