/usr/share/gtk-doc/html/libaccounts-glib/validating-xml-files.html is in libaccounts-glib-doc 1.23+17.04.20161104-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Validating XML files against the DTDs: libaccounts-glib Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="libaccounts-glib Reference Manual">
<link rel="up" href="xml-file-formats.html" title="XML files">
<link rel="prev" href="gettext-xml-files.html" title="Internationalizing XML data files using gettext">
<link rel="next" href="libaccounts-glib-tools.html" title="Part IV. libaccounts-glib tools">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="xml-file-formats.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gettext-xml-files.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libaccounts-glib-tools.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="validating-xml-files"></a>Validating XML files against the DTDs</h2></div></div></div>
<p>
<acronym title="
A Document Type Definition, used to define an XML document format. XML
documents can be validated against the DTD.
"><span class="acronym">DTD</span></acronym>s exist for the <acronym title="
The eXtensible Markup Language defines a set of rules for marking up
documents that are both machine- and human-readable.
"><span class="acronym">XML</span></acronym> file formats
supported by libaccounts-glib. Using these DTDs, it is possible to validate the
XML data files for errors. This is especially useful during the build or
testing process of applications which use libaccounts-glib, so that errors in
data files can be caught early.
</p>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="validating-with-xmllint"></a>Using <span class="application">xmllint</span>
</h3></div></div></div>
<p>
<span class="command"><strong>xmllint</strong></span> is part of <span class="application">libxml2</span> and
can be used to validate an XML document against a DTD. A sample command to
validate the hypothetical XML file <code class="filename">coolprovider.xml</code> is:
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1</pre></td>
<td class="listing_code"><pre class="programlisting">xmllint <span class="gtkdoc opt">--</span>noout <span class="gtkdoc opt">--</span>dtdvalid <span class="gtkdoc opt">/</span>usr<span class="gtkdoc opt">/</span>share<span class="gtkdoc opt">/</span>xml<span class="gtkdoc opt">/</span>accounts<span class="gtkdoc opt">/</span>schema<span class="gtkdoc opt">/</span>dtd<span class="gtkdoc opt">/</span>accounts<span class="gtkdoc opt">-</span>provider<span class="gtkdoc opt">.</span>dtd coolprovider<span class="gtkdoc opt">.</span>xml</pre></td>
</tr>
</tbody>
</table>
</div>
<p>
The <em class="parameter"><code>--noout</code></em> argument suppresses
printing of the XML document, and
<em class="parameter"><code>--dtdvalid</code></em> requests validation against
a DTD, given by the following argument. By default, the libaccounts-glib DTDs
are installed to
<code class="filename">$(datadir)/xml/accounts/schema/dtd</code>,
which usually expands to
<code class="filename">/usr/share/xml/accounts/schema/dtd</code>.
</p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>
|