From owner-svn-doc-projects@FreeBSD.ORG Fri Jul 5 18:30:44 2013 Return-Path: Delivered-To: svn-doc-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7C969E54; Fri, 5 Jul 2013 18:30:44 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6E1711B94; Fri, 5 Jul 2013 18:30:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r65IUiUE032430; Fri, 5 Jul 2013 18:30:44 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r65IUiJU032428; Fri, 5 Jul 2013 18:30:44 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201307051830.r65IUiJU032428@svn.freebsd.org> From: Gabor Kovesdan Date: Fri, 5 Jul 2013 18:30:44 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-projects@freebsd.org Subject: svn commit: r42160 - in projects/db5/en_US.ISO8859-1/books/fdp-primer: xhtml-markup xml-primer X-SVN-Group: doc-projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for doc projects trees List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2013 18:30:44 -0000 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 @@ Usage: - First section + <h1>First section</h1> - +<!-- Document introduction goes here --> -

This is the heading for the first section

+<h2>This is the heading for the first section</h2> - +<!-- Content for the first section goes here --> -

This is the heading for the first sub-section

+<h3>This is the heading for the first sub-section</h3> - +<!-- Content for the first sub-section goes here --> -

This is the heading for the second section

+<h2>This is the heading for the second section</h2> -]]>
+<!-- Content for the second section goes here -->
Generally, an XHTML page should have @@ -186,13 +186,13 @@ Usage: - First section + <h1>First section</h1> - +<!-- Document introduction --> -

Sub-section

+<h3>Sub-section</h3> -]]>
+<!-- This is bad, <h2> has been left out -->
@@ -459,10 +459,6 @@ - - Middle right cell 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 XML Generic Comment - <!-- test comment --> + <!-- test comment --> - + +<!-- This is inside the comment --> - +<!-- This is another comment --> - +<!-- This is one way + of doing multiline comments --> -]]> +<!-- This is another way of -- + -- doing multiline comments -->]]> If you have used XHTML before you may have been shown @@ -841,12 +841,12 @@ example.xml:5: element head: validity er Erroneous XML Comments - +<!-- This is in the comment -- THIS IS OUTSIDE THE COMMENT! - -- back inside the comment -->]]> + -- back inside the comment --> The XML parser will treat this as though it were actually: @@ -856,12 +856,12 @@ example.xml:5: element head: validity er This is not valid XML, and may give confusing error messages. - ]]> + <!--------------- This is a very bad idea ---------------> As the example suggests, do not write comments like that. - ]]> + <!--===================================================--> That is a (slightly) better approach, but it still potentially confusing to people new to XML. @@ -992,14 +992,14 @@ example.xml:5: element head: validity er Defining Parameter Entities - <!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"> - -]>]]> +<!-- %param.new now contains "some more text" --> + This may not seem particularly useful. It will be. @@ -1013,28 +1013,28 @@ example.xml:5: element head: validity er Add a general entity to example.xml. - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [ - -]> +<!ENTITY version "1.1"> +]> - - - An Example XHTML File - +<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 --> - -

This is a paragraph containing some text.

+ <body> + <p>This is a paragraph containing some text.</p> -

This paragraph contains some more text.

+ <p>This paragraph contains some more text.</p> -

This paragraph might be right-justified.

+ <p align="right">This paragraph might be right-justified.</p> -

The current version of this document is: &version;

- -]]>
+ <p>The current version of this document is: &version;</p> + </body> +</html> @@ -1110,21 +1110,21 @@ example.xml:5: element head: validity er Using General Entities to Include Files - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [ - - - - -]> - - - - - &chapter.1; - &chapter.2; - &chapter.3; -]]> +<!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> @@ -1177,20 +1177,20 @@ example.xml:5: element head: validity er entities available for use. Then use the general entities as before:
- <!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; -]> +]> - - &chapter.1; - &chapter.2; - &chapter.3; -]]> +<html xmlns="http://www.w3.org/1999/xhtml"> + &chapter.1; + &chapter.2; + &chapter.3; +</html> @@ -1216,27 +1216,27 @@ example.xml:5: element head: validity er Edit example.xml so that it looks like this: - <!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"> +]> - - - An Example XHTML File - - - -

The current version of this document is: &version;

- - ¶1; - ¶2; - ¶3; - -]]>
+<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> + + &para1; + &para2; + &para3; + </body> +</html> @@ -1268,24 +1268,24 @@ example.xml:5: element head: validity er Edit example.xml so that it looks like this: - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [ - %entities; -]> +<!ENTITY % entities SYSTEM "entities.ent"> %entities; +]> - - - An Example XHTML File - - - -

The current version of this document is: &version;

- - ¶1; - ¶2; - ¶3; - -]]>
+<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> + + &para1; + &para2; + &para3; + </body> +</html>