mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-01 00:58:16 +03:00
Small update to the guidelines, Daniel
This commit is contained in:
parent
8329884066
commit
6943a4db3e
62
doc/catalog.fig
Normal file
62
doc/catalog.fig
Normal file
@ -0,0 +1,62 @@
|
||||
#FIG 3.2
|
||||
Landscape
|
||||
Center
|
||||
Inches
|
||||
Letter
|
||||
100.00
|
||||
Single
|
||||
-2
|
||||
1200 2
|
||||
1 2 0 1 0 7 50 0 -1 0.000 1 0.0000 2587 1875 1312 300 1275 1575 3900 2175
|
||||
1 2 0 1 0 7 50 0 -1 0.000 1 0.0000 2587 3900 1312 300 1275 3600 3900 4200
|
||||
1 2 0 1 0 7 50 0 -1 0.000 1 0.0000 10987 1875 1312 300 9675 1575 12300 2175
|
||||
1 2 0 1 0 7 50 0 -1 0.000 1 0.0000 10987 3900 1312 300 9675 3600 12300 4200
|
||||
2 4 0 2 -1 7 50 0 -1 6.000 0 0 7 0 0 5
|
||||
4350 5925 4350 4650 3375 4650 3375 5925 4350 5925
|
||||
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
|
||||
1275 1875 1275 3900
|
||||
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
|
||||
3900 1875 3900 3900
|
||||
2 3 0 1 0 1 50 0 20 0.000 0 0 0 0 0 7
|
||||
1685 3675 1945 3525 1945 3225 1685 3075 1425 3225 1425 3525
|
||||
1685 3675
|
||||
2 3 0 1 0 1 50 0 20 0.000 0 0 0 0 0 7
|
||||
2250 3000 2510 2850 2510 2550 2250 2400 1990 2550 1990 2850
|
||||
2250 3000
|
||||
2 4 0 1 0 11 50 0 20 0.000 0 0 7 0 0 5
|
||||
3375 2625 3000 2625 3000 2325 3375 2325 3375 2625
|
||||
2 4 0 1 0 17 50 0 20 0.000 0 0 7 0 0 5
|
||||
3375 3000 3000 3000 3000 2700 3375 2700 3375 3000
|
||||
2 4 0 1 0 13 50 0 20 0.000 0 0 7 0 0 5
|
||||
3825 2850 3450 2850 3450 2550 3825 2550 3825 2850
|
||||
2 1 0 2 4 7 50 0 -1 6.000 0 0 -1 1 0 2
|
||||
1 0 2.00 120.00 240.00
|
||||
2550 2625 3000 2475
|
||||
2 1 0 2 4 7 50 0 -1 6.000 0 0 -1 1 0 2
|
||||
1 0 2.00 120.00 240.00
|
||||
3811 5007 1875 3600
|
||||
2 1 0 2 -1 7 50 0 -1 0.000 0 0 -1 1 0 4
|
||||
1 0 2.00 120.00 240.00
|
||||
3825 5025 5250 5025 9075 4125 11325 2625
|
||||
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
|
||||
9675 1875 9675 3900
|
||||
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
|
||||
12300 1875 12300 3900
|
||||
2 4 0 1 0 11 50 0 20 0.000 0 0 7 0 0 5
|
||||
11775 2625 11400 2625 11400 2325 11775 2325 11775 2625
|
||||
2 4 0 1 0 17 50 0 20 0.000 0 0 7 0 0 5
|
||||
11775 3000 11400 3000 11400 2700 11775 2700 11775 3000
|
||||
2 4 0 1 0 13 50 0 20 0.000 0 0 7 0 0 5
|
||||
12225 2850 11850 2850 11850 2550 12225 2550 12225 2850
|
||||
3 3 0 1 -1 7 50 0 -1 4.000 0 0 0 11
|
||||
7725 2625 6450 2700 5775 3525 5700 4200 5925 4800 6600 5475
|
||||
7350 5625 8100 5400 8550 4725 8625 3975 8400 3075
|
||||
-1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000
|
||||
-1.000 -1.000 -1.000
|
||||
3 2 0 2 4 7 50 0 -1 6.000 0 1 0 3
|
||||
1 0 2.00 120.00 240.00
|
||||
1575 3150 1575 2775 1950 2700
|
||||
0.000 -1.000 0.000
|
||||
4 0 -1 50 0 2 35 0.0000 4 345 1740 6375 4200 Internet\001
|
||||
4 0 0 50 0 0 18 0.0000 4 255 1770 2025 3450 /etc/xml/catalog\001
|
||||
4 0 -1 50 0 0 22 0.0000 4 255 810 3825 4500 XML\001
|
BIN
doc/catalog.gif
Normal file
BIN
doc/catalog.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
@ -3,14 +3,16 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<style type="text/css"><!--
|
||||
<style type="text/css">
|
||||
<!--
|
||||
TD {font-family: Verdana,Arial,Helvetica}
|
||||
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
|
||||
H1 {font-family: Verdana,Arial,Helvetica}
|
||||
H2 {font-family: Verdana,Arial,Helvetica}
|
||||
H3 {font-family: Verdana,Arial,Helvetica}
|
||||
A:link, A:visited, A:active { text-decoration: underline }
|
||||
--></style>
|
||||
A:link, A:visited, A:active { text-decoration: underline }-->
|
||||
|
||||
</style>
|
||||
<title>XML resources publication guidelines</title>
|
||||
</head>
|
||||
|
||||
@ -33,7 +35,7 @@ of new XML format defined, but not all steps have been taken, possibly by
|
||||
lack of documentation, to truely gain all the benefits of the use of XML.
|
||||
Those guidelines hopes to improve the matter and provide a better overview of
|
||||
the overall XML processing and associated steps needed deploy it
|
||||
successfully: </p>
|
||||
successfully:</p>
|
||||
|
||||
<p>Table of content:</p>
|
||||
<ol>
|
||||
@ -65,7 +67,7 @@ design phase try to be synthetic and be sure to express the real content of
|
||||
your data and use the XML structure to express the semantic and context of
|
||||
those data.</p>
|
||||
|
||||
<h3>DTD rules: </h3>
|
||||
<h3>DTD rules:</h3>
|
||||
|
||||
<p>Building a DTD (Document Type Definition) or a Schema describing the
|
||||
structure allowed by instances is the core of the design process of the
|
||||
@ -106,7 +108,7 @@ is 2 parts for this:</p>
|
||||
attribute was not in the recognized set.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Other design parts: </h3>
|
||||
<h3>Other design parts:</h3>
|
||||
|
||||
<p>While defining you vocabulary, try to think in term of other usage to your
|
||||
data, for example how using XSLT stylesheets could be used to make an HTML
|
||||
@ -164,10 +166,14 @@ and the fact that the processing will still work if there is no local copy
|
||||
resource to reference it but always use the canonical URL. For example in a
|
||||
DocBook instance the following should not be used:</p>
|
||||
<pre><!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"<br>
|
||||
|
||||
|
||||
"/usr/share/xml/docbook/4.2/docbookx.dtd"></pre>
|
||||
|
||||
<p>But always reference the canonical URL for the DTD:</p>
|
||||
<pre><!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"<br>
|
||||
|
||||
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> </pre>
|
||||
|
||||
<p>Similary, the document instance may reference the <a
|
||||
@ -177,7 +183,7 @@ generate HTML, and the canonical URL should be used:</p>
|
||||
href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"
|
||||
type="text/xsl"?></pre>
|
||||
|
||||
<p>Defining the canonical URL for the resources needed should obbey a few
|
||||
<p>Defining the canonical URL for the resources needed should obey a few
|
||||
simple rules similar to those used to design namespace names:</p>
|
||||
<ul>
|
||||
<li>use a DNS name you know is associated to the project and will be
|
||||
@ -210,7 +216,9 @@ case to recover from a catalog miss. The key point is that the document
|
||||
instances are totally independant of the availability of a catalog or from
|
||||
the actual place where the loacl resource they reference may be installed.
|
||||
This greatly improve the management of the document in the long run, making
|
||||
them independant of the platform or toolchain used to process them.</p>
|
||||
them independant of the platform or toolchain used to process them. The
|
||||
figure below tries to express that mechanism:<img src="catalog.gif"
|
||||
alt="Picture describing the catalog "></p>
|
||||
|
||||
<h3>Usual catalog setup:</h3>
|
||||
|
||||
@ -236,7 +244,7 @@ decision is left to the sysadmin or the packager for that system and may
|
||||
obbey different rules, but the actual place on the filesystem (or on a
|
||||
resource cache on the local network) will not influence the processing as
|
||||
long as it is available. The first rule indicate that if the reference uses a
|
||||
PUBLIC identifier beginning with the </p>
|
||||
PUBLIC identifier beginning with the</p>
|
||||
|
||||
<p><code>"-//W3C//DTD XHTML 1.0"</code></p>
|
||||
|
||||
@ -266,8 +274,7 @@ resources and direct the processing tools to the right subcatalog.</p>
|
||||
rewritePrefix="xhtml1-20020801/DTD"/>
|
||||
<rewriteURI uriStartString="http://www.w3.org/TR/xhtml1/DTD"
|
||||
rewritePrefix="xhtml1-20020801/DTD"/>
|
||||
</catalog>
|
||||
</pre>
|
||||
</catalog></pre>
|
||||
|
||||
<p>There is a few things to notice:</p>
|
||||
<ul>
|
||||
@ -297,7 +304,9 @@ at the Canonical URL for the XHTML1 DTDs.</p>
|
||||
resources should be processed with XML based tools to avoid problems with the
|
||||
generated files, the xmlcatalog command coming with libxml2 allows to create
|
||||
catalogs, and add or remove rules at that time. Here is a complete example
|
||||
coming from RPM for the XHTML1 DTDs post install script:</p>
|
||||
coming from RPM for the XHTML1 DTDs post install script. While this example
|
||||
is platform and packaging specific, this can be useful as a an example in
|
||||
other contexts:</p>
|
||||
<pre>%post
|
||||
CATALOG=/usr/share/sgml/xhtml1/xmlcatalog
|
||||
#
|
||||
@ -359,6 +368,6 @@ ensure a smooth evolution of the resource and instances.</p>
|
||||
|
||||
<p>$Id$</p>
|
||||
|
||||
<p> </p>
|
||||
<p></p>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user