svn commit: r42160 - in projects/db5/en_US.ISO8859-1/books/fdp-primer: xhtml-markup xml-primer
Gabor Kovesdan
gabor at FreeBSD.org
Fri Jul 5 18:30:44 UTC 2013
Author: gabor
Date: Fri Jul 5 18:30:43 2013
New Revision: 42160
URL: http://svnweb.freebsd.org/changeset/doc/42160
Log:
- Avoid comments in CDATA, which the DB 5.0 converter does not handle
Modified:
projects/db5/en_US.ISO8859-1/books/fdp-primer/xhtml-markup/chapter.xml
projects/db5/en_US.ISO8859-1/books/fdp-primer/xml-primer/chapter.xml
Modified: projects/db5/en_US.ISO8859-1/books/fdp-primer/xhtml-markup/chapter.xml
==============================================================================
--- projects/db5/en_US.ISO8859-1/books/fdp-primer/xhtml-markup/chapter.xml Fri Jul 5 15:16:25 2013 (r42159)
+++ projects/db5/en_US.ISO8859-1/books/fdp-primer/xhtml-markup/chapter.xml Fri Jul 5 18:30:43 2013 (r42160)
@@ -153,21 +153,21 @@
<para>Usage:</para>
- <programlisting><![CDATA[<h1>First section</h1>
+ <programlisting><h1>First section</h1>
-<!-- Document introduction goes here -->
+<!-- Document introduction goes here -->
-<h2>This is the heading for the first section</h2>
+<h2>This is the heading for the first section</h2>
-<!-- Content for the first section goes here -->
+<!-- Content for the first section goes here -->
-<h3>This is the heading for the first sub-section</h3>
+<h3>This is the heading for the first sub-section</h3>
-<!-- Content for the first sub-section goes here -->
+<!-- Content for the first sub-section goes here -->
-<h2>This is the heading for the second section</h2>
+<h2>This is the heading for the second section</h2>
-<!-- Content for the second section goes here -->]]></programlisting>
+<!-- Content for the second section goes here --></programlisting>
</example>
<para>Generally, an <acronym>XHTML</acronym> page should have
@@ -186,13 +186,13 @@
<para>Usage:</para>
- <programlisting><![CDATA[<h1>First section</h1>
+ <programlisting><h1>First section</h1>
-<!-- Document introduction -->
+<!-- Document introduction -->
-<h3>Sub-section</h3>
+<h3>Sub-section</h3>
-<!-- This is bad, <h2> has been left out -->]]></programlisting>
+<!-- This is bad, <h2> has been left out --></programlisting>
</example>
</sect2>
@@ -459,10 +459,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>
Modified: projects/db5/en_US.ISO8859-1/books/fdp-primer/xml-primer/chapter.xml
==============================================================================
--- projects/db5/en_US.ISO8859-1/books/fdp-primer/xml-primer/chapter.xml Fri Jul 5 15:16:25 2013 (r42159)
+++ projects/db5/en_US.ISO8859-1/books/fdp-primer/xml-primer/chapter.xml Fri Jul 5 18:30:43 2013 (r42160)
@@ -813,18 +813,18 @@ example.xml:5: element head: validity er
<example>
<title>XML Generic Comment</title>
- <programlisting><!-- test comment --></programlisting>
+ <programlisting><!-- test comment --></programlisting>
- <programlisting><![CDATA[
-<!-- This is inside the comment -->
+ <programlisting>
+<!-- This is inside the comment -->
-<!-- This is another comment -->
+<!-- This is another comment -->
-<!-- This is one way
- of doing multiline comments -->
+<!-- This is one way
+ of doing multiline comments -->
-<!-- This is another way of --
- -- doing multiline comments -->]]></programlisting>
+<!-- This is another way of --
+ -- doing multiline comments -->]]></programlisting>
</example>
<para>If you have used XHTML before you may have been shown
@@ -841,12 +841,12 @@ example.xml:5: element head: validity er
<example>
<title>Erroneous XML Comments</title>
- <programlisting><![CDATA[
-<!-- This is in the comment --
+ <programlisting>
+<!-- This is in the comment --
THIS IS OUTSIDE THE COMMENT!
- -- back inside the comment -->]]></programlisting>
+ -- back inside the comment --></programlisting>
<para>The XML parser will treat this as though it were
actually:</para>
@@ -856,12 +856,12 @@ example.xml:5: element head: validity er
<para>This is not valid XML, and may give confusing error
messages.</para>
- <programlisting><![CDATA[<!--------------- This is a very bad idea --------------->]]></programlisting>
+ <programlisting><!--------------- This is a very bad idea ---------------></programlisting>
<para>As the example suggests, <emphasis>do not</emphasis> write
comments like that.</para>
- <programlisting><![CDATA[<!--===================================================-->]]></programlisting>
+ <programlisting><!--===================================================--></programlisting>
<para>That is a (slightly) better approach, but it still
potentially confusing to people new to XML.</para>
@@ -992,14 +992,14 @@ example.xml:5: element head: validity er
<example>
<title>Defining Parameter Entities</title>
- <programlisting><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ <programlisting><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
-<!ENTITY % param.some "some">
-<!ENTITY % param.text "text">
-<!ENTITY % param.new "%param.some more %param.text">
+<!ENTITY % param.some "some">
+<!ENTITY % param.text "text">
+<!ENTITY % param.new "%param.some more %param.text">
-<!-- %param.new now contains "some more text" -->
-]>]]></programlisting>
+<!-- %param.new now contains "some more text" -->
+</programlisting>
</example>
<para>This may not seem particularly useful. It will be.</para>
@@ -1013,28 +1013,28 @@ example.xml:5: element head: validity er
<para>Add a general entity to
<filename>example.xml</filename>.</para>
- <programlisting><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ <programlisting><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
-<!ENTITY version "1.1">
-]>
+<!ENTITY version "1.1">
+]>
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>An Example XHTML File</title>
- </head>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>An Example XHTML File</title>
+ </head>
- <!-- You might well have some comments in here as well -->
+ <!-- You might well have some comments in here as well -->
- <body>
- <p>This is a paragraph containing some text.</p>
+ <body>
+ <p>This is a paragraph containing some text.</p>
- <p>This paragraph contains some more text.</p>
+ <p>This paragraph contains some more text.</p>
- <p align="right">This paragraph might be right-justified.</p>
+ <p align="right">This paragraph might be right-justified.</p>
- <p>The current version of this document is: &version;</p>
- </body>
-</html>]]></programlisting>
+ <p>The current version of this document is: &version;</p>
+ </body>
+</html></programlisting>
</step>
<step>
@@ -1110,21 +1110,21 @@ example.xml:5: element head: validity er
<example>
<title>Using General Entities to Include Files</title>
- <programlisting><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ <programlisting><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
-<!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;
-</html>]]></programlisting>
+<!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;
+</html></programlisting>
</example>
<warning>
@@ -1177,20 +1177,20 @@ example.xml:5: element head: validity er
entities available for use. Then use the general entities
as before:</para>
- <programlisting><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ <programlisting><!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">
+<!-- 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 -->
+<!-- Now use the parameter entity to load in this file -->
%chapters;
-]>
+]>
-<html xmlns="http://www.w3.org/1999/xhtml">
- &chapter.1;
- &chapter.2;
- &chapter.3;
-</html>]]></programlisting>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ &chapter.1;
+ &chapter.2;
+ &chapter.3;
+</html></programlisting>
</example>
</sect2>
@@ -1216,27 +1216,27 @@ example.xml:5: element head: validity er
<para>Edit <filename>example.xml</filename> so that it
looks like this:</para>
- <programlisting><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ <programlisting><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
-<!ENTITY version "1.1">
-<!ENTITY para1 SYSTEM "para1.xml">
-<!ENTITY para2 SYSTEM "para2.xml">
-<!ENTITY para3 SYSTEM "para3.xml">
-]>
+<!ENTITY version "1.1">
+<!ENTITY para1 SYSTEM "para1.xml">
+<!ENTITY para2 SYSTEM "para2.xml">
+<!ENTITY para3 SYSTEM "para3.xml">
+]>
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>An Example XHTML File</title>
- </head>
-
- <body>
- <p>The current version of this document is: &version;</p>
-
- ¶1;
- ¶2;
- ¶3;
- </body>
-</html>]]></programlisting>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>An Example XHTML File</title>
+ </head>
+
+ <body>
+ <p>The current version of this document is: &version;</p>
+
+ ¶1;
+ ¶2;
+ ¶3;
+ </body>
+</html></programlisting>
</step>
<step>
@@ -1268,24 +1268,24 @@ example.xml:5: element head: validity er
<para>Edit <filename>example.xml</filename> so that it
looks like this:</para>
- <programlisting><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ <programlisting><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
-<!ENTITY % entities SYSTEM "entities.ent"> %entities;
-]>
+<!ENTITY % entities SYSTEM "entities.ent"> %entities;
+]>
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>An Example XHTML File</title>
- </head>
-
- <body>
- <p>The current version of this document is: &version;</p>
-
- ¶1;
- ¶2;
- ¶3;
- </body>
-</html>]]></programlisting>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>An Example XHTML File</title>
+ </head>
+
+ <body>
+ <p>The current version of this document is: &version;</p>
+
+ ¶1;
+ ¶2;
+ ¶3;
+ </body>
+</html></programlisting>
</step>
<step>
More information about the svn-doc-projects
mailing list