Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65113 - in trunk/tools/quickbook: doc src test
From: dnljms_at_[hidden]
Date: 2010-08-29 17:11:18


Author: danieljames
Date: 2010-08-29 17:11:02 EDT (Sun, 29 Aug 2010)
New Revision: 65113
URL: http://svn.boost.org/trac/boost/changeset/65113

Log:
Restore 1.43 style document fields.

Only xml encoding the fields, and supporting escapes with a 1.6 version
switch.
Text files modified:
   trunk/tools/quickbook/doc/quickbook.qbk | 7 ++++---
   trunk/tools/quickbook/src/doc_info_actions.cpp | 20 ++++++++++----------
   trunk/tools/quickbook/test/doc-info-1.quickbook | 2 +-
   trunk/tools/quickbook/test/doc-info-2.gold | 14 +++++++++-----
   trunk/tools/quickbook/test/doc-info-2.quickbook | 5 +++--
   trunk/tools/quickbook/test/xml-escape_1_5.gold | 8 ++++----
   trunk/tools/quickbook/test/xml-escape_1_5.quickbook | 2 +-
   7 files changed, 32 insertions(+), 26 deletions(-)

Modified: trunk/tools/quickbook/doc/quickbook.qbk
==============================================================================
--- trunk/tools/quickbook/doc/quickbook.qbk (original)
+++ trunk/tools/quickbook/doc/quickbook.qbk 2010-08-29 17:11:02 EDT (Sun, 29 Aug 2010)
@@ -230,11 +230,12 @@
 * In docbook, variable list entries can only have one `listitem`, so if an
   entry has multiple values, merge them into one `listitem`.
 * Support nested code snippets.
-* Allow escapes in doc info fields (apart from `\n`).
-* Don't escape the raw markup for versions less than 1.3, for better
- compatibility with older documentation.
+* Revert xml escaping document info, it broke some documentation files
+ (now a 1.6 feature).
 * Further work on quickbook 1.6, still not stable.
   * Allow heading to have ids, using the syntax: `[heading:id title]`.
+ * XML escape documentation fields, with escapes to allow encoding unicode
+ in ASCII.
 
 [endsect]
 

Modified: trunk/tools/quickbook/src/doc_info_actions.cpp
==============================================================================
--- trunk/tools/quickbook/src/doc_info_actions.cpp (original)
+++ trunk/tools/quickbook/src/doc_info_actions.cpp 2010-08-29 17:11:02 EDT (Sun, 29 Aug 2010)
@@ -31,7 +31,7 @@
         // *before* anything else.
 
         if (!actions.doc_id_tmp.empty())
- actions.doc_id = actions.doc_id_tmp.get(103);
+ actions.doc_id = actions.doc_id_tmp.get(106);
 
         if (actions.doc_id.empty())
             actions.doc_id = detail::make_identifier(
@@ -145,18 +145,18 @@
         
         if(actions.doc_type == "library")
         {
- out << " name=\"" << actions.doc_title.get(103) << "\"\n";
+ out << " name=\"" << actions.doc_title.get(106) << "\"\n";
         }
 
         if(!actions.doc_dirname.empty())
         {
             out << " dirname=\""
- << actions.doc_dirname.get(103)
+ << actions.doc_dirname.get(106)
                 << "\"\n";
         }
 
         out << " last-revision=\""
- << actions.doc_last_revision.get(103)
+ << actions.doc_last_revision.get(106)
             << "\" \n"
             << " xmlns:xi=\"http://www.w3.org/2001/XInclude\">\n";
             
@@ -188,9 +188,9 @@
         if (!actions.doc_title.empty())
         {
             out << " <title>"
- << actions.doc_title.get(103);
+ << actions.doc_title.get(106);
             if (!actions.doc_version.empty()) {
- out << ' ' << actions.doc_version.get(103);
+ out << ' ' << actions.doc_version.get(106);
             }
             out<< "</title>\n\n\n";
         }
@@ -210,10 +210,10 @@
             {
                 tmp << " <author>\n"
                     << " <firstname>"
- << it->first.get(103)
+ << it->first.get(106)
                     << "</firstname>\n"
                     << " <surname>"
- << it->second.get(103)
+ << it->second.get(106)
                     << "</surname>\n"
                     << " </author>\n";
             }
@@ -238,7 +238,7 @@
                 }
         
                 tmp << " <holder>"
- << it->second.get(103)
+ << it->second.get(106)
                     << "</holder>\n"
                     << " </copyright>\n"
                     << "\n"
@@ -274,7 +274,7 @@
                 it != end; ++it)
             {
                 tmp << " <" << actions.doc_type << "category name=\"category:"
- << it->get(103)
+ << it->get(106)
                     << "\"></" << actions.doc_type << "category>\n"
                     << "\n"
                 ;

Modified: trunk/tools/quickbook/test/doc-info-1.quickbook
==============================================================================
--- trunk/tools/quickbook/test/doc-info-1.quickbook (original)
+++ trunk/tools/quickbook/test/doc-info-1.quickbook 2010-08-29 17:11:02 EDT (Sun, 29 Aug 2010)
@@ -1,5 +1,5 @@
 [article Karel Vom\u00E1\u010Dka and Tom\u00E1\u0161 Martin\u00EDk
-[quickbook 1.5]
+[quickbook 1.6]
 [authors [Meik\u00E4l\u00E4inen, Matti][Peri\u0107, Pero]]
 [copyright 2010 Me\u00F0al-J\u00F3n and J\u00F3na J\u00F3nsd\u00F3ttir]
 [source-mode teletype]

Modified: trunk/tools/quickbook/test/doc-info-2.gold
==============================================================================
--- trunk/tools/quickbook/test/doc-info-2.gold (original)
+++ trunk/tools/quickbook/test/doc-info-2.gold 2010-08-29 17:11:02 EDT (Sun, 29 Aug 2010)
@@ -1,20 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<library id="document_information_1" name="Document Information 1" dirname="document_information_1"
-last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+<library id="karel_vom__xe1___x10d_ka_and_tom__xe1___x161__martin__xed_k" name="Karel Vom&#xE1;&#x10D;ka and Tom&#xE1;&#x161; Martin&#xED;k"
+dirname="karel_vom__xe1___x10d_ka_and_tom__xe1___x161__martin__xed_k" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
   <libraryinfo>
     <authorgroup>
     <author>
- <firstname>Joe</firstname> <surname>Blow</surname>
+ <firstname>Matti</firstname> <surname>Meik&#xE4;l&#xE4;inen</surname>
     </author>
     <author>
- <firstname>Jane</firstname> <surname>Doe</surname>
+ <firstname>Pero</firstname> <surname>Peri&#x107;</surname>
     </author>
     </authorgroup>
+ <copyright>
+ <year>2010</year> <holder>Me&#xF0;al-J&#xF3;n and J&#xF3;na J&#xF3;nsd&#xF3;ttir</holder>
+ </copyright>
     <librarypurpose>
       Inline code test: <code>1 + 2</code>
     </librarypurpose>
     <librarycategory name="category:tests"></librarycategory> <librarycategory name="category:irrelevance"></librarycategory>
   </libraryinfo>
- <title>Document Information 1</title>
+ <title>Karel Vom&#xE1;&#x10D;ka and Tom&#xE1;&#x161; Martin&#xED;k</title>
 </library>

Modified: trunk/tools/quickbook/test/doc-info-2.quickbook
==============================================================================
--- trunk/tools/quickbook/test/doc-info-2.quickbook (original)
+++ trunk/tools/quickbook/test/doc-info-2.quickbook 2010-08-29 17:11:02 EDT (Sun, 29 Aug 2010)
@@ -1,6 +1,7 @@
-[library Document Information 1
+[library Karel Vom&#xE1;&#x10D;ka and Tom&#xE1;&#x161; Martin&#xED;k
 [quickbook 1.5]
-[authors [Blow, Joe] [Doe, Jane]]
+[authors [Meik&#xE4;l&#xE4;inen, Matti],[Peri&#x107;, Pero]]
+[copyright 2010 Me&#xF0;al-J&#xF3;n and J&#xF3;na J&#xF3;nsd&#xF3;ttir]
 [source-mode teletype]
 [purpose Inline code test: `1 + 2`]
 [category tests]

Modified: trunk/tools/quickbook/test/xml-escape_1_5.gold
==============================================================================
--- trunk/tools/quickbook/test/xml-escape_1_5.gold (original)
+++ trunk/tools/quickbook/test/xml-escape_1_5.gold 2010-08-29 17:11:02 EDT (Sun, 29 Aug 2010)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<library id="test_that______are_being_escaped_" name="Test that &amp;, &lt; are being escaped."
-dirname="test_that______are_being_escaped_" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+<library id="test_that__amp____lt__are_being_escaped_" name="Test that &amp;, &lt; are being escaped."
+dirname="test_that__amp____lt__are_being_escaped_" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
  xmlns:xi="http://www.w3.org/2001/XInclude">
   <libraryinfo>
     <legalnotice>
@@ -14,8 +14,8 @@
     </librarypurpose>
   </libraryinfo>
   <title>Test that &amp;, &lt; are being escaped.</title>
- <section id="test_that______are_being_escaped_.escapes___explicitly_written_markup">
- <title><link linkend="test_that______are_being_escaped_.escapes___explicitly_written_markup">Escapes
+ <section id="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">
+ <title><link linkend="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">Escapes
     &amp; explicitly written markup</link></title>
     <itemizedlist>
       <listitem>

Modified: trunk/tools/quickbook/test/xml-escape_1_5.quickbook
==============================================================================
--- trunk/tools/quickbook/test/xml-escape_1_5.quickbook (original)
+++ trunk/tools/quickbook/test/xml-escape_1_5.quickbook 2010-08-29 17:11:02 EDT (Sun, 29 Aug 2010)
@@ -1,4 +1,4 @@
-[library Test that &, < are being escaped.
+[library Test that &amp;, &lt; are being escaped.
     [quickbook 1.5]
     [purpose & should be &amp;, < should &lt;]
     [license & should be &amp;, < should &lt;]


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk