- Avoid comments in CDATA sections so that these documents can easily be

converted to DocBook 5.0.  This results in an ugly markup at some parts
  but this can be corrected after the conversion is done.  Anyway, these
  sections need serious rewriting.
- Fix a double application element
This commit is contained in:
Gabor Kovesdan 2013-06-20 10:40:37 +00:00
parent 71e721a7b6
commit d1543284b1
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/projects/db5/; revision=41955
14 changed files with 165 additions and 294 deletions
de_DE.ISO8859-1/books/fdp-primer
sgml-markup
sgml-primer
tools
en_US.ISO8859-1/books/fdp-primer
sgml-markup
sgml-primer
fr_FR.ISO8859-1/books/fdp-primer
sgml-markup
sgml-primer
hu_HU.ISO8859-2/books/fdp-primer
sgml-markup
sgml-primer
pt_BR.ISO8859-1/books/fdp-primer
sgml-markup
sgml-primer
ru_RU.KOI8-R/books/fdp-primer/sgml-markup
zh_TW.Big5/books/fdp-primer
sgml-markup
sgml-primer

View file

@ -165,21 +165,21 @@
<para>Fügen Sie in eine der existierenden Übungsdateien folgendes ein:</para>
<programlisting><![CDATA[<h1>Erstes Kapitel</h1>
<programlisting>&lt;h1&gt;Erstes Kapitel&lt;/h1&gt;
<!-- Hier steht die Einführung -->
&lt;!&hyphen;- Hier steht die Einführung -&hyphen;&gt;
<h2>Das ist die Überschrift des ersten Kapitels</h2>
&lt;h2&gt;Das ist die Überschrift des ersten Kapitels&lt;/h2&gt;
<!-- Hier steht der Inhalt des ersten Kapitels -->
&lt;!&hyphen;- Hier steht der Inhalt des ersten Kapitels -&hyphen;&gt;
<h3>Das ist die Überschrift des ersten Unterkapitels</h3>
&lt;h3&gt;Das ist die Überschrift des ersten Unterkapitels&lt;/h3&gt;
<!-- Hier steht der Inhalt des ersten Unterkapitels -->
&lt;!&hyphen;- Hier steht der Inhalt des ersten Unterkapitels -&hyphen;&gt;
<h2>Das ist die Überschrift des zweiten Kapitels</h2>
&lt;h2&gt;Das ist die Überschrift des zweiten Kapitels&lt;/h2&gt;
<!-- Hier steht der Inhalt des zweiten Kapitels -->]]></programlisting>
&lt;!&hyphen;- Hier steht der Inhalt des zweiten Kapitels -&hyphen;&gt;</programlisting>
</example>
<para>Eine XHTML-Seite sollte immer nur eine Überschrift
@ -198,13 +198,13 @@
<para>Fügen Sie in eine der existierenden Übungsdateien folgendes ein:</para>
<programlisting><![CDATA[<h1>Erstes Kapitel</h1>
<programlisting>&lt;h1&gt;Erstes Kapitel&lt;/h1&gt;
<!-- Allgemeines zum Dokument -->
&lt;!&hyphen;- Allgemeines zum Dokument -&hyphen;&gt;
<h3>Unterkapitel</h3>
&lt;h3&gt;Unterkapitel&lt;/h3&gt;
<!-- h3 folgt direkt auf h1. h2 wurde ausgelassen -->]]></programlisting>
&lt;!&hyphen;- h3 folgt direkt auf h1. h2 wurde ausgelassen -&hyphen;&gt;</programlisting>
</example>
</sect3>
@ -508,10 +508,6 @@
</tr>
<tr>
<!-- Da sich die zusammengefasste Zelle über zwei Zeilen
erstreckt, befindet sich das die durch dieses <td>
definierte Zelle ganz rechts. -->
<td>Mittlere rechte Zelle</td>
</tr>

View file

@ -1058,16 +1058,16 @@ onsgmls:beispiel.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<programlisting>&lt;!-- Testkommentar --></programlisting>
<programlisting><![CDATA[
<!-- Text innerhalb eines Kommentars -->
<programlisting>
&lt;!&hyphen;- Text innerhalb eines Kommentars -&hyphen;&gt;
<!-- Ein anderer Kommentar -->
6lt;!&hyphen;- Ein anderer Kommentar -&hyphen;&gt;
<!-- So können mehrzeilige Kommentare
genutzt werden -->
6lt;!&hyphen;- So können mehrzeilige Kommentare
genutzt werden -&hyphen;&gt;
<!-- Eine andere Möglichkeit für --
-- mehrzeilige Kommentare. -->]]></programlisting>
&lt;!&hyphen;- Eine andere Möglichkeit für -&hyphen;
&hyphen;- mehrzeilige Kommentare. -&hyphen;&gt;</programlisting>
</example>
<para>Hat man früher schon Erfahrungen mit HTML gesammelt,
@ -1086,12 +1086,12 @@ onsgmls:beispiel.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<example>
<title>Fehlerhafte SGML-Kommentare</title>
<programlisting><![CDATA[
<!-- Innerhalb eines Kommentars --
<programlisting>
&lt;!&hyphen;- Innerhalb eines Kommentars -&hyphen;
DIES IST NICHT TEIL EINES KOMMENTARS
-- Wieder innerhalb eines Kommentars -->]]></programlisting>
&hyphen;- Wieder innerhalb eines Kommentars -&hyphen;&gt;</programlisting>
<para>SGML-Parser würden die mittlere Zeile wie folgt
interpretieren:</para>
@ -1102,7 +1102,7 @@ onsgmls:beispiel.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<para>Da es sich hierbei nicht um gültiges SGML handelt, kann
diese Zeile zur verwirrenden Fehlermeldungen führen.</para>
<programlisting><![CDATA[<!--------------- Eine wirklich schlechte Idee --------------->]]></programlisting>
<programlisting>&lt;!&hyphen;&hyphen;&hyphen;&hyphen;&hyphen; Eine wirklich schlechte Idee &hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&gt;</programlisting>
<para>Wie das Beispiel zeigt, sollten solche Kommentare
tunlichst vermieden werden.</para>
@ -1110,7 +1110,7 @@ onsgmls:beispiel.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<!--<para>As the example suggests, <emphasis>do not</emphasis> write
comments like that.</para>-->
<programlisting><![CDATA[<!--===================================================-->]]></programlisting>
<programlisting>&lt;!&hyphen;-===================================================-&hyphen;&gt;</programlisting>
<para>Ein solcher Kommentar ist (ein wenig) besser, kann aber
jemanden, der mit SGML noch nicht so vertraut ist,
@ -1278,8 +1278,6 @@ onsgmls:beispiel.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<!ENTITY % param.etwas "etwas">
<!ENTITY % param.text "Text">
<!ENTITY % param.neu "%param.etwas mehr %param.text">
<!-- %param.neu ist jetzt "etwas mehr Text" -->
]>]]></programlisting>
</example>
@ -1423,11 +1421,9 @@ onsgmls:beispiel.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<!ENTITY kapitel.1 SYSTEM "kapitel1.xml">
<!ENTITY kapitel.2 SYSTEM "kapitel2.xml">
<!ENTITY kapitel.3 SYSTEM "kapitel3.xml">
<!-- Und so weiter... -->
]>
<html>
<!-- Jetzt werden die Kapitel über die Entitäten eingebunden -->
&amp;kapitel.1;
&amp;kapitel.2;
@ -1489,11 +1485,7 @@ onsgmls:beispiel.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
genutzt werden.</para>
<programlisting><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
<!-- Definieren einer Parameterentität um die Allgemeinen Entitäten für -->
<!-- die Kapitel laden zu können -->
<!ENTITY % kapitel SYSTEM "kapitel.ent">
<!-- Nun wird der Inhalt der referenzierten Datei geladen -->
%kapitel;
]>

View file

@ -98,7 +98,7 @@
von diesen Ports automatisch entsprechend gesetzt. Ohne
<application>JadeTeX</application> können Sie nur die Formate
HTML und ASCII erzeugen. Die Formate PostScript und PDF
erfordern <application>&tex;</application>.</para>
erfordern &tex;.</para>
</tip>
<sect1 id="tools-mandatory">

View file

@ -155,21 +155,21 @@
<para>Use:</para>
<programlisting><![CDATA[<h1>First section</h1>
<programlisting>&lt;h1&gt;First section&lt;/h1&gt;
<!-- Document introduction goes here -->
&lt;!&hyphen;- Document introduction goes here -&hyphen;&gt;
<h2>This is the heading for the first section</h2>
&lt;h2&gt;This is the heading for the first section&lt;/h2&gt;
<!-- Content for the first section goes here -->
&lt;!&hyphen;- Content for the first section goes here -&hyphen;&gt;
<h3>This is the heading for the first sub-section</h3>
&lt;h3&gt;This is the heading for the first sub-section&lt;/h3&gt;
<!-- Content for the first sub-section goes here -->
&lt;!&hyphen;- Content for the first sub-section goes here -&hyphen;&gt;
<h2>This is the heading for the second section</h2>
&lt;h2&gt;This is the heading for the second section&lt;/h2&gt;
<!-- Content for the second section goes here -->]]></programlisting>
&lt;!&hyphen;- Content for the second section goes here -&hyphen;&gt;</programlisting>
</example>
<para>Generally, an XHTML page should have one first level
@ -188,13 +188,13 @@
<para>Use:</para>
<programlisting><![CDATA[<h1>First section</h1>
<programlisting>&lt;h1&gt;First section&lt;/h1&gt;
<!-- Document introduction -->
&lt;!&hyphen;- Document introduction -&hyphen;&gt;
<h3>Sub-section</h3>
&lt;h3&gt;Sub-section&lt;/h3&gt;
<!-- This is bad, <h2> has been left out -->]]></programlisting>
&lt;!&hyphen;- This is bad, &lt;h2&gt; has been left out -&hyphen;&gt;</programlisting>
</example>
</sect3>
@ -471,10 +471,6 @@
</tr>
<tr>
<!-- Because the large cell on the left merges into
this row, the first <td> will occur on its
right -->
<td>Middle right cell</td>
</tr>

View file

@ -40,8 +40,7 @@
of XML tricks you will see used in the documentation.</para>
<para>Portions of this section were inspired by Mark Galassi's
<ulink
url="http://www.galassi.org/mark/mydocs/docbook-intro/docbook-intro.html">Get
<ulink url="http://www.galassi.org/mark/mydocs/docbook-intro/docbook-intro.html">Get
Going With DocBook</ulink>.</para>
<sect1 id="xml-primer-overview">
@ -816,16 +815,16 @@ example.xml:5: element head: validity error : Element head content does not foll
<programlisting>&lt;!-- test comment --></programlisting>
<programlisting><![CDATA[
<!-- This is inside the comment -->
<programlisting>
&lt;!&hyphen;- This is inside the comment -&hyphen;&gt;
<!-- This is another comment -->
&lt;!&hyphen;- This is another comment -&hyphen;&gt;
<!-- This is one way
of doing multiline comments -->
&lt;!&hyphen;- This is one way
of doing multiline comments -&hyphen;&gt;
<!-- This is another way of --
-- doing multiline comments -->]]></programlisting>
&lt;!&hyphen;- This is another way of -&hyphen;
&hyphen;- doing multiline comments -&hyphen;&gt;</programlisting>
</example>
<para>If you have used XHTML before you may have been shown
@ -842,12 +841,12 @@ example.xml:5: element head: validity error : Element head content does not foll
<example>
<title>Erroneous XML Comments</title>
<programlisting><![CDATA[
<!-- This is in the comment --
<programlisting>
&lt;!&hyphen;- This is in the comment -&hyphen;
THIS IS OUTSIDE THE COMMENT!
-- back inside the comment -->]]></programlisting>
&hyphen;- back inside the comment -&hyphen;&gt;</programlisting>
<para>The XML parser will treat this as though it were
actually:</para>
@ -857,12 +856,12 @@ example.xml:5: element head: validity error : Element head content does not foll
<para>This is not valid XML, and may give confusing error
messages.</para>
<programlisting><![CDATA[<!--------------- This is a very bad idea --------------->]]></programlisting>
<programlisting>&gt;!&hyphen;&hyphen;&hyphen;&hyphen;&hyphen; This is a very bad idea &hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&gt;</programlisting>
<para>As the example suggests, <emphasis>do not</emphasis> write
comments like that.</para>
<programlisting><![CDATA[<!--===================================================-->]]></programlisting>
<programlisting>&gt;!-&hyphen;===================================================-&hyphen;&gt;</programlisting>
<para>That is a (slightly) better approach, but it still
potentially confusing to people new to XML.</para>
@ -998,8 +997,6 @@ example.xml:5: element head: validity error : Element head content does not foll
<!ENTITY % param.some "some">
<!ENTITY % param.text "text">
<!ENTITY % param.new "%param.some more %param.text">
<!-- %param.new now contains "some more text" -->
]>]]></programlisting>
</example>
@ -1024,8 +1021,6 @@ example.xml:5: element head: validity error : Element head content does not foll
<title>An Example XHTML File</title>
</head>
<!-- You might well have some comments in here as well -->
<body>
<p>This is a paragraph containing some text.</p>
@ -1116,12 +1111,9 @@ example.xml:5: element head: validity error : Element head content does not foll
<!ENTITY chapter.1 SYSTEM "chapter1.xml">
<!ENTITY chapter.2 SYSTEM "chapter2.xml">
<!ENTITY chapter.3 SYSTEM "chapter3.xml">
<!-- And so forth -->
]>
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- Use the entities to load in the chapters -->
&chapter.1;
&chapter.2;
&chapter.3;
@ -1180,10 +1172,7 @@ example.xml:5: element head: validity error : Element head content does not foll
<programlisting><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
<!-- Define a parameter entity to load in the chapter general entities -->
<!ENTITY % chapters SYSTEM "chapters.ent">
<!-- Now use the parameter entity to load in this file -->
%chapters;
]>

View file

@ -159,21 +159,21 @@ PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"</programlisting>
<para>Utilisez&nbsp;:</para>
<programlisting>
<![CDATA[<h1>Première section</h1>
&lt;h1&gt;Première section&lt;/h1&gt;
<!-- Introduction du document -->
&lt;!&hyphen;- Introduction du document -&hyphen;&gt;
<h2>C'est le titre de la première section</h2>
&lt;h2&gt;C'est le titre de la première section&lt;/h2&gt;
<!-- Contenu de la première section -->
&lt;!&hyphen;- Contenu de la première section -&hyphen;&gt;
<h3>C'est le titre de la première sous-section</h3>
&lt;h3&gt;C'est le titre de la première sous-section&lt;/h3&gt;
<!-- Contenu de la première sous-section -->
&lt;!&hyphen;- Contenu de la première sous-section -&hyphen;&gt;
<h2>C'est le titre de la seconde section</h2>
&lt;h2&gt;C'est le titre de la seconde section&lt;/h2&gt;
<!-- Contenu de la seconde section -->]]></programlisting>
&lt;!&hyphen;- Contenu de la seconde section -&hyphen;&gt;</programlisting>
</example>
<para>Une page HTML doit normalement avoir un titre de premier niveau
@ -191,13 +191,13 @@ PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"</programlisting>
<para>Use:</para>
<programlisting>
<![CDATA[<h1>Première section</h1>
&lt;h1&gt;Première section&lt;/h1&gt;
<!-- Introduction du document -->
&lt;!&hyphen;- Introduction du document -&hyphen;&gt;
<h3>Sous-section</h3>
&lt;h3&gt;Sous-section&lt;/h3&gt;
<!-- Ce n'est pas bon, <h2> a été oublié -->]]></programlisting>
&lt;!&hyphen;- Ce n'est pas bon, &lt;h2&gt; a été oublié -&hyphen;&gt;</programlisting>
</example>
</sect3>
@ -470,10 +470,6 @@ PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"</programlisting>
</tr>
<tr>
<!-- Comme la grande cellule se prolonge
sur cette colonne, la première cellule
marquée par <td> se trouvera &agrave; sa droite -->
<td>Cellule du milieu &agrave; droite</td>
</tr>

View file

@ -856,40 +856,18 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
<programlisting>
<!-- commentaire de test --></programlisting>
<programlisting><![CDATA[
<!-- C'est le texte du commentaire -->
<programlisting>
&lt;!&hyphen;- C'est le texte du commentaire -&hyphen;&gt;
<!-- C'est un autre commentaire -->
&lt;!&hyphen;- C'est un autre commentaire -&hyphen;&gt;
<!-- Voici une façon de mettre un commentaire
sur plusieurs lignes -->
&lt;!&hyphen;- Voici une façon de mettre un commentaire
sur plusieurs lignes -&hyphen;&gt;
<!-- Voici une autre façon --
-- de le faire -->]]></programlisting>
&lt;!&hyphen;- Voici une autre façon -&hyphen;
&hyphen;- de le faire -&hyphen;&gt;</programlisting>
</example>
<!--
<![%output.print;[
<important>
<title>Utilisez 2 tirets</title>
<para>Vous aurez un problème avec les versions PostScript et PDF de ce
document. Les exemples précédents n'auront probablement qu'un simple
tiret, <literal>-</literal> après <literal>&lt;!</literal> et avant
<literal>&gt;</literal>.</para>
<para>Il <emphasis>faut</emphasis> utiliser deux <literal>-</literal>,
et <emphasis>non</emphasis> un seul. Les versions PostScript et PDF
ont converti les deux <literal>-</literal> de l'original en un seul
<emphasis>double tiret</emphasis> plus professionnel, et déformé
l'exemple au passage.</para>
<para>Les versions HTML, texte et RTF de ce document ne sont pas
sujettes &agrave; ce problème.</para>
</important>
]]>
-->
<para>Si vous avez déj&agrave; utilisé HTML auparavant, on vous a peut-être
donné des règles différentes pour les commentaires. En particulier, vous
pensez peut-être qu'ils commencent par <literal>&lt;!--</literal> et
@ -903,12 +881,12 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
<example>
<title>Commentaires SGML erronnés</title>
<programlisting><![CDATA[
<!-- C'est en commentaire --
<programlisting>
&gt;!&hyphen;- C'est en commentaire -&hyphen;
CE N'EST PAS EN COMMENTAIRE!
-- retour au commentaire -->]]></programlisting>
&hyphen;- retour au commentaire -&hyphen;&gt;</programlisting>
<para>L'analyseur SGML traitera cela comme s'il trouvait&nbsp;:</para>
@ -918,14 +896,12 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
<para>Ce qui n'est pas du SGML valide et donnera des messages d'erreur
source de confusion.</para>
<programlisting>
<![CDATA[<!--------------- C'est un très mauvaise idée --------------->]]></programlisting>
<programlisting>&lt;!&hyphen;&hyphen;&hyphen;&hyphen;&hyphen; C'est un très mauvaise idée &hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&gt;</programlisting>
<para>Comme l'exemple le suggère, ne mettez <emphasis>pas</emphasis> de
commentaires de ce type.</para>
<programlisting>
<![CDATA[<!--===================================================-->]]></programlisting>
<programlisting>&lt;!&hyphen;-===================================================-&hyphen;&gt;</programlisting>
<para>C'est une (légèrement) meilleure idée, mais c'est toute de même
une source de confusion potentielle pour les débutants en SGML.</para>
@ -1053,8 +1029,6 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
<!ENTITY % param.du "du">
<!ENTITY % param.texte "text">
<!ENTITY % param.encore "encore %param.du more %param.texte">
<!-- %param.encore contient maintenant "encore du texte" -->
]>]]></programlisting>
</example>
@ -1080,8 +1054,6 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
<title>Exemple de fichier HTML</title>
</head>
<!-- Vous pourriez aussi mettre des commentaires ici -->
<body>
<p>C'est un paragraphe avec du texte.</p>
@ -1175,12 +1147,9 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
<!ENTITY chapitre.1 SYSTEM "chapitre1.xml">
<!ENTITY chapitre.2 SYSTEM "chapitre2.xml">
<!ENTITY chapitre.3 SYSTEM "chapitre3.xml">
<!-- Et ainsi de suite -->
]>
<html>
<!-- Utilisation des entités pour inclure les chapitres -->
&chapitre.1;
&chapitre.2;
&chapitre.3;
@ -1239,13 +1208,7 @@ PUBLIC "-//W3C//DTD HTML 4.0//EN" "4.0/strict.dtd"</programlisting>
<programlisting>
<![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
<!--
Définissez une entité paramètre pour inclure le fichier
des entités générales pour les chapitres
-->
<!ENTITY % chapitres SYSTEM "chapitres.ent">
<!-- Utilisez maintenant l'entité générale pour inclure ce fichier -->
%chapitres;
]>

View file

@ -583,29 +583,26 @@
<para>A használat módja:</para>
<programlisting><![CDATA[<p>]]>Egy 3x3-as rácson a bal felsõ blokk 2x2 egymásba olvasztott
cellából áll. A többi cella normális.<![CDATA[</p>
<programlisting><![CDATA[<p>Egy 3x3-as rácson a bal felsõ blokk 2x2 egymásba olvasztott
cellából áll. A többi cella normális.</p>
<table>
<tr>
<td colspan="2" rowspan="2">]]>Bal felsõ nagy cella<![CDATA[</td>
<td colspan="2" rowspan="2">Bal felsõ nagy cella</td>
<td>]]>Jobb felsõ cella<![CDATA[</td>
<td>Jobb felsõ cella</td>
</tr>
<tr>
<!--]]> Mivel a bal oldalon levõ nagy cella beleolvad az elsõ sorba,
az elsõ <![CDATA[<td>]]> a jobb oldalán jelenik meg <![CDATA[-->
<td>]]>Jobb középsõ cella<![CDATA[</td>
<td>Jobb középsõ cella</td>
</tr>
<tr>
<td>]]>Bal alsó cella<![CDATA[</td>
<td>Bal alsó cella</td>
<td>]]>Bal középsõ cella<![CDATA[</td>
<td>Bal középsõ cella</td>
<td>]]>Jobb alsó cella<![CDATA[</td>
<td>Jobb alsó cella</td>
</tr>
</table>]]></programlisting>
</example>

View file

@ -1154,16 +1154,16 @@ onsgmls:pr
<programlisting>&lt;!-- próba megjegyzés --&gt;</programlisting>
<programlisting><![CDATA[
<!--]]> Most a megjegyzés belsejében vagyunk <![CDATA[-->
<programlisting>
&lt;!&hyphen;- Most a megjegyzés belsejében vagyunk -&hyphen;&gt;
<!--]]> Ez pedig egy másik megjegyzés <![CDATA[-->
&lt;!&hyphen;- Ez pedig egy másik megjegyzés -&hyphen;&gt;
<!--]]> Így lehet például
többsoros megjegyzéseket írni <![CDATA[-->
&lt;!&hyphen;- Így lehet például
többsoros megjegyzéseket írni -&hyphen;&gt;
<!--]]> Ez egy másik módja a <![CDATA[--
--]]> többsoros megjegyzések írásának <![CDATA[-->]]></programlisting>
&lt;!&hyphen;- Ez egy másik módja a -&hyphen;
&hyphen;- többsoros megjegyzések írásának -&hyphen;&gt;</programlisting>
</example>
<para>Ha dolgoztunk már korábban HTML kóddal,
@ -1184,12 +1184,12 @@ onsgmls:pr
<example>
<title>Hibás SGML megjegyzések</title>
<programlisting><![CDATA[
<!--]]> Most egy megjegyzés belsejében vagyunk <![CDATA[--]]>
<programlisting>
&lt;!&hyphen;- Most egy megjegyzés belsejében vagyunk -&hyphen;&gt;
KÍVÜL VAGYUNK A MEGJEGYZÉSEN!
<![CDATA[--]]> ismét megjegyzésben vagyunk <![CDATA[-->]]></programlisting>
&hyphen;- ismét megjegyzésben vagyunk -&hyphen;&gt;</programlisting>
<para>Az SGML elemző ezt valahogy így fogja
értelmezni:</para>
@ -1200,12 +1200,12 @@ onsgmls:pr
ráadásul félrevezető hibaüzenetet
eredményez.</para>
<programlisting><![CDATA[<!------------------]]> Ez nem szép dolog! <![CDATA[----------------->]]></programlisting>
<programlisting>&lt;!&hyphen;&hyphen;&hyphen;&hyphen;&hyphen; Ez nem szép dolog! &hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&gt;</programlisting>
<para>A példa szövege szerint <emphasis>sem</emphasis>
javasolt ilyen megjegyzéseket írni.</para>
<programlisting><![CDATA[<!--===================================================-->]]></programlisting>
<programlisting>&lt;!&hyphen;-===================================================-&hyphen;&gt;</programlisting>
<para>Ez már (valamivel) értelmesebb
megoldás, de még feláll a veszélye,
@ -1371,12 +1371,10 @@ onsgmls:pr
<title>Paraméteregyedek megadása</title>
<programlisting><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
<!ENTITY % param.valami "]]>valami<![CDATA[">
<!ENTITY % param.szoveg "]]>szöveg<![CDATA[">
<!ENTITY % param.uj "%param.valami ]]>más<![CDATA[ %param.szoveg">
<!--]]> A %param.uj értéke most már "valami más szöveg" <![CDATA[-->
]>]]></programlisting>
<!ENTITY % param.valami "valami">
<!ENTITY % param.szoveg "szöveg">
<!ENTITY % param.uj "%param.valami más %param.szoveg">
]]></programlisting>
</example>
<para>Ez most még nem tűnik
@ -1400,19 +1398,17 @@ onsgmls:pr
<html>
<head>
<title>]]>Egy minta HTML állomány<![CDATA[</title>
<title>Egy minta HTML állomány</title>
</head>
<!--]]> Az állományba rakhatunk azért még megjegyzéseket <![CDATA[-->
<body>
<p>]]>Ebben a bekezdésben van egy kis szöveg.<![CDATA[</p>
<p>Ebben a bekezdésben van egy kis szöveg.</p>
<p>]]>Ez a bekezdés még tartalmaz némi szöveget.<![CDATA[</p>
<p>Ez a bekezdés még tartalmaz némi szöveget.</p>
<p align="right">]]>Ennek a bekezdésnek jobbra zártnak kellene lennie.<![CDATA[</p>
<p align="right">Ennek a bekezdésnek jobbra zártnak kellene lennie.</p>
<p>]]>A dokumentum jelenlegi változata: <![CDATA[&valtozat;</p>
<p>A dokumentum jelenlegi változata: &valtozat;</p>
</body>
</html>]]></programlisting>
</step>
@ -1532,11 +1528,9 @@ onsgmls:pr
<!ENTITY fejezet.1 SYSTEM "fejezet1.xml">
<!ENTITY fejezet.2 SYSTEM "fejezet2.xml">
<!ENTITY fejezet.3 SYSTEM "fejezet3.xml">
<!--]]> És így tovább... <![CDATA[-->
]>
<html>
<!--]]> Az egyedek segítségével végül betöltjük a fejezeteket <![CDATA[-->
&fejezet.1;
&fejezet.2;
@ -1613,10 +1607,7 @@ onsgmls:pr
általános egyedeket:</para>
<programlisting><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
<!--]]> A fejezetekhez tartozó egyedek betöltéséhez definiálunk egy paraméteregyedet <![CDATA[-->
<!ENTITY % fejezetek SYSTEM "fejezetek.ent">
<!--]]> Most pedig a paraméteregyeddel töltsük be az állományt <![CDATA[-->
%fejezetek;
]>
@ -1664,11 +1655,11 @@ onsgmls:pr
<html>
<head>
<title>]]>Próba HTML állomány<![CDATA[</title>
<title>Próba HTML állomány</title>
</head>
<body>
<p>]]>A dokumentum jelenlegi változata: <![CDATA[&valtozat;</p>
<p>A dokumentum jelenlegi változata: &valtozat;</p>
&bekezd1;
&bekezd2;

View file

@ -177,21 +177,21 @@
<para>Uso:</para>
<programlisting><![CDATA[<h1>Primeira seção</h1>
<programlisting>&lt;h1&gt;Primeira seção&lt;/h1&gt;
<!-- a introdução do documento entra aqui -->
&lt;!&hyphen;- a introdução do documento entra aqui -&hyphen;&gt;
<h2>Este é o cabeçalho da primeira seção</h2>
&lt;h2&gt;Este é o cabeçalho da primeira seção&lt;/h2&gt;
<!-- O conteúdo da primeira seção entra aqui -->
&lt;!&hyphen;- O conteúdo da primeira seção entra aqui -&hyphen;&gt;
<h3>Este é o cabeçalho da primeira subseção</h3>
&lt;h3&gt;Este é o cabeçalho da primeira subseção&lt;/h3&gt;
<!-- O conteúdo da primeira subseção entra aqui -->
&lt;!&hyphen;- O conteúdo da primeira subseção entra aqui -&hyphen;&gt;
<h2>Este é o heading para a segunda seção</h2>
&lt;h2&gt;Este é o heading para a segunda seção&lt;/h2&gt;
<!-- O conteúdo da segunda seção entra aqui -->]]></programlisting>
&lt;!&hyphen;- O conteúdo da segunda seção entra aqui -&hyphen;&gt;</programlisting>
</example>
<para>Geralmente, uma página HTML deveria ter um
@ -211,13 +211,13 @@
<para>Uso:</para>
<programlisting><![CDATA[<h1>Primeira seção</h1>
<programlisting>&lt;h1&gt;Primeira seção&lt;/h1&gt;
<!-- Introdução do documento -->
&lt;!&hyphen;- Introdução do documento -&hyphen;&gt;
<h3>Subseção</h3>
&lt;h3&gt;Subseção&lt;/h3&gt;
<!-- Isto é ruim, não foi usado <h2> -->]]></programlisting>
&lt;!&hyphen;- Isto é ruim, não foi usado <h2> -&hyphen;&gt;</programlisting>
</example>
</sect3>
@ -509,8 +509,6 @@ c
</tr>
<tr>
<!-- Como a célula grande à esquerda funde-se com esta linha,
o primeiro <td> ocorrerá à a sua direita. -->
<td>Célula do meio a direita</td>
</tr>

View file

@ -1008,16 +1008,16 @@ onsgmls:example.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<programlisting>&lt;!-- Teste de comentário --></programlisting>
<programlisting><![CDATA[
<!-- Este é o interior do comentário -->
<programlisting>
&lt;!&hyphen;- Este é o interior do comentário -&hyphen;&gt;
<!-- Este é outro comentário -->
&lt;!&hyphen;- Este é outro comentário -&hyphen;&gt;
<!-- Esta é uma forma
de fazer comentários de várias linhas -->
&lt;!&hyphen;- Esta é uma forma
de fazer comentários de várias linhas -&hyphen;&gt;
<!-- Esta é outra forma --
-- de fazer comentários de várias linhas -->]]></programlisting>
&lt;!&hyphen;- Esta é outra forma -&hyphen;
&hyphen;- de fazer comentários de várias linhas -&hyphen;&gt;</programlisting>
</example>
<para>Se você já utilizou HTML antes, você pode ter
@ -1037,12 +1037,12 @@ onsgmls:example.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<example>
<title>Comentários SGML errados</title>
<programlisting><![CDATA[
<!-- Este é o comentário --
<programlisting>
&lt;!&hyphen;- Este é o comentário -&hyphen;
Isto está fora do comentário!
-- de volta para dentro do comentário -->]]></programlisting>
&hyphen;- de volta para dentro do comentário -&hyphen;&gt;</programlisting>
<para>O interpretador SGML irá tratar isto como ele
é realmente;</para>
@ -1052,12 +1052,12 @@ onsgmls:example.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<para>Isto não é um SGML válido, e pode
dar mensagens de erro confusas.</para>
<programlisting><![CDATA[<!--------------- Isto é uma idéia muito ruim --------------->]]></programlisting>
<programlisting>&lt;!&hyphen;&hyphen;&hyphen;&hyphen;&hyphen; Isto é uma idéia muito ruim &hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&gt;</programlisting>
<para>E como o exemplo sugere, <emphasis>não escreva
</emphasis> comentários como esse.</para>
<programlisting><![CDATA[<!--===================================================-->]]></programlisting>
<programlisting>&lt;!&hyphen;-===================================================-&hyphen;&gt;</programlisting>
<para>Esta é uma abordagem (ligeiramente) melhor, mas
ele ainda é potencialmente confuso para as pessoas
@ -1209,8 +1209,6 @@ onsgmls:example.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<!ENTITY % param.some "some">
<!ENTITY % param.text "text">
<!ENTITY % param.new "%param.some more %param.text">
<!-- %param.new agora contém "some more text" -->
]>]]></programlisting>
</example>
@ -1236,8 +1234,6 @@ onsgmls:example.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<title>Um exemplo de arquivo HTML</title>
</head>
<!-- Você pode ter alguns comentários aqui também -->
<body>
<p>Este é um parágrafo contendo algum texto.</p>
@ -1344,11 +1340,9 @@ onsgmls:example.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<!ENTITY chapter.1 SYSTEM "chapter1.xml">
<!ENTITY chapter.2 SYSTEM "chapter2.xml">
<!ENTITY chapter.3 SYSTEM "chapter3.xml">
<!-- e assim por diante -->
]>
<html>
<!-- Utilize as entidades para carregar os capítulos -->
&chapter.1;
&chapter.2;
@ -1414,10 +1408,7 @@ onsgmls:example.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
entidades gerais como antes;</para>
<programlisting><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
<!-- Define uma entidade de parâmetro para carregar as entidades gerais de capitulo -->
<!ENTITY % chapters SYSTEM "chapters.ent">
<!-- Agora utilize a entidade de parâmetro para carregar neste arquivo -->
%chapters;
]>

View file

@ -158,21 +158,21 @@
<para>Использование:</para>
<programlisting><![CDATA[<h1>First section</h1>
<programlisting>&lt;h1&gt;First section&lt;/h1&gt;
<!-- Здесь помещается введение документа -->
&lt;!&hyphen;- Здесь помещается введение документа -&hyphen;&gt;
<h2>Это заголовок первого раздела</h2>
&lt;h2&gt;Это заголовок первого раздела&lt;/h2&gt;
<!-- Здесь размещается содержимое первого раздела -->
&lt;!&hyphen;- Здесь размещается содержимое первого раздела -&hyphen;&gt;
<h3>Это заголовок первого подраздела</h3>
&lt;h3&gt;Это заголовок первого подраздела&lt;/h3&gt;
<!-- Здесь размещается содержимое первого подраздела -->
&lt;!&hyphen;- Здесь размещается содержимое первого подраздела -&hyphen;&gt;
<h2>Это заголовок второго раздела</h2>
&lt;h2&gt;Это заголовок второго раздела&lt;/h2&gt;
<!-- Здесь размещается содержимое второго раздела -->]]></programlisting>
&lt;!&hyphen;- Здесь размещается содержимое второго раздела -&hyphen;&gt;</programlisting>
</example>
<para>Вообще говоря, на странице HTML должен иметься один заголовок
@ -189,13 +189,13 @@
<para>Использование:</para>
<programlisting><![CDATA[<h1>Первый раздел</h1>
<programlisting>&lt;h1&gt;Первый раздел&lt;/h1&gt;
<!-- Введение документа -->
&lt;!&hyphen;- Введение документа -&hyphen;&gt;
<h3>Подраздел</h3>
&lt;h3&gt;Подраздел&lt;/h3&gt;
<!-- Это плохо, пропущен <h2> -->]]></programlisting>
&lt;!&hyphen;- Это плохо, пропущен <h2> -&hyphen;&gt;</programlisting>
</example>
</sect3>
@ -458,9 +458,6 @@
</tr>
<tr>
<!-- Из-за того, что большая ячейка слева объединяется в
эту строку, первый <td> появится справа -->
<td>Средняя правая ячейка</td>
</tr>

View file

@ -148,21 +148,21 @@
<para>Use:</para>
<programlisting><![CDATA[<h1>First section</h1>
<programlisting>&lt;h1&gt;First section&lt;/h1&gt;
<!-- Document introduction goes here -->
&lt;!&hyphen;- Document introduction goes here -&hyphen;&gt;
<h2>This is the heading for the first section</h2>
&lt;h2&gt;This is the heading for the first section&lt;/h2&gt;
<!-- Content for the first section goes here -->
&lt;!&hyphen;- Content for the first section goes here -&hyphen;&gt;
<h3>This is the heading for the first sub-section</h3>
&lt;h3&gt;This is the heading for the first sub-section&lt;/h3&gt;
<!-- Content for the first sub-section goes here -->
&lt;!&hyphen;- Content for the first sub-section goes here -&hyphen;&gt;
<h2>This is the heading for the second section</h2>
&lt;h2&gt;This is the heading for the second section&lt;/h2&gt;
<!-- Content for the second section goes here -->]]></programlisting>
&lt;!&hyphen;- Content for the second section goes here -&hyphen;&gt;</programlisting>
</example>
<para>Generally, an HTML page should have one first level heading
@ -179,13 +179,13 @@
<para>Use:</para>
<programlisting><![CDATA[<h1>First section</h1>
<programlisting>&lt;h1&gt;First section&lt;/h1&gt;
<!-- Document introduction -->
&lt;!&hyphen;- Document introduction -&hyphen;&gt;
<h3>Sub-section</h3>
&lt;h3&gt;Sub-section&lt;/h3&gt;
<!-- This is bad, <h2> has been left out -->]]></programlisting>
&lt;!&hyphen;- This is bad, &lt;h2&gt; has been left out -&hyphen;&gt;</programlisting>
</example>
</sect3>
@ -455,10 +455,6 @@
</tr>
<tr>
<!-- Because the large cell on the left merges into
this row, the first <td> will occur on its
right -->
<td>Middle right cell</td>
</tr>

View file

@ -818,40 +818,18 @@ nsgmls:example.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<programlisting>&lt;!-- ´ú¸Õµù¸Ñ --></programlisting>
<programlisting><![CDATA[
<!-- 這是註解 -->
<programlisting>
&lt;!&hyphen;- 這是註解 -&hyphen;&gt;
<!-- 這也是註解 -->
&lt;!&hyphen;- 這也是註解 -&hyphen;&gt;
<!-- 要寫多行註解的話,
這是其中之一的方式 -->
&lt;!&hyphen;- 要寫多行註解的話,
這是其中之一的方式 -&hyphen;&gt;
<!-- 要寫多行註解, --
-- 也可以這樣子用 -->]]></programlisting>
&lt;!&hyphen;- 要寫多行註解, -&hyphen;
&hyphen;- 也可以這樣子用 -&hyphen;&gt;</programlisting>
</example>
<!--
<![%output.print;[
<important>
<title>Use 2 dashes</title>
<para>There is a problem with producing the Postscript and PDF versions
of this document. The above example probably shows just one hyphen
symbol, <literal>-</literal> after the <literal>&lt;!</literal> and
before the <literal>&gt;</literal>.</para>
<para>You <emphasis>must</emphasis> use two <literal>-</literal>,
<emphasis>not</emphasis> one. The Postscript and PDF versions have
translated the two <literal>-</literal> in the original to a longer,
more professional <emphasis>em-dash</emphasis>, and broken this
example in the process.</para>
<para>The HTML, plain text, and RTF versions of this document are not
affected.</para>
</important>
]]>
-->
<para>If you have used HTML before you may have been shown different rules
for comments. In particular, you may think that the string
<literal>&lt;!--</literal> opens a comment, and it is only closed by
@ -865,12 +843,12 @@ nsgmls:example.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<example>
<title>Erroneous SGML comments</title>
<programlisting><![CDATA[
<!-- This is in the comment --
<programlisting>
&lt;!&hyphen;- This is in the comment -&hyphen;
THIS IS OUTSIDE THE COMMENT!
-- back inside the comment -->]]></programlisting>
&hyphen;- back inside the comment -&hyphen;&gt;</programlisting>
<para>The SGML parser will treat this as though it were actually:</para>
@ -879,12 +857,12 @@ nsgmls:example.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<para>This is not valid SGML, and may give confusing error
messages.</para>
<programlisting><![CDATA[<!--------------- This is a very bad idea --------------->]]></programlisting>
<programlisting>&lt;!&hyphen;&hyphen;&hyphen;&hyphen;&hyphen; This is a very bad idea &hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&gt;</programlisting>
<para>As the example suggests, <emphasis>do not</emphasis> write
comments like that.</para>
<programlisting><![CDATA[<!--===================================================-->]]></programlisting>
<programlisting>&lt;!&hyphen;-===================================================-&hyphen;&gt;</programlisting>
<para>That is a (slightly) better approach, but it still potentially
confusing to people new to SGML.</para>
@ -1011,8 +989,6 @@ nsgmls:example.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<!ENTITY % param.some "some">
<!ENTITY % param.text "text">
<!ENTITY % param.new "%param.some more %param.text">
<!-- %param.new now contains "some more text" -->
]>]]></programlisting>
</example>
@ -1036,8 +1012,6 @@ nsgmls:example.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<title>An example HTML file</title>
</head>
<!-- You might well have some comments in here as well -->
<body>
<p>This is a paragraph containing some text.</p>
@ -1129,11 +1103,9 @@ nsgmls:example.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
<!ENTITY chapter.1 SYSTEM "chapter1.xml">
<!ENTITY chapter.2 SYSTEM "chapter2.xml">
<!ENTITY chapter.3 SYSTEM "chapter3.xml">
<!-- And so forth -->
]>
<html>
<!-- Use the entities to load in the chapters -->
&chapter.1;
&chapter.2;
@ -1189,10 +1161,7 @@ nsgmls:example.xml:6:8:E: end tag for "HEAD" which is not finished</screen>
for use. Then use the general entities as before:</para>
<programlisting><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" [
<!-- Define a parameter entity to load in the chapter general entities -->
<!ENTITY % chapters SYSTEM "chapters.ent">
<!-- Now use the parameter entity to load in this file -->
%chapters;
]>