$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r76361 - in branches/release: . boost tools tools/build/v2 tools/quickbook tools/quickbook/doc tools/quickbook/src tools/quickbook/test tools/quickbook/test/command-line tools/quickbook/test/doc-info tools/quickbook/test/html tools/quickbook/test/include tools/quickbook/test/snippets tools/quickbook/test/unit tools/quickbook/test/versions tools/quickbook/test/xinclude
From: dnljms_at_[hidden]
Date: 2012-01-08 05:34:15
Author: danieljames
Date: 2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
New Revision: 76361
URL: http://svn.boost.org/trac/boost/changeset/76361
Log:
Quickbook: Merge from trunk.
Added:
   branches/release/tools/quickbook/doc/1_6.qbk
      - copied, changed from r75700, /trunk/tools/quickbook/doc/1_6.qbk
   branches/release/tools/quickbook/doc/block.qbk
      - copied, changed from r75845, /trunk/tools/quickbook/doc/block.qbk
   branches/release/tools/quickbook/doc/change_log.qbk
      - copied unchanged from r75845, /trunk/tools/quickbook/doc/change_log.qbk
   branches/release/tools/quickbook/doc/editors.qbk
      - copied unchanged from r75845, /trunk/tools/quickbook/doc/editors.qbk
   branches/release/tools/quickbook/doc/faq.qbk
      - copied unchanged from r75845, /trunk/tools/quickbook/doc/faq.qbk
   branches/release/tools/quickbook/doc/install.qbk
      - copied unchanged from r75845, /trunk/tools/quickbook/doc/install.qbk
   branches/release/tools/quickbook/doc/introduction.qbk
      - copied unchanged from r75845, /trunk/tools/quickbook/doc/introduction.qbk
   branches/release/tools/quickbook/doc/phrase.qbk
      - copied unchanged from r75845, /trunk/tools/quickbook/doc/phrase.qbk
   branches/release/tools/quickbook/doc/ref.qbk
      - copied unchanged from r75845, /trunk/tools/quickbook/doc/ref.qbk
   branches/release/tools/quickbook/doc/structure.qbk
      - copied unchanged from r75845, /trunk/tools/quickbook/doc/structure.qbk
   branches/release/tools/quickbook/doc/syntax.qbk
      - copied unchanged from r75845, /trunk/tools/quickbook/doc/syntax.qbk
   branches/release/tools/quickbook/src/actions_state.hpp
      - copied unchanged from r75700, /trunk/tools/quickbook/src/actions_state.hpp
   branches/release/tools/quickbook/src/files.cpp
      - copied, changed from r75700, /trunk/tools/quickbook/src/files.cpp
   branches/release/tools/quickbook/src/files.hpp
      - copied unchanged from r75700, /trunk/tools/quickbook/src/files.hpp
   branches/release/tools/quickbook/src/id_manager.cpp
      - copied unchanged from r75700, /trunk/tools/quickbook/src/id_manager.cpp
   branches/release/tools/quickbook/src/id_manager.hpp
      - copied unchanged from r75700, /trunk/tools/quickbook/src/id_manager.hpp
   branches/release/tools/quickbook/src/intrusive_base.hpp
      - copied unchanged from r75700, /trunk/tools/quickbook/src/intrusive_base.hpp
   branches/release/tools/quickbook/src/string_ref.cpp
      - copied unchanged from r75700, /trunk/tools/quickbook/src/string_ref.cpp
   branches/release/tools/quickbook/src/string_ref.hpp
      - copied unchanged from r75700, /trunk/tools/quickbook/src/string_ref.hpp
   branches/release/tools/quickbook/src/symbols.hpp
      - copied unchanged from r75700, /trunk/tools/quickbook/src/symbols.hpp
   branches/release/tools/quickbook/test/anchor-1_1.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/anchor-1_1.gold
   branches/release/tools/quickbook/test/anchor-1_1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/anchor-1_1.quickbook
   branches/release/tools/quickbook/test/anchor-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/anchor-1_6.gold
   branches/release/tools/quickbook/test/anchor-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/anchor-1_6.quickbook
   branches/release/tools/quickbook/test/blocks-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/blocks-1_5.gold
   branches/release/tools/quickbook/test/blocks-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/blocks-1_5.quickbook
   branches/release/tools/quickbook/test/callouts-1_5.gold
      - copied, changed from r75700, /trunk/tools/quickbook/test/callouts-1_5.gold
   branches/release/tools/quickbook/test/callouts-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/callouts-1_5.quickbook
   branches/release/tools/quickbook/test/code-1_1.gold
      - copied, changed from r75700, /trunk/tools/quickbook/test/code-1_1.gold
   branches/release/tools/quickbook/test/code-1_1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/code-1_1.quickbook
   branches/release/tools/quickbook/test/code-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/code-1_5.gold
   branches/release/tools/quickbook/test/code-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/code-1_5.quickbook
   branches/release/tools/quickbook/test/code_cpp-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/code_cpp-1_5.gold
   branches/release/tools/quickbook/test/code_cpp-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/code_cpp-1_5.quickbook
   branches/release/tools/quickbook/test/code_cpp_mismatched_escape-1_4-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/code_cpp_mismatched_escape-1_4-fail.quickbook
   branches/release/tools/quickbook/test/code_python-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/code_python-1_5.gold
   branches/release/tools/quickbook/test/code_python-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/code_python-1_5.quickbook
   branches/release/tools/quickbook/test/code_python_mismatched_escape-1_4-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/code_python_mismatched_escape-1_4-fail.quickbook
   branches/release/tools/quickbook/test/code_snippet-1_1.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/code_snippet-1_1.gold
   branches/release/tools/quickbook/test/code_snippet-1_1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/code_snippet-1_1.quickbook
   branches/release/tools/quickbook/test/code_teletype-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/code_teletype-1_5.gold
   branches/release/tools/quickbook/test/code_teletype-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/code_teletype-1_5.quickbook
   branches/release/tools/quickbook/test/command-line/basic-1_6.quickbook
      - copied unchanged from r75769, /trunk/tools/quickbook/test/command-line/basic-1_6.quickbook
   branches/release/tools/quickbook/test/command_line_macro-1_1.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/command_line_macro-1_1.gold
   branches/release/tools/quickbook/test/command_line_macro-1_1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/command_line_macro-1_1.quickbook
   branches/release/tools/quickbook/test/cond_phrase-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/cond_phrase-1_5.gold
   branches/release/tools/quickbook/test/cond_phrase-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/cond_phrase-1_5.quickbook
   branches/release/tools/quickbook/test/doc-info/empty_title-1_1.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/doc-info/empty_title-1_1.gold
   branches/release/tools/quickbook/test/doc-info/empty_title-1_1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/doc-info/empty_title-1_1.quickbook
   branches/release/tools/quickbook/test/doc-info/empty_title-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/doc-info/empty_title-1_5.gold
   branches/release/tools/quickbook/test/doc-info/empty_title-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/doc-info/empty_title-1_5.quickbook
   branches/release/tools/quickbook/test/doc-info/empty_title-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/doc-info/empty_title-1_6.gold
   branches/release/tools/quickbook/test/doc-info/empty_title-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/doc-info/empty_title-1_6.quickbook
   branches/release/tools/quickbook/test/doc-info/id1-1.5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/doc-info/id1-1.5.gold
   branches/release/tools/quickbook/test/doc-info/id1-1.5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/doc-info/id1-1.5.quickbook
   branches/release/tools/quickbook/test/doc-info/id1-docinfo-no-id.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/doc-info/id1-docinfo-no-id.quickbook
   branches/release/tools/quickbook/test/doc-info/id1-no-docinfo.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/doc-info/id1-no-docinfo.quickbook
   branches/release/tools/quickbook/test/doc-info/missing_doc_info-1_6-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/doc-info/missing_doc_info-1_6-fail.quickbook
   branches/release/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold
   branches/release/tools/quickbook/test/doc-info/title_trailing_space-1_1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/doc-info/title_trailing_space-1_1.quickbook
   branches/release/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold
   branches/release/tools/quickbook/test/doc-info/title_trailing_space-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/doc-info/title_trailing_space-1_6.quickbook
   branches/release/tools/quickbook/test/elements-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/elements-1_5.gold
   branches/release/tools/quickbook/test/elements-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/elements-1_5.quickbook
   branches/release/tools/quickbook/test/elements-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/elements-1_6.gold
   branches/release/tools/quickbook/test/elements-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/elements-1_6.quickbook
   branches/release/tools/quickbook/test/empty.qbk
      - copied unchanged from r75700, /trunk/tools/quickbook/test/empty.qbk
   branches/release/tools/quickbook/test/escape-1_1.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/escape-1_1.gold
   branches/release/tools/quickbook/test/escape-1_1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/escape-1_1.quickbook
   branches/release/tools/quickbook/test/escape-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/escape-1_6.gold
   branches/release/tools/quickbook/test/escape-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/escape-1_6.quickbook
   branches/release/tools/quickbook/test/escape-mismatched-1_5-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/escape-mismatched-1_5-fail.quickbook
   branches/release/tools/quickbook/test/heading-1_1.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/heading-1_1.gold
   branches/release/tools/quickbook/test/heading-1_1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/heading-1_1.quickbook
   branches/release/tools/quickbook/test/heading-1_3.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/heading-1_3.gold
   branches/release/tools/quickbook/test/heading-1_3.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/heading-1_3.quickbook
   branches/release/tools/quickbook/test/heading-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/heading-1_5.gold
   branches/release/tools/quickbook/test/heading-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/heading-1_5.quickbook
   branches/release/tools/quickbook/test/heading-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/heading-1_6.gold
   branches/release/tools/quickbook/test/heading-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/heading-1_6.quickbook
   branches/release/tools/quickbook/test/heading_unclosed-1_4-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/heading_unclosed-1_4-fail.quickbook
   branches/release/tools/quickbook/test/hr-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/hr-1_5.gold
   branches/release/tools/quickbook/test/hr-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/hr-1_5.quickbook
   branches/release/tools/quickbook/test/hr-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/hr-1_6.gold
   branches/release/tools/quickbook/test/hr-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/hr-1_6.quickbook
   branches/release/tools/quickbook/test/html/
      - copied from r75700, /trunk/tools/quickbook/test/html/
   branches/release/tools/quickbook/test/identifier-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/identifier-1_5.gold
   branches/release/tools/quickbook/test/identifier-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/identifier-1_5.quickbook
   branches/release/tools/quickbook/test/identifier-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/identifier-1_6.gold
   branches/release/tools/quickbook/test/identifier-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/identifier-1_6.quickbook
   branches/release/tools/quickbook/test/image-1_5.gold
      - copied, changed from r75700, /trunk/tools/quickbook/test/image-1_5.gold
   branches/release/tools/quickbook/test/image-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/image-1_5.quickbook
   branches/release/tools/quickbook/test/image-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/image-1_6.gold
   branches/release/tools/quickbook/test/image-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/image-1_6.quickbook
   branches/release/tools/quickbook/test/import-1_1-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/import-1_1-fail.quickbook
   branches/release/tools/quickbook/test/include-1_1-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include-1_1-fail.quickbook
   branches/release/tools/quickbook/test/include-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include-1_5.gold
   branches/release/tools/quickbook/test/include-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include-1_5.quickbook
   branches/release/tools/quickbook/test/include-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include-1_6.gold
   branches/release/tools/quickbook/test/include-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include-1_6.quickbook
   branches/release/tools/quickbook/test/include/code-import.gold
      - copied, changed from r75700, /trunk/tools/quickbook/test/include/code-import.gold
   branches/release/tools/quickbook/test/include/code-import.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/code-import.quickbook
   branches/release/tools/quickbook/test/include/code-include.gold
      - copied, changed from r75700, /trunk/tools/quickbook/test/include/code-include.gold
   branches/release/tools/quickbook/test/include/code-include.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/code-include.quickbook
   branches/release/tools/quickbook/test/include/compatibility-1_1.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/compatibility-1_1.gold
   branches/release/tools/quickbook/test/include/compatibility-1_1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/compatibility-1_1.quickbook
   branches/release/tools/quickbook/test/include/compatibility-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/compatibility-1_5.gold
   branches/release/tools/quickbook/test/include/compatibility-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/compatibility-1_5.quickbook
   branches/release/tools/quickbook/test/include/compatibility-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/compatibility-1_6.gold
   branches/release/tools/quickbook/test/include/compatibility-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/compatibility-1_6.quickbook
   branches/release/tools/quickbook/test/include/compatibility-inc.qbk
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/compatibility-inc.qbk
   branches/release/tools/quickbook/test/include/compatibility-inc_1_1.qbk
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/compatibility-inc_1_1.qbk
   branches/release/tools/quickbook/test/include/compatibility-inc_1_5.qbk
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/compatibility-inc_1_5.qbk
   branches/release/tools/quickbook/test/include/compatibility-inc_1_6.qbk
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/compatibility-inc_1_6.qbk
   branches/release/tools/quickbook/test/include/doc-title1-1.5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/doc-title1-1.5.gold
   branches/release/tools/quickbook/test/include/doc-title1-1.5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/doc-title1-1.5.quickbook
   branches/release/tools/quickbook/test/include/doc-title1-inc1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/doc-title1-inc1.quickbook
   branches/release/tools/quickbook/test/include/doc-title1-inc2.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/doc-title1-inc2.quickbook
   branches/release/tools/quickbook/test/include/doc-title1-inc3.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/doc-title1-inc3.quickbook
   branches/release/tools/quickbook/test/include/doc-title1a-1.5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/doc-title1a-1.5.gold
   branches/release/tools/quickbook/test/include/doc-title1a-1.5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/doc-title1a-1.5.quickbook
   branches/release/tools/quickbook/test/include/import-basic-1.6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/import-basic-1.6.gold
   branches/release/tools/quickbook/test/include/import-basic-1.6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/import-basic-1.6.quickbook
   branches/release/tools/quickbook/test/include/import-basic-inc1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/import-basic-inc1.quickbook
   branches/release/tools/quickbook/test/include/import-basic-inc2.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/import-basic-inc2.quickbook
   branches/release/tools/quickbook/test/include/in_section-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/in_section-1_5.gold
   branches/release/tools/quickbook/test/include/in_section-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/in_section-1_5.quickbook
   branches/release/tools/quickbook/test/include/in_section-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/in_section-1_6.gold
   branches/release/tools/quickbook/test/include/in_section-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/in_section-1_6.quickbook
   branches/release/tools/quickbook/test/include/in_section-include1.qbk
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/in_section-include1.qbk
   branches/release/tools/quickbook/test/include/in_section-include2.qbk
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/in_section-include2.qbk
   branches/release/tools/quickbook/test/include/include-id-1.5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/include-id-1.5.gold
   branches/release/tools/quickbook/test/include/include-id-1.5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/include-id-1.5.quickbook
   branches/release/tools/quickbook/test/include/include-id-1.6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/include-id-1.6.gold
   branches/release/tools/quickbook/test/include/include-id-1.6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/include-id-1.6.quickbook
   branches/release/tools/quickbook/test/include/include-id-inc1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/include-id-inc1.quickbook
   branches/release/tools/quickbook/test/include/include-id-inc2.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/include-id-inc2.quickbook
   branches/release/tools/quickbook/test/include/include-id-inc3.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/include-id-inc3.quickbook
   branches/release/tools/quickbook/test/include/include_id_unbalanced-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/include_id_unbalanced-1_6.gold
   branches/release/tools/quickbook/test/include/include_id_unbalanced-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/include_id_unbalanced-1_6.quickbook
   branches/release/tools/quickbook/test/include/include_id_unbalanced-inc1.qbk
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/include_id_unbalanced-inc1.qbk
   branches/release/tools/quickbook/test/include/include_id_unbalanced-inc1a.qbk
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/include_id_unbalanced-inc1a.qbk
   branches/release/tools/quickbook/test/include/include_id_unbalanced-inc2.qbk
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/include_id_unbalanced-inc2.qbk
   branches/release/tools/quickbook/test/include/include_id_unbalanced-inc2a.qbk
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/include_id_unbalanced-inc2a.qbk
   branches/release/tools/quickbook/test/include/macros-1.5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/macros-1.5.gold
   branches/release/tools/quickbook/test/include/macros-1.5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/macros-1.5.quickbook
   branches/release/tools/quickbook/test/include/macros-1.6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/macros-1.6.gold
   branches/release/tools/quickbook/test/include/macros-1.6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/macros-1.6.quickbook
   branches/release/tools/quickbook/test/include/macros-inc1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/macros-inc1.quickbook
   branches/release/tools/quickbook/test/include/nested_compatibility-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/nested_compatibility-1_5.gold
   branches/release/tools/quickbook/test/include/nested_compatibility-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/nested_compatibility-1_5.quickbook
   branches/release/tools/quickbook/test/include/nested_compatibility-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/nested_compatibility-1_6.gold
   branches/release/tools/quickbook/test/include/nested_compatibility-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/nested_compatibility-1_6.quickbook
   branches/release/tools/quickbook/test/include/nested_compatibility_inc-1_5.qbk
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/nested_compatibility_inc-1_5.qbk
   branches/release/tools/quickbook/test/include/nested_compatibility_inc-1_6.qbk
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/nested_compatibility_inc-1_6.qbk
   branches/release/tools/quickbook/test/include/section-fail1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/section-fail1.quickbook
   branches/release/tools/quickbook/test/include/section-fail2.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/section-fail2.quickbook
   branches/release/tools/quickbook/test/include/section-inc1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/section-inc1.quickbook
   branches/release/tools/quickbook/test/include/section-inc2.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/section-inc2.quickbook
   branches/release/tools/quickbook/test/include/section-unclosed.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/section-unclosed.gold
   branches/release/tools/quickbook/test/include/section-unclosed.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/section-unclosed.quickbook
   branches/release/tools/quickbook/test/include/section.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/section.gold
   branches/release/tools/quickbook/test/include/section.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/section.quickbook
   branches/release/tools/quickbook/test/include/source_mode-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/source_mode-1_5.gold
   branches/release/tools/quickbook/test/include/source_mode-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/source_mode-1_5.quickbook
   branches/release/tools/quickbook/test/include/source_mode-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/source_mode-1_6.gold
   branches/release/tools/quickbook/test/include/source_mode-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/source_mode-1_6.quickbook
   branches/release/tools/quickbook/test/include/source_mode-inc1.qbk
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/source_mode-inc1.qbk
   branches/release/tools/quickbook/test/include/templates-1.5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/templates-1.5.gold
   branches/release/tools/quickbook/test/include/templates-1.5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/templates-1.5.quickbook
   branches/release/tools/quickbook/test/include/templates-1.6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/templates-1.6.gold
   branches/release/tools/quickbook/test/include/templates-1.6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/templates-1.6.quickbook
   branches/release/tools/quickbook/test/include/templates-inc1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include/templates-inc1.quickbook
   branches/release/tools/quickbook/test/include2-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include2-1_6.gold
   branches/release/tools/quickbook/test/include2-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include2-1_6.quickbook
   branches/release/tools/quickbook/test/include_sub-1_5.qbk
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include_sub-1_5.qbk
   branches/release/tools/quickbook/test/include_sub.qbk
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include_sub.qbk
   branches/release/tools/quickbook/test/include_win_path-1_6-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/include_win_path-1_6-fail.quickbook
   branches/release/tools/quickbook/test/link-1_1.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/link-1_1.gold
   branches/release/tools/quickbook/test/link-1_1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/link-1_1.quickbook
   branches/release/tools/quickbook/test/link-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/link-1_6.gold
   branches/release/tools/quickbook/test/link-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/link-1_6.quickbook
   branches/release/tools/quickbook/test/list_test-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/list_test-1_5.gold
   branches/release/tools/quickbook/test/list_test-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/list_test-1_5.quickbook
   branches/release/tools/quickbook/test/list_test-1_6.gold
      - copied, changed from r75700, /trunk/tools/quickbook/test/list_test-1_6.gold
   branches/release/tools/quickbook/test/list_test-1_6.quickbook
      - copied, changed from r75700, /trunk/tools/quickbook/test/list_test-1_6.quickbook
   branches/release/tools/quickbook/test/macro-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/macro-1_5.gold
   branches/release/tools/quickbook/test/macro-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/macro-1_5.quickbook
   branches/release/tools/quickbook/test/macro-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/macro-1_6.gold
   branches/release/tools/quickbook/test/macro-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/macro-1_6.quickbook
   branches/release/tools/quickbook/test/mismatched_brackets-1_1-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/mismatched_brackets-1_1-fail.quickbook
   branches/release/tools/quickbook/test/mismatched_brackets1-1_1.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/mismatched_brackets1-1_1.gold
   branches/release/tools/quickbook/test/mismatched_brackets1-1_1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/mismatched_brackets1-1_1.quickbook
   branches/release/tools/quickbook/test/mismatched_brackets2-1_1.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/mismatched_brackets2-1_1.gold
   branches/release/tools/quickbook/test/mismatched_brackets2-1_1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/mismatched_brackets2-1_1.quickbook
   branches/release/tools/quickbook/test/newline-1_1.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/newline-1_1.gold
   branches/release/tools/quickbook/test/newline-1_1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/newline-1_1.quickbook
   branches/release/tools/quickbook/test/para_test-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/para_test-1_5.gold
   branches/release/tools/quickbook/test/para_test-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/para_test-1_5.quickbook
   branches/release/tools/quickbook/test/post_process-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/post_process-fail.quickbook
   branches/release/tools/quickbook/test/preformatted-1_1.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/preformatted-1_1.gold
   branches/release/tools/quickbook/test/preformatted-1_1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/preformatted-1_1.quickbook
   branches/release/tools/quickbook/test/preformatted-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/preformatted-1_6.gold
   branches/release/tools/quickbook/test/preformatted-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/preformatted-1_6.quickbook
   branches/release/tools/quickbook/test/quickbook_manual-1_4.gold
      - copied, changed from r75700, /trunk/tools/quickbook/test/quickbook_manual-1_4.gold
   branches/release/tools/quickbook/test/quickbook_manual-1_4.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/quickbook_manual-1_4.quickbook
   branches/release/tools/quickbook/test/role-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/role-1_6.gold
   branches/release/tools/quickbook/test/role-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/role-1_6.quickbook
   branches/release/tools/quickbook/test/section-1_4.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/section-1_4.gold
   branches/release/tools/quickbook/test/section-1_4.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/section-1_4.quickbook
   branches/release/tools/quickbook/test/section-1_5-unclosed.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/section-1_5-unclosed.gold
   branches/release/tools/quickbook/test/section-1_5-unclosed.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/section-1_5-unclosed.quickbook
   branches/release/tools/quickbook/test/section-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/section-1_5.gold
   branches/release/tools/quickbook/test/section-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/section-1_5.quickbook
   branches/release/tools/quickbook/test/simple_markup-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/simple_markup-1_5.gold
   branches/release/tools/quickbook/test/simple_markup-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/simple_markup-1_5.quickbook
   branches/release/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold
      - copied, changed from r75700, /trunk/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold
   branches/release/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.quickbook
   branches/release/tools/quickbook/test/snippets/unbalanced_snippet1-1_6-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/snippets/unbalanced_snippet1-1_6-fail.quickbook
   branches/release/tools/quickbook/test/snippets/unbalanced_snippet1.cpp
      - copied unchanged from r75700, /trunk/tools/quickbook/test/snippets/unbalanced_snippet1.cpp
   branches/release/tools/quickbook/test/snippets/unbalanced_snippet2-1_6-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/snippets/unbalanced_snippet2-1_6-fail.quickbook
   branches/release/tools/quickbook/test/snippets/unbalanced_snippet2.cpp
      - copied unchanged from r75700, /trunk/tools/quickbook/test/snippets/unbalanced_snippet2.cpp
   branches/release/tools/quickbook/test/svg-1_1.gold
      - copied, changed from r75700, /trunk/tools/quickbook/test/svg-1_1.gold
   branches/release/tools/quickbook/test/svg-1_1.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/svg-1_1.quickbook
   branches/release/tools/quickbook/test/table-1_3.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/table-1_3.gold
   branches/release/tools/quickbook/test/table-1_3.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/table-1_3.quickbook
   branches/release/tools/quickbook/test/table-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/table-1_5.gold
   branches/release/tools/quickbook/test/table-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/table-1_5.quickbook
   branches/release/tools/quickbook/test/table-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/table-1_6.gold
   branches/release/tools/quickbook/test/table-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/table-1_6.quickbook
   branches/release/tools/quickbook/test/template_arguments1-1_1-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/template_arguments1-1_1-fail.quickbook
   branches/release/tools/quickbook/test/template_arguments2-1_1-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/template_arguments2-1_1-fail.quickbook
   branches/release/tools/quickbook/test/template_arguments3-1_1-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/template_arguments3-1_1-fail.quickbook
   branches/release/tools/quickbook/test/template_section-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/template_section-1_5.gold
   branches/release/tools/quickbook/test/template_section-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/template_section-1_5.quickbook
   branches/release/tools/quickbook/test/template_section1-1_5-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/template_section1-1_5-fail.quickbook
   branches/release/tools/quickbook/test/template_section2-1_5-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/template_section2-1_5-fail.quickbook
   branches/release/tools/quickbook/test/template_section3-1_5-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/template_section3-1_5-fail.quickbook
   branches/release/tools/quickbook/test/templates-1_3.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/templates-1_3.gold
   branches/release/tools/quickbook/test/templates-1_3.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/templates-1_3.quickbook
   branches/release/tools/quickbook/test/templates-1_4.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/templates-1_4.gold
   branches/release/tools/quickbook/test/templates-1_4.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/templates-1_4.quickbook
   branches/release/tools/quickbook/test/templates-1_5.gold
      - copied, changed from r75700, /trunk/tools/quickbook/test/templates-1_5.gold
   branches/release/tools/quickbook/test/templates-1_5.quickbook
      - copied, changed from r75700, /trunk/tools/quickbook/test/templates-1_5.quickbook
   branches/release/tools/quickbook/test/unicode_escape-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/unicode_escape-1_5.gold
   branches/release/tools/quickbook/test/unicode_escape-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/unicode_escape-1_5.quickbook
   branches/release/tools/quickbook/test/unit/symbols_find_null.cpp
      - copied unchanged from r75700, /trunk/tools/quickbook/test/unit/symbols_find_null.cpp
   branches/release/tools/quickbook/test/unit/symbols_tests.cpp
      - copied unchanged from r75700, /trunk/tools/quickbook/test/unit/symbols_tests.cpp
   branches/release/tools/quickbook/test/unmatched_element-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/unmatched_element-1_5.gold
   branches/release/tools/quickbook/test/unmatched_element-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/unmatched_element-1_5.quickbook
   branches/release/tools/quickbook/test/unmatched_element-1_6.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/unmatched_element-1_6.gold
   branches/release/tools/quickbook/test/unmatched_element-1_6.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/unmatched_element-1_6.quickbook
   branches/release/tools/quickbook/test/utf16be_bom-1_5-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/utf16be_bom-1_5-fail.quickbook
   branches/release/tools/quickbook/test/utf16le_bom-1_5-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/utf16le_bom-1_5-fail.quickbook
   branches/release/tools/quickbook/test/utf8-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/utf8-1_5.gold
   branches/release/tools/quickbook/test/utf8-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/utf8-1_5.quickbook
   branches/release/tools/quickbook/test/utf8_bom-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/utf8_bom-1_5.gold
   branches/release/tools/quickbook/test/utf8_bom-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/utf8_bom-1_5.quickbook
   branches/release/tools/quickbook/test/variablelist-1_5-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/variablelist-1_5-fail.quickbook
   branches/release/tools/quickbook/test/variablelist-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/variablelist-1_5.gold
   branches/release/tools/quickbook/test/variablelist-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/variablelist-1_5.quickbook
   branches/release/tools/quickbook/test/version-0_1-fail.quickbook
      - copied, changed from r75700, /trunk/tools/quickbook/test/version-0_1-fail.quickbook
   branches/release/tools/quickbook/test/version-1_7-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/version-1_7-fail.quickbook
   branches/release/tools/quickbook/test/version-2_0-fail.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/version-2_0-fail.quickbook
   branches/release/tools/quickbook/test/versions/
      - copied from r75700, /trunk/tools/quickbook/test/versions/
   branches/release/tools/quickbook/test/xinclude/
      - copied from r75766, /trunk/tools/quickbook/test/xinclude/
   branches/release/tools/quickbook/test/xinclude/xmlbase-1_6-fail.quickbook
      - copied, changed from r75769, /trunk/tools/quickbook/test/xinclude/xmlbase-1_6-fail.quickbook
   branches/release/tools/quickbook/test/xml_escape-1_2.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/xml_escape-1_2.gold
   branches/release/tools/quickbook/test/xml_escape-1_2.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/xml_escape-1_2.quickbook
   branches/release/tools/quickbook/test/xml_escape-1_5.gold
      - copied unchanged from r75700, /trunk/tools/quickbook/test/xml_escape-1_5.gold
   branches/release/tools/quickbook/test/xml_escape-1_5.quickbook
      - copied unchanged from r75700, /trunk/tools/quickbook/test/xml_escape-1_5.quickbook
Removed:
   branches/release/tools/quickbook/src/id_generator.cpp
   branches/release/tools/quickbook/src/id_generator.hpp
   branches/release/tools/quickbook/test/anchor.gold
   branches/release/tools/quickbook/test/anchor.quickbook
   branches/release/tools/quickbook/test/blocks.gold
   branches/release/tools/quickbook/test/blocks.quickbook
   branches/release/tools/quickbook/test/callouts.gold
   branches/release/tools/quickbook/test/callouts.quickbook
   branches/release/tools/quickbook/test/code-block-1.gold
   branches/release/tools/quickbook/test/code-block-1.quickbook
   branches/release/tools/quickbook/test/code-block-2.gold
   branches/release/tools/quickbook/test/code-block-2.quickbook
   branches/release/tools/quickbook/test/code-block-3.gold
   branches/release/tools/quickbook/test/code-block-3.quickbook
   branches/release/tools/quickbook/test/code-block-cpp.gold
   branches/release/tools/quickbook/test/code-block-cpp.quickbook
   branches/release/tools/quickbook/test/code-block-python.gold
   branches/release/tools/quickbook/test/code-block-python.quickbook
   branches/release/tools/quickbook/test/code-block-teletype.gold
   branches/release/tools/quickbook/test/code-block-teletype.quickbook
   branches/release/tools/quickbook/test/code-block.gold
   branches/release/tools/quickbook/test/code-block.quickbook
   branches/release/tools/quickbook/test/code-snippet.gold
   branches/release/tools/quickbook/test/code-snippet.quickbook
   branches/release/tools/quickbook/test/command_line_macro.gold
   branches/release/tools/quickbook/test/command_line_macro.quickbook
   branches/release/tools/quickbook/test/cond_phrase.gold
   branches/release/tools/quickbook/test/cond_phrase.quickbook
   branches/release/tools/quickbook/test/elements_1_5.gold
   branches/release/tools/quickbook/test/elements_1_5.quickbook
   branches/release/tools/quickbook/test/elements_1_6.gold
   branches/release/tools/quickbook/test/elements_1_6.quickbook
   branches/release/tools/quickbook/test/empty.quickbook
   branches/release/tools/quickbook/test/escape.gold
   branches/release/tools/quickbook/test/escape.quickbook
   branches/release/tools/quickbook/test/fail-cpp-mismatched-escape.quickbook
   branches/release/tools/quickbook/test/fail-import.quickbook
   branches/release/tools/quickbook/test/fail-include.quickbook
   branches/release/tools/quickbook/test/fail-mismatched-boostbook-escape.quickbook
   branches/release/tools/quickbook/test/fail-parse-error1.quickbook
   branches/release/tools/quickbook/test/fail-parse-error2.quickbook
   branches/release/tools/quickbook/test/fail-post-process.quickbook
   branches/release/tools/quickbook/test/fail-python-mismatched-escape.quickbook
   branches/release/tools/quickbook/test/fail-template-arguments1.quickbook
   branches/release/tools/quickbook/test/fail-template-arguments2.quickbook
   branches/release/tools/quickbook/test/fail-template-arguments3.quickbook
   branches/release/tools/quickbook/test/fail-template-lookup1.quickbook
   branches/release/tools/quickbook/test/fail-template-section-1.quickbook
   branches/release/tools/quickbook/test/fail-template-section-2.quickbook
   branches/release/tools/quickbook/test/fail-template-section-3.quickbook
   branches/release/tools/quickbook/test/fail-unknown-quickbook-1.quickbook
   branches/release/tools/quickbook/test/fail-unknown-quickbook-2.quickbook
   branches/release/tools/quickbook/test/fail-unknown-quickbook-3.quickbook
   branches/release/tools/quickbook/test/heading_1_1.gold
   branches/release/tools/quickbook/test/heading_1_1.quickbook
   branches/release/tools/quickbook/test/heading_1_3.gold
   branches/release/tools/quickbook/test/heading_1_3.quickbook
   branches/release/tools/quickbook/test/heading_1_5.gold
   branches/release/tools/quickbook/test/heading_1_6.gold
   branches/release/tools/quickbook/test/heading_1_6.quickbook
   branches/release/tools/quickbook/test/identifier_1_5.gold
   branches/release/tools/quickbook/test/identifier_1_5.quickbook
   branches/release/tools/quickbook/test/identifier_1_6.gold
   branches/release/tools/quickbook/test/identifier_1_6.quickbook
   branches/release/tools/quickbook/test/image_1_5.gold
   branches/release/tools/quickbook/test/image_1_5.quickbook
   branches/release/tools/quickbook/test/import.gold
   branches/release/tools/quickbook/test/import.quickbook
   branches/release/tools/quickbook/test/include-sub.quickbook
   branches/release/tools/quickbook/test/include-sub2.quickbook
   branches/release/tools/quickbook/test/include_1_5.gold
   branches/release/tools/quickbook/test/include_1_5.quickbook
   branches/release/tools/quickbook/test/include_1_6-2.gold
   branches/release/tools/quickbook/test/include_1_6-2.quickbook
   branches/release/tools/quickbook/test/include_1_6.gold
   branches/release/tools/quickbook/test/include_1_6.quickbook
   branches/release/tools/quickbook/test/link.gold
   branches/release/tools/quickbook/test/link.quickbook
   branches/release/tools/quickbook/test/list_test.gold
   branches/release/tools/quickbook/test/list_test.quickbook
   branches/release/tools/quickbook/test/macro.gold
   branches/release/tools/quickbook/test/macro.quickbook
   branches/release/tools/quickbook/test/mismatched-brackets-1.gold
   branches/release/tools/quickbook/test/mismatched-brackets-1.quickbook
   branches/release/tools/quickbook/test/mismatched-brackets-2.gold
   branches/release/tools/quickbook/test/mismatched-brackets-2.quickbook
   branches/release/tools/quickbook/test/mismatched-brackets-3.quickbook
   branches/release/tools/quickbook/test/newline.gold
   branches/release/tools/quickbook/test/newline.quickbook
   branches/release/tools/quickbook/test/para-test.gold
   branches/release/tools/quickbook/test/para-test.quickbook
   branches/release/tools/quickbook/test/preformatted.gold
   branches/release/tools/quickbook/test/preformatted.quickbook
   branches/release/tools/quickbook/test/quickbook-manual.gold
   branches/release/tools/quickbook/test/quickbook-manual.quickbook
   branches/release/tools/quickbook/test/section_1_4.gold
   branches/release/tools/quickbook/test/section_1_4.quickbook
   branches/release/tools/quickbook/test/section_1_5-unclosed.gold
   branches/release/tools/quickbook/test/section_1_5-unclosed.quickbook
   branches/release/tools/quickbook/test/section_1_5.gold
   branches/release/tools/quickbook/test/section_1_5.quickbook
   branches/release/tools/quickbook/test/simple_markup.gold
   branches/release/tools/quickbook/test/simple_markup.quickbook
   branches/release/tools/quickbook/test/table_1_3.gold
   branches/release/tools/quickbook/test/table_1_3.quickbook
   branches/release/tools/quickbook/test/table_1_5.gold
   branches/release/tools/quickbook/test/table_1_5.quickbook
   branches/release/tools/quickbook/test/template-section.gold
   branches/release/tools/quickbook/test/template-section.quickbook
   branches/release/tools/quickbook/test/templates.gold
   branches/release/tools/quickbook/test/templates.quickbook
   branches/release/tools/quickbook/test/templates_1_4.gold
   branches/release/tools/quickbook/test/templates_1_4.quickbook
   branches/release/tools/quickbook/test/templates_1_5.gold
   branches/release/tools/quickbook/test/templates_1_5.quickbook
   branches/release/tools/quickbook/test/unicode-escape.gold
   branches/release/tools/quickbook/test/unicode-escape.quickbook
   branches/release/tools/quickbook/test/unit/iterator_tests.cpp
   branches/release/tools/quickbook/test/utf-16be-bom.quickbook
   branches/release/tools/quickbook/test/utf-16le-bom.quickbook
   branches/release/tools/quickbook/test/utf-8-bom.gold
   branches/release/tools/quickbook/test/utf-8-bom.quickbook
   branches/release/tools/quickbook/test/utf-8.gold
   branches/release/tools/quickbook/test/utf-8.quickbook
   branches/release/tools/quickbook/test/variablelist.gold
   branches/release/tools/quickbook/test/variablelist.quickbook
   branches/release/tools/quickbook/test/xinclude.gold
   branches/release/tools/quickbook/test/xinclude.quickbook
   branches/release/tools/quickbook/test/xml-escape_1_2.gold
   branches/release/tools/quickbook/test/xml-escape_1_2.quickbook
   branches/release/tools/quickbook/test/xml-escape_1_5.gold
   branches/release/tools/quickbook/test/xml-escape_1_5.quickbook
Properties modified: 
   branches/release/   (props changed)
   branches/release/Jamroot   (props changed)
   branches/release/boost/   (props changed)
   branches/release/tools/   (props changed)
   branches/release/tools/build/v2/   (props changed)
   branches/release/tools/quickbook/   (props changed)
Text files modified: 
   branches/release/tools/quickbook/Jamfile.v2                                      |    24                                         
   branches/release/tools/quickbook/doc/1_6.qbk                                     |    58                                         
   branches/release/tools/quickbook/doc/Jamfile.v2                                  |     6                                         
   branches/release/tools/quickbook/doc/block.qbk                                   |    24                                         
   branches/release/tools/quickbook/doc/quickbook.qbk                               |  2466 --------------------------------------- 
   branches/release/tools/quickbook/src/Jamfile.v2                                  |     4                                         
   branches/release/tools/quickbook/src/actions.cpp                                 |  1482 +++++++++++------------                 
   branches/release/tools/quickbook/src/actions.hpp                                 |   267 +---                                    
   branches/release/tools/quickbook/src/actions_class.cpp                           |   165 +-                                      
   branches/release/tools/quickbook/src/actions_class.hpp                           |   101 -                                       
   branches/release/tools/quickbook/src/block_element_grammar.cpp                   |    68                                         
   branches/release/tools/quickbook/src/block_tags.hpp                              |     4                                         
   branches/release/tools/quickbook/src/code_snippet.cpp                            |   424 ++++--                                  
   branches/release/tools/quickbook/src/doc_info_actions.cpp                        |   408 ++++--                                  
   branches/release/tools/quickbook/src/doc_info_grammar.cpp                        |   184 +-                                      
   branches/release/tools/quickbook/src/doc_info_tags.hpp                           |    10                                         
   branches/release/tools/quickbook/src/files.cpp                                   |     3                                         
   branches/release/tools/quickbook/src/fwd.hpp                                     |     9                                         
   branches/release/tools/quickbook/src/grammar.cpp                                 |     5                                         
   branches/release/tools/quickbook/src/grammar.hpp                                 |    24                                         
   branches/release/tools/quickbook/src/grammar_impl.hpp                            |    39                                         
   branches/release/tools/quickbook/src/input_path.cpp                              |    19                                         
   branches/release/tools/quickbook/src/input_path.hpp                              |     3                                         
   branches/release/tools/quickbook/src/iterator.hpp                                |    51                                         
   branches/release/tools/quickbook/src/main_grammar.cpp                            |   757 +++++++++---                            
   branches/release/tools/quickbook/src/markups.cpp                                 |     1                                         
   branches/release/tools/quickbook/src/parsers.hpp                                 |     9                                         
   branches/release/tools/quickbook/src/phrase_element_grammar.cpp                  |    80 +                                       
   branches/release/tools/quickbook/src/phrase_tags.hpp                             |     1                                         
   branches/release/tools/quickbook/src/quickbook.cpp                               |   168 +                                       
   branches/release/tools/quickbook/src/quickbook.hpp                               |     8                                         
   branches/release/tools/quickbook/src/scoped.hpp                                  |     3                                         
   branches/release/tools/quickbook/src/syntax_highlight.cpp                        |   314 +++-                                    
   branches/release/tools/quickbook/src/template_stack.cpp                          |    50                                         
   branches/release/tools/quickbook/src/template_stack.hpp                          |    57                                         
   branches/release/tools/quickbook/src/template_tags.hpp                           |     1                                         
   branches/release/tools/quickbook/src/utils.cpp                                   |   190 ---                                     
   branches/release/tools/quickbook/src/utils.hpp                                   |    20                                         
   branches/release/tools/quickbook/src/values.cpp                                  |   432 ++----                                  
   branches/release/tools/quickbook/src/values.hpp                                  |    62                                         
   branches/release/tools/quickbook/src/values_parse.hpp                            |    40                                         
   branches/release/tools/quickbook/test/Jamfile.v2                                 |   165 +-                                      
   branches/release/tools/quickbook/test/callouts-1_5.gold                          |    36                                         
   branches/release/tools/quickbook/test/code-1_1.gold                              |     9                                         
   branches/release/tools/quickbook/test/command-line/Jamfile.v2                    |    12                                         
   branches/release/tools/quickbook/test/doc-info/Jamfile.v2                        |     7                                         
   branches/release/tools/quickbook/test/doc-info/escape-1.6.gold                   |     4                                         
   branches/release/tools/quickbook/test/doc-info/source-mode-1.6.gold              |    36                                         
   branches/release/tools/quickbook/test/doc-info/source-mode-cpp-include.quickbook |     3                                         
   branches/release/tools/quickbook/test/image-1_5.gold                             |    37                                         
   branches/release/tools/quickbook/test/include/Jamfile.v2                         |    27                                         
   branches/release/tools/quickbook/test/include/code-import.gold                   |    12                                         
   branches/release/tools/quickbook/test/include/code-include.gold                  |     5                                         
   branches/release/tools/quickbook/test/list_test-1_6.gold                         |    31                                         
   branches/release/tools/quickbook/test/list_test-1_6.quickbook                    |    23                                         
   branches/release/tools/quickbook/test/quickbook_manual-1_4.gold                  |    60                                         
   branches/release/tools/quickbook/test/snippets/Jamfile.v2                        |     3                                         
   branches/release/tools/quickbook/test/snippets/pass_thru.gold                    |     1                                         
   branches/release/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold      |     3                                         
   branches/release/tools/quickbook/test/stub.c                                     |     6                                         
   branches/release/tools/quickbook/test/stub.cpp                                   |     3                                         
   branches/release/tools/quickbook/test/stub.py                                    |     2                                         
   branches/release/tools/quickbook/test/svg-1_1.gold                               |    13                                         
   branches/release/tools/quickbook/test/templates-1_5.gold                         |     3                                         
   branches/release/tools/quickbook/test/templates-1_5.quickbook                    |     9                                         
   branches/release/tools/quickbook/test/unit/Jamfile.v2                            |    14                                         
   branches/release/tools/quickbook/test/unit/values_test.cpp                       |    98 -                                       
   branches/release/tools/quickbook/test/version-0_1-fail.quickbook                 |     2                                         
   branches/release/tools/quickbook/test/xinclude/Jamfile.v2                        |     1                                         
   branches/release/tools/quickbook/test/xinclude/xmlbase-1_6-fail.quickbook        |     2                                         
   70 files changed, 3356 insertions(+), 5312 deletions(-)
Modified: branches/release/tools/quickbook/Jamfile.v2
==============================================================================
--- branches/release/tools/quickbook/Jamfile.v2	(original)
+++ branches/release/tools/quickbook/Jamfile.v2	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -8,15 +8,11 @@
 #   http://www.boost.org/LICENSE_1_0.txt)
 #==============================================================================
 
-alias quickbook
-    : src//quickbook
-    ;
-
-explicit quickbook ;
+# Install quickbook by default.
 
 install dist-bin
     :
-    quickbook
+    src//quickbook
     :
     <install-type>EXE
     <location>../../dist/bin
@@ -24,22 +20,12 @@
     release
     ;
 
-install dist-lib
-    :
-    quickbook
-    :
-    <install-type>LIB
-    <location>../../dist/lib
-    :
-    release
-    ;
-
 # Target for quickbook toolset's auto build.
 
-alias quickbook-auto
-    : quickbook
+alias quickbook
+    : src//quickbook
     : release
     ;
 
-explicit quickbook-auto
+explicit quickbook
     ;
Copied: branches/release/tools/quickbook/doc/1_6.qbk (from r75700, /trunk/tools/quickbook/doc/1_6.qbk)
==============================================================================
--- /trunk/tools/quickbook/doc/1_6.qbk	(original)
+++ branches/release/tools/quickbook/doc/1_6.qbk	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -1,11 +1,48 @@
-[section:1_6 Quickbook 1.6]
-
-New features and changes to the language are being introduced for quickbook 1.6. These
-can be used now by adding the `[quickbook 1.6]` tag to your document's docinfo:
+[/
+    Copyright 2002,2004,2006 Joel de Guzman, Eric Niebler
+    Copyright 2010-2011 Daniel James
+
+    Distributed under the Boost Software License, Version 1.0.
+    (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt)
+]
 
-    [article Document
+[chapter Language Versions
     [quickbook 1.6]
-    ]
+    [compatibility-mode 1.5]
+    [id quickbook.versions]
+    [source-mode teletype]
+]
+
+[section:stable Stable Versions]
+
+Since quickbook 1.3 the `quickbook` attribute in the document block selects
+which version of the language to use. Not all changes to quickbook are
+implemented using a version switch, it's mainly just the changes that change
+the way a document is interpreted or would break existing documentation.
+
+[heading Quickbook 1.3 and later]
+
+* Introduced quickbook language versioning.
+* In the documentation info, allow phrase markup in license and purpose
+  attributes.
+* Fully qualified section and headers. Subsection names are concatenated to the
+  ID to avoid clashing. Example: `doc_name.sect_name.sub_sect_name.sub_sub_sect_name`.
+
+[heading Quickbook 1.5 and later]
+
+* Ignore template argument separators inside square brackets.
+* Don't separate the final template argument if the `..` separator was
+  used. i.e. never mix `..` and whitespace separators.
+* Statically scope templates and their arguments rather than dynamically
+  scope them.
+* Give table ids, and let you set them.
+* Allow spaces between the `:` character and ids in elements which can
+  have ids.
+
+[endsect]
+
+[section:1_6 Quickbook 1.6]
 
 Everything described in here may change depending on the feedback received.
 
@@ -163,9 +200,9 @@
 
 [section:table Table Titles]
 
-Table titles are not parsed as phrases, so some markup is allowd:
+Table titles are now parsed as phrases, so some markup is allowd:
 
-[table [*bold title]]
+    [table [*bold title]]
 
 Which is an empty table with a bold title. The title is no longer ended
 by a newline, but by either a closing square bracket, or two opening
@@ -236,8 +273,9 @@
         Code block
   Para 3
 
-/TODO/: Improve code generation.
+The docbook markup that this generates is pretty bad, but seems to create okay
+html.
 
 [endsect]
 
-[endsect] [/1_6]
+[endsect] [/ Quickbok 1.6]
\ No newline at end of file
Modified: branches/release/tools/quickbook/doc/Jamfile.v2
==============================================================================
--- branches/release/tools/quickbook/doc/Jamfile.v2	(original)
+++ branches/release/tools/quickbook/doc/Jamfile.v2	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -10,7 +10,7 @@
 
 project boost/quickbook/doc ;
 
-import boostbook : boostbook ;
+using boostbook ;
 using quickbook ;
 
 xml quickbook : quickbook.qbk ;
@@ -22,10 +22,6 @@
         quickbook
     :
         <xsl:param>boost.root=../../../..
-        <xsl:param>generate.section.toc.level=3
-        <xsl:param>chunk.section.depth=1
-        <xsl:param>chunk.first.sections=1
-
         #<xsl:param>callout.graphics.path=../../images/callouts//
         <format>pdf:<xsl:param>img.src.path=$(images)/
         <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
Copied: branches/release/tools/quickbook/doc/block.qbk (from r75845, /trunk/tools/quickbook/doc/block.qbk)
==============================================================================
--- /trunk/tools/quickbook/doc/block.qbk	(original)
+++ branches/release/tools/quickbook/doc/block.qbk	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -428,19 +428,19 @@
 
 [tip It's a good idea to use macro identifiers that are distinguishable.
 For instance, in this document, macro identifiers have two leading and
-trailing underscores (e.g. `__spirit__`). The reason is to avoid
+trailing underscores (e.g. [^\__spirit__]). The reason is to avoid
 unwanted macro replacement.]
 
 Links (URLS) and images are good candidates for macros. *1*) They tend to
 change a lot. It is a good idea to place all links and images in one place near the top
 to make it easy to make changes. *2*) The syntax is not pretty. It's easier to read and
-write, e.g. `__spirit__` than `[@http://spirit.sourceforge.net Spirit]`.
+write, e.g. [^\__spirit__] than `[@http://spirit.sourceforge.net Spirit]`.
 
 Some more examples:
 
 ```
-[def :-)            [$theme/smiley.png]]
-[def __spirit__     [@http://spirit.sourceforge.net Spirit]]
+[def ``\:-)``            [$theme/smiley.png]]
+[def ``\__spirit__``     [@http://spirit.sourceforge.net Spirit]]
 ```
 
 (See __images__ and __links__)
@@ -448,7 +448,7 @@
 Invoking these macros:
 
 ```
-Hi __spirit__  :-)
+Hi ``\__spirit__``  ``\:-)``
 ```
 
 will generate this:
@@ -462,10 +462,10 @@
 Quickbook has some predefined macros that you can already use.
 
 [table Predefined Macros
-    [[Macro]                [Meaning]                       [Example]]
-    [[[^'''__DATE__''']]    [Today's date]                  [__DATE__]]
-    [[[^'''__TIME__''']]    [The current time]              [__TIME__]]
-    [[[^'''__FILENAME__''']][Quickbook source filename]     [__FILENAME__]]
+    [[Macro]           [Meaning]                       [Example]]
+    [[[^\__DATE__]]    [Today's date]                  [__DATE__]]
+    [[[^\__TIME__]]    [The current time]              [__TIME__]]
+    [[[^\__FILENAME__]][Quickbook source filename]     [__FILENAME__]]
 ]
 
 [endsect] [/Predefined Macros]
@@ -753,7 +753,7 @@
 [section Blurbs]
 
 ```
-[blurb :-) [*An eye catching advertisement or note...]
+[blurb ``\:-)`` [*An eye catching advertisement or note...]
 
     __spirit__ is an object-oriented recursive-descent parser generator framework
     implemented using template meta-programming techniques. Expression templates
@@ -870,7 +870,7 @@
     [[Comment] [Code]]
     [
         [My first program]
-        [``
+        [``\`\`\ ``
             #include <iostream>
 
             int main()
@@ -878,7 +878,7 @@
                 std::cout << "Hello, World!" << std::endl;
                 return 0;
             }
-        ``]
+        ``\`\`\ ``]
     ]
 ]
 ```
Modified: branches/release/tools/quickbook/doc/quickbook.qbk
==============================================================================
--- branches/release/tools/quickbook/doc/quickbook.qbk	(original)
+++ branches/release/tools/quickbook/doc/quickbook.qbk	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -1,8 +1,20 @@
-[article Quickbook
-    [quickbook 1.5]
+[/
+    Copyright 2002,2004,2006 Joel de Guzman, Eric Niebler
+    Copyright 2010-2011 Daniel James
+
+    Distributed under the Boost Software License, Version 1.0.
+    (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt)
+]
+
+[part Quickbook
+    [quickbook 1.6]
+    [compatibility-mode 1.5]
+    [id quickbook]
     [version 1.5]
     [authors [de Guzman, Joel], [Niebler, Eric]]
     [copyright 2002 2004 2006 Joel de Guzman, Eric Niebler]
+    [copyright 2010-2011 Daniel James]
     [purpose /WikiWiki/ style documentation tool]
     [license
         Distributed under the Boost Software License, Version 1.0.
@@ -45,8 +57,8 @@
 [def __images__             [link quickbook.syntax.phrase.images Images]]
 [def __cond__               [link quickbook.syntax.phrase.cond Conditional Generation]]
 
-[def __document__           [link quickbook.syntax.block.document Document]]
-[def __section__            [link quickbook.syntax.block.section Section]]
+[def __document__           [link quickbook.syntax.structure.docinfo Document]]
+[def __section__            [link quickbook.syntax.structure.section Section]]
 [def __xinclude__           [link quickbook.syntax.block.xinclude  xinclude]]
 [def __paragraphs__         [link quickbook.syntax.block.paragraphs Paragraphs]]
 [def __ordered_lists__      [link quickbook.syntax.block.lists.ordered_lists Ordered lists]]
@@ -69,2438 +81,14 @@
 [def __include__            [link quickbook.syntax.block.include Include]]
 [def __import__             [link quickbook.syntax.block.import Import]]
 
-[section:intro Introduction]
-
-[:[*['["Why program by hand in five days what you can spend five years of your
-life automating?]]]
-
--- Terrence Parr, author ANTLR/PCCTS
-]
-
-Well, QuickBook started as a weekend hack. It was originally intended to be a
-sample application using __spirit__. What is it? What you are viewing now, this
-documentation, is autogenerated by QuickBook. These files were generated from
-one master:
-
-[:[@boost:/tools/quickbook/doc/quickbook.qbk quickbook.qbk]]
-
-Originally named QuickDoc, this funky tool that never dies, evolved into a
-funkier tool thanks to Eric Niebler who resurrected the project making it
-generate __boostbook__ instead of HTML. The __boostbook__ documentation format
-is an extension of __docbook__, an SGML or XML based format for describing
-documentation.
-
-[tip You don't need to know anything about __boostbook__ or __docbook__
-to use QuickBook. A basic understanding of __docbook__ might help, but
-shouldn't be necessary. For really advanced stuff you will need to know
-__docbook__, but you can ignore it at first, and maybe continue to do so.
-]
-
-QuickBook is a WikiWiki style documentation tool geared towards C++
-documentation using simple rules and markup for simple formatting tasks.
-QuickBook extends the WikiWiki concept. Like the WikiWiki, QuickBook documents are
-simple text files. A single QuickBook document can generate a fully linked set
-of nice HTML and PostScript/PDF documents complete with images and syntax-
-colorized source code.
-
-Features include:
-
-* generate __boostbook__ xml, to generate HTML, PostScript and PDF
-* simple markup to link to Doxygen-generated entities
-* macro system for simple text substitution
-* simple markup for italics, bold, preformatted, blurbs, code samples,
-  tables, URLs, anchors, images, etc.
-* automatic syntax coloring of code samples
-* CSS support
-
-[endsect] [/Introduction]
-
-[section:change_log Change Log]
-
-[h3 Version 1.3]
-
-* Quickbook file inclusion \[include\].
-* Better xml output (pretty layout). Check out the generated XML.
-* Regression testing facility: to make sure your document will always be
-  compatible (full backward compatibility) regardless of changes to
-  QuickBook.
-* Code cleanup and refactoring.
-* Allow phrase markup in the doc-info.
-* Preformatted code blocks via \`\`code\`\` (double ticks) allows code in tables
-  and lists, for example.
-* Quickbook versioning; allows full backward compatibility. You have to add
-  \[quickbook 1.3\] to the doc-info header to enable the new features. Without
-  this, QuickBook will assume that the document is a pre-1.3 document.
-* Better (intuitive) paragraph termination. Some markups may terminate a paragraph.
-  Example:``
-  [section x]
-  blah...
-  [endsect]``
-* Fully qualified section and headers. Subsection names are concatenated to the
-  ID to avoid clashing. Example: `doc_name.sect_name.sub_sect_name.sub_sub_sect_name`
-* Better   and whitespace handling in code snippets.
-* \[xinclude\] fixes up the relative path to the target XML file when
-  input_directory is not the same as the output_directory.
-* Allow untitled tables.
-* Allow phrase markups in section titles.
-* Allow escaping back to QuickBook from code, code blocks and inline code.
-* Footnotes, with the \[footnote This is the footnote\] syntax.
-* Post-processor bug fix for escaped XML code that it does not recognize.
-* Replaceable, with the \[~replacement\] syntax.
-
-[h3 Version 1.4]
-
-* Generic Headers
-* Code changes to allow full recursion (i.e. Collectors and push/pop functions)
-* Various code cleanup/maintenance
-* Templates!
-* \[conceptref\] for referencing BoostBook <concept> entities.
-* Allow escape of spaces. The escaped space is removed from the output. Syntax:
-  `\ `.
-* Nested comments are now allowed.
-* Quickbook blocks can nest inside comments.
-* __import__ facility.
-* Callouts on imported code
-* Simple markups can now span a whole block.
-* __blurbs__, __admonitions__ and table cells (see __tables__) may now
-  contain paragraphs.
-* `\n` and `[br]` are now deprecated.
-* __cond__. Ala C++ #ifdef.
-* Searching of included and imported files in an extensible search path with
-  `--include-path` (`-I`) option.
-  
-[h3 Version 1.5]
-
-* Support multiple copyright entrys in document info.
-* Improved SVG support.
-* \[globalref\] for referencing BoostBook <global> entities.
-* Fail on error.
-* Fix crash for templates with too many arguments or trailing space.
-* Improved handling of unexpected characters in code blocks.
-* Improved handling of unmatched escape in code blocks.
-* Support for python snippets.
-* `teletype` source mode.
-* Use static scoping in templates, should be a lot more intuitive.
-* Accept a space between `section:` and the section id.
-* Support table ids.
-
-[h3 Version 1.5.1 - Boost 1.43.0]
-
-* Improve the post processor's list of block elements. `table`, `entry` and
-  `varlistentry` are treated as blocks. `replaceable` is treated as an inline
-  element.
-* Check that `[section]` and `[endsect]` tags are balanced in templates.
-* Add unicode escape characters, eg. `\u03B1` for \u03B1.
-* Support UTF-8 files with a unicode byte order mark.
-* Disallow `[` in simple markup. Fixes some errors with mismatched punctuation.
-* Add command line flag to define macros at the command line,
-  e.g. `quickbook "-D__italic_foo__=/foo/"`.
-
-[h3 Version 1.5.2 - Boost 1.44.0]
-
-* Use the cygwin 1.7 API for better path handling.
-* Improved boostbook generation:
-  * XML encode the documentation info correctly.
-  * Avoid generating empty paragraphs.
-  * No longer wraps block templates in paragraphs.
-  * Warns if you use invalid doc_info members for docbook document types.
-  * Fixes some other causes of invalid boostbook, although it still
-    generates invalid boostbook in places.
-* Improved grammar:
-  * Supports multiple categories in library doc_info.
-  * No longer requires commas between authors in docinfo.
-  * Allows empty document bodies.
-  * A line containing only a comment is no longer interpreted as a
-    paragraph break.
-  * If a line starts with a comment, interpret it as a paragraph even if it's
-    followed by whitespace or a list character.
-  * Doesn't treat several consecutive blank lines as multiple paragraph breaks.
-* Fixes duplicate image attribute detection.
-* Fixes using code snippets more than once.
-* Early work on quickbook 1.6, available using the `[quickbook 1.6]` version switch,
-  but liable to change in future versions.
-  * When automatically generating ids for headers, use the quickbook
-    source, rather than the generated docbook.
-  * Fix id generation in included files. It wasn't correctly using the
-    main document's documentation id.
-  * Correctly restore the quickbook version switch after including a file
-    with a different version.
-
-[h3 Version 1.5.3 - Boost 1.45.0]
-
-* Fix command line flag for defining macros.
-* Fix a couple of issues with the code block parser:
-  * A comment with no indentation will now end a code block.
-  * Code blocks no longer have to be followed by a blank line.
-* Improved tracking of file position in templates and imported code blocks.
-* Better generated markup for callout lists.
-* 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.
-* Support nested blocks in document info comments.
-* 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.
-
-[heading Version 1.5.4 - Boost 1.46.1]
-
-Boost 1.46.0:
-
-* Add support for `lang` attribute in documentation info.
-* Improved anchor implementation. Especially for using an anchor
-  before a section or heading.
-* Fixed some more issues where lines containing comments were treated
-  as blank lines.
-* Allow import, include and xinclude in conditional phrases. Will
-  allow more block elements in a future version.
-* Rearrange the structure of the grammar.
-* Use filesystem 3. Remove cygwin 1.5 support.
-
-Boost 1.46.1:
-
-* Work around optimization bug in g++ 4.4 on 64 bit linux.
-
-[heading Version 1.5.5 - Boost 1.47]
-
-* Tweak anchor placement for titles.
-* Hard code the quickbook path into the quickbook testing tools. This
-  means that they can be used from multiple locations.
-* Generate an id for boostbook `bridgehead` elements. This results in
-  more consistent html, since docbook generates a random id if they
-  don't have one.
-* Improved unicode support on windows. Unicode can now be used from the
-  command line, and unicode filenames are supported. Unicode output is
-  a bit weak.
-* Check for windows paths, and warn about them.
-* Fix relative path detection on windows.
-* Reverse deprecation of `[br]`, printing a single warning about
-  generating invalid boostbook.
-* Fix handling empty category attributes.
-* Store data from the parser in a dynamic data structure.
-  This simplifies the implementation and makes it easier to parse
-  more complicated data structures.
-* Improved error messages for unknown doc info attributes.
-* Richer copyright syntax. Now understands:
-  `[copyright 2001-2006, 2010 One person, 2008 Another person]`.
-* Fix delimeter checking for simple markup.
-* Allow more block elements to be nested.
-* Go back to using invalid markup for lists. It generates better html.
-* Better anchor placement for lists.
-* Pass-thru comments in code snippets.
-* Use relative paths for '''<code>__FILENAME__</code>''' macro.
-* Rewrite xinclude path generator so that it doesn't use deprecated
-  filesystem functions.
-* Allow quickbook escapes inside comments in syntax highlighted code.
-* Quickbook 1.6:
-  * Scope source mode changes to the file they're made in.
-  * Explicit markup for lists. e.g.
-    `[ordered_list [item1][item2]]` or
-    `[itemized_list [item1][item2]]`.
-
-[heading Version 1.5.6 - Boost 1.48]
-
-* Xml encode escaped punctuation (eg. `\<` is correctly encodes to \<).
-* Rename duplicate generated ids.
-* Close open sections at end of document (still warns about them).
-* New anchor markup for headers, will hopefully generate better pdfs.
-* Remove some whitespace around code from post processed output.
-
-[endsect] [/Change log]
-
-[section:syntax Syntax Summary]
-
-A QuickBook document is composed of one or more blocks. An example of
-a block is the paragraph or a C++ code snippet. Some blocks have
-special mark-ups. Blocks, except code snippets which have their own
-grammar (C++ or Python), are composed of one or more phrases. A phrase
-can be a simple contiguous run of characters. Phrases can have special
-mark-ups. Marked up phrases can recursively contain other phrases, but
-cannot contain blocks. A terminal is a self contained block-level or
-phrase-level element that does not nest anything.
-
-Blocks, in general, are delimited by two end-of-lines (the block terminator).
-Phrases in each block cannot contain a block terminator. This way, syntax errors
-such as un-matched closing brackets do not go haywire and corrupt anything past
-a single block.
-
-[section Comments]
-
-Can be placed anywhere.
-
-[pre
-'''[/ comment (no output generated) ]'''
-]
-
-[/ for testing only... ]
-
-[pre
-'''[/ comments can be nested [/ some more here] ]'''
-]
-
-[/ for testing [/ only ] ]
-
-[pre
-'''[/ Quickbook blocks can nest inside comments. [*Comment this out too!] ]'''
-]
-
-[/ for testing [*only ] ]
-
-[endsect] [/Comments]
-
-[section:phrase Phrase Level Elements]
-
-[section Font Styles]
-
-[pre'''
-['italic], [*bold], [_underline], [^teletype], [-strikethrough]
-''']
-
-will generate:
-
-['italic], [*bold], [_underline], [^teletype], [-strikethrough]
-
-Like all non-terminal phrase level elements, this can of course be nested:
-
-[pre'''
-[*['bold-italic]]
-''']
-
-will generate:
-
-[*['bold-italic]]
-
-[endsect] [/Font Styles]
-
-[section Replaceable]
-
-When you want content that may or must be replaced by the user, use the syntax:
-
-[pre'''
-[~replacement]
-''']
-
-This will generate:
-
-[~replacement]
-
-[endsect] [/Replaceable]
-
-[section Quotations]
-
-[pre'''
-["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein
-''']
-
-will generate:
-
-["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein
-
-Note the proper left and right quote marks. Also, while you can simply use
-ordinary quote marks like "quoted", our quotation, above, will generate correct
-DocBook quotations (e.g. <quote>quoted</quote>).
-
-Like all phrase elements, quotations may be nested. Example:
-
-[pre'''
-["Here's the rule for bargains: ["Do other men, for they would do you.] That's
-the true business precept.]
-''']
-
-will generate:
-
-["Here's the rule for bargains: ["Do other men, for they would do you.]
-That's the true business precept.]
-
-[endsect] [/Quotations]
-
-[section Simple formatting]
-
-Simple markup for formatting text, common in many applications, is now supported:
-
-[pre'''
-/italic/, *bold*, _underline_, =teletype=
-''']
-
-will generate:
-
-/italic/, *bold*, _underline_, =teletype=
-
-Unlike QuickBook's standard formatting scheme, the rules for simpler
-alternatives are much stricter[footnote Thanks to David Barrett, author of
-[@http://quinthar.com/qwikiwiki/index.php?page=Home Qwiki], for sharing
-these samples and teaching me these obscure formatting rules. I wasn't sure
-at all if __spirit__, being more or less a formal EBNF parser, can handle
-the context sensitivity and ambiguity.].
-
-* Simple markups cannot nest. You can combine a simple markup with a nestable markup.
-* Simple markups cannot contain any other form of quickbook markup.
-* A non-space character must follow the leading markup
-* A non-space character must precede the trailing markup
-* A space or a punctuation must follow the trailing markup
-* If the matching markup cannot be found within a block, the formatting
-  will not be applied. This is to ensure that un-matched formatting markups,
-  which can be a common mistake, does not corrupt anything past a single block.
-  We do not want the rest of the document to be rendered bold just because we
-  forgot a trailing '*'. A single block is terminated by two end of lines or
-  the close bracket: ']'.
-* A line starting with the star will be interpreted as an unordered list.
-  See __unordered_lists__.
-
-[table More Formatting Samples
-    [[Markup]                                           [Result]]
-    [[[^'''*Bold*''']]                                  [*Bold*]]
-    [[[^'''*Is bold*''']]                               [*Is bold*]]
-    [[[^'''* Not bold* *Not bold * * Not bold *''']]    [* Not bold* *Not bold * * Not bold *]]
-    [[[^'''This*Isn't*Bold (no bold)''']]               [This*Isn't*Bold (no bold)]]
-    [[[^'''(*Bold Inside*) (parenthesis not bold)''']]  [(*Bold Inside*) (parenthesis not bold)]]
-    [[[^'''*(Bold Outside)* (parenthesis bold)''']]     [*(Bold Outside)* (parenthesis bold)]]
-    [[[^'''3*4*5 = 60 (no bold)''']]                    [3*4*5 = 60 (no bold)]]
-    [[[^'''3 * 4 * 5 = 60 (no bold)''']]                [3 * 4 * 5 = 60 (no bold)]]
-    [[[^'''3 *4* 5 = 60 (4 is bold)''']]                [3 *4* 5 = 60 (4 is bold)]]
-    [[[^'''*This is bold* this is not *but this is*''']][*This is bold* this is not *but this is*]]
-    [[[^'''*This is bold*.''']]                         [*This is bold*.]]
-    [[[^'''*B*. (bold B)''']]                           [*B*. (bold B)]]
-    [[[^'''['*Bold-Italic*]''']]                        [['*Bold-Italic*]]]
-    [[[^'''*side-by*/-side/''']]                        [*side-by*/-side/]]
-]
-
-As mentioned, simple markups cannot go past a single block. The text
-from "have" to "full" in the following paragraph will be rendered as
-bold:
-
-[pre'''
-Baa baa black sheep, *have you any wool?
-Yes sir, yes sir, three bags full!*
-One for the master, one for the dame,
-And one for the little boy who lives down the lane.
-''']
-
-Baa baa black sheep, *have you any wool?
-Yes sir, yes sir, three bags full!*
-One for the master, one for the dame,
-And one for the little boy who lives down the lane.
-
-But in the following paragraph, bold is not applied:
-
-[pre'''
-Baa baa black sheep, *have you any wool?
-Yes sir, yes sir, three bags full!
-One for the master, one for the dame,
-And one for the little boy who lives down the lane.
-''']
-
-Baa baa black sheep, *have you any wool?
-Yes sir, yes sir, three bags full!
-One for the master, one for the dame,
-And one for the little boy who lives down the lane.
-
-[endsect] [/Simple Formatting]
-
-[section Inline code]
-
-Inlining code in paragraphs is quite common when writing C++ documentation. We
-provide a very simple markup for this. For example, this:
-
-[pre'''
-This text has inlined code `int main() { return 0; }` in it.
-''']
-
-will generate:
-
-This text has inlined code `int main() { return 0; }` in it. The code will be
-syntax highlighted.
-
-[note We simply enclose the code with the tick: [^'''"`"'''], not the
-single quote: `"'"`. Note too that [^'''`some code`'''] is preferred over
-[^'''[^some code]''']. ]
-
-[endsect] [/Inline Code]
-
-[section Code blocks]
-
-Preformatted code simply starts with a space or a tab (See __code__).
-However, such a simple syntax cannot be used as phrase elements in lists
-(See __ordered_lists__ and __unordered_lists__), tables (See __tables__),
-etc. Inline code (see above) can. The problem is, inline code does not
-allow formatting with newlines, spaces, and tabs. These are lost.
-
-We provide a phrase level markup that is a mix between the two. By using the
-double-tick, instead of the single-tick, we are telling QuickBook to use
-preformatted blocks of code. Example:
-
-[pre
-\`\`
-    #include <iostream>
-
-    int main()
-    {
-        std::cout << "Hello, World!" << std::endl;
-        return 0;
-    }
-\`\`
-]
-
-will generate:
-
-``
-    #include <iostream>
-
-    int main()
-    {
-        std::cout << "Hello, World!" << std::endl;
-        return 0;
-    }
-``
-
-[endsect] [/Code blocks]
-
-[section Source Mode]
-
-If a document contains more than one type of source code then the source
-mode may be changed dynamically as the document is processed. All QuickBook
-documents are initially in C++ mode by default, though an alternative
-initial value may be set in the __document__ section.
-
-To change the source mode, use the [^\[source-mode\]] markup, where
-=source-mode= is one of the supported modes. For example, this:
-
-[pre'''
-Python's [python] `import` is rather like C++'s [c++] `#include`. A
-C++ comment `// looks like this` whereas a Python comment [python]
-`# looks like this`.
-''']
-
-will generate:
-
-Python's [python] `import` is rather like C++'s [c++] `#include`. A
-C++ comment `// looks like this` whereas a Python comment [python]
-`#looks like this`.
-
-[teletype]
-
-[table Supported Source Modes
-    [[Mode]                 [Source Mode Markup]]
-    [[C++]                  [[^\[c++\]]]]
-    [[Python]               [[^\[python\]]]]
-    [[Plain Text]           [[^\[teletype\]]]]
-]
-
-[note The source mode strings are lowercase.]
-
-[endsect] [/Source Mode]
-
-[section line-break]
-
-[pre'''
-[br]
-''']
-
-[warning `[br]` is now deprecated. __blurbs__, __admonitions__ and
-table cells (see __tables__) may now contain paragraphs.]
-
-[endsect]
-[section Anchors]
-
-[pre'''
-[#named_anchor]
-''']
-
-A named anchor is a hook that can be referenced by a link elsewhere in the
-document. You can then reference an anchor with [^'''[link named_anchor
-Some link text]''']. See __anchor_links__, __section__ and __heading__.
-
-These anchors are global and can be accessed from anywhere in the
-quickbook documentation. Be careful to avoid clashes with anchors in
-other sections.
-
-[endsect] [/Line break]
-
-[section Links]
-
-[pre'''
-[@http://www.boost.org this is [*boost's] website....]
-''']
-
-will generate:
-
-[@http://www.boost.org this is [*boost's] website....]
-
-URL links where the link text is the link itself is common. Example:
-
-[pre'''
-see http://spirit.sourceforge.net/
-''']
-
-so, when the text is absent in a link markup, the URL is assumed. Example:
-
-[pre
-see '''[@http://spirit.sourceforge.net/]'''
-]
-
-will generate:
-
-see [@http://spirit.sourceforge.net/]
-
-Boostbook also support a custom url schema for linking to files within
-the boost distribution:
-
-[pre
-'''[@boost:/libs/spirit/index.html the Boost.Spirit documentation]'''
-]
-
-will generate: [@boost:/libs/spirit/index.html the Boost.Spirit documentation]
-
-Note that this is only available when using BoostBook, and only for links
-- it can't be used for images.
-
-[endsect] [/Links]
-
-[section Anchor links]
-
-You can link within a document using:
-
-[pre'''
-[link document_id.section_id.normalized_header_text The link text]
-''']
-
-See sections __section__ and __heading__ for more info.
-
-[endsect] [/Anchor links]
-
-[section refentry links]
-
-In addition, you can link internally to an XML refentry like:
-
-[pre'''
-[link xml.refentry The link text]
-''']
-
-This gets converted into [^<link linkend="xml.refentry">The link text</link>].
-
-Like URLs, the link text is optional. If this is not present, the link text will
-automatically be the refentry. Example:
-
-[pre'''
-[link xml.refentry]
-''']
-
-This gets converted into [^<link linkend="xml.refentry">xml.refentry</link>].
-
-[endsect] [/refentry links]
-
-[section:code_links Code Links]
-
-If you want to link to a function, class, member, enum, concept, global, or header in
-the reference section, you can use:
-
-[pre'''
-[funcref fully::qualified::function_name The link text]
-[classref fully::qualified::class_name The link text]
-[memberref fully::qualified::member_name The link text]
-[enumref fully::qualified::enum_name The link text]
-[macroref MACRO_NAME The link text]
-[conceptref ConceptName The link text]
-[headerref path/to/header.hpp The link text]
-[globalref fully::qualified::global The link text]
-''']
-
-Again, the link text is optional. If this is not present, the link text will
-automatically be the function, class, member, enum, macro, concept, global, or header name.
-Example:
-
-[pre'''
-[classref boost::bar::baz]
-''']
-
-would have "boost::bar::baz" as the link text.
-
-[endsect] [/Code Links]
-
-[section Escape]
-
-The escape mark-up is used when we don't want to do any processing.
-
-[pre
-\'\'\'
-escape (no processing/formatting)
-\'\'\'
-]
-
-Escaping allows us to pass XML markup to __boostbook__ or __docbook__. For example:
-
-[pre
-\'\'\'
-<emphasis role="bold">This is direct XML markup</emphasis>
-\'\'\'
-]
-
-'''
-<emphasis role="bold">This is direct XML markup</emphasis>
-'''
-
-[important Be careful when using the escape. The text must conform to
-__boostbook__/__docbook__ syntax.]
-
-[endsect] [/Escape]
-
-[section Single char escape]
-
-The backslash may be used to escape a single punctuation character. The
-punctuation immediately after the backslash is passed without any processing.
-This is useful when we need to escape QuickBook punctuations such as `[` and `]`.
-For example, how do you escape the triple quote? Simple: [^\\'\\'\\']
-
-
-`\n` has a special meaning. It is used to generate line breaks.
-
-[warning `\n` and `[br]` are now deprecated. __blurbs__, __admonitions__
-and table cells (see __tables__) may now contain paragraphs.]
-
-The escaped space: `\ ` also has a special meaning. The escaped space is removed
-from the output.
-
-[endsect] [/Single char escape]
-
-[section Unicode escape]
-
-You can enter any 16-bit unicode character by using `\u` followed by its 4 digit
-hexadecimal code, or a 32-bit character by using `\U` followed by an 8 digit
-hexadecimal code. eg.
-
-[pre'''
-\u03B1 + \u03B2
-''']
-
-will generate:
-
-[:
-\u03B1 + \u03B2
-]
-
-[endsect] [/Unicode escape]
-
-[section Images]
-
-[pre'''
-[$image.jpg]
-''']
-
-From version 1.5, you can also use
-[@http://www.docbook.org/tdg/en/html/imagedata.html
-DocBook imagedata attributes]:
-
-[pre'''
-[$image.jpg [width 200in] [height 200in]]
-''']
-
-[endsect] [/Images]
-
-[section Footnotes]
-
-As of version 1.3, QuickBook supports footnotes. Just put the text of the
-footnote in a `[footnote]` block, and the text will be put at the bottom
-of the current page. For example, this:
-
-[pre'''
-[footnote A sample footnote]
-''']
-
-will generate this[footnote A sample footnote].
-
-[endsect] [/Footnotes]
-
-[section Macro Expansion]
-
-[pre'''
-__a_macro_identifier__
-''']
-
-See __macros__ for details.
-
-[endsect] [/Macro Expansion]
-
-[section Template Expansion]
-
-[pre'''
-[a_template_identifier]
-''']
-
-See __templates__ for details.
-
-[endsect] [/Template Expansion]
-
-[section:cond Conditional Generation]
-
-Like C++ `#ifdef`, you can generate phrases depending on the presence of
-a macro. Example:
-
-[pre'''
-[? __to_be__ To be or not to be]
-''']
-
-[? __to_be__ To be or not to be]
-
-Here, the phrase "To be or not to be" will only be generated if the
-macro symbol '''__to_be__''' has been previously defined. The phrase
-above will not do anything since we haven't defined '''__to_be__'''.
-Now, let's define the symbol:
-
-[pre'''
-[def __to_be__]
-''']
-
-[def __to_be__]
-
-And try again:
-
-[? __to_be__ To be or not to be]
-
-Yes![footnote Conditional Generation makes quickbook turing complete.]
-
-[endsect] [/Condition Generation]
-
-[endsect] [/Phrase Level Elements]
-
-[section:block Block Level Elements]
-
-[section Document]
-
-Every document must begin with a Document Info section, which should look
-like this:
-
-[pre'''
-[document-type The Document Title
-    [quickbook 1.5]
-    [version 1.0]
-    [id the_document_name]
-    [dirname the_document_dir]
-    [copyright 2000 2002 2003 Joe Blow, Jane Doe]
-    [purpose The document's reason for being]
-    [category The document's category]
-    [authors [Blow, Joe] [Doe, Jane]]
-    [license The document's license]
-    [source-mode source-type]
-]
-''']
-
-Where document-type is one of:
-
-* book
-* article
-* library
-* chapter
-* part
-* appendix
-* preface
-* qandadiv
-* qandaset
-* reference
-* set
-
-quickbook 1.5 declares the version of quickbook the document is written for.
-In its absence, version 1.1 is assumed.
-
-=version=, =id=, =dirname=, =copyright=, =purpose=, =category=, =authors=,
-=license=, =last-revision= and =source-mode= are optional information.
-
-=dirname=, =purpose= and =category= are boostbook attributes which are only
-valid for =library= documents. If you use them for other document types,
-quickbook will warn about them, but still use them, generating invalid markup,
-that's just ignored by the style sheets.
-
-=source-type= is a lowercase string setting the initial __source_mode__. If
-the =source-mode= field is omitted, a default value of =c++= will be used.
-
-[endsect] [/Document]
-
-[section Section]
-
-Starting a new section is accomplished with:
-
-[pre'''
-[section:id The Section Title]
-''']
-
-where /id/ is optional. id will be the filename of the generated section.
-If it is not present, "The Section Title" will be normalized and become the id.
-Valid characters are =a-Z=, =A-Z=, =0-9= and =_=. All non-valid characters are
-converted to underscore and all upper-case are converted to lower case.
-Thus: "The Section Title" will be normalized to "the_section_title".
-
-End a section with:
-
-[pre'''
-[endsect]
-''']
-
-Sections can nest, and that results in a hierarchy in the table of contents.
-
-[endsect] [/Section]
-
-[section xinclude]
-
-You can include another XML file with:
-
-[pre'''
-[xinclude file.xml]
-''']
-
-This is useful when file.xml has been generated by Doxygen and contains your
-reference section.
-
-[endsect] [/xinclude]
-
-[section Paragraphs]
-
-Paragraphs start left-flushed and are terminated by two or more newlines. No
-markup is needed for paragraphs. QuickBook automatically detects paragraphs from
-the context. Block markups \[section, endsect, h1, h2, h3, h4, h5, h6, blurb,
-(block-quote) ':', pre, def, table and include \] may also terminate a paragraph.
- [/ <-- There's a space here. Don't remove. this is intentianal, for testing]
-This is a new paragraph...
-
-[endsect] [/Paragraphs]
-
-[section Lists]
-[section Ordered lists]
-
-[pre
-# One
-# Two
-# Three
-]
-
-will generate:
-
-# One
-# Two
-# Three
-
-[endsect] [/Ordered lists]
-[section List Hierarchies]
-
-List hierarchies are supported. Example:
-
-[pre
-# One
-# Two
-# Three
-    # Three.a
-    # Three.b
-    # Three.c
-# Four
-    # Four.a
-        # Four.a.i
-        # Four.a.ii
-# Five
-]
-
-will generate:
-
-# One
-# Two
-# Three
-    # Three.a
-    # Three.b
-    # Three.c
-# Fourth
-    # Four.a
-        # Four.a.i
-        # Four.a.ii
-# Five
-
-[endsect] [/List Hierarchies]
-[section Long List Lines]
-
-Long lines will be wrapped appropriately. Example:
-
-[pre
-# A short item.
-# A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-# A short item.
-]
-
-# A short item.
-# A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-# A short item.
-
-[endsect] [/Long list lines]
-[section Unordered lists]
-
-[pre'''
-* First
-* Second
-* Third
-''']
-
-will generate:
-
-* First
-* Second
-* Third
-
-[endsect] [/Unordered lists]
-[section Mixed lists]
-
-Mixed lists (ordered and unordered) are supported. Example:
-
-[pre'''
-# One
-# Two
-# Three
-    * Three.a
-    * Three.b
-    * Three.c
-# Four
-''']
-
-will generate:
-
-# One
-# Two
-# Three
-    * Three.a
-    * Three.b
-    * Three.c
-# Four
-
-And...
-
-[pre'''
-# 1
-    * 1.a
-        # 1.a.1
-        # 1.a.2
-    * 1.b
-# 2
-    * 2.a
-    * 2.b
-        # 2.b.1
-        # 2.b.2
-            * 2.b.2.a
-            * 2.b.2.b
-''']
-
-will generate:
-
-# 1
-    * 1.a
-        # 1.a.1
-        # 1.a.2
-    * 1.b
-# 2
-    * 2.a
-    * 2.b
-        # 2.b.1
-        # 2.b.2
-            * 2.b.2.a
-            * 2.b.2.b
-
-[endsect] [/Mixed lists]
-[endsect] [/Lists]
-
-[section Code]
-
-Preformatted code starts with a space or a tab. The code will be
-syntax highlighted according to the current __source_mode__:
-
-[c++]
-
-    #include <iostream>
-
-    int main()
-    {
-        // Sample code
-        std::cout << "Hello, World\n";
-        return 0;
-    }
-
-[python]
-
-    import cgi
-
-    def cookForHtml(text):
-        '''"Cooks" the input text for HTML.'''
-
-        return cgi.escape(text)
-
-[teletype]
-
-Macros that are already defined are expanded in source code. Example:
-
-[pre'''
-[def __array__ [@http://www.boost.org/doc/html/array/reference.html array]]
-[def __boost__ [@http://www.boost.org/libs/libraries.htm boost]]
-
-    using __boost__::__array__;
-''']
-
-Generates:
-
-[def __array__ [@http://www.boost.org/doc/html/array/reference.html array]]
-[def __boost__ [@http://www.boost.org/libs/libraries.htm boost]]
-
-    using __boost__::__array__;
-
-[endsect] [/Code]
-
-[section:escape_back Escaping Back To QuickBook]
-
-Inside code, code blocks and inline code, QuickBook does not allow any
-markup to avoid conflicts with the target syntax (e.g. c++). In case you
-need to switch back to QuickBook markup inside code, you can do so using a
-language specific /escape-back/ delimiter. In C++ and Python, the delimiter
-is the double tick (back-quote): "\`\`" and "\`\`". Example:
-
-[pre'''
-void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``()
-{
-}
-''']
-
-Will generate:
-
-    void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``()
-    {
-    }
-
-When escaping from code to QuickBook, only phrase level markups are
-allowed. Block level markups like lists, tables etc. are not allowed.
-
-[endsect] [/Escaping back to quickbook]
-
-[section Preformatted]
-
-Sometimes, you don't want some preformatted text to be parsed as C++. In such
-cases, use the [^[pre ... \]] markup block.
-
-[pre'''
-[pre
-
-    Some *preformatted* text                    Some *preformatted* text
-
-        Some *preformatted* text            Some *preformatted* text
-
-            Some *preformatted* text    Some *preformatted* text
-
-]
-''']
-
-Spaces, tabs and newlines are rendered as-is. Unlike all quickbook block level
-markup, pre (and Code) are the only ones that allow multiple newlines. The
-markup above will generate:
-
-[pre
-
-Some *preformatted* text                    Some *preformatted* text
-
-    Some *preformatted* text            Some *preformatted* text
-
-        Some *preformatted* text    Some *preformatted* text
-
-]
-
-Notice that unlike Code, phrase markup such as font style is still permitted
-inside =pre= blocks.
-
-[endsect] [/Preformatted]
-
-[section Blockquote]
-
-[pre
-'''[:sometext...]'''
-]
-
-[:Indents the paragraph. This applies to one paragraph only.]
-
-[endsect] [/Blockquote]
-
-[section Admonitions]
-
-[pre'''
-[note This is a note]
-[tip This is a tip]
-[important This is important]
-[caution This is a caution]
-[warning This is a warning]
-''']
-
-generates __docbook__ admonitions:
-
-[note This is a note]
-[tip This is a tip]
-[important This is important]
-[caution This is a caution]
-[warning This is a warning]
-
-These are the only admonitions supported by __docbook__. So,
-for example [^\[information This is some information\]] is unlikely
-to produce the desired effect.
-
-[endsect] [/Admonitions]
-
-[section Headings]
-
-[pre'''
-[h1 Heading 1]
-[h2 Heading 2]
-[h3 Heading 3]
-[h4 Heading 4]
-[h5 Heading 5]
-[h6 Heading 6]
-''']
-
-[h1 Heading 1]
-[h2 Heading 2]
-[h3 Heading 3]
-[h4 Heading 4]
-[h5 Heading 5]
-[h6 Heading 6]
-
-Headings 1-3 \[h1 h2 and h3\] will automatically have anchors with
-normalized names with
-[^name="document_id.section_id.normalized_header_text"] (i.e. valid
-characters are =a-z=, =A-Z=, =0-9= and =_=. All non-valid characters are
-converted to underscore and all upper-case are converted to lower-case.
-For example: Heading 1 in section Section 2 will be normalized to
-[^section_2.heading_1]). You can use:
-
-[pre'''
-[link document_id.section_id.normalized_header_text The link text]
-''']
-
-to link to them. See __anchor_links__ and __section__ for more info.
-
-[endsect] [/Headings]
-
-[section Generic Heading]
-
-In cases when you don't want to care about the heading level (1 to 6), you
-can use the /Generic Heading/:
-
-[pre'''
-[heading Heading]
-''']
-
-The /Generic Heading/ assumes the level, plus one, of the innermost section
-where it is placed. For example, if it is placed in the outermost section,
-then, it assumes /h2/.
-
-Headings are often used as an alternative to sections. It is used
-particularly if you do not want to start a new section. In many cases,
-however, headings in a particular section is just flat. Example:
-
-[pre'''
-[section A]
-[h2 X]
-[h2 Y]
-[h2 Z]
-[endsect]
-''']
-
-Here we use h2 assuming that section A is the outermost level. If it is
-placed in an inner level, you'll have to use h3, h4, etc. depending on
-where the section is. In general, it is the section level plus one. It is
-rather tedious, however, to scan the section level everytime. If you
-rewrite the example above as shown below, this will be automatic:
-
-[pre'''
-[section A]
-[heading X]
-[heading Y]
-[heading Z]
-[endsect]
-''']
-
-They work well regardless where you place them. You can rearrange sections
-at will without any extra work to ensure correct heading levels. In fact,
-with /section/ and /heading/, you have all you need. /h1/../h6/ becomes
-redundant. /h1/../h6/ might be deprecated in the future.
-
-[endsect] [/Generic Heading]
-
-[section Macros]
-
-[pre'''
-[def macro_identifier some text]
-''']
-
-When a macro is defined, the identifier replaces the text anywhere in the
-file, in paragraphs, in markups, etc. macro_identifier is a string of non-
-white space characters except '\]'. A macro may not follow an alphabetic
-character or the underscore. The replacement text can be any phrase (even
-marked up). Example:
-
-[pre'''
-[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]]
-sf_logo
-''']
-
-Now everywhere the sf_logo is placed, the picture will be inlined.
-
-[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]]
-sf_logo
-
-[tip It's a good idea to use macro identifiers that are distinguishable.
-For instance, in this document, macro identifiers have two leading and
-trailing underscores (e.g. [^'''__spirit__''']). The reason is to avoid
-unwanted macro replacement.]
-
-Links (URLS) and images are good candidates for macros. *1*) They tend to
-change a lot. It is a good idea to place all links and images in one place near the top
-to make it easy to make changes. *2*) The syntax is not pretty. It's easier to read and
-write, e.g. [^'''__spirit__'''] than [^'''[@http://spirit.sourceforge.net Spirit]'''].
-
-Some more examples:
-
-[pre'''
-[def :-)            [$theme/smiley.png]]
-[def __spirit__     [@http://spirit.sourceforge.net Spirit]]
-''']
-
-(See __images__ and __links__)
-
-Invoking these macros:
-
-[pre'''
-Hi __spirit__  :-)
-''']
-
-will generate this:
-
-Hi __spirit__ :-)
-
-[endsect] [/Macros]
-
-[section Predefined Macros]
-
-Quickbook has some predefined macros that you can already use.
-
-[table Predefined Macros
-    [[Macro]                [Meaning]                       [Example]]
-    [['''__DATE__''']       [Today's date]                  [__DATE__]]
-    [['''__TIME__''']       [The current time]              [__TIME__]]
-    [['''__FILENAME__''']   [Quickbook source filename]     [__FILENAME__]]
-]
-
-[endsect] [/Predefined Macros]
-
-[section Templates]
-
-Templates provide a more versatile text substitution mechanism. Templates
-come in handy when you need to create parameterizable, multi-line,
-boilerplate text that you specify once and expand many times. Templates
-accept one or more arguments. These arguments act like place-holders for
-text replacement. Unlike simple macros, which are limited to phrase level
-markup, templates can contain block level markup (e.g. paragraphs, code
-blocks and tables).
-
-Example template:
-
-[pre'''
-[template person[name age what]
-
-Hi, my name is [name]. I am [age] years old. I am a [what].
-
-]
-''']
-
-[template person[name age what]
-
-Hi, my name is [name]. I am [age] years old. I am a [what].
-
-]
-
-[heading Template Identifier]
-
-Template identifiers can either consist of:
-
-* An initial alphabetic character or the underscore, followed by
-  zero or more alphanumeric characters or the underscore. This is
-  similar to your typical C/C++ identifier.
-* A single character punctuation (a non-alphanumeric printable character)
-
-[heading Formal Template Arguments]
-
-Template formal arguments are identifiers consisting of an initial
-alphabetic character or the underscore, followed by zero or more
-alphanumeric characters or the underscore. This is similar to your typical
-C/C++ identifier.
-
-A template formal argument temporarily hides a template of the same name at
-the point where the [link quickbook.syntax.block.templates.template_expansion
-template is expanded]. Note that the body of the [^person] template above
-refers to [^name] [^age] and [^what] as [^\[name\]] [^\[age\]] and
-[^\[what\]]. [^name] [^age] and [^what] are actually templates that exist
-in the duration of the template call.
-
-[heading Template Body]
-
-The template body can be just about any QuickBook block or phrase. There
-are actually two forms. Templates may be phrase or block level. Phrase
-templates are of the form:
-
-[pre'''
-[template sample[arg1 arg2...argN] replacement text... ]
-''']
-
-Block templates are of the form:
-
-[pre'''
-[template sample[arg1 arg2...argN]
-replacement text...
-]
-''']
-
-The basic rule is as follows: if a newline immediately follows the argument
-list, then it is a block template, otherwise, it is a phrase template.
-Phrase templates are typically expanded as part of phrases. Like macros,
-block level elements are not allowed in phrase templates.
-
-[heading Template Expansion]
-
-You expand a template this way:
-
-[pre'''
-[template_identifier arg1..arg2..arg3]
-''']
-
-At template expansion, you supply the actual arguments. The template will
-be expanded with your supplied arguments. Example:
-
-[pre'''
-[person James Bond..39..Spy]
-[person Santa Clause..87..Big Red Fatso]
-''']
-
-Which will expand to:
-
-[person James Bond..39..Spy]
-[person Santa Clause..87..Big Red Fatso]
-
-[caution A word of caution: Templates are recursive. A template can call
-another template or even itself, directly or indirectly. There are no
-control structures in QuickBook (yet) so this will always mean infinite
-recursion. QuickBook can detect this situation and report an error if
-recursion exceeds a certain limit.]
-
-Each actual argument can be a word, a text fragment or just about any [link
-quickbook.syntax.phrase QuickBook phrase]. Arguments are separated by the
-double dot [^".."] and terminated by the close parenthesis.
-
-[heading Nullary Templates]
-
-Nullary templates look and act like simple macros. Example:
-
-[pre'''
-[template alpha[]'''&#945;''']
-[template beta[]'''&#946;''']
-''']
-
-[template alpha[]'''α''']
-[template beta[]'''β''']
-
-Expanding:
-
-[pre'''Some squigles...[*[alpha][beta]]''']
-
-We have:
-
-Some squiggles...[*[alpha][beta]]
-
-The difference with macros are
-
-* The explicit [link quickbook.syntax.block.templates.template_expansion
-  template expansion syntax]. This is an advantage because, now, we don't
-  have to use obscure naming conventions like double underscores (e.g.
-  \_\_alpha\_\_) to avoid unwanted
-  macro replacement.
-* The template is expanded at the point where it is invoked. A macro is
-  expanded immediately at its point of declaration. This is subtle and
-  can cause a slight difference in behavior especially if you refer to
-  other macros and templates in the body.
-
-The empty brackets after the template identifier ([^alpha\[\]]) indicates no
-arguments. If the template body does not look like a template argument list, we
-can elide the empty brackets. Example:
-
-[pre'''
-[template aristotle_quote Aristotle: [*['Education is the best provision
-for the journey to old age.]]]
-''']
-
-[template aristotle_quote\ Aristotle: [*['Education is the best provision
-for the journey to old age.]]]
-
-Expanding:
-
-[pre'''
-Here's a quote from [aristotle_quote].
-''']
-
-We have:
-
-Here's a quote from [aristotle_quote].
-
-The disadvantage is that you can't avoid the space between the template
-identifier, `aristotle_quote`, and the template body "Aristotle...". This space
-will be part of the template body. If that space is unwanted, use empty
-brackets or use the space escape: "`\ `". Example:
-
-[pre'''
-[template tag\ _tag]
-''']
-
-[template tag\ _tag]
-
-Then expanding:
-
-[pre'''
-`struct` x[tag];
-''']
-
-We have:
-
-`struct` x[tag];
-
-You have a couple of ways to do it. I personally prefer the explicit empty
-brackets, though.
-
-[heading Simple Arguments]
-
-As mentioned, arguments are separated by the double dot [^".."]. Alternatively,
-if the double dot isn't used and more than one argument is expected, QuickBook
-uses whitespace to separate the arguments, following this logic:
-
-* Break the last argument into two, at the first space found ([^'', '\\n',
-  \\t' or '\\r']).
-* Repeat until there are enough arguments or if there are no more spaces
-  found (in which case, an error is reported).
-
-For example:
-
-[pre'''
-[template simple[a b c d] [a][b][c][d]]
-[simple w x y z]
-''']
-
-will produce:
-
-[template simple[a b c d] [a][b][c][d]]
-[simple w x y z]
-
-"w x y z" is initially treated as a single argument because we didn't
-supply any [^".."] separators. However, since [^simple] expects 4
-arguments, "w x y z" is broken down iteratively (applying the logic above)
-until we have "w", "x", "y" and "z".
-
-QuickBook only tries to get the arguments it needs. For example:
-
-[pre'''
-[simple w x y z trail]
-''']
-
-will produce:
-
-[simple w x y z trail]
-
-The arguments being: "w", "x", "y" and "z trail".
-
-[caution The behavior described here is for QuickBook 1.5. In older versions you
-could use both the double dot and whitespace as separators in the same template
-call. If your document is marked up as an older version, it will use the old
-behavior, which is described in the
-[@http://www.boost.org/doc/libs/1_40_0/doc/html/quickbook/syntax.html#quickbook.syntax.block.templates.simple_arguments
-QuickBook 1.4 documentation].]
-
-[heading Punctuation Templates]
-
-With templates, one of our objectives is to allow us to rewrite QuickBook
-in QuickBook (as a qbk library). For that to happen, we need to accommodate
-single character punctuation templates which are fairly common in
-QuickBook. You might have noticed that single character punctuations are
-allowed as [link quickbook.syntax.block.templates.template_identifier
-template identifiers]. Example:
-
-[pre'''
-[template ![bar] '''<hey>'''[bar]'''</hey>''']
-''']
-
-Now, expanding this:
-
-[pre'''
-[!baz]
-''']
-
-We will have:
-
-[pre
-<hey>baz</hey>
-]
-
-[endsect] [/Templates]
-
-[section Blurbs]
-
-[pre'''
-[blurb :-) [*An eye catching advertisement or note...]
-
-    __spirit__ is an object-oriented recursive-descent parser generator framework
-    implemented using template meta-programming techniques. Expression templates
-    allow us to approximate the syntax of Extended Backus-Normal Form (EBNF)
-    completely in C++.
-]
-''']
-
-will generate this:
-
-[blurb :-) [*An eye catching advertisement or note...]
-
-    __spirit__ is an object-oriented recursive-descent parser generator
-    framework implemented using template meta-programming techniques. Expression
-    templates allow us to approximate the syntax of Extended Backus-Normal Form
-    (EBNF) completely in C++.
-]
-
-[note Prefer [link quickbook.syntax.block.admonitions admonitions] wherever
-appropriate.]
-
-[endsect] [/Blurbs]
-
-[section Tables]
-
-[pre'''
-[table:id A Simple Table
-    [[Heading 1] [Heading 2] [Heading 3]]
-    [[R0-C0]     [R0-C1]     [R0-C2]]
-    [[R1-C0]     [R1-C1]     [R1-C2]]
-    [[R2-C0]     [R2-C1]     [R2-C2]]
-]
-''']
-
-will generate:
-
-[table:id A Simple Table
-    [[Heading 1] [Heading 2] [Heading 3]]
-    [[R0-C0]     [R0-C1]     [R0-C2]]
-    [[R1-C0]     [R1-C1]     [R1-C2]]
-    [[R2-C0]     [R2-C1]     [R2-C2]]
-]
-
-The table title is optional. The first row of the table is automatically
-treated as the table header; that is, it is wrapped in [^<thead>...</thead>]
-XML tags. Note that unlike the original QuickDoc, the columns are nested in
-[cells... ].
-
-Giving tables an id is a new feature for quickbook 1.5 onwards. As with
-sections, the id is optional. If the table has a title but no id, an id will
-be generated from the title. The table above can be linked to using:
-
-[pre'''
-[link quickbook.syntax.block.tables.id link to table]
-''']
-
-which will generate:
-
-[link quickbook.syntax.block.tables.id link to table]
-
-The syntax is free-format and allows big cells to be formatted
-nicely. Example:
-
-[pre'''
-[table Table with fat cells
-    [[Heading 1] [Heading 2]]
-    [
-        [Row 0, Col 0: a small cell]
-        [
-            Row 0, Col 1: a big fat cell with paragraphs
-
-            Boost provides free peer-reviewed portable C++ source libraries.
-
-            We emphasize libraries that work well with the C++ Standard Library.
-            Boost libraries are intended to be widely useful, and usable across
-            a broad spectrum of applications. The Boost license encourages both
-            commercial and non-commercial use.
-        ]
-    ]
-    [
-        [Row 1, Col 0: a small cell]
-        [Row 1, Col 1: a small cell]
-    ]
-]
-''']
-
-and thus:
-
-[table Table with fat cells
-    [[Heading 1] [Heading 2]]
-    [
-        [Row 0, Col 0: a small cell]
-        [
-            Row 0, Col 1: a big fat cell with paragraphs
-
-            Boost provides free peer-reviewed portable C++ source libraries.
- [/ <-- There's a space here. Don't remove. This is intentional, for testing]
-            We emphasize libraries that work well with the C++ Standard Library.
-            Boost libraries are intended to be widely useful, and usable across
-            a broad spectrum of applications. The Boost license encourages both
-            commercial and non-commercial use.
-        ]
-    ]
-    [
-        [Row 1, Col 0: a small cell]
-        [Row 1, Col 1: a small cell]
-    ]
-]
-
-Here's how to have preformatted blocks of code in a table cell:
-
-[pre'''
-[table Table with code
-    [[Comment] [Code]]
-    [
-        [My first program]
-        ['''\`\`
-            #include <iostream>
-
-            int main()
-            {
-                std::cout << "Hello, World!" << std::endl;
-                return 0;
-            }
-        \`\`''']
-    ]
-]
-''']
-
-[table Table with code
-    [[Comment] [Code]]
-    [
-        [My first program]
-        [``
-            #include <iostream>
-
-            int main()
-            {
-                std::cout << "Hello, World!" << std::endl;
-                return 0;
-            }
-        ``]
-    ]
-]
-
-[endsect] [/Tables]
-
-[section Variable Lists]
-
-[pre'''
-[variablelist A Variable List
-    [[term 1] [The definition of term 1]]
-    [[term 2] [The definition of term 2]]
-    [[term 3] [
-    The definition of term 3.
-
-    Definitions may contain paragraphs.
-    ]]
-]
-''']
-
-will generate:
-
-[variablelist A Variable List
-    [[term 1] [The definition of term 1]]
-    [[term 2] [The definition of term 2]]
-    [[term 3] [
-    The definition of term 3.
-
-    Definitions may contain paragraphs.
-    ]]
-]
-
-The rules for variable lists are the same as for tables, except that
-only 2 "columns" are allowed. The first column contains the terms, and
-the second column contains the definitions. Those familiar with HTML
-will recognize this as a "definition list".
-
-[endsect] [/Variable Lists]
-
-[section Include]
-
-You can include one QuickBook file from another. The syntax is simply:
-
-[pre'''
-[include someother.qbk]
-''']
-
-The included file will be processed as if it had been cut and pasted
-into the current document, with the following exceptions:
-
-* The '''__FILENAME__''' predefined macro will reflect the name of the
-  file currently being processed.
-* Any macros defined in the included file are scoped to that file.
-
-The [^\[include\]] directive lets you specify a document id to use for the
-included file. When this id is not explicitly specified, the id defaults to
-the filename ("someother", in the example above). You can specify the id
-like this:
-
-[pre'''
-[include:someid someother.qbk]
-''']
-
-All auto-generated anchors will use the document id as a unique prefix. So
-for instance, if there is a top section in someother.qbk named "Intro", the
-named anchor for that section will be "someid.intro", and you can link to
-it with [^\[link someid.intro The Intro\]].
-
-[endsect] [/Include]
-
-[section Import]
-
-When documenting code, you'd surely need to present code from actual source
-files. While it is possible to copy some code and paste them in your QuickBook
-file, doing so is error prone and the extracted code in the documentation tends
-to get out of sync with the actual code as the code evolves. The problem, as
-always, is that once documentation is written, the tendency is for the docs to
-languish in the archives without maintenance.
-
-QuickBook's import facility provides a nice solution.
-
-[heading Example]
-
-You can effortlessly import code snippets from source code into your QuickBook.
-The following illustrates how this is done:
-
-[pre'''
-[import ../test/stub.cpp]
-[foo]
-[bar]
-''']
-
-The first line:
-
-[pre'''
-[import ../test/stub.cpp]
-''']
-
-collects specially marked-up code snippets from
-[@boost:/tools/quickbook/test/stub.cpp stub.cpp]
-and places them in your QuickBook file as virtual templates. Each of the
-specially marked-up code snippets has a name (e.g. `foo` and `bar` in the
-example above). This shall be the template identifier for that particular code
-snippet. The second and third line above does the actual template expansion:
-
-[pre'''
-[foo]
-[bar]
-''']
-
-And the result is:
-
-[import ../test/stub.cpp]
-[foo]
-[bar]
-
-[heading Code Snippet Markup]
-
-Note how the code snippets in [@boost:/tools/quickbook/test/stub.cpp stub.cpp]
-get marked up. We use distinguishable comments following the form:
-
-    //[id
-    some code here
-    //]
-
-The first comment line above initiates a named code-snippet. This prefix will
-not be visible in quickbook. The entire code-snippet in between `//[id` and
-`//]` will be inserted as a template in quickbook with name ['/id/]. The comment
-`//]` ends a code-snippet This too will not be visible in quickbook.
-
-[heading Special Comments]
-
-Special comments of the form:
-
-    //` some [*quickbook] markup here
-
-and:
-
-    /*` some [*quickbook] markup here */
-
-will be parsed by QuickBook. This can contain quickbook /blocks/ (e.g. sections,
-paragraphs, tables, etc). In the first case, the initial slash-slash, tick and
-white-space shall be ignored. In the second, the initial slash-star-tick and the
-final star-slash shall be ignored.
-
-Special comments of the form:
-
-    /*<- this C++ comment will be ignored ->*/
-
-or
-
-    /*<-*/ "this c++ code  will be ignored" /*->*/
-
-or
-
-    //<-
-    private:
-        int some_member;
-    //->
-
-can be used to inhibit code from passing through to quickbook. All text between
-the delimeters will simply be ignored.
-
-Comments of this form:
-
-    //=int main() {}
-
-or
-
-    /*=foo()*/
-
-will be displayed as code that isn't in comments. This allows you to
-include some code in the snippet but not actually use it when
-compiling your example.
-
-[heading Callouts]
-
-Special comments of the form:
-
-    /*< some [*quickbook] markup here >*/
-
-will be regarded as callouts. These will be collected, numbered and
-rendered as a "callout bug" (a small icon with a number). After the
-whole snippet is parsed, the callout list is generated. See
-[@http://www.docbook.org/tdg/en/html/callout.html Callouts] for details.
-Example:
-
-[foo_bar]
-
-This is the actual code:
-
-    //[ foo_bar
-    std::string foo_bar() /*< The /Mythical/ FooBar.
-                          See [@http://en.wikipedia.org/wiki/Foobar Foobar for details] >*/
-    {
-        return "foo-bar"; /*< return 'em, foo-bar man! >*/
-    }
-    //]
-
-The callouts bugs are placed exactly where the special callout comment
-is situated. It can be anywhere in the code. The bugs can be rather
-obtrusive, however. They get in the way of the clarity of the code.
-Another special callout comment style is available:
-
-    /*<< some [*quickbook] markup here >>*/
-
-This is the line-oriented version of the callout. With this, the "bug"
-is placed at the very left of the code block, away from the actual code.
-By placing it at the far left, the code is rendered un-obscured.
-Example:
-
-[class_]
-
-See the actual code here: [@boost:/tools/quickbook/test/stub.cpp]
-
-[endsect] [/Import]
-
-[endsect] [/Block Level Elements]
-
-[endsect] [/Syntax Summary]
-
-[section:install Installation and configuration]
-
-This section provides some guidelines on how to install and configure
-BoostBook and Quickbook under several operating systems. Before installing
-you'll need a local copy of boost, and to install the version of `bjam`
-which comes with it (or a later version).
-
-[/ I don't think this is needed any more]
-[/
-Before continuing, it is very important that you keep this in mind: if you
-try to build some documents and the process breaks due to misconfiguration,
-be absolutely sure to delete any `bin` and `bin.v2` directories generated
-by the build before trying again.  Otherwise your configuration fixes will
-not take any effect.
-]
-
-[section:macosx Mac OS X]
-
-The simplest way to install on OS X is to use macports.
-If you don't want to use macports and are using Snow Leopard or later,
-there are instructions [link quickbook.install.macosx.native later].
-Earlier versions of OS X need to use something like macports to install
-`xsltproc` because the version they come with is very old, and doesn't have
-good enough XSL support for boostbook's stylesheets.
-
-[section:macports Mac OS X, using macports]
-
-First install the `libxslt`, `docbook-xsl` and `docbook-xml-4.2`
-packages:
-
-    sudo port install libxslt docbook-xsl docbook-xml-4.2
-
-Next, we need to configure Boost Build to compile BoostBook files. Add the
-following to your `user-config.jam` file, which should be in your home
-directory. If you don't have one, create a file containing this text. For more
-information on setting up `user-config.jam`, see the
-[@http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html Boost
-Build documentation].
-
-    using xsltproc
-        : /opt/local/bin/xsltproc
-        ;
-
-    using boostbook
-        : /opt/local/share/xsl/docbook-xsl/
-        : /opt/local/share/xml/docbook/4.2
-        ;
-
-The above steps are enough to get a functional BoostBook setup.  Quickbook
-will be automatically built when needed.  If you want to avoid these
-rebuilds:
-
-# Go to Quickbook's source directory (`BOOST_ROOT/tools/quickbook`).
-
-# Build the utility by issuing `bjam`.
-
-# Copy the resulting `quickbook` binary (located at
-  `BOOST_ROOT/dist/bin`) to a safe place.  The traditional location is
-  `/usr/local/bin`.
-
-# Add the following to your `user-config.jam` file, using the full path of the
-  quickbook executable:
-  ```
- using quickbook
-     : /usr/local/bin/quickbook
-     ;
-  ```
- 
-If you need to build documentation that uses Doxygen, you will need to install it as well:
-
-    sudo port install doxygen
-
-And then add to your `user-config.jam`:
-
-    using doxygen ;
-
-Alternatively, you can install from the official doxygen `dmg`.
-This is described at [link osx-prebuilt-doxygen the end of the next section].
-
-[endsect] [/ macports]
-
-[section:native Mac OS X, Snow Leopard (or later)]
-
-[:['Section contributed by Julio M. Merino Vidal]]
-
-The text below assumes you want to install all the necessary utilities in a
-system-wide location, allowing any user in the machine to have access to
-them. Therefore, all files will be put in the `/usr/local` hierarchy.  If
-you do not want this, you can choose any other prefix such as
-`~/Applications` for a single-user installation.
-
-Snow Leopard comes with `xsltproc` and all related libraries preinstalled, so
-you do not need to take any extra steps to set them up.  It is probable
-that future versions will include them too, but these instructions may not
-apply to older versions.
-
-To get started:
-
-# Download [@http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip Docbook XML
-  4.2] and unpack it inside `/usr/local/share/xml/docbook/4.2`.
-
-# Download the latest
-  [@http://sourceforge.net/project/showfiles.php?group_id=21935&package_id=16608
-  Docbook XSL] version and unpack it. Be careful that you download the correct
-  file, sometimes the 'looking for the latest version' link often links to
-  another file. The name should be of the form
-  '''<code>docbook-xsl-1.<emphasis>nn</emphasis>.<emphasis>n</emphasis>.tar.bz2</code>''',
-  with no suffix such as `-ns.tar.bz2` or `-doc.tar.bz2`.
-  Put the results in
-  `/usr/local/share/xsl/docbook`, thus effectively removing the version
-  number from the directory name (for simplicity).
-
-# Add the following to your `user-config.jam` file, which should live in
-  your home directory (`/Users/<your_username>`).  You must already have it
-  somewhere or otherwise you could not be building Boost (i.e. missing
-  tools configuration).
-  ```
- using xsltproc ;
-
- using boostbook
-     : "/usr/local/share/xsl/docbook"
-     : "/usr/local/share/xml/docbook/4.2"
-     ;
-  ```
-
-The above steps are enough to get a functional BoostBook setup.  Quickbook
-will be automatically built when needed.  If you want to avoid these
-rebuilds and install a system-wide Quickbook instead:
-
-# Go to Quickbook's source directory (`BOOST_ROOT/tools/quickbook`).
-
-# Build the utility by issuing `bjam`.
-
-# Copy the resulting `quickbook` binary (located at
-  `BOOST_ROOT/dist/bin`) to a safe place.  Following our previous
-  example, you can install it into: `/usr/local/bin`.
-
-# Add the following to your `user-config.jam` file:
-  ```
- using quickbook
-     : "/usr/local/bin/quickbook" ;
-     ;
-  ```
-
-[# osx-prebuilt-doxygen]
-Additionally, if you need to build documentation that uses
-[@http://www.doxygen.org Doxygen], you will need to install it too:
-
-# Go to the [@http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc
-  downloads section] and get the disk image (`dmg` file) for Mac OS X.
-
-# Open the disk image and drag the Doxygen application to your
-  `Applications` folder to install it.
-
-# Add the following to your `user-config.jam` file:
-  ```
- using doxygen
-     : /Applications/Doxygen.app/Contents/Resources/doxygen
-     ;
-  ```
-
-[/ Removed this, since there are macports based instructions earlier.
-   Instructions for pkgsrc welcome]
-[/
-Alternatively, you may want to install all the prerequistes through a
-package system to avoid manual management of the installations.  In that
-case, check out [@http://www.pkgsrc.org pkgsrc].
-]
-
-[endsect] [/ native]
-
-[endsect] [/ macosx]
-
-[section:windows Windows 2000, XP, 2003, Vista, 7]
-
-[:['Section contributed by Julio M. Merino Vidal]]
-
-The following instructions apply to any Windows system based on Windows
-2000, including Windows XP, Windows 2003 Server, Windows Vista, and Windows 7. The
-paths shown below are taken from a Windows Vista machine; you will need to
-adjust them to match your system in case you are running an older version.
-
-# First of all you need to have a copy of `xsltproc` for Windows.  There
-  are many ways to get this tool, but to keep things simple, use the
-  [@http://www.zlatkovic.com/pub/libxml/ binary packages] made by Igor
-  Zlatkovic.  At the very least, you need to download the following
-  packages: `iconv`, `zlib`, `libxml2` and `libxslt`.
-
-# Unpack all these packages in the same directory so that you get unique
-  `bin`, `include` and `lib` directories within the hierarchy.  These
-  instructions use `C:\Users\example\Documents\boost\xml` as the root for
-  all files.
-
-# From the command line, go to the `bin` directory and launch
-  `xsltproc.exe` to ensure it works.  You should get usage information on
-  screen.
-
-# Download [@http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip Docbook XML
-  4.2] and unpack it in the same directory used above.  That is:
-  `C:\Users\example\Documents\boost\xml\docbook-xml`.
-
-# Download the latest
-  [@http://sourceforge.net/project/showfiles.php?group_id=21935&package_id=16608
-  Docbook XSL] version and unpack it, again in the same directory
-  used before. Be careful that you download the correct
-  file, sometimes the 'looking for the latest version' link often links to
-  another file. The name should be of the form
-  '''<code>docbook-xsl-1.<emphasis>nn</emphasis>.<emphasis>n</emphasis>.tar.bz2</code>''',
-  with no suffix such as `-ns.tar.bz2` or `-doc.tar.bz2`.
-  To make things easier, rename the directory created
-  during the extraction to `docbook-xsl` (bypassing the version name):
-  `C:\Users\example\Documents\boost\xml\docbook-xsl`.
-
-# Add the following to your `user-config.jam` file, which should live in
-  your home directory (`%HOMEDRIVE%%HOMEPATH%`).  You must already have it
-  somewhere or otherwise you could not be building Boost (i.e. missing
-  tools configuration).
-
- using xsltproc
-     : "C:/Users/example/Documents/boost/xml/bin/xsltproc.exe"
-     ;
-
- using boostbook
-     : "C:/Users/example/Documents/boost/xml/docbook-xsl"
-     : "C:/Users/example/Documents/boost/xml/docbook-xml"
-     ;
-
-The above steps are enough to get a functional BoostBook setup.  Quickbook
-will be automatically built when needed.  If you want to avoid these
-rebuilds:
-
-# Go to Quickbook's source directory (`BOOST_ROOT\tools\quickbook`).
-
-# Build the utility by issuing `bjam`.
-
-# Copy the resulting `quickbook.exe` binary (located at
-  `BOOST_ROOT\dist\bin`) to a safe place.  Following our previous
-  example, you can install it into:
-  `C:\Users\example\Documents\boost\xml\bin`.
-
-# Add the following to your `user-config.jam` file:
-  ```
- using quickbook
-     : "C:/Users/example/Documents/boost/xml/bin/quickbook.exe"
-     ;
-  ```
-
-[endsect] [/Windows]
-
-[section:linux Debian, Ubuntu]
-
-The following instructions apply to Debian and its derivatives. They are based
-on a Ubuntu Edgy install but should work on other Debian based systems. They
-assume you've already installed an appropriate version of `bjam` for your
-copy of boost.
-
-First install the `xsltproc`, `docbook-xsl` and `docbook-xml` packages.
-For example, using `apt-get`:
-
-    sudo apt-get install xsltproc docbook-xsl docbook-xml
-
-If you're planning on building boost's documentation, you'll also need to
-install the `doxygen` package as well.
-
-Next, we need to configure Boost Build to compile BoostBook files. Add the
-following to your `user-config.jam` file, which should be in your home
-directory. If you don't have one, create a file containing this text. For more
-information on setting up `user-config.jam`, see the
-[@http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html Boost
-Build documentation].
-
-    using xsltproc ;
-
-    using boostbook
-        : /usr/share/xml/docbook/stylesheet/nwalsh
-        : /usr/share/xml/docbook/schema/dtd/4.2
-        ;
-
-    # Remove this line if you're not using doxygen
-    using doxygen ;
-
-The above steps are enough to get a functional BoostBook setup.  Quickbook
-will be automatically built when needed.  If you want to avoid these
-rebuilds:
-
-# Go to Quickbook's source directory (`BOOST_ROOT/tools/quickbook`).
-
-# Build the utility by issuing `bjam`.
-
-# Copy the resulting `quickbook` binary (located at
-  `BOOST_ROOT/dist/bin`) to a safe place.  The traditional location is
-  `/usr/local/bin`.
-
-# Add the following to your `user-config.jam` file, using the full path of the
-  quickbook executable:
-
- using quickbook
-     : /usr/local/bin/quickbook
-     ;
-
-[endsect] [/Linux]
-
-[endsect] [/Installation and configuration]
-
-[section:editors Editor Support]
-
-Editing quickbook files is usually done with text editors both simple and
-powerful. The following sections list the settings for some editors which can
-help make editing quickbook files a bit easier.
-
-[note You may submit your settings, tips, and suggestions to the
-authors, or through the [@https://lists.sourceforge.net/lists/listinfo/boost-
-docs Boost Docs mailing list].]
-
-[section:scite Scintilla Text Editor]
-
-[:['Section contributed by Dean Michael Berris]]
-
-The Scintilla Text Editor (SciTE) is a free source code editor for Win32 and X.
-It uses the SCIntilla source code editing component.
-
-[tip SciTE can be downloaded from [@http://www.scintilla.org/SciTE.html]]
-
-You can use the following settings to highlight quickbook tags when
-editing quickbook files.
-
-[pre'''
-qbk=*.qbk
-lexer.*.qbk=props
-use.tabs.$(qbk)=0
-tab.size.$(qbk)=4
-indent.size.$(qbk)=4
-style.props.32=$(font.base)
-comment.stream.start.props=[/
-comment.stream.end.props=]
-comment.box.start.props=[/
-comment.box.middle.props=
-comment.box.end.props=]
-''']
-
-[note Thanks to Rene Rivera for the above SciTE settings.]
-
-[endsect] [/scite]
-
-[/ KDE support (Kate, KWrite, Konqueror, KDevelop) ]
-[include ../extra/katepart/katepart.qbk]
-
-[endsect] [/editors]
-
-[section:faq Frequently Asked Questions]
-
-[heading Can I use QuickBook for non-Boost documentation?]
-
-QuickBook can be used for non-Boost documentation with a little extra work.
-
-[:['Faq contributed by Michael Marcin]]
-
-When building HTML documentation with BoostBook a Boost C++ Libraries header
-is added to the files. When using QuickBook to document projects outside of
-Boost this is not desirable. This behavior can be overridden at the BoostBook
-level by specifying some XSLT options. When using Boost Build version 2 (BBv2)
-this can be achieved by adding parameters to the BoostBook target declaration.
-
-For example:
-[pre
-using quickbook ;
-
-xml my_doc : my_doc.qbk ;
-
-boostbook standalone
-    :
-        my_doc
-    :
-        <xsl:param>boost.image.src\=images/my_project_logo.png
-        <xsl:param>boost.image.alt\="\\"My Project\\""
-        <xsl:param>boost.image.w=100
-        <xsl:param>boost.image.h=50
-        <xsl:param>nav.layout=none
-    ;
-]
-
-[heading Is there an easy way to convert BoostBook docs to QuickBook?]
-
-There's a stylesheet that allows Boostbook generated HTML to be viewed
-as quickbook source, see
-[@http://svn.boost.org/trac/boost/wiki/QuickbookSourceStylesheetProject],
-so it's then just a cut and paste job to convert the BoostBook to
-QuickBook (which IMO is a whole lot easier to edit and maintain).
-
---John Maddock
-
-[endsect] [/faq]
-
-[section:ref Quick Reference]
-
-[teletype]
-
-[template ordered_list_sample[]
-[pre'''
-# one
-# two
-# three
-''']
-]
-
-[template unordered_list_sample[]
-[pre'''
-* one
-* two
-* three
-''']
-]
-
-[template table_sample[]
-[pre'''
-[table Title
-[[a][b][c]]
-[[a][b][c]]
-]
-''']
-]
-
-[template var_list_sample[]
-[pre'''
-[variablelist Title
-[[a][b]]
-[[a][b]]
-]
-''']
-]
-
-
-[table Syntax Compendium
-    [[To do this...]        [Use this...]                                   [See this...]]
-    [[comment]              [[^'''[/ some comment]''']]                     [__comments__]]
-    [[['italics]]           [[^'''['italics] or /italics/''']]              [__font_styles__ and __simple_formatting__]]
-    [[[*bold]]              [[^'''[*bold] or *bold*''']]                    [__font_styles__ and __simple_formatting__]]
-    [[[_underline]]         [[^'''[_underline] or _underline_''']]          [__font_styles__ and __simple_formatting__]]
-    [[[^teletype]]          [[^'''[^teletype] or =teletype=''']]            [__font_styles__ and __simple_formatting__]]
-    [[[-strikethrough]]     [[^'''[-strikethrough]''']]                     [__font_styles__ and __simple_formatting__]]
-    [[[~replaceable]]       [[^'''[~replaceable]''']]                       [__replaceable__]]
-    [[source mode]          [[^\[c++\]] or [^\[python\]]]                   [__source_mode__]]
-    [[inline code]          [[^'''`int main();`''']]                        [__inline_code__]]
-    [[code block]           [[^'''``int main();``''']]                      [__code__]]
-    [[code escape]          [[^'''``from c++ to QuickBook``''']]            [__escape_back__]]
-    [[line break]           [[^'''[br] or \n''']]                           [__line_break__ *DEPRECATED*]]
-    [[anchor]               [[^'''[#anchor]''']]                            [__anchors__]]
-    [[link]                 [[^'''[@http://www.boost.org Boost]''']]        [__links__]]
-    [[anchor link]          [[^'''[link section.anchor Link text]''']]      [__anchor_links__]]
-    [[refentry link]        [[^'''[link xml.refentry Link text]''']]        [__refentry_links__]]
-    [[function link]        [[^'''[funcref fully::qualified::function_name Link text]''']]      [__code_links__]]
-    [[class link]           [[^'''[classref fully::qualified::class_name Link text]''']]        [__code_links__]]
-    [[member link]          [[^'''[memberref fully::qualified::member_name Link text]''']]      [__code_links__]]
-    [[enum link]            [[^'''[enumref fully::qualified::enum_name Link text]''']]          [__code_links__]]
-    [[macro link]           [[^'''[macroref MACRO_NAME Link text]''']]                          [__code_links__]]
-    [[concept link]         [[^'''[conceptref ConceptName Link text]''']]                       [__code_links__]]
-    [[header link]          [[^'''[headerref path/to/header.hpp Link text]''']]                 [__code_links__]]
-    [[global link]          [[^'''[globalref fully::qualified::global Link text]''']]           [__code_links__]]
-    [[escape]               [[^\'\'\'escaped text (no processing/formatting)\'\'\']]            [__escape__]]
-    [[single char escape]   [[^\\c]]                                        [__single_char_escape__]]
-    [[images]               [[^'''[$image.jpg]''']]                         [__images__]]
-    [[begin section]        [[^'''[section The Section Title]''']]          [__section__]]
-    [[end section]          [[^'''[endsect]''']]                            [__section__]]
-    [[paragraph]            [No markup. Paragraphs start left-flushed and are terminated by two or more newlines.]  [__paragraphs__]]
-    [[ordered list]         [[ordered_list_sample]]                         [__ordered_lists__]]
-    [[unordered list]       [[unordered_list_sample]]                       [__unordered_lists__]]
-    [[code]                 [No markup. Preformatted code starts with a space or a tab.]        [__code__]]
-    [[preformatted]         [[^'''[pre preformatted]''']]                   [__preformatted__]]
-    [[block quote]          [[^'''[:sometext...]''']]                       [__blockquote__]]
-    [[heading 1]            [[^'''[h1 Heading 1]''']]                       [__heading__]]
-    [[heading 2]            [[^'''[h2 Heading 2]''']]                       [__heading__]]
-    [[heading 3]            [[^'''[h3 Heading 3]''']]                       [__heading__]]
-    [[heading 4]            [[^'''[h4 Heading 4]''']]                       [__heading__]]
-    [[heading 5]            [[^'''[h5 Heading 5]''']]                       [__heading__]]
-    [[heading 6]            [[^'''[h6 Heading 6]''']]                       [__heading__]]
-    [[macro]                [[^'''[def macro_identifier some text]''']]     [__macros__]]
-    [[template]             [[^'''[template[a b] [a] body [b]]''']]         [__templates__]]
-    [[blurb]                [[^'''[blurb advertisement or note...]''']]     [__blurbs__]]
-    [[admonition]           [[^'''[warning Warning text...]''']]            [__admonitions__]]
-    [[table]                [[table_sample]]                                [__tables__]]
-    [[variablelist]         [[var_list_sample]]                             [__variable_lists__]]
-    [[include]              [[^'''[include someother.qbk]''']]              [__include__]]
-    [[conditional generation]
-                            [[^'''[? symbol phrase]''']]                    [__cond__]]
-]
-
-[endsect] [/ quick reference]
+[include introduction.qbk]
+[include change_log.qbk]
+[include syntax.qbk]
+[include structure.qbk]
+[include phrase.qbk]
+[include block.qbk]
+[include 1_6.qbk]
+[include install.qbk]
+[include editors.qbk]
+[include faq.qbk]
+[include ref.qbk]
\ No newline at end of file
Modified: branches/release/tools/quickbook/src/Jamfile.v2
==============================================================================
--- branches/release/tools/quickbook/src/Jamfile.v2	(original)
+++ branches/release/tools/quickbook/src/Jamfile.v2	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -26,9 +26,11 @@
     doc_info_actions.cpp
     actions_class.cpp
     utils.cpp
+    files.cpp
+    string_ref.cpp
     input_path.cpp
     values.cpp
-    id_generator.cpp
+    id_manager.cpp
     post_process.cpp
     collector.cpp
     template_stack.cpp
Modified: branches/release/tools/quickbook/src/actions.cpp
==============================================================================
--- branches/release/tools/quickbook/src/actions.cpp	(original)
+++ branches/release/tools/quickbook/src/actions.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -23,13 +23,15 @@
 #include "quickbook.hpp"
 #include "actions.hpp"
 #include "utils.hpp"
+#include "files.hpp"
 #include "markups.hpp"
 #include "actions_class.hpp"
+#include "actions_state.hpp"
 #include "grammar.hpp"
 #include "input_path.hpp"
 #include "block_tags.hpp"
 #include "phrase_tags.hpp"
-#include "id_generator.hpp"
+#include "id_manager.hpp"
 
 namespace quickbook
 {
@@ -39,18 +41,6 @@
     unsigned qbk_version_n = 0; // qbk_major_version * 100 + qbk_minor_version
 
     namespace {
-        std::string fully_qualified_id(std::string const& library_id,
-            std::string const& qualified_section_id,
-            std::string const& section_id)
-        {
-            std::string id = library_id;
-            if(!id.empty() && !qualified_section_id.empty()) id += '.';
-            id += qualified_section_id;
-            if(!id.empty() && !section_id.empty()) id += '.';
-            id += section_id;
-            return id;
-        }
-
         void write_anchors(quickbook::actions& actions, collector& tgt)
         {
             for(quickbook::actions::string_list::iterator
@@ -68,19 +58,19 @@
         
         std::string add_anchor(quickbook::actions& actions,
                 std::string const& id,
-                id_generator::categories category = id_generator::explicit_id)
+                id_category::categories category =
+                    id_category::explicit_anchor_id)
         {
-            std::string placeholder = actions.ids.add(id, category);
+            std::string placeholder = actions.ids.add_anchor(id, category);
             actions.anchors.push_back(placeholder);
             return placeholder;
         }
     }
 
-    void list_action(quickbook::actions&, value);
     void explicit_list_action(quickbook::actions&, value);
     void header_action(quickbook::actions&, value);
     void begin_section_action(quickbook::actions&, value);
-    void end_section_action(quickbook::actions&, value, file_position);
+    void end_section_action(quickbook::actions&, value, string_iterator);
     void block_action(quickbook::actions&, value);
     void block_empty_action(quickbook::actions&, value);
     void macro_definition_action(quickbook::actions&, value);
@@ -88,28 +78,26 @@
     void variable_list_action(quickbook::actions&, value);
     void table_action(quickbook::actions&, value);
     void xinclude_action(quickbook::actions&, value);
-    void import_action(quickbook::actions&, value);
-    void include_action(quickbook::actions&, value);
+    void include_action(quickbook::actions&, value, string_iterator);
     void image_action(quickbook::actions&, value);
     void anchor_action(quickbook::actions&, value);
     void link_action(quickbook::actions&, value);
     void phrase_action(quickbook::actions&, value);
+    void role_action(quickbook::actions&, value);
     void footnote_action(quickbook::actions&, value);
     void raw_phrase_action(quickbook::actions&, value);
     void source_mode_action(quickbook::actions&, value);
-    void do_template_action(quickbook::actions&, value, file_position);
+    void do_template_action(quickbook::actions&, value, string_iterator);
     
-    void element_action::operator()(iterator first, iterator) const
+    void element_action::operator()(parse_iterator first, parse_iterator) const
     {
         value_consumer values = actions.values.release();
-        if(!values.check()) return;
+        if(!values.check() || !actions.conditional) return;
         value v = values.consume();
-        if(values.check()) return;
+        values.finish();
         
         switch(v.get_tag())
         {
-        case block_tags::list:
-            return list_action(actions, v);
         case block_tags::ordered_list:
         case block_tags::itemized_list:
             return explicit_list_action(actions, v);
@@ -124,7 +112,7 @@
         case block_tags::begin_section:
             return begin_section_action(actions, v);
         case block_tags::end_section:
-            return end_section_action(actions, v, first.get_position());
+            return end_section_action(actions, v, first.base());
         case block_tags::blurb:
         case block_tags::preformatted:
         case block_tags::blockquote:
@@ -133,6 +121,7 @@
         case block_tags::important:
         case block_tags::note:
         case block_tags::tip:
+        case block_tags::block:
             return block_action(actions,v);
         case block_tags::hr:
             return block_empty_action(actions,v);
@@ -147,9 +136,8 @@
         case block_tags::xinclude:
             return xinclude_action(actions, v);
         case block_tags::import:
-            return import_action(actions, v);
         case block_tags::include:
-            return include_action(actions, v);
+            return include_action(actions, v, first.base());
         case phrase_tags::image:
             return image_action(actions, v);
         case phrase_tags::anchor:
@@ -177,34 +165,33 @@
             return footnote_action(actions, v);
         case phrase_tags::escape:
             return raw_phrase_action(actions, v);
+        case phrase_tags::role:
+            return role_action(actions, v);
         case source_mode_tags::cpp:
         case source_mode_tags::python:
         case source_mode_tags::teletype:
             return source_mode_action(actions, v);
         case template_tags::template_:
-            return do_template_action(actions, v, first.get_position());
+            return do_template_action(actions, v, first.base());
         default:
             break;
         }
     }
 
-    // Handles line-breaks (DEPRECATED!!!)
-    void break_action::operator()(iterator first, iterator) const
+    void break_action::operator()(parse_iterator first, parse_iterator) const
     {
-        if (actions.suppress) return;
         write_anchors(actions, phrase);
 
-        file_position const pos = first.get_position();
         if(*first == '\\')
         {
-            detail::outwarn(actions.filename, pos.line)
-                << "in column:" << pos.column << ", "
+            detail::outwarn(actions.current_file, first.base())
+                //<< "in column:" << pos.column << ", "
                 << "'\\n' is deprecated, pleases use '[br]' instead" << ".\n";
         }
 
         if(!actions.warned_about_breaks)
         {
-            detail::outwarn(actions.filename, pos.line)
+            detail::outwarn(actions.current_file, first.base())
                 << "line breaks generate invalid boostbook "
                    "(will only note first occurrence).\n";
 
@@ -214,9 +201,9 @@
         phrase << detail::get_markup(phrase_tags::break_mark).pre;
     }
 
-    void error_message_action::operator()(iterator first, iterator last) const
+    void error_message_action::operator()(parse_iterator first, parse_iterator last) const
     {
-        file_position const pos = first.get_position();
+        file_position const pos = actions.current_file->position_of(first.base());
 
         std::string value(first, last);
         std::string formatted_message = message;
@@ -224,34 +211,33 @@
         boost::replace_all(formatted_message, "%c",
             boost::lexical_cast<std::string>(pos.column));
 
-        detail::outerr(actions.filename, pos.line)
+        detail::outerr(actions.current_file->path, pos.line)
             << detail::utf8(formatted_message) << std::endl;
         ++actions.error_count;
     }
 
-    void error_action::operator()(iterator first, iterator /*last*/) const
+    void error_action::operator()(parse_iterator first, parse_iterator /*last*/) const
     {
-        file_position const pos = first.get_position();
-        detail::outerr(actions.filename, pos.line)
+        file_position const pos = actions.current_file->position_of(first.base());
+
+        detail::outerr(actions.current_file->path, pos.line)
             << "Syntax Error near column " << pos.column << ".\n";
         ++actions.error_count;
     }
 
     void block_action(quickbook::actions& actions, value block)
     {
-        if (actions.suppress) return;
         write_anchors(actions, actions.out);
 
         detail::markup markup = detail::get_markup(block.get_tag());
 
         value_consumer values = block;
-        actions.out << markup.pre << values.consume().get_boostbook() << markup.post;
+        actions.out << markup.pre << values.consume().get_encoded() << markup.post;
         values.finish();
     }
 
     void block_empty_action(quickbook::actions& actions, value block)
     {
-        if (actions.suppress) return;
         write_anchors(actions, actions.out);
 
         detail::markup markup = detail::get_markup(block.get_tag());
@@ -260,36 +246,46 @@
 
     void phrase_action(quickbook::actions& actions, value phrase)
     {
-        if (actions.suppress) return;
         write_anchors(actions, actions.phrase);
 
         detail::markup markup = detail::get_markup(phrase.get_tag());
 
         value_consumer values = phrase;
-        actions.phrase << markup.pre << values.consume().get_boostbook() << markup.post;
+        actions.phrase << markup.pre << values.consume().get_encoded() << markup.post;
+        values.finish();
+    }
+
+    void role_action(quickbook::actions& actions, value role)
+    {
+        write_anchors(actions, actions.phrase);
+
+        value_consumer values = role;
+        actions.phrase
+            << "<phrase role=\"";
+        detail::print_string(values.consume().get_quickbook(), actions.phrase.get());
+        actions.phrase
+            << "\">"
+            << values.consume().get_encoded()
+            << "</phrase>";
         values.finish();
     }
 
     void footnote_action(quickbook::actions& actions, value phrase)
     {
-        if (actions.suppress) return;
         write_anchors(actions, actions.phrase);
 
         value_consumer values = phrase;
         actions.phrase
             << "<footnote id=\""
-            << actions.ids.add(fully_qualified_id(actions.doc_id,
-                    actions.qualified_section_id, "f"),
-                    id_generator::numbered)
+            << actions.ids.add_id("f", id_category::numbered)
             << "\"><para>"
-            << values.consume().get_boostbook()
+            << values.consume().get_encoded()
             << "</para></footnote>";
         values.finish();
     }
 
     void raw_phrase_action(quickbook::actions& actions, value phrase)
     {
-        if (actions.suppress) return;
         write_anchors(actions, actions.phrase);
 
         detail::markup markup = detail::get_markup(phrase.get_tag());
@@ -298,8 +294,6 @@
 
     void paragraph_action::operator()() const
     {
-        if(actions.suppress) return;
-    
         std::string str;
         actions.phrase.swap(str);
 
@@ -316,6 +310,19 @@
             actions.out << markup.post;
         }
     }
+
+    void list_item_action::operator()() const
+    {
+        std::string str;
+        actions.phrase.swap(str);
+        actions.out << str;
+        write_anchors(actions, actions.out);
+    }
+
+    void phrase_end_action::operator()() const
+    {
+        write_anchors(actions, actions.phrase);
+    }
     
     namespace {
         void write_bridgehead(quickbook::actions& actions, int level,
@@ -325,10 +332,7 @@
             {
                 actions.out << "<bridgehead renderas=\"sect" << level << "\"";
                 actions.out << " id=\"";
-                actions.out << actions.ids.add(
-                    fully_qualified_id(actions.doc_id,
-                        actions.qualified_section_id, "h"),
-                    id_generator::numbered),
+                actions.out << actions.ids.add_id("h", id_category::numbered);
                 actions.out << "\">";
                 actions.out << "<phrase id=\"" << id << "\"/>";
                 actions.out << "<link linkend=\"" << id << "\">";
@@ -349,8 +353,6 @@
 
     void header_action(quickbook::actions& actions, value heading_list)
     {
-        if(actions.suppress) return;
-
         value_consumer values = heading_list;
 
         bool generic = heading_list.get_tag() == block_tags::generic_heading;
@@ -362,10 +364,9 @@
 
         if (generic)
         {
-            level = actions.section_level + 2;
-                                            // section_level is zero-based. We need to use a
-                                            // one-based heading which is one greater
-                                            // than the current. Thus: section_level + 2.
+            level = actions.ids.section_level() + 1;
+                                            // We need to use a heading which is one greater
+                                            // than the current.
             if (level > 6 )                 // The max is h6, clip it if it goes
                 level =  6;                 // further than that
         }
@@ -376,45 +377,45 @@
 
         write_anchors(actions, actions.out);
 
-        if (!generic && qbk_version_n < 103) // version 1.2 and below
+        if (!element_id.empty())
         {
-            std::string anchor = actions.ids.add(
-                actions.section_id + '.' +
-                    detail::make_identifier(content.get_boostbook()),
-                id_generator::generated_heading);
+            std::string anchor = actions.ids.add_id(
+                element_id.get_quickbook(),
+                id_category::explicit_id);
+
+            write_bridgehead(actions, level,
+                content.get_encoded(), anchor, self_linked_headers);
+        }
+        else if (!generic && actions.ids.compatibility_version() < 103) // version 1.2 and below
+        {
+            // This generates the old id style if both the interpreting
+            // version and the generation version are less then 103u.
+
+            std::string anchor = actions.ids.old_style_id(
+                detail::make_identifier(content.get_encoded()),
+                id_category::generated_heading);
 
             write_bridgehead(actions, level,
-                content.get_boostbook(), anchor, false);
+                content.get_encoded(), anchor, false);
+
         }
         else
         {
-            id_generator::categories category =
-                !element_id.empty() ?
-                    id_generator::explicit_id :
-                    id_generator::generated_heading;
-
-            std::string id =
-                !element_id.empty() ?
-                    element_id.get_quickbook() :
-                    detail::make_identifier(
-                        qbk_version_n >= 106 ?
-                            content.get_quickbook() :
-                            content.get_boostbook()
-                    );
-
-            std::string anchor = actions.ids.add(
-                fully_qualified_id(actions.doc_id,
-                    actions.qualified_section_id, id),
-                category);;
+            std::string anchor = actions.ids.add_id(
+                detail::make_identifier(
+                    actions.ids.compatibility_version() >= 106 ?
+                        content.get_quickbook() :
+                        content.get_encoded()
+                ),
+                id_category::generated_heading);
 
             write_bridgehead(actions, level,
-                content.get_boostbook(), anchor, true);
+                content.get_encoded(), anchor, self_linked_headers);
         }
     }
 
     void simple_phrase_action::operator()(char mark) const
     {
-        if (actions.suppress) return;
         write_anchors(actions, out);
 
         int tag =
@@ -432,26 +433,43 @@
         values.finish();
 
         out << markup.pre;
-        out << content.get_boostbook();
+        out << content.get_encoded();
         out << markup.post;
     }
 
     bool cond_phrase_push::start()
     {
-        saved_suppress = actions.suppress;
-    
         value_consumer values = actions.values.release();
-        bool condition = find(actions.macro,
-            values.consume().get_quickbook().c_str());
-    
-        actions.suppress = actions.suppress || !condition;
+
+        saved_conditional = actions.conditional;
+
+        if (saved_conditional)
+        {
+            string_ref macro1 = values.consume().get_quickbook();
+            std::string macro(macro1.begin(), macro1.end());
+
+            actions.conditional = find(actions.macro, macro.c_str());
+
+            if (!actions.conditional) {
+                actions.phrase.push();
+                actions.out.push();
+                actions.anchors.swap(anchors);
+            }
+        }
 
         return true;
     }
     
     void cond_phrase_push::cleanup()
     {
-        actions.suppress = saved_suppress;
+        if (saved_conditional && !actions.conditional)
+        {
+            actions.phrase.pop();
+            actions.out.pop();
+            actions.anchors.swap(anchors);
+        }
+
+        actions.conditional = saved_conditional;
     }
 
     namespace {
@@ -473,83 +491,34 @@
         }
     }
 
-    void list_action(quickbook::actions& actions, value list)
+    void actions::start_list(char mark)
     {
-        if (actions.suppress) return;
-        write_anchors(actions, actions.out);
-
-        typedef std::pair<char, int> mark_type;
-        std::stack<mark_type> list_marks;
-        int list_indent = -1;
-
-        BOOST_FOREACH(value_consumer values, list)
-        {
-            int new_indent = indent_length(
-                    values.consume(general_tags::list_indent).get_quickbook());
-            value mark_value = values.consume(general_tags::list_mark);
-            std::string content = values.consume().get_boostbook();
-            values.finish();
-
-            char mark = mark_value.get_quickbook()[0];
-            assert(mark == '*' || mark == '#');
-
-            if(list_indent == -1) {
-                assert(new_indent == 0);
-            }
-
-            if(new_indent > list_indent)
-            {
-                list_indent = new_indent;
-                list_marks.push(mark_type(mark, list_indent));
-
-                actions.out << ((mark == '#') ? "<orderedlist>\n" : "<itemizedlist>\n");
-            }
-            else if (new_indent < list_indent)
-            {
-                BOOST_ASSERT(!list_marks.empty());
-                list_indent = new_indent;
+        write_anchors(*this, out);
+        assert(mark == '*' || mark == '#');
+        out << ((mark == '#') ? "<orderedlist>\n" : "<itemizedlist>\n");
+    }
 
-                while (!list_marks.empty() && (list_indent < list_marks.top().second))
-                {
-                    char mark = list_marks.top().first;
-                    list_marks.pop();
-                    actions.out << "</simpara></listitem>";
-                    actions.out << ((mark == '#') ? "\n</orderedlist>" : "\n</itemizedlist>");
-                }
-                actions.out << "</simpara></listitem>";
-            }
-            else
-            {
-                actions.out << "</simpara></listitem>";
-            }
+    void actions::end_list(char mark)
+    {
+        write_anchors(*this, out);
+        assert(mark == '*' || mark == '#');
+        out << ((mark == '#') ? "\n</orderedlist>" : "\n</itemizedlist>");
+    }
 
-            if (mark != list_marks.top().first) // new_indent == list_indent
-            {
-                file_position const pos = mark_value.get_position();
-                detail::outerr(actions.filename, pos.line)
-                    << "Illegal change of list style near column " << pos.column << ".\n";
-                detail::outwarn(actions.filename, pos.line)
-                    << "Ignoring change of list style" << std::endl;
-                ++actions.error_count;
-            }
-            
-            actions.out << "<listitem><simpara>";
-            actions.out << content;
-        }
+    void actions::start_list_item()
+    {
+        out << "<listitem><simpara>";
+        write_anchors(*this, out);
+    }
 
-        assert(!list_marks.empty());
-        while (!list_marks.empty())
-        {
-            char mark = list_marks.top().first;
-            list_marks.pop();
-            actions.out << "</simpara></listitem>";
-            actions.out << ((mark == '#') ? "\n</orderedlist>" : "\n</itemizedlist>");
-        }
+    void actions::end_list_item()
+    {
+        write_anchors(*this, out);
+        out << "</simpara></listitem>";
     }
 
     void explicit_list_action(quickbook::actions& actions, value list)
     {
-        if (actions.suppress) return;
         write_anchors(actions, actions.out);
 
         detail::markup markup = detail::get_markup(list.get_tag());
@@ -559,65 +528,26 @@
         BOOST_FOREACH(value item, list)
         {
             actions.out << "<listitem>";
-            actions.out << item.get_boostbook();
+            actions.out << item.get_encoded();
             actions.out << "</listitem>";
         }
 
         actions.out << markup.post;
     }
 
-    // TODO: No need to check suppress since this is only used in the syntax
-    //       highlighter. I should move this or something.
-    void span::operator()(iterator first, iterator last) const
-    {
-        if (name) out << "<phrase role=\"" << name << "\">";
-        while (first != last)
-            detail::print_char(*first++, out.get());
-        if (name) out << "</phrase>";
-    }
-
-    void span_start::operator()(iterator first, iterator last) const
-    {
-        out << "<phrase role=\"" << name << "\">";
-        while (first != last)
-            detail::print_char(*first++, out.get());
-    }
-
-    void span_end::operator()(iterator first, iterator last) const
-    {
-        while (first != last)
-            detail::print_char(*first++, out.get());
-        out << "</phrase>";
-    }
-
-    void unexpected_char::operator()(iterator first, iterator last) const
-    {
-        file_position const pos = first.get_position();
-
-        detail::outwarn(actions.filename, pos.line)
-            << "in column:" << pos.column
-            << ", unexpected character: " << detail::utf8(first, last)
-            << "\n";
-
-        // print out an unexpected character
-        out << "<phrase role=\"error\">";
-        while (first != last)
-            detail::print_char(*first++, out.get());
-        out << "</phrase>";
-    }
-
     void anchor_action(quickbook::actions& actions, value anchor)
     {
-        if(actions.suppress) return;
-        
         value_consumer values = anchor;
-        add_anchor(actions, values.consume().get_quickbook());
+        value anchor_id = values.consume();
+        // Note: anchor_id is never encoded as boostbook. If it
+        // is encoded, it's just things like escapes.
+        add_anchor(actions, anchor_id.is_encoded() ?
+            anchor_id.get_encoded() : anchor_id.get_quickbook());
         values.finish();
     }
 
     void do_macro_action::operator()(std::string const& str) const
     {
-        if (actions.suppress) return;
         write_anchors(actions, phrase);
 
         if (str == quickbook_get_date)
@@ -638,27 +568,15 @@
         }
     }
 
-    void space::operator()(char ch) const
+    void raw_char_action::operator()(char ch) const
     {
-        detail::print_space(ch, out.get());
+        out << ch;
     }
 
-    void space::operator()(iterator first, iterator last) const
+    void raw_char_action::operator()(parse_iterator first, parse_iterator last) const
     {
         while (first != last)
-            detail::print_space(*first++, out.get());
-    }
-
-    void pre_escape_back::operator()(iterator, iterator) const
-    {
-        escape_actions.phrase.push(); // save the stream
-    }
-
-    void post_escape_back::operator()(iterator, iterator) const
-    {
-        write_anchors(escape_actions, escape_actions.phrase);
-        out << escape_actions.phrase.str();
-        escape_actions.phrase.pop(); // restore the stream
+            out << *first++;
     }
 
     void source_mode_action(quickbook::actions& actions, value source_mode)
@@ -666,76 +584,83 @@
         actions.source_mode = source_mode_tags::name(source_mode.get_tag());
     }
 
-    void code_action::operator()(iterator first, iterator last) const
+    void code_action::operator()(parse_iterator first, parse_iterator last) const
     {
-        if (actions.suppress) return;
-        write_anchors(actions, out);
+        bool inline_code = type == inline_ ||
+            (type == inline_block && qbk_version_n < 106u);
+        bool block = type != inline_;
+
+        if (inline_code) {
+            write_anchors(actions, actions.phrase);
+        }
+        else {
+            actions.paragraph();
+            write_anchors(actions, actions.out);
+        }
 
-        // preprocess the code section to remove the initial indentation
-        std::string program(first, last);
-        detail::unindent(program);
-        if (program.size() == 0)
-            return; // Nothing left to do here. The program is empty.
-
-        iterator first_(program.begin(), first.get_position());
-        iterator last_(program.end());
-
-        // TODO: Shouldn't phrase be empty here? Why would it be output
-        // after the code block?
-        std::string save;
-        phrase.swap(save);
+        std::string str;
 
-        // print the code with syntax coloring
-        std::string str = syntax_highlight(first_, last_, actions, actions.source_mode);
+        if (block) {
+            // preprocess the code section to remove the initial indentation
+            mapped_file_builder mapped;
+            mapped.start(actions.current_file);
+            mapped.unindent_and_add(first.base(), last.base());
 
-        phrase.swap(save);
+            file_ptr f = mapped.release();
 
-        //
-        // We must not place a \n after the <programlisting> tag
-        // otherwise PDF output starts code blocks with a blank line:
-        //
-        out << "<programlisting>";
-        out << str;
-        out << "</programlisting>\n";
-    }
+            if (f->source.empty())
+                return; // Nothing left to do here. The program is empty.
 
-    void inline_code_action::operator()(iterator first, iterator last) const
-    {
-        if (actions.suppress) return;
-        write_anchors(actions, out);
+            parse_iterator first_(f->source.begin());
+            parse_iterator last_(f->source.end());
 
-        std::string save;
-        out.swap(save);
+            file_ptr saved_file = f;
+            boost::swap(actions.current_file, saved_file);
 
-        // print the code with syntax coloring
-        std::string str = syntax_highlight(first, last, actions, actions.source_mode);
+            // print the code with syntax coloring
+            str = syntax_highlight(first_, last_, actions, actions.source_mode);
+
+            boost::swap(actions.current_file, saved_file);
+        }
+        else {
+            parse_iterator first_(first);
+            str = syntax_highlight(first_, last, actions, actions.source_mode);
+        }
 
-        out.swap(save);
+        if (block) {
+            collector& output = inline_code ? actions.phrase : actions.out;
 
-        out << "<code>";
-        out << str;
-        out << "</code>";
+            // We must not place a \n after the <programlisting> tag
+            // otherwise PDF output starts code blocks with a blank line:
+            //
+            output << "<programlisting>";
+            output << str;
+            output << "</programlisting>\n";
+        }
+        else {
+            actions.phrase << "<code>";
+            actions.phrase << str;
+            actions.phrase << "</code>";
+        }
     }
 
     void plain_char_action::operator()(char ch) const
     {
-        if (actions.suppress) return;
         write_anchors(actions, phrase);
 
         detail::print_char(ch, phrase.get());
     }
 
-    void plain_char_action::operator()(iterator first, iterator /*last*/) const
+    void plain_char_action::operator()(parse_iterator first, parse_iterator last) const
     {
-        if (actions.suppress) return;
         write_anchors(actions, phrase);
 
-        detail::print_char(*first, phrase.get());
+        while (first != last)
+            detail::print_char(*first++, phrase.get());
     }
 
-    void escape_unicode_action::operator()(iterator first, iterator last) const
+    void escape_unicode_action::operator()(parse_iterator first, parse_iterator last) const
     {
-        if (actions.suppress) return;
         write_anchors(actions, phrase);
 
         while(first != last && *first == '0') ++first;
@@ -755,11 +680,30 @@
         }
     }
 
+    void write_plain_text(std::ostream& out, value const& v)
+    {
+        if (v.is_encoded())
+        {
+            detail::print_string(v.get_encoded(), out);
+        }
+        else {
+            std::string value = v.get_quickbook();
+            for(std::string::const_iterator
+                first = value.begin(), last  = value.end();
+                first != last; ++first)
+            {
+                if (*first == '\\' && ++first == last) break;
+                detail::print_char(*first, out);
+            }
+        }
+    }
+
     void image_action(quickbook::actions& actions, value image)
     {
-        if (actions.suppress) return;
         write_anchors(actions, actions.phrase);
 
+        // Note: attributes are never encoded as boostbook, if they're
+        // encoded, it's just things like escapes.
         typedef std::map<std::string, value> attribute_map;
         attribute_map attributes;
 
@@ -774,7 +718,7 @@
             pair.finish();
             if(!attributes.insert(std::make_pair(name.get_quickbook(), value)).second)
             {
-                detail::outwarn(actions.filename, name.get_position().line)
+                detail::outwarn(name.get_file(), name.get_position())
                     << "Duplicate image attribute: "
                     << detail::utf8(name.get_quickbook())
                     << std::endl;
@@ -788,18 +732,23 @@
         // Not using Boost.Filesystem because I want to stay in UTF-8.
         // Need to think about uri encoding.
         
-        std::string fileref = attributes["fileref"].get_quickbook();
+        std::string fileref = attributes["fileref"].is_encoded() ?
+            attributes["fileref"].get_encoded() :
+            attributes["fileref"].get_quickbook();
 
         // Check for windows paths, then convert.
         // A bit crude, but there you go.
 
         if(fileref.find('\\') != std::string::npos)
         {
-            detail::outwarn(actions.filename, attributes["fileref"].get_position().line)
+            (qbk_version_n >= 106u ?
+                detail::outerr(attributes["fileref"].get_file(), attributes["fileref"].get_position()) :
+                detail::outwarn(attributes["fileref"].get_file(), attributes["fileref"].get_position()))
                 << "Image path isn't portable: '"
                 << detail::utf8(fileref)
                 << "'"
                 << std::endl;
+            if (qbk_version_n >= 106u) ++actions.error_count;
         }
 
         boost::replace(fileref, '\\', '/');
@@ -810,7 +759,7 @@
         // Need to think about uri encoding.
 
         std::string::size_type pos;
-        std::string stem,extension;
+        std::string stem, extension;
 
         pos = fileref.rfind('/');
         stem = pos == std::string::npos ?
@@ -826,15 +775,15 @@
 
         // Extract the alt tag, to use as a text description.
         // Or if there isn't one, use the stem of the file name.
-        // TODO: IMO if there isn't an alt tag, then the description should
-        //       be empty or missing.
 
         attribute_map::iterator alt_pos = attributes.find("alt");
-        std::string alt_text = alt_pos != attributes.end() ?
-            alt_pos->second.get_quickbook() : stem;
+        quickbook::value alt_text =
+            alt_pos != attributes.end() ? alt_pos->second :
+            qbk_version_n < 106u ? encoded_value(stem) :
+            quickbook::value();
         attributes.erase("alt");
 
-        if(extension == ".svg")
+        if(extension == "svg")
         {
            //
            // SVG's need special handling:
@@ -848,16 +797,15 @@
            //    fit in a tiny box (IE7).
            //
 
-           attributes.insert(attribute_map::value_type("format", qbk_value("SVG")));
+           attributes.insert(attribute_map::value_type("format",
+                encoded_value("SVG")));
 
            //
            // Image paths are relative to the html subdirectory:
            //
-           // TODO: This seems wrong to me.
-           //
            fs::path img = detail::generic_to_path(fileref);
-           if(img.root_path().empty())
-              img = "html" / img;  // relative path
+           if (!img.has_root_directory())
+              img = quickbook::image_location / img;  // relative path
 
            //
            // Now load the SVG file:
@@ -885,7 +833,7 @@
            if(a != std::string::npos)
            {
               attributes.insert(std::make_pair(
-                "contentwidth", qbk_value(std::string(
+                "contentwidth", encoded_value(std::string(
                     svg_text.begin() + a + 1, svg_text.begin() + b))
                 ));
            }
@@ -896,7 +844,7 @@
            if(a != std::string::npos)
            {
               attributes.insert(std::make_pair(
-                "contentdepth", qbk_value(std::string(
+                "contentdepth", encoded_value(std::string(
                     svg_text.begin() + a + 1, svg_text.begin() + b))
                 ));
            }
@@ -909,16 +857,7 @@
         BOOST_FOREACH(attribute_map::value_type const& attr, attributes)
         {
             actions.phrase << " " << attr.first << "=\"";
-
-            std::string value = attr.second.get_quickbook();
-            for(std::string::const_iterator
-                first = value.begin(), last  = value.end();
-                first != last; ++first)
-            {
-                if (*first == '\\' && ++first == last) break;
-                detail::print_char(*first, actions.phrase.get());
-            }
-
+            write_plain_text(actions.phrase.get(), attr.second);
             actions.phrase << "\"";
         }
 
@@ -926,23 +865,38 @@
 
         // Add a textobject containing the alt tag from earlier.
         // This will be used for the alt tag in html.
-        actions.phrase << "<textobject><phrase>";
-        detail::print_string(alt_text, actions.phrase.get());
-        actions.phrase << "</phrase></textobject>";
+        if (alt_text.check()) {
+            actions.phrase << "<textobject><phrase>";
+            write_plain_text(actions.phrase.get(), alt_text);
+            actions.phrase << "</phrase></textobject>";
+        }
 
         actions.phrase << "</inlinemediaobject>";
     }
 
     void macro_definition_action(quickbook::actions& actions, quickbook::value macro_definition)
     {
-        if(actions.suppress) return;
-
         value_consumer values = macro_definition;
         std::string macro_id = values.consume().get_quickbook();
-        std::string phrase = values.consume().get_boostbook();
+        value phrase_value = values.optional_consume();
+        std::string phrase;
+        if (phrase_value.check()) phrase = phrase_value.get_encoded();
         values.finish();
 
-        actions.copy_macros_for_write();
+        std::string* existing_macro =
+            boost::spirit::classic::find(actions.macro, macro_id.c_str());
+        quickbook::ignore_variable(&existing_macro);
+
+        if (existing_macro)
+        {
+            if (qbk_version_n < 106) return;
+
+            // Do this if you're using spirit's TST.
+            //
+            // *existing_macro = phrase;
+            // return;
+        }
+
         actions.macro.add(
             macro_id.begin()
           , macro_id.end()
@@ -951,8 +905,6 @@
 
     void template_body_action(quickbook::actions& actions, quickbook::value template_definition)
     {
-        if(actions.suppress) return;
-
         value_consumer values = template_definition;
         std::string identifier = values.consume().get_quickbook();
 
@@ -970,11 +922,9 @@
                 identifier,
                 template_values,
                 body,
-                actions.filename,
                 &actions.templates.top_scope())))
         {
-            file_position const pos = body.get_position();
-            detail::outerr(actions.filename, pos.line)
+            detail::outwarn(body.get_file(), body.get_position())
                 << "Template Redefinition: " << detail::utf8(identifier) << std::endl;
             ++actions.error_count;
         }
@@ -982,7 +932,7 @@
 
     namespace
     {
-        iterator find_first_seperator(iterator begin, iterator end)
+        string_iterator find_first_seperator(string_iterator begin, string_iterator end)
         {
             if(qbk_version_n < 105) {
                 for(;begin != end; ++begin)
@@ -1029,9 +979,9 @@
             return begin;
         }
         
-        std::pair<iterator, iterator> find_seperator(iterator begin, iterator end)
+        std::pair<string_iterator, string_iterator> find_seperator(string_iterator begin, string_iterator end)
         {
-            iterator first = begin = find_first_seperator(begin, end);
+            string_iterator first = begin = find_first_seperator(begin, end);
 
             for(;begin != end; ++begin)
             {
@@ -1050,11 +1000,10 @@
             return std::make_pair(first, begin);
         }
     
-        bool break_arguments(
-            std::vector<template_body>& args
+        void break_arguments(
+            std::vector<value>& args
           , std::vector<std::string> const& params
           , fs::path const& filename
-          , file_position const& pos
         )
         {
             // Quickbook 1.4-: If there aren't enough parameters seperated by
@@ -1074,58 +1023,44 @@
                     // recursively until we have all the expected number of
                     // arguments, or if there are no more spaces left.
 
-                    template_body& body = args.back();
-                    iterator begin = body.content.get_quickbook_range().begin();
-                    iterator end = body.content.get_quickbook_range().end();
+                    value last_arg = args.back();
+                    string_iterator begin = last_arg.get_quickbook().begin();
+                    string_iterator end = last_arg.get_quickbook().end();
                     
-                    std::pair<iterator, iterator> pos =
+                    std::pair<string_iterator, string_iterator> pos =
                         find_seperator(begin, end);
                     if (pos.second == end) break;
-                    template_body second(
-                        qbk_value(pos.second, end, template_tags::phrase),
-                        body.filename);
-    
-                    body.content = qbk_value(begin, pos.first,
-                        body.content.get_tag());
-                    args.push_back(second);
+                    value new_arg(
+                        qbk_value(last_arg.get_file(),
+                            pos.second, end, template_tags::phrase));
+
+                    args.back() = qbk_value(last_arg.get_file(),
+                        begin, pos.first, last_arg.get_tag());
+                    args.push_back(new_arg);
                 }
             }
-
-            if (args.size() != params.size())
-            {
-                detail::outerr(filename, pos.line)
-                    << "Invalid number of arguments passed. Expecting: "
-                    << params.size()
-                    << " argument(s), got: "
-                    << args.size()
-                    << " argument(s) instead."
-                    << std::endl;
-                return false;
-            }
-            return true;
         }
 
         std::pair<bool, std::vector<std::string>::const_iterator>
         get_arguments(
-            std::vector<template_body>& args
+            std::vector<value> const& args
           , std::vector<std::string> const& params
           , template_scope const& scope
-          , file_position const& pos
+          , string_iterator first
           , quickbook::actions& actions
         )
         {
-            std::vector<template_body>::const_iterator arg = args.begin();
+            std::vector<value>::const_iterator arg = args.begin();
             std::vector<std::string>::const_iterator tpl = params.begin();
             std::vector<std::string> empty_params;
 
-
             // Store each of the argument passed in as local templates:
             while (arg != args.end())
             {
                 if (!actions.templates.add(
                         template_symbol(*tpl, empty_params, *arg, &scope)))
                 {
-                    detail::outerr(actions.filename, pos.line)
+                    detail::outerr(actions.current_file, first)
                         << "Duplicate Symbol Found" << std::endl;
                     ++actions.error_count;
                     return std::make_pair(false, tpl);
@@ -1136,84 +1071,50 @@
         }
         
         bool parse_template(
-            template_body const& body
-          , bool escape
+            value const& content
           , quickbook::actions& actions
         )
         {
-            // How do we know if we are to parse the template as a block or
-            // a phrase? We apply a simple heuristic: if the body starts with
-            // a newline, then we regard it as a block, otherwise, we parse
-            // it as a phrase.
-            //
-            // Note: this is now done in the grammar.
+            file_ptr saved_current_file = actions.current_file;
 
-            // TODO: For escape, should this be surrounded in escape comments?
-            if (body.type == template_body::raw_output || escape)
-            {
-                //  escape the body of the template
-                //  we just copy out the literal body
-                (body.is_block() ? actions.out : actions.phrase) << body.content.get_quickbook();
-                return true;
-            }
-            else
-            {
-                if (!body.is_block())
-                {
-                    //  do a phrase level parse
-                    actions.filename = body.filename;
-                    iterator first = body.content.get_quickbook_range().begin();
-                    iterator last = body.content.get_quickbook_range().end();
-                    
-                    return cl::parse(first, last, actions.grammar().simple_phrase).full;
-                }
-                else
-                {
-                    //  do a block level parse
-                    //  ensure that we have enough trailing newlines to eliminate
-                    //  the need to check for end of file in the grammar.
-                    
-                    actions.filename = body.filename;
-                    std::string content = body.content.get_quickbook() + "\n\n";
-                    iterator first(content.begin(), body.content.get_position());
-                    iterator last(content.end());
+            actions.current_file = content.get_file();
+            string_ref source = content.get_quickbook();
 
-                    return cl::parse(first, last, actions.grammar().block).full;
-                }
-            }
-        }
-    }
+            parse_iterator first(source.begin());
+            parse_iterator last(source.end());
 
-    void do_template_action(quickbook::actions& actions, value template_list,
-            file_position pos)
-    {
-        if(actions.suppress) return;
+            bool r = cl::parse(first, last,
+                    content.get_tag() == template_tags::block ?
+                        actions.grammar().block :
+                        actions.grammar().inline_phrase
+                ).full;
 
-        // Get the arguments
-        value_consumer values = template_list;
-
-        bool template_escape = values.check(template_tags::escape);
-        if(template_escape) values.consume();
+            boost::swap(actions.current_file, saved_current_file);
 
-        std::string identifier = values.consume(template_tags::identifier).get_quickbook();
+            return r;
+        }
+    }
 
-        std::vector<std::string> callout_ids;
-        std::vector<template_body> args;
+    void call_template(quickbook::actions& actions,
+            template_symbol const* symbol,
+            std::vector<value> const& args,
+            string_iterator first)
+    {
+        // If this template contains already encoded text, then just
+        // write it out, without going through any of the rigamarole.
 
-        BOOST_FOREACH(value arg, values)
+        if (symbol->content.is_encoded())
         {
-            args.push_back(template_body(arg, actions.filename));
-        }
-        
-        values.finish();
+            if (symbol->content.get_tag() == template_tags::block)
+            {
+                actions.paragraph();
+                actions.out << symbol->content.get_encoded();
+            }
+            else
+            {
+                actions.phrase << symbol->content.get_encoded();
+            }
 
-        ++actions.template_depth;
-        if (actions.template_depth > actions.max_template_depth)
-        {
-            detail::outerr(actions.filename, pos.line)
-                << "Infinite loop detected" << std::endl;
-            --actions.template_depth;
-            ++actions.error_count;
             return;
         }
 
@@ -1224,155 +1125,151 @@
         // arguments are expanded.
         template_scope const& call_scope = actions.templates.top_scope();
 
-        template_symbol const* symbol = actions.templates.find(identifier);
-        BOOST_ASSERT(symbol);
-
         std::string block;
         std::string phrase;
 
-        actions.push(); // scope the actions' states
         {
-            // Store the current section level so that we can ensure that
-            // [section] and [endsect] tags in the template are balanced.
-            actions.min_section_level = actions.section_level;
+            template_state state(actions);
+            actions.templates.start_template(symbol);
 
-            // Quickbook 1.4-: When expanding the tempalte continue to use the
-            //                 current scope (the dynamic scope).
-            // Quickbook 1.5+: Use the scope the template was defined in
-            //                 (the static scope).
-            if (qbk_version_n >= 105)
-                actions.templates.set_parent_scope(*symbol->parent);
+            qbk_version_n = symbol->content.get_file()->version();
 
-            ///////////////////////////////////
-            // Initialise the arguments
-            
-            if (!symbol->callouts.check())
+            ++actions.template_depth;
+            if (actions.template_depth > actions.max_template_depth)
             {
-                // Break the arguments for a template
-            
-                if (!break_arguments(args, symbol->params, actions.filename, pos))
-                {
-                    actions.pop(); // restore the actions' states
-                    --actions.template_depth;
-                    ++actions.error_count;
-                    return;
-                }
+                detail::outerr(actions.current_file, first)
+                    << "Infinite loop detected" << std::endl;
+                ++actions.error_count;
+                return;
             }
-            else
-            {
-                if (!args.empty())
-                {
-                    detail::outerr(actions.filename, pos.line)
-                        << "Arguments for code snippet."
-                        <<std::endl;
-                    ++actions.error_count;
 
-                    args.clear();
-                }
-
-                unsigned int size = symbol->params.size();
-                std::string callout_base_id =
-                    fully_qualified_id(actions.doc_id,
-                        actions.qualified_section_id, "c");
-
-                for(unsigned int i = 0; i < size; ++i)
-                {
-                    std::string callout_id1 = actions.ids.add(
-                        callout_base_id, id_generator::numbered);
-                    std::string callout_id2 = actions.ids.add(
-                        callout_base_id, id_generator::numbered);
-
-                    std::string code;
-                    code += "<co id=\"" + callout_id1 + "\" ";
-                    code += "linkends=\"" + callout_id2 + "\" />";
-
-                    // TODO: This isn't a qbk_value...
-                    args.push_back(template_body(
-                        qbk_value(code, pos, template_tags::phrase),
-                        actions.filename, template_body::raw_output));
-                    callout_ids.push_back(callout_id1);
-                    callout_ids.push_back(callout_id2);
-                }
-            }
+            // Store the current section level so that we can ensure that
+            // [section] and [endsect] tags in the template are balanced.
+            actions.min_section_level = actions.ids.section_level();
 
             ///////////////////////////////////
             // Prepare the arguments as local templates
             bool get_arg_result;
             std::vector<std::string>::const_iterator tpl;
             boost::tie(get_arg_result, tpl) =
-                get_arguments(args, symbol->params,
-                    call_scope, pos, actions);
+                get_arguments(args, symbol->params, call_scope, first, actions);
 
             if (!get_arg_result)
             {
-                actions.pop(); // restore the actions' states
-                --actions.template_depth;
                 return;
             }
 
             ///////////////////////////////////
             // parse the template body:
 
-            if (!parse_template(symbol->body, template_escape, actions))
+            if (!parse_template(symbol->content, actions))
             {
-                detail::outerr(actions.filename, pos.line)
+                detail::outerr(actions.current_file, first)
                     << "Expanding "
-                    << (symbol->body.is_block() ? "block" : "phrase")
+                    << (symbol->content.get_tag() == template_tags::block ? "block" : "phrase")
                     << " template: " << detail::utf8(symbol->identifier) << std::endl
                     << std::endl
                     << "------------------begin------------------" << std::endl
-                    << detail::utf8(symbol->body.content.get_quickbook())
+                    << detail::utf8(symbol->content.get_quickbook())
                     << "------------------end--------------------" << std::endl
                     << std::endl;
-                actions.pop(); // restore the actions' states
-                --actions.template_depth;
                 ++actions.error_count;
                 return;
             }
 
-            if (actions.section_level != actions.min_section_level)
+            if (actions.ids.section_level() != actions.min_section_level)
             {
-                detail::outerr(actions.filename, pos.line)
-                    << "Mismatched sections in template " << detail::utf8(identifier) << std::endl;
-                actions.pop(); // restore the actions' states
-                --actions.template_depth;
+                detail::outerr(actions.current_file, first)
+                    << "Mismatched sections in template "
+                    << detail::utf8(symbol->identifier)
+                    << std::endl;
                 ++actions.error_count;
                 return;
             }
+
+            actions.out.swap(block);
+            actions.phrase.swap(phrase);
         }
 
-        actions.out.swap(block);
-        actions.phrase.swap(phrase);
-        actions.pop(); // restore the actions' states
+        if(symbol->content.get_tag() == template_tags::block || !block.empty()) {
+            actions.paragraph(); // For paragraphs before the template call.
+            actions.out << block;
+            actions.phrase << phrase;
+            actions.paragraph();
+        }
+        else {
+            actions.phrase << phrase;
+        }
+    }
 
-        if(!symbol->callouts.empty())
+    void call_code_snippet(quickbook::actions& actions,
+            template_symbol const* symbol,
+            string_iterator first)
+    {
+        value_consumer values = symbol->content;
+        value content = values.consume(template_tags::block);
+        value callouts = values.consume();
+        values.finish();
+
+        std::vector<std::string> callout_ids;
+        std::vector<value> args;
+        unsigned int size = symbol->params.size();
+        std::string callout_base("c");
+
+        for(unsigned int i = 0; i < size; ++i)
+        {
+            std::string callout_id1 = actions.ids.add_id(callout_base, id_category::numbered);
+            std::string callout_id2 = actions.ids.add_id(callout_base, id_category::numbered);
+
+            std::string code;
+            code += "<co id=\"" + callout_id1 + "\" ";
+            code += "linkends=\"" + callout_id2 + "\" />";
+
+            args.push_back(encoded_value(code, template_tags::phrase));
+            callout_ids.push_back(callout_id1);
+            callout_ids.push_back(callout_id2);
+        }
+
+        // Create a fake symbol for call_template
+        template_symbol t(
+            symbol->identifier,
+            symbol->params,
+            content,
+            symbol->lexical_parent);
+        call_template(actions, &t, args, first);
+
+        std::string block;
+
+        if(!callouts.empty())
         {
-            BOOST_ASSERT(phrase.empty());
             block += "<calloutlist>";
             int i = 0;
-            BOOST_FOREACH(value c, symbol->callouts)
+            BOOST_FOREACH(value c, callouts)
             {
                 std::string callout_id1 = callout_ids[i++];
                 std::string callout_id2 = callout_ids[i++];
-
+    
                 std::string callout_value;
-                actions.push();
-                bool r = parse_template(
-                    template_body(c, symbol->body.filename), false, actions);
-                actions.out.swap(callout_value);
-                actions.pop();
-
-                if(!r)
                 {
-                    detail::outerr(symbol->body.filename, c.get_position().line)
-                        << "Expanding callout." << std::endl
-                        << "------------------begin------------------" << std::endl
-                        << detail::utf8(c.get_quickbook())
-                        << std::endl
-                        << "------------------end--------------------" << std::endl
-                        ;
-                    ++actions.error_count;
-                    return;
+                    template_state state(actions);
+                    ++actions.template_depth;
+
+                    bool r = parse_template(c, actions);
+
+                    if(!r)
+                    {
+                        detail::outerr(c.get_file(), c.get_position())
+                            << "Expanding callout." << std::endl
+                            << "------------------begin------------------" << std::endl
+                            << detail::utf8(c.get_quickbook())
+                            << std::endl
+                            << "------------------end--------------------" << std::endl
+                            ;
+                        ++actions.error_count;
+                        return;
+                    }
+    
+                    actions.out.swap(callout_value);
                 }
                 
                 block += "<callout arearefs=\"" + callout_id1 + "\" ";
@@ -1383,45 +1280,151 @@
             block += "</calloutlist>";
         }
 
-        if(symbol->body.is_block() || !block.empty()) {
-            actions.paragraph(); // For paragraphs before the template call.
-            actions.out << block;
-            actions.phrase << phrase;
-            actions.paragraph();
+        actions.out << block;
+    }
+
+    void do_template_action(quickbook::actions& actions, value template_list,
+            string_iterator first)
+    {
+        // Get the arguments
+        value_consumer values = template_list;
+
+        bool template_escape = values.check(template_tags::escape);
+        if(template_escape) values.consume();
+
+        std::string identifier = values.consume(template_tags::identifier).get_quickbook();
+
+        std::vector<value> args;
+
+        BOOST_FOREACH(value arg, values)
+        {
+            args.push_back(arg);
         }
-        else {
-            actions.phrase << phrase;
+        
+        values.finish();
+
+        template_symbol const* symbol = actions.templates.find(identifier);
+        BOOST_ASSERT(symbol);
+
+        // Deal with escaped templates.
+
+        if (template_escape)
+        {
+            if (!args.empty())
+            {
+                detail::outerr(actions.current_file, first)
+                    << "Arguments for escaped template."
+                    <<std::endl;
+                ++actions.error_count;
+            }
+
+            if (symbol->content.is_encoded())
+            {
+                actions.phrase << symbol->content.get_encoded();
+            }
+            else
+            {
+                actions.phrase << symbol->content.get_quickbook();
+
+                /*
+
+                This would surround the escaped template in escape
+                comments to indicate to the post-processor that it
+                isn't quickbook generated markup. But I'm not sure if
+                it would work.
+
+                quickbook::detail::markup escape_markup
+                    = detail::get_markup(phrase_tags::escape);
+
+                actions.phrase
+                    << escape_markup.pre
+                    << symbol->content.get_quickbook()
+                    << escape_markup.post
+                    ;
+                */
+            }
+
+            return;
+        }
+
+        ///////////////////////////////////
+        // Initialise the arguments
+
+        switch(symbol->content.get_tag())
+        {
+        case template_tags::block:
+        case template_tags::phrase:
+            // Break the arguments for a template
+
+            break_arguments(args, symbol->params, actions.current_file->path);
+
+            if (args.size() != symbol->params.size())
+            {
+                detail::outerr(actions.current_file, first)
+                    << "Invalid number of arguments passed. Expecting: "
+                    << symbol->params.size()
+                    << " argument(s), got: "
+                    << args.size()
+                    << " argument(s) instead."
+                    << std::endl;
+
+                ++actions.error_count;
+                return;
+            }
+
+            call_template(actions, symbol, args, first);
+            break;
+
+        case template_tags::snippet:
+
+            if (!args.empty())
+            {
+                detail::outerr(actions.current_file, first)
+                    << "Arguments for code snippet."
+                    <<std::endl;
+                ++actions.error_count;
+
+                args.clear();
+            }
+
+            call_code_snippet(actions, symbol, first);
+            break;
+
+        default:
+            assert(0);
         }
-        --actions.template_depth;
     }
 
     void link_action(quickbook::actions& actions, value link)
     {
-        if (actions.suppress) return;
         write_anchors(actions, actions.phrase);
 
         detail::markup markup = detail::get_markup(link.get_tag());
 
         value_consumer values = link;
-        value dst = values.consume();
+        value dst_value = values.consume();
         value content = values.consume();
         values.finish();
+
+        // Note: dst is never actually encoded as boostbook, which
+        // is why the result is called with 'print_string' later.
+        std::string dst = dst_value.is_encoded() ?
+            dst_value.get_encoded() : dst_value.get_quickbook();
         
         actions.phrase << markup.pre;
-        detail::print_string(dst.get_quickbook(), actions.phrase.get());
+        detail::print_string(dst, actions.phrase.get());
         actions.phrase << "\">";
 
         if (content.empty())
-            detail::print_string(dst.get_quickbook(), actions.phrase.get());
+            detail::print_string(dst, actions.phrase.get());
         else
-            actions.phrase << content.get_boostbook();
+            actions.phrase << content.get_encoded();
 
         actions.phrase << markup.post;
     }
 
     void variable_list_action(quickbook::actions& actions, value variable_list)
     {
-        if(actions.suppress) return;
         write_anchors(actions, actions.out);
 
         value_consumer values = variable_list;
@@ -1438,13 +1441,13 @@
             
             if(entry.check()) {
                 actions.out << "<term>";
-                actions.out << entry.consume().get_boostbook();
+                actions.out << entry.consume().get_encoded();
                 actions.out << "</term>";
             }
             
             if(entry.check()) {
                 actions.out << "<listitem>";
-                BOOST_FOREACH(value phrase, entry) actions.out << phrase.get_boostbook();
+                BOOST_FOREACH(value phrase, entry) actions.out << phrase.get_encoded();
                 actions.out << "</listitem>";
             }
 
@@ -1458,7 +1461,6 @@
 
     void table_action(quickbook::actions& actions, value table)
     {
-        if(actions.suppress) return;
         write_anchors(actions, actions.out);
 
         value_consumer values = table;
@@ -1467,31 +1469,21 @@
         if(values.check(general_tags::element_id))
             element_id = values.consume().get_quickbook();
 
-        std::string title = values.consume(table_tags::title).get_quickbook();
+        value title = values.consume(table_tags::title);
         bool has_title = !title.empty();
         
         std::string table_id;
-        if(qbk_version_n >= 105) {
-            if(!element_id.empty()) {
-                table_id = actions.ids.add(
-                    fully_qualified_id(actions.doc_id,
-                        actions.qualified_section_id, element_id),
-                    id_generator::explicit_id);
-            }
-            else if(has_title) {
-                table_id = actions.ids.add(
-                    fully_qualified_id(actions.doc_id,
-                        actions.qualified_section_id,
-                        detail::make_identifier(title)),
-                    id_generator::generated);
-            }
-        }
-        else if (has_title)
-        {
-            table_id = actions.ids.add(
-                    fully_qualified_id(actions.doc_id,
-                        actions.qualified_section_id, "t"),
-                id_generator::numbered);
+
+        if (!element_id.empty()) {
+            table_id = actions.ids.add_id(element_id, id_category::explicit_id);
+        }
+        else if (has_title) {
+            if (actions.ids.compatibility_version() >= 105) {
+                table_id = actions.ids.add_id(detail::make_identifier(title.get_quickbook()), id_category::generated);
+            }
+            else {
+                table_id = actions.ids.add_id("t", id_category::numbered);
+            }
         }
 
         // Emulating the old behaviour which used the width of the final
@@ -1513,7 +1505,12 @@
                 actions.out << " id=\"" << table_id << "\"";
             actions.out << ">\n";
             actions.out << "<title>";
-            detail::print_string(title, actions.out.get());
+            if (qbk_version_n < 106u) {
+                detail::print_string(title.get_quickbook(), actions.out.get());
+            }
+            else {
+                actions.out << title.get_encoded();
+            }
             actions.out << "</title>";
         }
         else
@@ -1530,7 +1527,7 @@
         {
             actions.out << "<thead>" << "<row>";
             BOOST_FOREACH(value cell, values.consume()) {
-                actions.out << "<entry>" << cell.get_boostbook() << "</entry>";
+                actions.out << "<entry>" << cell.get_encoded() << "</entry>";
             }
             actions.out << "</row>\n" << "</thead>\n";
         }
@@ -1540,7 +1537,7 @@
         BOOST_FOREACH(value row, values) {
             actions.out << "<row>";
             BOOST_FOREACH(value cell, row) {
-                actions.out << "<entry>" << cell.get_boostbook() << "</entry>";
+                actions.out << "<entry>" << cell.get_encoded() << "</entry>";
             }
             actions.out << "</row>\n";
         }
@@ -1562,88 +1559,62 @@
 
     void begin_section_action(quickbook::actions& actions, value begin_section_list)
     {    
-        if(actions.suppress) return;
-
         value_consumer values = begin_section_list;
 
         value element_id = values.optional_consume(general_tags::element_id);
         value content = values.consume();
         values.finish();
 
-        actions.section_id = !element_id.empty() ?
-            element_id.get_quickbook() :
-            detail::make_identifier(content.get_quickbook());
-
-        if (actions.section_level != 0)
-            actions.qualified_section_id += '.';
-        else
-            BOOST_ASSERT(actions.qualified_section_id.empty());
-
-        actions.qualified_section_id += actions.section_id;
-        ++actions.section_level;
-
-        // TODO: This could be awkward if there's a clash, possibly
-        // needs another category, between explicit and generated.
-        std::string full_id = actions.ids.add(
-            qbk_version_n < 103 ?
-                actions.doc_id + "." + actions.section_id :
-                actions.doc_id + "." + actions.qualified_section_id,
+        std::string full_id = actions.ids.begin_section(
+            !element_id.empty() ?
+                element_id.get_quickbook() :
+                detail::make_identifier(content.get_quickbook()),
             !element_id.empty() ?
-                id_generator::explicit_id :
-                id_generator::generated_section);
+                id_category::explicit_section_id :
+                id_category::generated_section);
 
         actions.out << "\n<section id=\"" << full_id << "\">\n";
         actions.out << "<title>";
+
         write_anchors(actions, actions.out);
 
-        if (qbk_version_n < 103) // version 1.2 and below
-        {
-            actions.out << content.get_boostbook();
-        }
-        else // version 1.3 and above
+        if (self_linked_headers && actions.ids.compatibility_version() >= 103)
         {
             actions.out << "<link linkend=\"" << full_id << "\">"
-                << content.get_boostbook()
+                << content.get_encoded()
                 << "</link>"
                 ;
         }
+        else
+        {
+            actions.out << content.get_encoded();
+        }
         
         actions.out << "</title>\n";
     }
 
-    void end_section_action(quickbook::actions& actions, value end_section, file_position pos)
+    void end_section_action(quickbook::actions& actions, value end_section, string_iterator first)
     {
-        if (actions.suppress) return;
         write_anchors(actions, actions.out);
 
-        if (actions.section_level <= actions.min_section_level)
+        if (actions.ids.section_level() <= actions.min_section_level)
         {
-            detail::outerr(actions.filename, pos.line)
+            file_position const pos = actions.current_file->position_of(first);
+
+            detail::outerr(actions.current_file->path, pos.line)
                 << "Mismatched [endsect] near column " << pos.column << ".\n";
             ++actions.error_count;
             
             return;
         }
 
-        --actions.section_level;
         actions.out << "</section>";
-
-        if (actions.section_level == 0)
-        {
-            actions.qualified_section_id.clear();
-        }
-        else
-        {
-            std::string::size_type const n =
-                actions.qualified_section_id.find_last_of('.');
-            actions.qualified_section_id.erase(n, std::string::npos);
-        }
+        actions.ids.end_section();
     }
     
-    void element_id_warning_action::operator()(iterator first, iterator) const
+    void element_id_warning_action::operator()(parse_iterator first, parse_iterator) const
     {
-        file_position const pos = first.get_position();
-        detail::outwarn(actions.filename, pos.line) << "Empty id.\n";        
+        detail::outwarn(actions.current_file, first.base()) << "Empty id.\n";
     }
 
     // Not a general purpose normalization function, just
@@ -1721,54 +1692,56 @@
         return result;
     }
 
-    std::string check_path(value const& path, quickbook::actions& actions)
+    fs::path check_path(value const& path, quickbook::actions& actions)
     {
-        std::string path_text = path.get_quickbook();
+        std::string path_text = path.is_encoded() ? path.get_encoded() :
+            path.get_quickbook();
 
         if(path_text.find('\\') != std::string::npos)
         {
-            detail::outwarn(actions.filename, path.get_position().line)
-                << "Path isn't portable: "
+            (qbk_version_n >= 106u ?
+                detail::outerr(path.get_file(), path.get_position()) :
+                detail::outwarn(path.get_file(), path.get_position()))
+                << "Path isn't portable: '"
                 << detail::utf8(path_text)
+                << "'"
                 << std::endl;
+            if (qbk_version_n >= 106u) ++actions.error_count;
         }
         
         boost::replace(path_text, '\\', '/');
         
-        return path_text;
+        return detail::generic_to_path(path_text);
     }
 
-    fs::path calculate_relative_path(std::string const& name, quickbook::actions& actions)
+    xinclude_path calculate_xinclude_path(value const& p, quickbook::actions& actions)
     {
-        // Given a source file and the current filename, calculate the
-        // path to the source file relative to the output directory.
+        fs::path path = check_path(p, actions);
+        fs::path full_path = path;
 
-        fs::path path = detail::generic_to_path(name);
-        if (path.has_root_directory())
-        {
-            return path;
-        }
-        else
+        // If the path is relative
+        if (!path.has_root_directory())
         {
-            return path_difference(
-                actions.xinclude_base,
-                actions.filename.parent_path() / path);
-                
+            // Resolve the path from the current file
+            full_path = actions.current_file->path.parent_path() / path;
+
+            // Then calculate relative to the current xinclude_base.
+            path = path_difference(actions.xinclude_base, full_path);
         }
+
+        return xinclude_path(full_path, detail::escape_uri(detail::path_to_generic(path)));
     }
 
     void xinclude_action(quickbook::actions& actions, value xinclude)
     {
-        if (actions.suppress) return;
         write_anchors(actions, actions.out);
 
         value_consumer values = xinclude;
-        fs::path path = calculate_relative_path(
-            check_path(values.consume(), actions), actions);
+        xinclude_path x = calculate_xinclude_path(values.consume(), actions);
         values.finish();
 
         actions.out << "\n<xi:include href=\"";
-        detail::print_string(detail::escape_uri(path.generic_string()), actions.out.get());
+        detail::print_string(x.uri, actions.out.get());
         actions.out << "\" />\n";
     }
 
@@ -1783,11 +1756,10 @@
             fs::path filename_relative;
         };
 
-        include_search_return include_search(std::string const & name,
+        include_search_return include_search(fs::path const& path,
                 quickbook::actions const& actions)
         {
-            fs::path current = actions.filename.parent_path();
-            fs::path path = detail::generic_to_path(name);
+            fs::path current = actions.current_file->path.parent_path();
 
             // If the path is relative, try and resolve it.
             if (!path.has_root_directory() && !path.has_root_name())
@@ -1815,131 +1787,166 @@
                 actions.filename_relative.parent_path() / path);
         }
     }
+    
+    void load_quickbook(quickbook::actions& actions,
+            include_search_return const& paths,
+            value::tag_type load_type,
+            value const& include_doc_id = value())
+    {
+        assert(load_type == block_tags::include ||
+            load_type == block_tags::import);
+
+        // Check this before qbk_version_n gets changed by the inner file.
+        bool keep_inner_source_mode = (qbk_version_n < 106);
+        
+        {
+            // When importing, state doesn't scope templates and macros so that
+            // they're added to the existing scope. It might be better to add
+            // them to a new scope then explicitly import them into the
+            // existing scope.
+            //
+            // For old versions of quickbook, templates aren't scoped by the
+            // file.
+            file_state state(actions,
+                load_type == block_tags::import ? file_state::scope_output :
+                qbk_version_n >= 106u ? file_state::scope_callables :
+                file_state::scope_macros);
 
-    void import_action(quickbook::actions& actions, value import)
-    {
-        if (actions.suppress) return;
-        write_anchors(actions, actions.out);
+            actions.current_file = load(paths.filename); // Throws load_error
+            actions.filename_relative = paths.filename_relative;
+            actions.imported = (load_type == block_tags::import);
 
-        value_consumer values = import;
-        include_search_return paths = include_search(
-            check_path(values.consume(), actions), actions);
-        values.finish();
+            // update the __FILENAME__ macro
+            *boost::spirit::classic::find(actions.macro, "__FILENAME__")
+                = detail::path_to_generic(actions.filename_relative);
+        
+            // parse the file
+            quickbook::parse_file(actions, include_doc_id, true);
+
+            // Don't restore source_mode on older versions.
+            if (keep_inner_source_mode) state.source_mode = actions.source_mode;
+        }
+
+        // restore the __FILENAME__ macro
+        *boost::spirit::classic::find(actions.macro, "__FILENAME__")
+            = detail::path_to_generic(actions.filename_relative);
+    }
+
+    void load_source_file(quickbook::actions& actions,
+            include_search_return const& paths,
+            value::tag_type load_type,
+            string_iterator first,
+            value const& include_doc_id = value())
+    {
+        assert(load_type == block_tags::include ||
+            load_type == block_tags::import);
 
         std::string ext = paths.filename.extension().generic_string();
         std::vector<template_symbol> storage;
+        // Throws load_error
         actions.error_count +=
-            load_snippets(paths.filename, storage, ext, actions.doc_id);
+            load_snippets(paths.filename, storage, ext, load_type);
+
+        if (load_type == block_tags::include)
+        {
+            actions.templates.push();
+        }
 
         BOOST_FOREACH(template_symbol& ts, storage)
         {
             std::string tname = ts.identifier;
-            ts.parent = &actions.templates.top_scope();
-            if (!actions.templates.add(ts))
+            if (tname != "!")
             {
-                detail::outerr(ts.body.filename, ts.body.content.get_position().line)
-                    << "Template Redefinition: " << detail::utf8(tname) << std::endl;
-                ++actions.error_count;
+                ts.lexical_parent = &actions.templates.top_scope();
+                if (!actions.templates.add(ts))
+                {
+                    detail::outerr(ts.content.get_file(), ts.content.get_position())
+                        << "Template Redefinition: " << detail::utf8(tname) << std::endl;
+                    ++actions.error_count;
+                }
+            }
+        }
+
+        if (load_type == block_tags::include)
+        {
+            BOOST_FOREACH(template_symbol& ts, storage)
+            {
+                std::string tname = ts.identifier;
+
+                if (tname == "!")
+                {
+                    ts.lexical_parent = &actions.templates.top_scope();
+                    call_code_snippet(actions, &ts, first);
+                }
             }
+
+            actions.templates.pop();
         }
     }
 
-    void include_action(quickbook::actions& actions, value include)
+    void include_action(quickbook::actions& actions, value include, string_iterator first)
     {
-        if (actions.suppress) return;
         write_anchors(actions, actions.out);
 
         value_consumer values = include;
         value include_doc_id = values.optional_consume(general_tags::include_id);
-        include_search_return filein = include_search(
+        include_search_return paths = include_search(
             check_path(values.consume(), actions), actions);
         values.finish();
 
-        std::string doc_type, doc_id;
+        try {
+            if (qbk_version_n >= 106)
+            {
+                if (actions.imported && include.get_tag() == block_tags::include)
+                    return;
 
-        // swap the filenames
-        std::swap(actions.filename, filein.filename);
-        std::swap(actions.filename_relative, filein.filename_relative);
-
-        // save the doc info strings and source mode
-        if(qbk_version_n >= 106) {
-            doc_type = actions.doc_type;
-            doc_id = actions.doc_id;
-        }
-        else {
-            actions.doc_type.swap(doc_type);
-            actions.doc_id.swap(doc_id);
+                std::string ext = paths.filename.extension().generic_string();
+                
+                if (ext == ".qbk" || ext == ".quickbook")
+                {
+                    load_quickbook(actions, paths, include.get_tag(), include_doc_id);
+                }
+                else
+                {
+                    load_source_file(actions, paths, include.get_tag(), first, include_doc_id);
+                }
+            }
+            else
+            {
+                if (include.get_tag() == block_tags::include)
+                {
+                    load_quickbook(actions, paths, include.get_tag(), include_doc_id);
+                }
+                else
+                {
+                    load_source_file(actions, paths, include.get_tag(), first, include_doc_id);
+                }
+            }
         }
-        
-        // save the source mode and version info (only restored for 1.6+)
-        std::string source_mode = actions.source_mode;
-        unsigned qbk_version_n_store = qbk_version_n;
-
-        // scope the macros
-        string_symbols macro = actions.macro;
-        std::size_t macro_change_depth = actions.macro_change_depth;
-        // scope the templates
-        //~ template_symbols templates = actions.templates; $$$ fixme $$$
-
-        // if an id is specified in this include (as in [include:id foo.qbk])
-        // then use it as the doc_id.
-        if (!include_doc_id.empty())
-            actions.doc_id = include_doc_id.get_quickbook();
-
-        // update the __FILENAME__ macro
-        *boost::spirit::classic::find(actions.macro, "__FILENAME__")
-            = detail::path_to_generic(actions.filename_relative);
-
-        // save values
-        actions.values.builder.save();
-
-        // parse the file
-        quickbook::parse_file(actions.filename, actions, true);
-
-        // restore the values
-        actions.values.builder.restore();
-
-        std::swap(actions.filename, filein.filename);
-        std::swap(actions.filename_relative, filein.filename_relative);
-
-        actions.doc_type.swap(doc_type);
-        actions.doc_id.swap(doc_id);
-        
-        if(qbk_version_n >= 106 || qbk_version_n_store >= 106)
-        {
-            actions.source_mode = source_mode;
+        catch (load_error& e) {
+            ++actions.error_count;
 
-            qbk_version_n = qbk_version_n_store;
+            detail::outerr(actions.current_file, first)
+                << "Loading file "
+                << paths.filename
+                << ": "
+                << detail::utf8(e.what())
+                << std::endl;
         }
-
-        // restore the macros
-        actions.macro = macro;
-        actions.macro_change_depth = macro_change_depth;
-        // restore the templates
-        //~ actions.templates = templates; $$$ fixme $$$
     }
 
-    void phrase_to_docinfo_action_impl::operator()(iterator first, iterator last,
-            value::tag_type tag) const
+    bool to_value_scoped_action::start(value::tag_type t)
     {
-        if (actions.suppress) return;
-        write_anchors(actions, actions.phrase);
+        actions.out.push();
+        actions.phrase.push();
+        actions.anchors.swap(saved_anchors);
+        tag = t;
 
-        std::string encoded;
-        actions.phrase.swap(encoded);
-        actions.values.builder.insert(
-            qbk_bbk_value(first, last, encoded, tag));
+        return true;
     }
 
-    void phrase_to_docinfo_action_impl::operator()(iterator first, iterator last) const
-    {
-        return (*this)(first, last, value::default_tag);
-    }
-    
-    void to_value_action::operator()(iterator, iterator) const
+    void to_value_scoped_action::success(parse_iterator first, parse_iterator last)
     {
-        if (actions.suppress) return;
-
         std::string value;
 
         if (!actions.out.str().empty())
@@ -1954,48 +1961,15 @@
             actions.phrase.swap(value);
         }
 
-        actions.values.builder.insert(bbk_value(value, value::default_tag));
+        actions.values.builder.insert(encoded_qbk_value(
+            actions.current_file, first.base(), last.base(), value, tag));
     }
     
-    bool scoped_output_push::start()
-    {
-        actions.out.push();
-        actions.phrase.push();
-        actions.anchors.swap(saved_anchors);
-
-        return true;
-    }
     
-    void scoped_output_push::cleanup()
+    void to_value_scoped_action::cleanup()
     {
         actions.phrase.pop();
         actions.out.pop();
         actions.anchors.swap(saved_anchors);
     }
-
-    bool set_no_eols_scoped::start()
-    {
-        saved_no_eols = actions.no_eols;
-        actions.no_eols = false;
-
-        return true;
-    }
-
-    void set_no_eols_scoped::cleanup()
-    {
-        actions.no_eols = saved_no_eols;
-    }
-
-    bool scoped_context_impl::start(int new_context)
-    {
-        saved_context_ = actions_.context;
-        actions_.context = new_context;
-
-        return true;
-    }
-
-    void scoped_context_impl::cleanup()
-    {
-        actions_.context = saved_context_;
-    }
 }
Modified: branches/release/tools/quickbook/src/actions.hpp
==============================================================================
--- branches/release/tools/quickbook/src/actions.hpp	(original)
+++ branches/release/tools/quickbook/src/actions.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -12,13 +12,13 @@
 
 #include <string>
 #include <vector>
-#include <boost/spirit/include/phoenix1_functions.hpp>
-#include <boost/spirit/include/classic_symbols_fwd.hpp>
 #include "fwd.hpp"
 #include "template_stack.hpp"
 #include "utils.hpp"
 #include "values.hpp"
 #include "scoped.hpp"
+#include "symbols.hpp"
+#include <boost/spirit/include/classic_parser.hpp>
 
 namespace quickbook
 {
@@ -26,18 +26,22 @@
 
     extern unsigned qbk_version_n; // qbk_major_version * 100 + qbk_minor_version
 
-    struct quickbook_range {
-        template <typename Arg>
-        struct result
-        {
-            typedef bool type;
-        };
-        
+    struct quickbook_range : cl::parser<quickbook_range> {
         quickbook_range(unsigned min_, unsigned max_)
             : min_(min_), max_(max_) {}
         
-        bool operator()() const {
-            return qbk_version_n >= min_ && qbk_version_n < max_;
+        template <typename ScannerT>
+        typename cl::parser_result<quickbook_range, ScannerT>::type
+        parse(ScannerT const& scan) const
+        {
+            if (qbk_version_n >= min_ && qbk_version_n < max_)
+            {
+                return scan.empty_match();
+            }
+            else
+            {
+                return scan.no_match();
+            }
         }
 
         unsigned min_, max_;
@@ -51,16 +55,25 @@
         return quickbook_range(0, max_);
     }
 
-    typedef cl::symbols<std::string> string_symbols;
-
+    // Throws load_error
     int load_snippets(fs::path const& file, std::vector<template_symbol>& storage,
-        std::string const& extension, std::string const& doc_id);
+        std::string const& extension, value::tag_type load_type);
 
     std::string syntax_highlight(
-        iterator first, iterator last,
+        parse_iterator first, parse_iterator last,
         actions& escape_actions,
         std::string const& source_mode);        
 
+    struct xinclude_path {
+        xinclude_path(fs::path& path, std::string const& uri) :
+            path(path), uri(uri) {}
+
+        fs::path path;
+        std::string uri;
+    };
+
+    xinclude_path calculate_xinclude_path(value const&, quickbook::actions&);
+
     struct error_message_action
     {
         // Prints an error message to std::cerr
@@ -70,7 +83,7 @@
             , message(m)
         {}
 
-        void operator()(iterator, iterator) const;
+        void operator()(parse_iterator, parse_iterator) const;
 
         quickbook::actions& actions;
         std::string message;
@@ -83,7 +96,7 @@
         error_action(quickbook::actions& actions)
         : actions(actions) {}
 
-        void operator()(iterator first, iterator /*last*/) const;
+        void operator()(parse_iterator first, parse_iterator last) const;
 
         error_message_action operator()(std::string const& message)
         {
@@ -98,7 +111,7 @@
         element_action(quickbook::actions& actions)
             : actions(actions) {}
 
-        void operator()(iterator, iterator) const;
+        void operator()(parse_iterator, parse_iterator) const;
 
         quickbook::actions& actions;
     };
@@ -113,7 +126,33 @@
         : actions(actions) {}
 
         void operator()() const;
-        void operator()(iterator, iterator) const { (*this)(); }
+        void operator()(parse_iterator, parse_iterator) const { (*this)(); }
+
+        quickbook::actions& actions;
+    };
+
+    struct list_item_action
+    {
+        //  implicit paragraphs
+        //  doesn't output the paragraph if it's only whitespace.
+
+        list_item_action(
+            quickbook::actions& actions)
+        : actions(actions) {}
+
+        void operator()() const;
+        void operator()(parse_iterator, parse_iterator) const { (*this)(); }
+
+        quickbook::actions& actions;
+    };
+
+    struct phrase_end_action
+    {
+        phrase_end_action(quickbook::actions& actions) :
+            actions(actions) {}
+
+        void operator()() const;
+        void operator()(parse_iterator, parse_iterator) const { (*this)(); }
 
         quickbook::actions& actions;
     };
@@ -143,57 +182,8 @@
         void cleanup();
 
         quickbook::actions& actions;
-        bool saved_suppress;
-    };
-
-    struct span
-    {
-        // Decorates c++ code fragments
-
-        span(char const* name, collector& out)
-        : name(name), out(out) {}
-
-        void operator()(iterator first, iterator last) const;
-
-        char const* name;
-        collector& out;
-    };
-
-    struct span_start
-    {
-        span_start(char const* name, collector& out)
-        : name(name), out(out) {}
-
-        void operator()(iterator first, iterator last) const;
-
-        char const* name;
-        collector& out;
-    };
-
-    struct span_end
-    {
-        span_end(collector& out)
-        : out(out) {}
-
-        void operator()(iterator first, iterator last) const;
-
-        collector& out;
-    };
-
-    struct unexpected_char
-    {
-        // Handles unexpected chars in c++ syntax
-
-        unexpected_char(
-            collector& out
-          , quickbook::actions& actions)
-        : out(out)
-        , actions(actions) {}
-
-        void operator()(iterator first, iterator last) const;
-
-        collector& out;
-        quickbook::actions& actions;
+        bool saved_conditional;
+        std::vector<std::string> anchors;
     };
 
     extern char const* quickbook_get_date;
@@ -212,46 +202,19 @@
         quickbook::actions& actions;
     };
 
-    struct space
+    struct raw_char_action
     {
         // Prints a space
 
-        space(collector& out)
+        raw_char_action(collector& out)
             : out(out) {}
 
-        void operator()(iterator first, iterator last) const;
         void operator()(char ch) const;
+        void operator()(parse_iterator first, parse_iterator last) const;
 
         collector& out;
     };
 
-    struct pre_escape_back
-    {
-        // Escapes back from code to quickbook (Pre)
-
-        pre_escape_back(actions& escape_actions, std::string& save)
-            : escape_actions(escape_actions), save(save) {}
-
-        void operator()(iterator first, iterator last) const;
-
-        actions& escape_actions;
-        std::string& save;
-    };
-
-    struct post_escape_back
-    {
-        // Escapes back from code to quickbook (Post)
-
-        post_escape_back(collector& out, actions& escape_actions, std::string& save)
-            : out(out), escape_actions(escape_actions), save(save) {}
-
-        void operator()(iterator first, iterator last) const;
-
-        collector& out;
-        actions& escape_actions;
-        std::string& save;
-    };
-
     struct plain_char_action
     {
         // Prints a single plain char.
@@ -262,7 +225,7 @@
         , actions(actions) {}
 
         void operator()(char ch) const;
-        void operator()(iterator first, iterator /*last*/) const;
+        void operator()(parse_iterator first, parse_iterator last) const;
 
         collector& phrase;
         quickbook::actions& actions;
@@ -273,7 +236,7 @@
         escape_unicode_action(collector& phrase, quickbook::actions& actions)
         : phrase(phrase)
         , actions(actions) {}
-        void operator()(iterator first, iterator last) const;
+        void operator()(parse_iterator first, parse_iterator last) const;
 
         collector& phrase;
         quickbook::actions& actions;
@@ -281,50 +244,30 @@
 
     struct code_action
     {
+        enum code_type { block, inline_block, inline_ };
+    
         // Does the actual syntax highlighing of code
 
         code_action(
-            collector& out
-          , collector& phrase
+            code_type type
           , quickbook::actions& actions)
-        : out(out)
-        , phrase(phrase)
+        : type(type)
         , actions(actions)
         {
         }
 
-        void operator()(iterator first, iterator last) const;
+        void operator()(parse_iterator first, parse_iterator last) const;
 
-        collector& out;
-        collector& phrase;
-        quickbook::actions& actions;
-    };
-
-    struct inline_code_action
-    {
-        // Does the actual syntax highlighing of code inlined in text
-
-        inline_code_action(
-            collector& out
-          , quickbook::actions& actions)
-        : out(out)
-        , actions(actions)
-        {}
-
-        void operator()(iterator first, iterator last) const;
-
-        collector& out;
+        code_type type;
         quickbook::actions& actions;
     };
 
     struct break_action
     {
-        // Handles line-breaks (DEPRECATED!!!)
-
         break_action(collector& phrase, quickbook::actions& actions)
         : phrase(phrase), actions(actions) {}
 
-        void operator()(iterator f, iterator) const;
+        void operator()(parse_iterator f, parse_iterator) const;
 
         collector& phrase;
         quickbook::actions& actions;
@@ -335,75 +278,27 @@
         element_id_warning_action(quickbook::actions& actions_)
             : actions(actions_) {}
 
-        void operator()(iterator first, iterator last) const;
+        void operator()(parse_iterator first, parse_iterator last) const;
 
         quickbook::actions& actions;
    };
 
-    void pre(collector& out, quickbook::actions& actions, bool ignore_docinfo = false);
-    void post(collector& out, quickbook::actions& actions, bool ignore_docinfo = false);
+    // Returns the doc_type, or an empty string if there isn't one.
+    std::string pre(quickbook::actions& actions, parse_iterator pos, value include_doc_id, bool nested_file);
+    void post(quickbook::actions& actions, std::string const& doc_type);
 
-    struct phrase_to_docinfo_action_impl
+    struct to_value_scoped_action : scoped_action_base
     {
-        template <typename Arg1, typename Arg2, typename Arg3 = void>
-        struct result { typedef void type; };
-    
-        phrase_to_docinfo_action_impl(quickbook::actions& actions)
+        to_value_scoped_action(quickbook::actions& actions)
             : actions(actions) {}
 
-        void operator()(iterator first, iterator last) const;
-        void operator()(iterator first, iterator last, value::tag_type) const;
-
-        quickbook::actions& actions;
-    };
-    
-    typedef phoenix::function<phrase_to_docinfo_action_impl> phrase_to_docinfo_action;
-
-    struct to_value_action
-    {
-        to_value_action(quickbook::actions& actions)
-            : actions(actions) {}
-
-        void operator()(iterator first, iterator last) const;
-
-        quickbook::actions& actions;
-    };
-
-    struct scoped_output_push : scoped_action_base
-    {
-        scoped_output_push(quickbook::actions& actions)
-            : actions(actions) {}
-
-        bool start();
+        bool start(value::tag_type = value::default_tag);
+        void success(parse_iterator, parse_iterator);
         void cleanup();
 
         quickbook::actions& actions;
         std::vector<std::string> saved_anchors;
-    };
-
-    struct set_no_eols_scoped : scoped_action_base
-    {
-        set_no_eols_scoped(quickbook::actions& actions)
-            : actions(actions) {}
-
-        bool start();
-        void cleanup();
-
-        quickbook::actions& actions;
-        bool saved_no_eols;
-    };
-    
-    struct scoped_context_impl : scoped_action_base
-    {
-        scoped_context_impl(quickbook::actions& actions)
-            : actions_(actions) {}
-
-        bool start(int);
-        void cleanup();
-
-    private:
-        quickbook::actions& actions_;
-        int saved_context_;
+        value::tag_type tag;
     };
 }
 
Modified: branches/release/tools/quickbook/src/actions_class.cpp
==============================================================================
--- branches/release/tools/quickbook/src/actions_class.cpp	(original)
+++ branches/release/tools/quickbook/src/actions_class.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -9,6 +9,7 @@
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 #include "actions_class.hpp"
+#include "actions_state.hpp"
 #include "quickbook.hpp"
 #include "grammar.hpp"
 #include "input_path.hpp"
@@ -20,60 +21,43 @@
 namespace quickbook
 {
     actions::actions(fs::path const& filein_, fs::path const& xinclude_base_,
-            string_stream& out_, id_generator& ids)
+            string_stream& out_, id_manager& ids)
         : grammar_()
 
-    // header info
-        , doc_type()
-        , doc_title_qbk()
-        , doc_id()
-
-    // main output stream
-        , out(out_)
-
-    // auxilliary streams
-        , phrase()
-
-    // value actions
-        , values()
-        , to_value(*this)
-        , docinfo_value(*this)
-        , scoped_cond_phrase(*this)
-        , scoped_output(*this)
-        , scoped_no_eols(*this)
-        , scoped_context(*this)
-
-    // state
-        , filename(filein_)
-        , filename_relative(filein_.filename())
         , xinclude_base(xinclude_base_)
-        , macro_change_depth(0)
-        , macro()
-        , section_level(0)
-        , min_section_level(0)
-        , section_id()
-        , qualified_section_id()
-        , source_mode("c++")
 
-    // temporary or global state
-        , template_depth(0)
         , templates()
         , error_count(0)
         , anchors()
-        , no_eols(true)
-        , suppress(false)
         , warned_about_breaks(false)
-        , context(0)
+        , conditional(true)
         , ids(ids)
 
-    // actions
+        , imported(false)
+        , macro()
+        , source_mode("c++")
+        , current_file(0)
+        , filename_relative(filein_.filename())
+
+        , template_depth(0)
+        , min_section_level(1)
+
+        , out(out_)
+        , phrase()
+        , values(¤t_file)
+
+        , to_value(*this)
+        , scoped_cond_phrase(*this)
+
         , element(*this)
         , error(*this)
-        , code(out, phrase, *this)
-        , code_block(phrase, phrase, *this)
-        , inline_code(phrase, *this)
+        , code(code_action::block, *this)
+        , code_block(code_action::inline_block, *this)
+        , inline_code(code_action::inline_, *this)
         , paragraph(*this)
-        , space_char(phrase)
+        , list_item(*this)
+        , phrase_end(*this)
+        , raw_char(phrase)
         , plain_char(phrase, *this)
         , escape_unicode(phrase, *this)
 
@@ -95,69 +79,58 @@
             new quickbook_grammar(*this));
         grammar_.swap(g);
     }
-    
-    void actions::push()
-    {
-        state_stack.push(
-            boost::make_tuple(
-                filename
-              , xinclude_base
-              , macro_change_depth
-              , section_level
-              , min_section_level
-              , section_id
-              , qualified_section_id
-              , source_mode
-            )
-        );
-
-        out.push();
-        phrase.push();
-        templates.push();
-        values.builder.save();
+
+    quickbook_grammar& actions::grammar() const {
+        return *grammar_;
     }
-    
-    // Pushing and popping the macro symbol table is pretty expensive, so
-    // instead implement a sort of 'stack on write'. Call this whenever a
-    // change is made to the macro table, and it'll stack the current macros
-    // if necessary. Would probably be better to implement macros in a less
-    // expensive manner.
-    void actions::copy_macros_for_write()
+
+    file_state::file_state(actions& a, scope_flags scope)
+        : a(a)
+        , scope(scope)
+        , qbk_version(qbk_version_n)
+        , imported(a.imported)
+        , current_file(a.current_file)
+        , filename_relative(a.filename_relative)
+        , xinclude_base(a.xinclude_base)
+        , source_mode(a.source_mode)
+        , macro()
     {
-        if(macro_change_depth != state_stack.size())
-        {
-            macro_stack.push(macro);
-            macro_change_depth = state_stack.size();
+        if (scope & scope_macros) macro = a.macro;
+        if (scope & scope_templates) a.templates.push();
+        if (scope & scope_output) {
+            a.out.push();
+            a.phrase.push();
         }
+        a.values.builder.save();
     }
 
-    void actions::pop()
+    file_state::~file_state()
     {
-        if(macro_change_depth == state_stack.size())
-        {
-            macro = macro_stack.top();
-            macro_stack.pop();
+        a.values.builder.restore();
+        boost::swap(qbk_version_n, qbk_version);
+        boost::swap(a.imported, imported);
+        boost::swap(a.current_file, current_file);
+        boost::swap(a.filename_relative, filename_relative);
+        boost::swap(a.xinclude_base, xinclude_base);
+        boost::swap(a.source_mode, source_mode);
+        if (scope & scope_output) {
+            a.out.pop();
+            a.phrase.pop();
         }
-    
-        boost::tie(
-            filename
-          , xinclude_base
-          , macro_change_depth
-          , section_level
-          , min_section_level
-          , section_id
-          , qualified_section_id
-          , source_mode
-        ) = state_stack.top();
-        state_stack.pop();
-
-        out.pop();
-        phrase.pop();
-        templates.pop();
-        values.builder.restore();
+        if (scope & scope_templates) a.templates.pop();
+        if (scope & scope_macros) a.macro = macro;
     }
     
-    quickbook_grammar& actions::grammar() const {
-        return *grammar_;
+    template_state::template_state(actions& a)
+        : file_state(a, file_state::scope_all)
+        , template_depth(a.template_depth)
+        , min_section_level(a.min_section_level)
+    {
+    }
+
+    template_state::~template_state()
+    {
+        boost::swap(a.template_depth, template_depth);
+        boost::swap(a.min_section_level, min_section_level);
     }
 }
Modified: branches/release/tools/quickbook/src/actions_class.hpp
==============================================================================
--- branches/release/tools/quickbook/src/actions_class.hpp	(original)
+++ branches/release/tools/quickbook/src/actions_class.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -10,7 +10,6 @@
 #if !defined(BOOST_SPIRIT_ACTIONS_CLASS_HPP)
 #define BOOST_SPIRIT_ACTIONS_CLASS_HPP
 
-#include <boost/tuple/tuple.hpp>
 #include <boost/scoped_ptr.hpp>
 #include "actions.hpp"
 #include "parsers.hpp"
@@ -25,7 +24,7 @@
     struct actions
     {
         actions(fs::path const& filein_, fs::path const& xinclude_base, string_stream& out_,
-                id_generator&);
+                id_manager&);
 
     private:
         boost::scoped_ptr<quickbook_grammar> grammar_;
@@ -38,90 +37,60 @@
         typedef std::vector<std::string> string_list;
 
         static int const max_template_depth = 100;
-
-    // header info
-        std::string             doc_type;
-        std::string             doc_title_qbk;
-        std::string             doc_id;
-
-    // main output stream
-        collector               out;
-
-    // auxilliary streams
-        collector               phrase;
-
-    // value actions
-        value_parser            values;
-        to_value_action         to_value;
-        phrase_to_docinfo_action docinfo_value;
         
-        scoped_parser<cond_phrase_push>
-                                scoped_cond_phrase;
-        scoped_parser<scoped_output_push>
-                                scoped_output;
-        scoped_parser<set_no_eols_scoped>
-                                scoped_no_eols;
-        scoped_parser<scoped_context_impl>
-                                scoped_context;
+    // global state
+        fs::path                xinclude_base;
+        template_stack          templates;
+        int                     error_count;
+        string_list             anchors;
+        bool                    warned_about_breaks;
+        bool                    conditional;
+        id_manager&             ids;
 
-    // state
-        fs::path                filename;
+    // state saved for files and templates.
+        bool                    imported;
+        string_symbols          macro;
+        std::string             source_mode;
+        file_ptr          current_file;
         fs::path                filename_relative;  // for the __FILENAME__ macro.
                                                     // (relative to the original file
                                                     //  or include path).
-        fs::path                xinclude_base;
-        std::size_t             macro_change_depth;
-        string_symbols          macro;
-        int                     section_level;
-        int                     min_section_level;
-        std::string             section_id;
-        std::string             qualified_section_id;
-        std::string             source_mode;
-
-        typedef boost::tuple<
-            fs::path
-          , fs::path
-          , std::size_t
-          , int
-          , int
-          , std::string
-          , std::string
-          , std::string>
-        state_tuple;
-
-        std::stack<state_tuple> state_stack;
-        // Stack macros separately as copying macros is expensive.
-        std::stack<string_symbols> macro_stack;
 
-    // temporary or global state
+    // state saved for templates.
         int                     template_depth;
-        template_stack          templates;
-        int                     error_count;
-        string_list             anchors;
-        bool                    no_eols;
-        bool                    suppress;
-        bool                    warned_about_breaks;
-        int                     context;
-        id_generator&           ids;
+        int                     min_section_level;
+
+    // output state - scoped by templates and grammar
+        collector               out;            // main output stream
+        collector               phrase;         // phrase output stream
+        value_parser            values;         // parsed values
 
-    // push/pop the states and the streams
-        void copy_macros_for_write();
-        void push();
-        void pop();
         quickbook_grammar& grammar() const;
 
     ///////////////////////////////////////////////////////////////////////////
     // actions
     ///////////////////////////////////////////////////////////////////////////
 
+        void start_list(char mark);
+        void end_list(char mark);
+        void start_list_item();
+        void end_list_item();
+
+        scoped_parser<to_value_scoped_action>
+                                to_value;
+        scoped_parser<cond_phrase_push>
+                                scoped_cond_phrase;
+
         element_action          element;
         error_action            error;
 
         code_action             code;
         code_action             code_block;
-        inline_code_action      inline_code;
+        code_action             inline_code;
         paragraph_action        paragraph;
-        space                   space_char;
+        list_item_action        list_item;
+        phrase_end_action       phrase_end;
+        raw_char_action         raw_char;
         plain_char_action       plain_char;
         escape_unicode_action   escape_unicode;
 
Modified: branches/release/tools/quickbook/src/block_element_grammar.cpp
==============================================================================
--- branches/release/tools/quickbook/src/block_element_grammar.cpp	(original)
+++ branches/release/tools/quickbook/src/block_element_grammar.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -28,10 +28,10 @@
     {
         cl::rule<scanner>
                         heading, inner_block, inner_phrase, def_macro,
-                        table, table_row, variablelist,
+                        table, table_title, table_row, variablelist,
                         varlistentry, varlistterm, list, cell,
                         preformatted, begin_section, end_section,
-                        xinclude, include,
+                        xinclude, include, include_filename,
                         template_, template_id, template_formal_arg,
                         template_body, identifier, import,
                         element_id, element_id_1_5, element_id_1_6,
@@ -45,7 +45,7 @@
 
         local.element_id =
             !(  ':'
-            >>  (   !(cl::eps_p(qbk_since(105u)) >> space)
+            >>  (   !(qbk_since(105u) >> space)
                 >>  (+(cl::alnum_p | '_'))      [actions.values.entry(ph::arg1, ph::arg2, general_tags::element_id)]
                 |   cl::eps_p                   [actions.element_id_warning]
                 )
@@ -53,10 +53,10 @@
             ;
         
         local.element_id_1_5 =
-                !(cl::eps_p(qbk_since(105u)) >> local.element_id);
+                !(qbk_since(105u) >> local.element_id);
 
         local.element_id_1_6 =
-                !(cl::eps_p(qbk_since(106u)) >> local.element_id);
+                !(qbk_since(106u) >> local.element_id);
 
         elements.add
             ("section", element_info(element_info::block, &local.begin_section, block_tags::begin_section))
@@ -102,14 +102,20 @@
             ;
 
         elements.add
+            ("block", element_info(element_info::nested_block, &local.inner_phrase, block_tags::block, 106u))
+            ;
+
+        elements.add
             ("pre", element_info(element_info::nested_block, &local.preformatted, block_tags::preformatted))
             ;
 
         local.preformatted =
-                space
-            >>  !eol
-            >>  actions.scoped_no_eols()
-                [   local.inner_phrase
+                ( qbk_before(106) >> space
+                | qbk_since(106) >> blank >> !eol
+                )
+            >>  actions.to_value()
+                [
+                    inside_preformatted
                 ]
             ;
 
@@ -167,8 +173,7 @@
 
         local.variablelist =
                 (cl::eps_p(*cl::blank_p >> cl::eol_p) | space)
-            >>  (*(cl::anychar_p - eol))        [actions.values.entry(ph::arg1, ph::arg2, table_tags::title)]
-            >>  (+eol)
+            >>  local.table_title
             >>  *local.varlistentry
             ;
 
@@ -209,8 +214,7 @@
                 local.same_line
             >>  local.element_id_1_5
             >>  local.same_line
-            >>  (*(cl::anychar_p - eol))        [actions.values.entry(ph::arg1, ph::arg2, table_tags::title)]
-            >>  (+eol)
+            >>  local.table_title
             >>  *local.table_row
             ;
 
@@ -230,6 +234,18 @@
             )
             ;
 
+        local.table_title =
+                qbk_before(106)
+            >>  (*(cl::anychar_p - eol))        [actions.values.entry(ph::arg1, ph::arg2, table_tags::title)]
+            >>  (+eol)
+            |   qbk_since(106)
+            >>  actions.to_value(table_tags::title)
+                [
+                    table_title_phrase
+                ]
+            >>  space
+            ;
+
         elements.add
             ("ordered_list", element_info(element_info::nested_block, &local.list, block_tags::ordered_list, 106))
             ("itemized_list", element_info(element_info::nested_block, &local.list, block_tags::itemized_list, 106))
@@ -255,12 +271,12 @@
 
         local.xinclude =
                space
-            >> (*(cl::anychar_p - phrase_end))  [actions.values.entry(ph::arg1, ph::arg2)]
+            >> local.include_filename
             ;
 
         local.import =
                space
-            >> (*(cl::anychar_p - phrase_end))  [actions.values.entry(ph::arg1, ph::arg2)]
+            >> local.include_filename
             ;
 
         local.include =
@@ -272,20 +288,32 @@
                                                 [actions.values.entry(ph::arg1, ph::arg2, general_tags::include_id)]
                 >> space
             )
-            >> (*(cl::anychar_p - phrase_end))  [actions.values.entry(ph::arg1, ph::arg2)]
+            >> local.include_filename
+            ;
+
+        local.include_filename =
+                qbk_before(106u)
+            >>  (*(cl::anychar_p - phrase_end)) [actions.values.entry(ph::arg1, ph::arg2)]
+            |   qbk_since(106u)
+            >>  actions.to_value()
+                [   *(  raw_escape
+                    |   (cl::anychar_p - phrase_end)
+                                                [actions.raw_char]
+                    )
+                ]
             ;
 
         local.inner_block =
-            actions.scoped_output()
+            actions.to_value()
             [
-                inside_paragraph                [actions.to_value]
+                inside_paragraph
             ]
             ;
 
         local.inner_phrase =
-            actions.scoped_output()
+            actions.to_value()
             [
-                phrase                          [actions.docinfo_value(ph::arg1, ph::arg2)]
+                paragraph_phrase
             ]
             ;
     }
Modified: branches/release/tools/quickbook/src/block_tags.hpp
==============================================================================
--- branches/release/tools/quickbook/src/block_tags.hpp	(original)
+++ branches/release/tools/quickbook/src/block_tags.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -18,12 +18,12 @@
         (generic_heading)
         (heading1)(heading2)(heading3)(heading4)(heading5)(heading6)
         (blurb)(blockquote)(preformatted)
-        (warning)(caution)(important)(note)(tip)
+        (warning)(caution)(important)(note)(tip)(block)
         (macro_definition)(template_definition)
         (variable_list)(table)
         (xinclude)(import)(include)
         (paragraph)
-        (list)(ordered_list)(itemized_list)
+        (ordered_list)(itemized_list)
         (hr)
     )
 
Modified: branches/release/tools/quickbook/src/code_snippet.cpp
==============================================================================
--- branches/release/tools/quickbook/src/code_snippet.cpp	(original)
+++ branches/release/tools/quickbook/src/code_snippet.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -13,9 +13,12 @@
 #include <boost/shared_ptr.hpp>
 #include <boost/bind.hpp>
 #include <boost/lexical_cast.hpp>
+#include "block_tags.hpp"
 #include "template_stack.hpp"
 #include "actions.hpp"
 #include "values.hpp"
+#include "files.hpp"
+#include "input_path.hpp"
 
 namespace quickbook
 {
@@ -24,24 +27,31 @@
     struct code_snippet_actions
     {
         code_snippet_actions(std::vector<template_symbol>& storage,
-                                 fs::path const& filename,
-                                 std::string const& doc_id,
-                                 char const* source_type)
-            : callout_id(0)
+                                file_ptr source_file,
+                                char const* source_type)
+            : last_code_pos(source_file->source.begin())
+            , in_code(false)
+            , callout_id(0)
+            , snippet_stack()
             , storage(storage)
-            , filename(filename)
-            , doc_id(doc_id)
+            , source_file(source_file)
             , source_type(source_type)
-        {}
+            , error_count(0)
+        {
+            content.start(source_file);
+        }
 
-        void pass_thru_char(char);
-        void pass_thru(iterator first, iterator last);
-        void escaped_comment(iterator first, iterator last);
-        void start_snippet(iterator first, iterator last);
-        void end_snippet(iterator first, iterator last);
-        void callout(iterator first, iterator last);
+        void mark(string_iterator first, string_iterator last);
+        void pass_thru(string_iterator first, string_iterator last);
+        void escaped_comment(string_iterator first, string_iterator last);
+        void start_snippet(string_iterator first, string_iterator last);
+        void start_snippet_impl(std::string const&, string_iterator);
+        void end_snippet(string_iterator first, string_iterator last);
+        void end_snippet_impl(string_iterator);
+        void callout(string_iterator first, string_iterator last);
+        void end_file(string_iterator, string_iterator);
         
-        void append_code();
+        void append_code(string_iterator first, string_iterator last);
         void close_code();
 
         struct snippet_data
@@ -49,26 +59,28 @@
             snippet_data(std::string const& id, int callout_base_id)
                 : id(id)
                 , callout_base_id(callout_base_id)
-                , content()
                 , start_code(false)
-                , end_code(false)
             {}
             
             std::string id;
             int callout_base_id;
-            std::string content;
             bool start_code;
-            bool end_code;
+            std::string::const_iterator source_pos;
+            mapped_file_builder::pos start_pos;
             value_builder callouts;
             boost::shared_ptr<snippet_data> next;
         };
         
-        void push_snippet_data(std::string const& id, int callout_base_id)
+        void push_snippet_data(std::string const& id, int callout_base_id,
+                std::string::const_iterator pos)
         {
             boost::shared_ptr<snippet_data> new_snippet(
                 new snippet_data(id, callout_base_id));
             new_snippet->next = snippet_stack;
             snippet_stack = new_snippet;
+            snippet_stack->start_code = in_code;
+            snippet_stack->source_pos = pos;
+            snippet_stack->start_pos = content.get_pos();
         }
 
         boost::shared_ptr<snippet_data> pop_snippet_data()
@@ -78,15 +90,17 @@
             snippet->next.reset();
             return snippet;
         }
-        
+
+        mapped_file_builder content;
+        std::string::const_iterator mark_begin, mark_end;
+        std::string::const_iterator last_code_pos;
+        bool in_code;
         int callout_id;
         boost::shared_ptr<snippet_data> snippet_stack;
-        std::string code;
-        std::string id;
         std::vector<template_symbol>& storage;
-        fs::path filename;
-        std::string const doc_id;
+        file_ptr source_file;
         char const* const source_type;
+        int error_count;
     };
 
     struct python_code_snippet_grammar
@@ -108,7 +122,8 @@
 
                 actions_type& actions = self.actions;
             
-                start_ = *code_elements;
+                start_ = (*code_elements)           [boost::bind(&actions_type::end_file, &actions, _1, _2)]
+                    ;
 
                 identifier =
                     (cl::alpha_p | '_') >> *(cl::alnum_p | '_')
@@ -117,26 +132,33 @@
                 code_elements =
                         start_snippet               [boost::bind(&actions_type::start_snippet, &actions, _1, _2)]
                     |   end_snippet                 [boost::bind(&actions_type::end_snippet, &actions, _1, _2)]
-                    |   escaped_comment
-                    |   pass_thru_comment
-                    |   ignore
-                    |   cl::anychar_p               [boost::bind(&actions_type::pass_thru_char, &actions, _1)]
+                    |   escaped_comment             [boost::bind(&actions_type::escaped_comment, &actions, _1, _2)]
+                    |   pass_thru_comment           [boost::bind(&actions_type::pass_thru, &actions, _1, _2)]
+                    |   ignore                      [boost::bind(&actions_type::append_code, &actions, _1, _2)]
+                    |   cl::anychar_p
                     ;
 
                 start_snippet =
-                    "#[" >> *cl::space_p
-                    >> identifier                   [cl::assign_a(actions.id)]
+                        *cl::blank_p
+                    >>  !(cl::eol_p >> *cl::blank_p)
+                    >>  "#["
+                    >>  *cl::blank_p
+                    >>  identifier                  [boost::bind(&actions_type::mark, &actions, _1, _2)]
+                    >>  *(cl::anychar_p - cl::eol_p)
                     ;
 
                 end_snippet =
-                    cl::str_p("#]")
+                        *cl::blank_p
+                    >>  !(cl::eol_p >> *cl::blank_p)
+                    >>  "#]"
+                    >>  *(cl::anychar_p - cl::eol_p)
                     ;
 
                 ignore
                     =   cl::confix_p(
                             *cl::blank_p >> "#<-",
                             *cl::anychar_p,
-                            "#->" >> *cl::blank_p >> cl::eol_p
+                            "#->" >> *cl::blank_p >> (cl::eol_p | cl::end_p)
                         )
                     |   cl::confix_p(
                             "\"\"\"<-\"\"\"",
@@ -153,12 +175,12 @@
                 escaped_comment =
                         cl::confix_p(
                             *cl::space_p >> "#`",
-                            (*cl::anychar_p)        [boost::bind(&actions_type::escaped_comment, &actions, _1, _2)],
-                            cl::eol_p
+                            (*cl::anychar_p)        [boost::bind(&actions_type::mark, &actions, _1, _2)],
+                            (cl::eol_p | cl::end_p)
                         )
                     |   cl::confix_p(
                             *cl::space_p >> "\"\"\"`",
-                            (*cl::anychar_p)        [boost::bind(&actions_type::escaped_comment, &actions, _1, _2)],
+                            (*cl::anychar_p)        [boost::bind(&actions_type::mark, &actions, _1, _2)],
                             "\"\"\""
                         )
                     ;
@@ -169,10 +191,10 @@
                     =   "#=" >> (cl::eps_p - '=')
                     >>  (   *(cl::anychar_p - cl::eol_p)
                         >>  (cl::eol_p | cl::end_p)
-                        )                           [boost::bind(&actions_type::pass_thru, &actions, _1, _2)]
+                        )                           [boost::bind(&actions_type::mark, &actions, _1, _2)]
                     |   cl::confix_p(
                             "\"\"\"=" >> (cl::eps_p - '='),
-                            (*cl::anychar_p)        [boost::bind(&actions_type::pass_thru, &actions, _1, _2)],
+                            (*cl::anychar_p)        [boost::bind(&actions_type::mark, &actions, _1, _2)],
                             "\"\"\""
                         )
                     ;
@@ -205,7 +227,8 @@
             {
                 actions_type& actions = self.actions;
             
-                start_ = *code_elements;
+                start_ = (*code_elements)           [boost::bind(&actions_type::end_file, &actions, _1, _2)]
+                    ;
 
                 identifier =
                     (cl::alpha_p | '_') >> *(cl::alnum_p | '_')
@@ -214,31 +237,60 @@
                 code_elements =
                         start_snippet               [boost::bind(&actions_type::start_snippet, &actions, _1, _2)]
                     |   end_snippet                 [boost::bind(&actions_type::end_snippet, &actions, _1, _2)]
-                    |   escaped_comment
-                    |   ignore
-                    |   pass_thru_comment
-                    |   line_callout
-                    |   inline_callout
-                    |   cl::anychar_p               [boost::bind(&actions_type::pass_thru_char, &actions, _1)]
+                    |   escaped_comment             [boost::bind(&actions_type::escaped_comment, &actions, _1, _2)]
+                    |   ignore                      [boost::bind(&actions_type::append_code, &actions, _1, _2)]
+                    |   pass_thru_comment           [boost::bind(&actions_type::pass_thru, &actions, _1, _2)]
+                    |   line_callout                [boost::bind(&actions_type::callout, &actions, _1, _2)]
+                    |   inline_callout              [boost::bind(&actions_type::callout, &actions, _1, _2)]
+                    |   cl::anychar_p
                     ;
 
                 start_snippet =
-                        "//[" >> *cl::space_p
-                        >> identifier               [cl::assign_a(actions.id)]
+                            *cl::blank_p
+                        >>  !(cl::eol_p >> *cl::blank_p)
+                        >>  "//["
+                        >>  *cl::blank_p
+                        >>  identifier              [boost::bind(&actions_type::mark, &actions, _1, _2)]
+                        >>  *(cl::anychar_p - cl::eol_p)
                     |
-                        "/*[" >> *cl::space_p
-                        >> identifier               [cl::assign_a(actions.id)]
-                        >> *cl::space_p >> "*/"
+                            *cl::blank_p
+                        >>  cl::eol_p
+                        >>  *cl::blank_p
+                        >>  "/*["
+                        >>  *cl::space_p
+                        >>  identifier              [boost::bind(&actions_type::mark, &actions, _1, _2)]
+                        >>  *cl::space_p
+                        >>  "*/"
+                        >>  *cl::blank_p
+                        >>  cl::eps_p(cl::eol_p)
+                    |
+                            "/*["
+                        >>  *cl::space_p
+                        >>  identifier              [boost::bind(&actions_type::mark, &actions, _1, _2)]
+                        >>  *cl::space_p
+                        >>  "*/"
                     ;
 
                 end_snippet =
-                    cl::str_p("//]") | "/*]*/"
+                            *cl::blank_p
+                        >>  !(cl::eol_p >> *cl::blank_p)
+                        >>  "//]"
+                        >>  *(cl::anychar_p - cl::eol_p)
+                    |
+                            *cl::blank_p
+                        >>  cl::eol_p
+                        >>  *cl::blank_p
+                        >>  "/*]*/"
+                        >>  *cl::blank_p
+                        >>  cl::eps_p(cl::eol_p)
+                    |
+                            "/*[*/"
                     ;
 
                 inline_callout
                     =   cl::confix_p(
                             "/*<" >> *cl::space_p,
-                            (*cl::anychar_p)        [boost::bind(&actions_type::callout, &actions, _1, _2)],
+                            (*cl::anychar_p)        [boost::bind(&actions_type::mark, &actions, _1, _2)],
                             ">*/"
                         )
                         ;
@@ -246,7 +298,7 @@
                 line_callout
                     =   cl::confix_p(
                             "/*<<" >> *cl::space_p,
-                            (*cl::anychar_p)        [boost::bind(&actions_type::callout, &actions, _1, _2)],
+                            (*cl::anychar_p)        [boost::bind(&actions_type::mark, &actions, _1, _2)],
                             ">>*/"
                         )
                     >>  *cl::space_p
@@ -275,12 +327,12 @@
                 escaped_comment
                     =   cl::confix_p(
                             *cl::space_p >> "//`",
-                            (*cl::anychar_p)        [boost::bind(&actions_type::escaped_comment, &actions, _1, _2)],
-                            cl::eol_p
+                            (*cl::anychar_p)        [boost::bind(&actions_type::mark, &actions, _1, _2)],
+                            (cl::eol_p | cl::end_p)
                         )
                     |   cl::confix_p(
                             *cl::space_p >> "/*`",
-                            (*cl::anychar_p)        [boost::bind(&actions_type::escaped_comment, &actions, _1, _2)],
+                            (*cl::anychar_p)        [boost::bind(&actions_type::mark, &actions, _1, _2)],
                             "*/"
                         )
                     ;
@@ -291,10 +343,10 @@
                     =   "//=" >> (cl::eps_p - '=')
                     >>  (   *(cl::anychar_p - cl::eol_p)
                         >>  (cl::eol_p | cl::end_p)
-                        )                           [boost::bind(&actions_type::pass_thru, &actions, _1, _2)]
+                        )                           [boost::bind(&actions_type::mark, &actions, _1, _2)]
                     |   cl::confix_p(
                             "/*=" >> (cl::eps_p - '='),
-                            (*cl::anychar_p)        [boost::bind(&actions_type::pass_thru, &actions, _1, _2)],
+                            (*cl::anychar_p)        [boost::bind(&actions_type::mark, &actions, _1, _2)],
                             "*/"
                         )
                     ;
@@ -312,134 +364,207 @@
     };
 
     int load_snippets(
-        fs::path const& file
+        fs::path const& filename
       , std::vector<template_symbol>& storage   // snippets are stored in a
                                                 // vector of template_symbols
       , std::string const& extension
-      , std::string const& doc_id)
+      , value::tag_type load_type)
     {
-        std::string code;
-        int err = detail::load(file, code);
-        if (err != 0)
-            return err; // return early on error
-
-        iterator first(code.begin());
-        iterator last(code.end());
+        assert(load_type == block_tags::include ||
+            load_type == block_tags::import);
 
         bool is_python = extension == ".py";
-        code_snippet_actions a(storage, file, doc_id, is_python ? "[python]" : "[c++]");
-        // TODO: Should I check that parse succeeded?
+        code_snippet_actions a(storage, load(filename, qbk_version_n), is_python ? "[python]" : "[c++]");
+
+        string_iterator first(a.source_file->source.begin());
+        string_iterator last(a.source_file->source.end());
+
+        cl::parse_info<string_iterator> info;
+
         if(is_python) {
-            boost::spirit::classic::parse(first, last, python_code_snippet_grammar(a));
+            info = boost::spirit::classic::parse(first, last, python_code_snippet_grammar(a));
         }
         else {
-            boost::spirit::classic::parse(first, last, cpp_code_snippet_grammar(a));
+            info = boost::spirit::classic::parse(first, last, cpp_code_snippet_grammar(a));
         }
 
-        return 0;
+        assert(info.full);
+        return a.error_count;
     }
 
-    void code_snippet_actions::append_code()
+    void code_snippet_actions::append_code(string_iterator first, string_iterator last)
     {
-        if(!snippet_stack) return;
-        snippet_data& snippet = *snippet_stack;
-    
-        if (!code.empty())
-        {
-            detail::unindent(code); // remove all indents
+        assert(last_code_pos <= first);
 
-            if(snippet.content.empty())
-            {
-                snippet.start_code = true;
-            }
-            else if(!snippet.end_code)
-            {
-                snippet.content += "\n\n";
-                snippet.content += source_type;
-                snippet.content += "```\n";
-            }
-            
-            snippet.content += code;
-            snippet.end_code = true;
+        if(snippet_stack) {
+            if (last_code_pos != first) {
+                if (!in_code)
+                {
+                    content.add("\n\n", last_code_pos);
+                    content.add(source_type, last_code_pos);
+                    content.add("```\n", last_code_pos);
+
+                    in_code = true;
+                }
 
-            code.clear();
+                content.add(last_code_pos, first);
+            }
         }
+        
+        last_code_pos = last;
     }
-
+    
     void code_snippet_actions::close_code()
     {
-        if(!snippet_stack) return;
-        snippet_data& snippet = *snippet_stack;
+        if (!snippet_stack) return;
     
-        if(snippet.end_code)
+        if (in_code)
         {
-            snippet.content += "```\n\n";
-            snippet.end_code = false;
+            content.add("\n```\n\n", last_code_pos);
+            in_code = false;
         }
     }
 
-    void code_snippet_actions::pass_thru(iterator first, iterator last)
+    void code_snippet_actions::mark(string_iterator first, string_iterator last)
     {
-        if(!snippet_stack) return;
-        code.append(first, last);
+        mark_begin = first;
+        mark_end = last;
     }
 
-    void code_snippet_actions::pass_thru_char(char c)
+    void code_snippet_actions::pass_thru(string_iterator first, string_iterator last)
     {
         if(!snippet_stack) return;
-        code += c;
+        append_code(first, last);
+
+        if (!in_code)
+        {
+            content.add("\n\n", first);
+            content.add(source_type, first);
+            content.add("```\n", first);
+            in_code = true;
+        }
+
+        content.add(mark_begin, mark_end);
     }
 
-    void code_snippet_actions::callout(iterator first, iterator last)
+    void code_snippet_actions::callout(string_iterator first, string_iterator last)
     {
         if(!snippet_stack) return;
-        code += "``[[callout" + boost::lexical_cast<std::string>(callout_id) + "]]``";
+        append_code(first, last);
+
+        if (!in_code)
+        {
+            content.add("\n\n", first);
+            content.add(source_type, first);
+            content.add("```\n", first);
+            in_code = true;
+        }
+
+        content.add(
+            "``[[callout" + boost::lexical_cast<std::string>(callout_id) + "]]``",
+            first);
     
-        snippet_stack->callouts.insert(qbk_value(first, last, template_tags::block));
+        snippet_stack->callouts.insert(qbk_value(source_file, mark_begin, mark_end, template_tags::block));
         ++callout_id;
     }
 
-    void code_snippet_actions::escaped_comment(iterator first, iterator last)
+    void code_snippet_actions::escaped_comment(string_iterator first, string_iterator last)
     {
-        if(!snippet_stack) return;
-        snippet_data& snippet = *snippet_stack;
-        append_code();
+        append_code(first, last);
         close_code();
 
-        std::string temp(first, last);
-        detail::unindent(temp); // remove all indents
-        if (temp.size() != 0)
+        if (mark_begin != mark_end)
         {
-            snippet.content += "\n" + temp; // add a linebreak to allow block markups
+            if (!snippet_stack)
+            {
+                start_snippet_impl("!", first);
+            }
+    
+            snippet_data& snippet = *snippet_stack;
+
+            content.add("\n", mark_begin);
+            content.unindent_and_add(mark_begin, mark_end);
+
+            if (snippet.id == "!")
+            {
+                end_snippet_impl(last);
+            }
         }
     }
 
-    void code_snippet_actions::start_snippet(iterator, iterator)
+    void code_snippet_actions::start_snippet(string_iterator first, string_iterator last)
     {
-        append_code();
-        push_snippet_data(id, callout_id);
-        id.clear();
+        append_code(first, last);
+        start_snippet_impl(std::string(mark_begin, mark_end), first);
     }
 
-    void code_snippet_actions::end_snippet(iterator first, iterator)
+    void code_snippet_actions::end_snippet(string_iterator first, string_iterator last)
     {
-        // TODO: Error?
-        if(!snippet_stack) return;
+        append_code(first, last);
 
-        append_code();
+        if(!snippet_stack) {
+            if (qbk_version_n >= 106u) {
+                detail::outerr(source_file, first)
+                    << "Mismatched end snippet."
+                    << std::endl;
+                ++error_count;
+            }
+            else {
+                detail::outwarn(source_file, first)
+                    << "Mismatched end snippet."
+                    << std::endl;
+            }
+            return;
+        }
+
+        end_snippet_impl(first);
+    }
+    
+    void code_snippet_actions::end_file(string_iterator, string_iterator pos)
+    {
+        append_code(pos, pos);
+        close_code();
+
+        while (snippet_stack) {
+            if (qbk_version_n >= 106u) {
+                detail::outerr(source_file->path)
+                    << "Unclosed snippet '" << snippet_stack->id << "'"
+                    << std::endl;
+                ++error_count;
+            }
+            else {
+                detail::outwarn(source_file->path)
+                    << "Unclosed snippet '" << snippet_stack->id << "'"
+                    << std::endl;
+            }
+            
+            end_snippet_impl(pos);
+        }
+    }
+
+    void code_snippet_actions::start_snippet_impl(std::string const& id,
+            string_iterator position)
+    {
+        push_snippet_data(id, callout_id, position);
+    }
+
+    void code_snippet_actions::end_snippet_impl(string_iterator position)
+    {
+        assert(snippet_stack);
 
         boost::shared_ptr<snippet_data> snippet = pop_snippet_data();
         value callouts = snippet->callouts.release();
 
-        std::string body;
-        if(snippet->start_code) {
-            body += "\n\n";
-            body += source_type;
-            body += "```\n";
-        }
-        body += snippet->content;
-        if(snippet->end_code) {
-            body += "```\n\n";
+        mapped_file_builder f;
+        f.start(source_file);
+        if (snippet->start_code) {
+            f.add("\n\n", snippet->source_pos);
+            f.add(source_type, snippet->source_pos);
+            f.add("```\n", snippet->source_pos);
+        }
+        f.add(content, snippet->start_pos, content.get_pos());
+        if (in_code) {
+            f.add("\n```\n\n", position);
         }
 
         std::vector<std::string> params;
@@ -449,34 +574,23 @@
             params.push_back("[callout" + boost::lexical_cast<std::string>(snippet->callout_base_id + i) + "]");
             ++i;
         }
-        
-        // TODO: Save position in start_snippet
-        template_symbol symbol(snippet->id, params,
-            qbk_value(body, first.get_position(), template_tags::block),
-            filename);
-        symbol.callouts = callouts;
+
+        file_ptr body = f.release();
+
+        value_builder builder;
+        builder.set_tag(template_tags::snippet);
+        builder.insert(qbk_value(body, body->source.begin(), body->source.end(),
+            template_tags::block));
+        builder.insert(callouts);
+
+        template_symbol symbol(snippet->id, params, builder.release());
         storage.push_back(symbol);
 
-        // Merge the snippet into its parent
+        // Copy the snippet's callouts to its parent
 
         if(snippet_stack)
         {
-            snippet_data& next = *snippet_stack;
-            if(!snippet->content.empty()) {
-                if(!snippet->start_code) {
-                    close_code();
-                }
-                else if(!next.end_code) {
-                    next.content += "\n\n";
-                    next.content += source_type;
-                    next.content += "```\n";
-                }
-                
-                next.content += snippet->content;
-                next.end_code = snippet->end_code;
-            }
-
-            next.callouts.extend(callouts);
+            snippet_stack->callouts.extend(callouts);
         }
     }
 }
Modified: branches/release/tools/quickbook/src/doc_info_actions.cpp
==============================================================================
--- branches/release/tools/quickbook/src/doc_info_actions.cpp	(original)
+++ branches/release/tools/quickbook/src/doc_info_actions.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -12,12 +12,14 @@
 #include <boost/bind.hpp>
 #include <boost/algorithm/string/join.hpp>
 #include <boost/foreach.hpp>
+#include <boost/filesystem/v3/operations.hpp>
 #include "quickbook.hpp"
 #include "utils.hpp"
+#include "files.hpp"
 #include "input_path.hpp"
 #include "actions_class.hpp"
 #include "doc_info_tags.hpp"
-#include "id_generator.hpp"
+#include "id_manager.hpp"
 
 namespace quickbook
 {
@@ -25,10 +27,22 @@
     
     static std::string doc_info_output(value const& p, unsigned version)
     {
-        return (qbk_version_n < version) ? p.get_quickbook() : p.get_boostbook();
+        if (qbk_version_n < version) {
+            std::string value = p.get_quickbook();
+            value.erase(value.find_last_not_of(" \t") + 1);
+            return value;
+        }
+        else {
+            return p.get_encoded();
+        }
     }
 
-    value consume_last(value_consumer& c, value::tag_type tag,
+    // Each docinfo attribute is stored in a value list, these are then stored
+    // in a sorted value list. The following convenience methods extract all the
+    // values for an attribute tag.
+
+    // Expecting at most one attribute, with several values in the list.
+    value consume_list(value_consumer& c, value::tag_type tag,
             std::vector<std::string>* duplicates)
     {
         value p;
@@ -44,10 +58,12 @@
         return p;
     }
 
-    value consume_last_single(value_consumer& c, value::tag_type tag,
+    // Expecting at most one attribute, with a single value, so extract that
+    // immediately.
+    value consume_value_in_list(value_consumer& c, value::tag_type tag,
             std::vector<std::string>* duplicates)
     {
-        value l = consume_last(c, tag, duplicates);
+        value l = consume_list(c, tag, duplicates);
         if(l.empty()) return l;
 
         assert(l.is_list());
@@ -58,7 +74,8 @@
         return p;
     }
 
-    std::vector<value> consume_multiple(value_consumer& c, value::tag_type tag)
+    // Any number of attributes, so stuff them into a vector.
+    std::vector<value> consume_multiple_lists(value_consumer& c, value::tag_type tag)
     {
         std::vector<value> values;
         
@@ -69,50 +86,107 @@
         return values;
     }
 
-    void pre(collector& out, quickbook::actions& actions, bool ignore_docinfo)
+    unsigned get_version(quickbook::actions& actions, bool using_docinfo,
+            value version)
+    {
+        unsigned result = 0;
+    
+        if (!version.empty()) {
+            value_consumer version_values(version);
+            bool before_docinfo = version_values.optional_consume(
+                doc_info_tags::before_docinfo).check();
+            int major_verison = version_values.consume().get_int();
+            int minor_verison = version_values.consume().get_int();
+            version_values.finish();
+    
+            if (before_docinfo || using_docinfo) {
+                result = ((unsigned) major_verison * 100) +
+                    (unsigned) minor_verison;
+            
+                if(result < 100 || result > 106)
+                {
+                    detail::outerr(actions.current_file->path)
+                        << "Unknown version: "
+                        << major_verison
+                        << "."
+                        << minor_verison
+                        << std::endl;
+                    ++actions.error_count;
+                }
+            }
+        }
+        
+        return result;
+    }
+
+    std::string pre(quickbook::actions& actions, parse_iterator pos,
+            value include_doc_id, bool nested_file)
     {
         // The doc_info in the file has been parsed. Here's what we'll do
         // *before* anything else.
+        //
+        // If there isn't a doc info block, then values will be empty, so most
+        // of the following code won't actually do anything.
 
         value_consumer values = actions.values.release();
 
         // Skip over invalid attributes
 
         while (values.check(value::default_tag)) values.consume();
-        
-        value qbk_version = values.optional_consume(doc_info_tags::qbk_version);
-        
+
+        bool use_doc_info = false;
+        std::string doc_type;
         value doc_title;
-        if (values.check())
+
+        if (values.check(doc_info_tags::type))
         {
-            actions.doc_type = values.consume(doc_info_tags::type).get_quickbook();
+            doc_type = values.consume(doc_info_tags::type).get_quickbook();
             doc_title = values.consume(doc_info_tags::title);
-            actions.doc_title_qbk = doc_title.get_quickbook();
+            use_doc_info = !nested_file || qbk_version_n >= 106u;
+        }
+        else
+        {
+            if (!nested_file)
+            {
+                detail::outerr(actions.current_file, pos.base())
+                    << "No doc_info block."
+                    << std::endl;
+
+                ++actions.error_count;
+
+                // Create a fake document info block in order to continue.
+                doc_type = "article";
+                doc_title = qbk_value(actions.current_file,
+                    pos.base(), pos.base(),
+                    doc_info_tags::type);
+                use_doc_info = true;
+            }
         }
 
         std::vector<std::string> duplicates;
 
-        value id = consume_last_single(values, doc_info_attributes::id, &duplicates);
-        value dirname = consume_last_single(values, doc_info_attributes::dirname, &duplicates);
-        value last_revision = consume_last_single(values, doc_info_attributes::last_revision, &duplicates);
-        value purpose = consume_last_single(values, doc_info_attributes::purpose, &duplicates);
-        std::vector<value> categories = consume_multiple(values, doc_info_attributes::category);
-        value lang = consume_last_single(values, doc_info_attributes::lang, &duplicates);
-        value version = consume_last_single(values, doc_info_attributes::version, &duplicates);
-        std::vector<value> authors = consume_multiple(values, doc_info_attributes::authors);
-        std::vector<value> copyrights = consume_multiple(values, doc_info_attributes::copyright);
-        value license = consume_last_single(values, doc_info_attributes::license, &duplicates);
-        std::vector<value> biblioids = consume_multiple(values, doc_info_attributes::biblioid);
-        
-        // Skip over source-mode tags (already dealt with)
-
-        while (values.check(doc_info_attributes::source_mode)) values.consume();
+        value qbk_version = consume_list(values, doc_attributes::qbk_version, &duplicates);
+        value compatibility_mode = consume_list(values, doc_attributes::compatibility_mode, &duplicates);
+        consume_multiple_lists(values, doc_attributes::source_mode);
+
+        value id = consume_value_in_list(values, doc_info_attributes::id, &duplicates);
+        value dirname = consume_value_in_list(values, doc_info_attributes::dirname, &duplicates);
+        value last_revision = consume_value_in_list(values, doc_info_attributes::last_revision, &duplicates);
+        value purpose = consume_value_in_list(values, doc_info_attributes::purpose, &duplicates);
+        std::vector<value> categories = consume_multiple_lists(values, doc_info_attributes::category);
+        value lang = consume_value_in_list(values, doc_info_attributes::lang, &duplicates);
+        value version = consume_value_in_list(values, doc_info_attributes::version, &duplicates);
+        std::vector<value> authors = consume_multiple_lists(values, doc_info_attributes::authors);
+        std::vector<value> copyrights = consume_multiple_lists(values, doc_info_attributes::copyright);
+        value license = consume_value_in_list(values, doc_info_attributes::license, &duplicates);
+        std::vector<value> biblioids = consume_multiple_lists(values, doc_info_attributes::biblioid);
+        value xmlbase = consume_value_in_list(values, doc_info_attributes::xmlbase, &duplicates);
 
         values.finish();
 
         if(!duplicates.empty())
         {
-            detail::outwarn(actions.filename,1)
+            detail::outwarn(actions.current_file->path)
                 << (duplicates.size() > 1 ?
                     "Duplicate attributes" : "Duplicate attribute")
                 << ":" << detail::utf8(boost::algorithm::join(duplicates, ", "))
@@ -120,91 +194,92 @@
                 ;
         }
 
-        bool generated_id = false;
+        std::string include_doc_id_, id_;
 
+        if (!include_doc_id.empty())
+            include_doc_id_ = include_doc_id.get_quickbook();
         if (!id.empty())
-            actions.doc_id = id.get_quickbook();
+            id_ = id.get_quickbook();
 
-        if (actions.doc_id.empty())
-        {
-            actions.doc_id = detail::make_identifier(actions.doc_title_qbk);
-            generated_id = true;
-        }
+        // Quickbook version
 
-        if (dirname.empty() && actions.doc_type == "library") {
-            if (!id.empty()) {
-                dirname = id;
-            }
-            else {
-                dirname = qbk_bbk_value(actions.doc_id, doc_info_attributes::dirname);
-            }
-        }
+        unsigned new_version = get_version(actions, use_doc_info, qbk_version);
 
-        if (last_revision.empty())
+        if (new_version != qbk_version_n && new_version == 106)
         {
-            // default value for last-revision is now
-
-            char strdate[64];
-            strftime(
-                strdate, sizeof(strdate),
-                (debug_mode ?
-                    "DEBUG MODE Date: %Y/%m/%d %H:%M:%S $" :
-                    "$" /* prevent CVS substitution */ "Date: %Y/%m/%d %H:%M:%S $"),
-                current_gm_time
-            );
-            last_revision = qbk_bbk_value(strdate, doc_info_attributes::last_revision);
+            detail::outwarn(actions.current_file->path)
+                << "Quickbook 1.6 is still under development and is "
+                "likely to change in the future." << std::endl;
         }
 
-        // if we're ignoring the document info, we're done.
-        if (ignore_docinfo)
-        {
-            return;
+        if (new_version) {
+            qbk_version_n = new_version;
         }
-
-        // Quickbook version
-
-        int qbk_major_version, qbk_minor_version;
-
-        if (qbk_version.empty())
-        {
+        else if (use_doc_info) {
             // hard code quickbook version to v1.1
-            qbk_major_version = 1;
-            qbk_minor_version = 1;
-            detail::outwarn(actions.filename,1)
+            qbk_version_n = 101;
+            detail::outwarn(actions.current_file, pos.base())
                 << "Quickbook version undefined. "
                 "Version 1.1 is assumed" << std::endl;
         }
-        else
-        {
-            value_consumer qbk_version_values(qbk_version);
-            qbk_major_version = qbk_version_values.consume().get_int();
-            qbk_minor_version = qbk_version_values.consume().get_int();
-            qbk_version_values.finish();
+
+        actions.current_file->version(qbk_version_n);
+
+        // Compatibility Version
+
+        unsigned compatibility_version =
+            get_version(actions, use_doc_info, compatibility_mode);
+
+        if (!compatibility_version) {
+            compatibility_version = use_doc_info ?
+                qbk_version_n : actions.ids.compatibility_version();
         }
-        
-        qbk_version_n = ((unsigned) qbk_major_version * 100) +
-            (unsigned) qbk_minor_version;
 
-        if (qbk_version_n == 106)
+        // Start file, finish here if not generating document info.
+
+        if (!use_doc_info)
         {
-            detail::outwarn(actions.filename,1)
-                << "Quickbook 1.6 is still under development and is "
-                "likely to change in the future." << std::endl;
+            actions.ids.start_file(compatibility_version, include_doc_id_, id_,
+                    doc_title);
+            return "";
         }
-        else if(qbk_version_n < 100 || qbk_version_n > 106)
+
+        std::string id_placeholder =
+            actions.ids.start_file_with_docinfo(
+                compatibility_version, include_doc_id_, id_, doc_title);
+
+        // Make sure we really did have a document info block.
+
+        assert(doc_title.check() && !doc_type.empty());
+
+        // Set xmlbase
+
+        std::string xmlbase_value;
+
+        if (!xmlbase.empty())
         {
-            detail::outerr(actions.filename,1)
-                << "Unknown version of quickbook: quickbook "
-                << qbk_major_version
-                << "."
-                << qbk_minor_version
-                << std::endl;
-            ++actions.error_count;
+            xinclude_path x = calculate_xinclude_path(xmlbase, actions);
+
+            if (!fs::is_directory(x.path))
+            {
+                detail::outerr(xmlbase.get_file(), xmlbase.get_position())
+                    << "xmlbase \""
+                    << detail::utf8(xmlbase.get_quickbook())
+                    << "\" isn't a directory."
+                    << std::endl;
+
+                ++actions.error_count;
+            }
+            else
+            {
+                xmlbase_value = x.uri;
+                actions.xinclude_base = x.path;
+            }
         }
 
         // Warn about invalid fields
 
-        if (actions.doc_type != "library")
+        if (doc_type != "library")
         {
             std::vector<std::string> invalid_attributes;
 
@@ -219,10 +294,10 @@
 
             if(!invalid_attributes.empty())
             {
-                detail::outwarn(actions.filename,1)
+                detail::outwarn(actions.current_file->path)
                     << (invalid_attributes.size() > 1 ?
                         "Invalid attributes" : "Invalid attribute")
-                    << " for '" << detail::utf8(actions.doc_type) << " document info': "
+                    << " for '" << detail::utf8(doc_type) << " document info': "
                     << detail::utf8(boost::algorithm::join(invalid_attributes, ", "))
                     << "\n"
                     ;
@@ -231,40 +306,88 @@
 
         // Write out header
 
-        out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
-            << "<!DOCTYPE "
-            << actions.doc_type
-            << " PUBLIC \"-//Boost//DTD BoostBook XML V1.0//EN\"\n"
-            << "     \"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd\">\n"
-            << '<' << actions.doc_type << "\n"
+        if (!nested_file)
+        {
+            actions.out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+                << "<!DOCTYPE "
+                << doc_type
+                << " PUBLIC \"-//Boost//DTD BoostBook XML V1.0//EN\"\n"
+                << "     \"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd\">\n"
+                ;
+        }
+
+        actions.out << '<' << doc_type << "\n"
             << "    id=\""
-            << actions.ids.add(actions.doc_id, generated_id ?
-                id_generator::generated_doc : id_generator::explicit_id)
+            << id_placeholder
             << "\"\n";
-        
+
         if(!lang.empty())
         {
-            out << "    lang=\""
+            actions.out << "    lang=\""
                 << doc_info_output(lang, 106)
                 << "\"\n";
         }
 
-        if(actions.doc_type == "library")
+        if(doc_type == "library" && !doc_title.empty())
+        {
+            actions.out << "    name=\"" << doc_info_output(doc_title, 106) << "\"\n";
+        }
+
+        // Set defaults for dirname + last_revision
+
+        if (!dirname.empty() || doc_type == "library")
+        {
+            actions.out << "    dirname=\"";
+            if (!dirname.empty()) {
+                actions.out << doc_info_output(dirname, 106);
+            }
+            else if (!id_.empty()) {
+                actions.out << id_;
+            }
+            else if (!include_doc_id_.empty()) {
+                actions.out << include_doc_id_;
+            }
+            else if (!doc_title.empty()) {
+                actions.out << detail::make_identifier(doc_title.get_quickbook());
+            }
+            else {
+                actions.out << "library";
+            }
+
+            actions.out << "\"\n";
+        }
+
+        actions.out << "    last-revision=\"";
+        if (!last_revision.empty())
         {
-            out << "    name=\"" << doc_info_output(doc_title, 106) << "\"\n";
+            actions.out << doc_info_output(last_revision, 106);
         }
+        else
+        {
+            // default value for last-revision is now
 
-        if(!dirname.empty())
+            char strdate[64];
+            strftime(
+                strdate, sizeof(strdate),
+                (debug_mode ?
+                    "DEBUG MODE Date: %Y/%m/%d %H:%M:%S $" :
+                    "$" /* prevent CVS substitution */ "Date: %Y/%m/%d %H:%M:%S $"),
+                current_gm_time
+            );
+
+            actions.out << strdate;
+        }
+
+        actions.out << "\" \n";
+
+        if (!xmlbase.empty())
         {
-            out << "    dirname=\""
-                << doc_info_output(dirname, 106)
+            actions.out << "    xml:base=\""
+                << xmlbase_value
                 << "\"\n";
         }
 
-        out << "    last-revision=\""
-            << doc_info_output(last_revision, 106)
-            << "\" \n"
-            << "    xmlns:xi=\"http://www.w3.org/2001/XInclude\">\n";
+        actions.out << "    xmlns:xi=\"http://www.w3.org/2001/XInclude\">\n";
 
         std::ostringstream tmp;
 
@@ -298,7 +421,8 @@
     
                 while(copyright.check(doc_info_tags::copyright_year))
                 {
-                    int year_start = copyright.consume().get_int();
+                    value year_start_value = copyright.consume();
+                    int year_start = year_start_value.get_int();
                     int year_end =
                         copyright.check(doc_info_tags::copyright_year_end) ?
                         copyright.consume().get_int() :
@@ -307,8 +431,7 @@
                     if (year_end < year_start) {
                         ++actions.error_count;
     
-                        detail::outerr(actions.filename,
-                            copyright.begin()->get_position().line)
+                        detail::outerr(actions.current_file, copyright.begin()->get_position())
                             << "Invalid year range: "
                             << year_start
                             << "-"
@@ -333,8 +456,7 @@
         if (!license.empty())
         {
             tmp << "    <legalnotice id=\""
-                << actions.ids.add(actions.doc_id + ".legal",
-                    id_generator::generated)
+                << actions.ids.add_id("legal", id_category::generated)
                 << "\">\n"
                 << "      <para>\n"
                 << "        " << doc_info_output(license, 103) << "\n"
@@ -346,9 +468,9 @@
 
         if (!purpose.empty())
         {
-            tmp << "    <" << actions.doc_type << "purpose>\n"
+            tmp << "    <" << doc_type << "purpose>\n"
                 << "      " << doc_info_output(purpose, 103)
-                << "    </" << actions.doc_type << "purpose>\n"
+                << "    </" << doc_type << "purpose>\n"
                 << "\n"
                 ;
         }
@@ -356,9 +478,9 @@
         BOOST_FOREACH(value_consumer values, categories) {
             value category = values.optional_consume();
             if(!category.empty()) {
-                tmp << "    <" << actions.doc_type << "category name=\"category:"
+                tmp << "    <" << doc_type << "category name=\"category:"
                     << doc_info_output(category, 106)
-                    << "\"></" << actions.doc_type << "category>\n"
+                    << "\"></" << doc_type << "category>\n"
                     << "\n"
                 ;
             }
@@ -380,50 +502,46 @@
             biblioid.finish();
         }
 
-        if(actions.doc_type != "library") {
-            write_document_title(out, doc_title, version);
+        if(doc_type != "library") {
+            write_document_title(actions.out, doc_title, version);
         }
 
         std::string docinfo = tmp.str();
         if(!docinfo.empty())
         {
-            out << "  <" << actions.doc_type << "info>\n"
+            actions.out << "  <" << doc_type << "info>\n"
                 << docinfo
-                << "  </" << actions.doc_type << "info>\n"
+                << "  </" << doc_type << "info>\n"
                 << "\n"
             ;
         }
 
-        if(actions.doc_type == "library") {
-            write_document_title(out, doc_title, version);
+        if(doc_type == "library") {
+            write_document_title(actions.out, doc_title, version);
         }
+
+        return doc_type;
     }
-    
-    void post(collector& out, quickbook::actions& actions, bool ignore_docinfo)
+
+    void post(quickbook::actions& actions, std::string const& doc_type)
     {
-        // if we're ignoring the document info, do nothing.
-        if (ignore_docinfo)
-        {
-            return;
-        } 
+        // We've finished generating our output. Here's what we'll do
+        // *after* everything else.
 
         // Close any open sections.
-        if (actions.section_level != 0) {
-            detail::outwarn(actions.filename)
+        if (!doc_type.empty() && actions.ids.section_level() > 1) {
+            detail::outwarn(actions.current_file->path)
                 << "Missing [endsect] detected at end of file."
                 << std::endl;
 
-            while(actions.section_level > 0) {
-                out << "</section>";
-                --actions.section_level;
+            while(actions.ids.section_level() > 1) {
+                actions.out << "</section>";
+                actions.ids.end_section();
             }
-
-            actions.qualified_section_id.clear();
         }
 
-        // We've finished generating our output. Here's what we'll do
-        // *after* everything else.
-        out << "\n</" << actions.doc_type << ">\n\n";
+        actions.ids.end_file();
+        if (!doc_type.empty()) actions.out << "\n</" << doc_type << ">\n\n";
     }
 
     static void write_document_title(collector& out, value const& title, value const& version)
Modified: branches/release/tools/quickbook/src/doc_info_grammar.cpp
==============================================================================
--- branches/release/tools/quickbook/src/doc_info_grammar.cpp	(original)
+++ branches/release/tools/quickbook/src/doc_info_grammar.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -17,6 +17,7 @@
 #include <boost/spirit/include/classic_chset.hpp>
 #include <boost/spirit/include/classic_numerics.hpp>
 #include <boost/spirit/include/phoenix1_primitives.hpp>
+#include <boost/spirit/include/phoenix1_operators.hpp>
 #include "grammar_impl.hpp"
 #include "actions_class.hpp"
 #include "doc_info_tags.hpp"
@@ -58,7 +59,7 @@
                 : l(l)
             {}
 
-            void operator()(iterator, iterator) const {
+            void operator()(parse_iterator, parse_iterator) const {
                 l.attribute_rule = l.doc_fallback;
                 l.attribute_tag = value::default_tag;
             }
@@ -67,24 +68,28 @@
         };
 
         cl::rule<scanner>
+                        doc_info_block, doc_attribute, doc_info_attribute,
                         doc_title, doc_simple, doc_phrase, doc_fallback,
                         doc_authors, doc_author,
                         doc_copyright, doc_copyright_holder,
-                        doc_source_mode, doc_biblioid,
+                        doc_source_mode, doc_biblioid, doc_compatibility_mode,
                         quickbook_version, char_;
         cl::uint_parser<int, 10, 4, 4> doc_copyright_year;
         cl::symbols<> doc_types;
+        cl::symbols<value::tag_type> doc_info_attributes;
         cl::symbols<value::tag_type> doc_attributes;
         std::map<value::tag_type, cl::rule<scanner>* > attribute_rules;
         value::tag_type attribute_tag;
         cl::rule<scanner> attribute_rule;
         assign_attribute_type assign_attribute;
         fallback_attribute_type fallback_attribute;
-        
+
         doc_info_grammar_local()
             : assign_attribute(*this)
             , fallback_attribute(*this)
         {}
+
+        bool source_mode_unset;
     };
 
     void quickbook_grammar::impl::init_doc_info()
@@ -100,70 +105,122 @@
           , "reference", "set"
         ;
 
+        BOOST_FOREACH(value::tag_type t, doc_attributes::tags()) {
+            local.doc_attributes.add(doc_attributes::name(t), t);
+            local.doc_info_attributes.add(doc_attributes::name(t), t);
+        }
+
         BOOST_FOREACH(value::tag_type t, doc_info_attributes::tags()) {
-            local.doc_attributes.add(doc_info_attributes::name(t), t);
+            local.doc_info_attributes.add(doc_info_attributes::name(t), t);
         }
         
         doc_info_details =
-            space
-            >> '[' >> space
-            >> (local.doc_types >> cl::eps_p)
-                                            [actions.values.reset()]
+                space                       [ph::var(local.source_mode_unset) = true]
+            >>  *(  local.doc_attribute
+                >>  space
+                )
+            >>  !local.doc_info_block
+            ;
+
+        local.doc_info_block =
+                '['
+            >>  space
+            >>  (local.doc_types >> cl::eps_p)
                                             [actions.values.entry(ph::arg1, ph::arg2, doc_info_tags::type)]
-            >> hard_space
-            >>  (  *(~cl::eps_p(cl::ch_p('[') | ']' | cl::eol_p) >> local.char_)
-                )                           [actions.docinfo_value(ph::arg1, ph::arg2, doc_info_tags::title)]
-            >>  !(
-                    space >> '[' >>
-                        local.quickbook_version
-                    >> space >> ']'
+            >>  hard_space
+            >>  actions.to_value(doc_info_tags::title)
+                [  *(   ~cl::eps_p(blank >> (cl::ch_p('[') | ']' | cl::eol_p))
+                    >>  local.char_
+                    )
+                    // Include 'blank' here so that it will be included in
+                    // id generation.
+                    >> blank
+                ]
+            >>  space
+            >>  !(qbk_since(106u) >> cl::eps_p(ph::var(local.source_mode_unset))
+                                            [cl::assign_a(actions.source_mode, "c++")]
                 )
-            >>  *(
-                    space
-                >>  '['
+            >>  (*(  local.doc_info_attribute
                 >>  space
-                >>  (   local.doc_attributes
+                ))                          [actions.values.sort()]
+            >>  (   ']'
+                >>  (+eol | cl::end_p)
+                |   cl::eps_p               [actions.error]
+                )
+            ;
+
+        local.doc_attribute =
+                '['
+            >>  space
+            >>  local.doc_attributes        [local.assign_attribute]
+            >>  hard_space
+            >>  actions.values.list(ph::var(local.attribute_tag))
+                [   cl::eps_p               [actions.values.entry(ph::arg1, ph::arg2, doc_info_tags::before_docinfo)]
+                >>  local.attribute_rule
+                ]
+            >>  space
+            >>  ']'
+            ;
+
+        local.doc_info_attribute =
+                '['
+            >>  space
+            >>  (   local.doc_info_attributes
                                             [local.assign_attribute]
-                    |   (+(cl::alnum_p | '_' | '-'))
+                |   (+(cl::alnum_p | '_' | '-'))
                                             [local.fallback_attribute]
                                             [actions.error("Unrecognized document attribute: '%s'.")]
-                    )
-                >>  hard_space
-                >>  actions.values.list(ph::var(local.attribute_tag))
-                    [local.attribute_rule]
-                >>  space
-                >>  ']'
-                >>  +cl::eol_p
                 )
-            >>  space                       [actions.values.sort()]
+            >>  hard_space
+            >>  actions.values.list(ph::var(local.attribute_tag))
+                [local.attribute_rule]
+            >>  space
             >>  ']'
-            >>  +cl::eol_p
             ;
 
+        local.doc_fallback = actions.to_value() [
+            *(~cl::eps_p(']') >> local.char_)
+        ];
+
+        // Document Attributes
+
         local.quickbook_version =
-            actions.values.list(doc_info_tags::qbk_version)
-            [   "quickbook"
-            >>  hard_space
-            >>  (   cl::uint_p              [actions.values.entry(ph::arg1)]
-                    >> '.' 
-                    >>  uint2_t()           [actions.values.entry(ph::arg1)]
-                )
-            ]
+                cl::uint_p                  [actions.values.entry(ph::arg1)]
+            >>  '.' 
+            >>  uint2_t()                   [actions.values.entry(ph::arg1)]
+            ;
+
+        local.attribute_rules[doc_attributes::qbk_version] = &local.quickbook_version;
+
+        local.doc_compatibility_mode =
+                cl::uint_p                  [actions.values.entry(ph::arg1)]
+            >>  '.'
+            >>  uint2_t()                   [actions.values.entry(ph::arg1)]
             ;
 
-        // TODO: Clear phrase afterwards?
+        local.attribute_rules[doc_attributes::compatibility_mode] = &local.doc_compatibility_mode;
+
+        local.doc_source_mode =
+                (
+                   cl::str_p("c++")
+                |  "python"
+                |  "teletype"
+                )                           [cl::assign_a(actions.source_mode)]
+                                            [ph::var(local.source_mode_unset) = false]
+            ;
 
-        local.doc_fallback = (*(~cl::eps_p(']') >> local.char_));
+        local.attribute_rules[doc_attributes::source_mode] = &local.doc_source_mode;
 
-        // TODO: Restrictions on doc_id and doc_dirname?
+        // Document Info Attributes
 
-        local.doc_simple = (*(~cl::eps_p(']') >> local.char_)) [actions.docinfo_value(ph::arg1, ph::arg2)];
+        local.doc_simple = actions.to_value() [*(~cl::eps_p(']') >> local.char_)];
         local.attribute_rules[doc_info_attributes::version] = &local.doc_simple;
         local.attribute_rules[doc_info_attributes::id] = &local.doc_simple;
         local.attribute_rules[doc_info_attributes::dirname] = &local.doc_simple;
         local.attribute_rules[doc_info_attributes::category] = &local.doc_simple;
         local.attribute_rules[doc_info_attributes::last_revision] = &local.doc_simple;
         local.attribute_rules[doc_info_attributes::lang] = &local.doc_simple;
+        local.attribute_rules[doc_info_attributes::xmlbase] = &local.doc_simple;
 
         local.doc_copyright_holder
             =   *(  ~cl::eps_p
@@ -186,7 +243,7 @@
                 >>  !cl::ch_p(',')
                 >>  space
                 )
-            >>  local.doc_copyright_holder  [actions.docinfo_value(ph::arg1, ph::arg2, doc_info_tags::copyright_name)]
+            >>  actions.to_value(doc_info_tags::copyright_name) [ local.doc_copyright_holder ]
             >>  !cl::ch_p(',')
             >>  space
             )
@@ -194,18 +251,18 @@
 
         local.attribute_rules[doc_info_attributes::copyright] = &local.doc_copyright;
 
-        local.doc_phrase = simple_phrase [actions.docinfo_value(ph::arg1, ph::arg2)];
+        local.doc_phrase = actions.to_value() [ nested_phrase ];
         local.attribute_rules[doc_info_attributes::purpose] = &local.doc_phrase;
         local.attribute_rules[doc_info_attributes::license] = &local.doc_phrase;
 
         local.doc_author =
                 '['
             >>   space
-            >>  (*(~cl::eps_p(',') >> local.char_))
-                                            [actions.docinfo_value(ph::arg1, ph::arg2, doc_info_tags::author_surname)]
+            >>  actions.to_value(doc_info_tags::author_surname)
+                [*(~cl::eps_p(',') >> local.char_)]
             >>  ',' >> space
-            >>  (*(~cl::eps_p(']') >> local.char_))
-                                            [actions.docinfo_value(ph::arg1, ph::arg2, doc_info_tags::author_first)]
+            >>  actions.to_value(doc_info_tags::author_first)
+                [*(~cl::eps_p(']') >> local.char_)]
             >>  ']'
             ;
 
@@ -218,42 +275,15 @@
 
         local.attribute_rules[doc_info_attributes::authors] = &local.doc_authors;
 
-        local.doc_source_mode =
-                (
-                   cl::str_p("c++") 
-                |  "python"
-                |  "teletype"
-                )                           [cl::assign_a(actions.source_mode)]
-            ;
-
-        local.attribute_rules[doc_info_attributes::source_mode] = &local.doc_source_mode;
-
         local.doc_biblioid =
                 (+cl::alnum_p)              [actions.values.entry(ph::arg1, ph::arg2, doc_info_tags::biblioid_class)]
             >>  hard_space
-            >>  (+(~cl::eps_p(']') >> local.char_))
-                                            [actions.docinfo_value(ph::arg1, ph::arg2, doc_info_tags::biblioid_value)]
+            >>  actions.to_value(doc_info_tags::biblioid_value)
+                [+(~cl::eps_p(']') >> local.char_)]
             ;
 
         local.attribute_rules[doc_info_attributes::biblioid] = &local.doc_biblioid;
 
-        local.char_ =
-                cl::str_p("\\n")            [actions.break_]
-            |   "\\ "                       // ignore an escaped space
-            |   '\\' >> cl::punct_p         [actions.plain_char]
-            |   "\\u" >> cl::repeat_p(4)
-                    [cl::chset<>("0-9a-fA-F")]
-                                            [actions.escape_unicode]
-            |   "\\U" >> cl::repeat_p(8)
-                    [cl::chset<>("0-9a-fA-F")]
-                                            [actions.escape_unicode]
-            |   ("'''" >> !eol)
-            >>  actions.values.save()
-                [  (*(cl::anychar_p - "'''"))
-                                            [actions.values.entry(ph::arg1, ph::arg2, phrase_tags::escape)]
-                >>  cl::str_p("'''")        [actions.element]
-                ]
-            |   cl::anychar_p               [actions.plain_char]
-            ;
+        local.char_ = escape | cl::anychar_p[actions.plain_char];
     }
 }
Modified: branches/release/tools/quickbook/src/doc_info_tags.hpp
==============================================================================
--- branches/release/tools/quickbook/src/doc_info_tags.hpp	(original)
+++ branches/release/tools/quickbook/src/doc_info_tags.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -14,7 +14,7 @@
 namespace quickbook
 {
     QUICKBOOK_VALUE_TAGS(doc_info_tags, 0x400,
-        (qbk_version)
+        (before_docinfo)
         (type)
         (title)
         (author_surname)(author_first)
@@ -23,6 +23,12 @@
         (biblioid_class)(biblioid_value)
     )
 
+    QUICKBOOK_VALUE_NAMED_TAGS(doc_attributes, 0x440,
+        ((qbk_version)("quickbook"))
+        ((compatibility_mode)("compatibility-mode"))
+        ((source_mode)("source-mode"))
+    )
+
     QUICKBOOK_VALUE_NAMED_TAGS(doc_info_attributes, 0x450,
         ((id)("id"))
         ((dirname)("dirname"))
@@ -35,7 +41,7 @@
         ((copyright)("copyright"))
         ((license)("license"))
         ((biblioid)("biblioid"))
-        ((source_mode)("source-mode"))
+        ((xmlbase)("xmlbase"))
     )
 }
 
Copied: branches/release/tools/quickbook/src/files.cpp (from r75700, /trunk/tools/quickbook/src/files.cpp)
==============================================================================
--- /trunk/tools/quickbook/src/files.cpp	(original)
+++ branches/release/tools/quickbook/src/files.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -120,6 +120,9 @@
                 std::istream_iterator<char>(),
                 std::back_inserter(source));
 
+            if (in.bad())
+                throw load_error("Error reading input file.");
+
             bool inserted;
 
             boost::tie(pos, inserted) = files.emplace(
Modified: branches/release/tools/quickbook/src/fwd.hpp
==============================================================================
--- branches/release/tools/quickbook/src/fwd.hpp	(original)
+++ branches/release/tools/quickbook/src/fwd.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -12,15 +12,20 @@
 #define BOOST_SPIRIT_FWD_HPP
 
 #include "iterator.hpp"
+#include <boost/intrusive_ptr.hpp>
 
 namespace quickbook
 {
     struct actions;
     struct quickbook_grammar;
     struct collector;
-    struct id_generator;
+    struct id_manager;
+    struct section_info;
+    struct file;
+    typedef boost::intrusive_ptr<file> file_ptr;
 
-    typedef position_iterator<std::string::const_iterator> iterator;
+    typedef std::string::const_iterator string_iterator;
+    typedef lookback_iterator<string_iterator> parse_iterator;
 
     inline void ignore_variable(void const*) {} 
 }
Modified: branches/release/tools/quickbook/src/grammar.cpp
==============================================================================
--- branches/release/tools/quickbook/src/grammar.cpp	(original)
+++ branches/release/tools/quickbook/src/grammar.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -16,10 +16,9 @@
    quickbook_grammar::quickbook_grammar(quickbook::actions& a)
         : impl_(new impl(a))
         , command_line_macro(impl_->command_line, "command_line_macro")
-        , common(impl_->common, "phrase")
-        , simple_phrase(impl_->simple_phrase, "simple_phrase")
+        , inline_phrase(impl_->inline_phrase, "inline_phrase")
+        , phrase(impl_->phrase_start, "phrase")
         , block(impl_->block_start, "block")
-        , block_skip_initial_spaces(impl_->block_skip_initial_spaces, "block")
         , doc_info(impl_->doc_info_details, "doc_info")
     {
     }
Modified: branches/release/tools/quickbook/src/grammar.hpp
==============================================================================
--- branches/release/tools/quickbook/src/grammar.hpp	(original)
+++ branches/release/tools/quickbook/src/grammar.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -21,9 +21,14 @@
     // spirit implementation detail, but since classic is no longer under
     // development, it won't change. And spirit 2 won't require such a hack.
 
-    typedef cl::scanner<iterator, cl::scanner_policies <
+    typedef cl::scanner<parse_iterator, cl::scanner_policies <
         cl::iteration_policy, cl::match_policy, cl::action_policy> > scanner;
 
+    template <typename Scanner>
+    struct Scanner_must_be_the_quickbook_scanner_typedef;
+    template <>
+    struct Scanner_must_be_the_quickbook_scanner_typedef<scanner> {};
+
     struct grammar
         : public cl::grammar<grammar>
     {
@@ -31,14 +36,12 @@
             : start_rule(start_rule) {}
 
         template <typename Scanner>
-        struct definition {
-            // TODO: Statically assert that Scanner == scanner.
-        
+        struct definition :
+            Scanner_must_be_the_quickbook_scanner_typedef<Scanner>
+        {
             definition(grammar const& self) : start_rule(self.start_rule) {}
-            
-            cl::rule<Scanner> const& start() const { return start_rule; }
-
-            cl::rule<Scanner> const& start_rule;
+            cl::rule<scanner> const& start() const { return start_rule; }
+            cl::rule<scanner> const& start_rule;
         };
 
         cl::rule<scanner> const& start_rule;
@@ -54,10 +57,9 @@
 
     public:
         grammar command_line_macro;
-        grammar common;
-        grammar simple_phrase;
+        grammar inline_phrase;
+        grammar phrase;
         grammar block;
-        grammar block_skip_initial_spaces;
         grammar doc_info;
 
         quickbook_grammar(quickbook::actions&);
Modified: branches/release/tools/quickbook/src/grammar_impl.hpp
==============================================================================
--- branches/release/tools/quickbook/src/grammar_impl.hpp	(original)
+++ branches/release/tools/quickbook/src/grammar_impl.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -22,19 +22,23 @@
 
     struct element_info
     {
-        enum context {
-            in_block = 1,
-            in_phrase = 2,
-            in_conditional = 4,
-            in_nested_block = 8
-        };
-
         enum type_enum {
             nothing = 0,
-            block = in_block,
-            conditional_or_block = block | in_conditional,
-            nested_block = conditional_or_block | in_nested_block,
-            phrase = nested_block | in_phrase
+            block = 1,
+            conditional_or_block = 2,
+            nested_block = 4,
+            phrase = 8,
+            maybe_block = 16
+        };
+
+        enum context {
+            in_phrase = phrase | maybe_block,
+            in_nested_block = phrase | maybe_block | nested_block,
+            in_conditional = phrase | maybe_block | nested_block | conditional_or_block,
+            in_block = phrase | maybe_block | nested_block | conditional_or_block | block,
+            only_nested_block = nested_block,
+            only_block = nested_block | conditional_or_block | block,
+            only_contextual_block = maybe_block | nested_block | conditional_or_block | block
         };
 
         element_info()
@@ -60,13 +64,17 @@
 
         // Main Grammar
         cl::rule<scanner> block_start;
-        cl::rule<scanner> block_skip_initial_spaces;
-        cl::rule<scanner> common;
-        cl::rule<scanner> simple_phrase;
-        cl::rule<scanner> phrase;
+        cl::rule<scanner> phrase_start;
+        cl::rule<scanner> nested_phrase;
+        cl::rule<scanner> inline_phrase;
+        cl::rule<scanner> paragraph_phrase;
         cl::rule<scanner> extended_phrase;
+        cl::rule<scanner> table_title_phrase;
+        cl::rule<scanner> inside_preformatted;
         cl::rule<scanner> inside_paragraph;
         cl::rule<scanner> command_line;
+        cl::rule<scanner> escape;
+        cl::rule<scanner> raw_escape;
 
         // Miscellaneous stuff
         cl::rule<scanner> hard_space;
@@ -75,6 +83,7 @@
         cl::rule<scanner> eol;
         cl::rule<scanner> phrase_end;
         cl::rule<scanner> comment;
+        cl::rule<scanner> line_comment;
         cl::rule<scanner> macro_identifier;
 
         // Element Symbols       
Deleted: branches/release/tools/quickbook/src/id_generator.cpp
==============================================================================
--- branches/release/tools/quickbook/src/id_generator.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,455 +0,0 @@
-/*=============================================================================
-    Copyright (c) 2011 Daniel James
-
-    Use, modification and distribution is subject to the Boost Software
-    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-    http://www.boost.org/LICENSE_1_0.txt)
-=============================================================================*/
-
-#include "id_generator.hpp"
-#include "markups.hpp"
-#include "phrase_tags.hpp"
-#include <cctype>
-#include <boost/lexical_cast.hpp>
-#include <algorithm>
-#include <vector>
-
-namespace quickbook
-{
-    // string_ref
-
-    struct string_ref
-    {
-    public:
-        typedef std::string::const_iterator iterator;
-
-    private:
-        iterator begin_, end_;
-
-    public:
-        string_ref() : begin_(), end_() {}
-
-        explicit string_ref(iterator b, iterator e)
-            : begin_(b), end_(e) {}
-
-        explicit string_ref(std::string const& x)
-            : begin_(x.begin()), end_(x.end()) {}
-
-        iterator begin() const { return begin_; }
-        iterator end() const { return end_; }
-        
-        std::size_t size() const
-        {
-            return static_cast<std::size_t>(end_ - begin_);
-        }    
-    };
-
-    bool operator==(string_ref const& x, string_ref const& y);
-    bool operator<(string_ref const& x, string_ref const& y);
-
-    inline bool operator==(string_ref const& x, std::string const& y)
-    {
-        return x == string_ref(y);
-    }
-
-    inline bool operator==(std::string const& x, string_ref const& y)
-    {
-        return string_ref(x) == y;
-    }
-
-    inline bool operator<(string_ref const& x, std::string const& y)
-    {
-        return x < string_ref(y);
-    }
-
-    inline bool operator<(std::string const& x, string_ref const& y)
-    {
-        return string_ref(x) < y;
-    }
-
-    bool operator==(string_ref const& x, string_ref const& y)
-    {
-        return x.size() == y.size() &&
-            std::equal(x.begin(), x.end(), y.begin());
-    }
-
-    bool operator<(string_ref const& x, string_ref const& y)
-    {
-        return std::lexicographical_compare(
-            x.begin(), x.end(), y.begin(), y.end());
-    }
-
-    //
-    // id_generator
-    //
-
-    static const std::size_t max_size = 32;
-
-    namespace
-    {
-        std::string normalize_id(std::string const& id)
-        {
-            std::string result;
-
-            std::string::const_iterator it = id.begin();
-            while (it != id.end()) {
-                if (*it == '_') {
-                    do {
-                        ++it;
-                    } while(it != id.end() && *it == '_');
-
-                    if (it != id.end()) result += '_';
-                }
-                else {
-                    result += *it;
-                    ++it;
-                }
-            }
-            
-            return result;
-        }
-    }
-
-    id_generator::id_generator()
-    {
-    }
-
-    id_generator::~id_generator()
-    {
-    }
-
-    std::string id_generator::add(
-            std::string const& value,
-            id_generator::categories category)
-    {
-        std::string result;
-
-        id_data& data = ids.emplace(boost::unordered::piecewise_construct,
-            boost::make_tuple(value),
-            boost::make_tuple(value, category)).first->second;
-
-        // Doesn't check if explicit ids collide, could probably be a warning.
-        if (category == explicit_id)
-        {
-            data.category = category;
-            data.used = true;
-            result = value;
-        }
-        else
-        {
-            if (category < data.category) data.category = category;
-
-            // '$' can't appear in quickbook ids, so use it indicate a
-            // placeholder id.
-            result = "$" +
-                boost::lexical_cast<std::string>(placeholders.size());
-            placeholders.push_back(placeholder_id(category, &data));
-        }
-
-        return result;
-    }
-
-    string_ref id_generator::get(string_ref value)
-    {
-        // If this isn't a placeholder id. 
-        if (value.size() <= 1 || *value.begin() != '$')
-            return value;
-
-        placeholder_id* placeholder = &placeholders.at(
-            boost::lexical_cast<int>(std::string(
-                value.begin() + 1, value.end())));
-
-        if (placeholder->final_id.empty())
-        {
-            if (placeholder->category < id_generator::numbered &&
-                    !placeholder->data->used &&
-                    placeholder->data->category == placeholder->category)
-            {
-                placeholder->data->used = true;
-                placeholder->final_id = placeholder->data->name;
-            }
-            else
-            {
-                generate_id(placeholder);
-            }
-        }
-
-        return string_ref(placeholder->final_id);
-    }
-
-    void id_generator::generate_id(placeholder_id* placeholder)
-    {
-        id_data* data = placeholder->data;
-
-        if (!data->generation_data)
-        {
-            std::string const& name = data->name;
-
-            std::size_t seperator = name.rfind('.') + 1;
-            data->generation_data.reset(new id_generation_data(
-                std::string(name, 0, seperator),
-                normalize_id(std::string(name, seperator))
-            ));
-
-            try_potential_id(placeholder);
-        }
-
-        while(!try_counted_id(placeholder)) {};
-    }
-
-    bool id_generator::try_potential_id(placeholder_id* placeholder)
-    {
-        placeholder->final_id =
-            placeholder->data->generation_data->parent +
-            placeholder->data->generation_data->base;
-
-        // Be careful here as it's quite likely that final_id is the
-        // same as the original id, so this will just find the original
-        // data.
-        //
-        // Not caring too much about 'category' and 'used', would want to if
-        // still creating ids.
-        std::pair<boost::unordered_map<std::string, id_data>::iterator, bool>
-            insert = ids.emplace(boost::unordered::piecewise_construct,
-                boost::make_tuple(placeholder->final_id),
-                boost::make_tuple(placeholder->final_id,
-                    placeholder->category, true));
-        
-        if (insert.first->second.generation_data)
-        {
-            placeholder->data->generation_data =
-                insert.first->second.generation_data;
-        }
-        else
-        {
-            insert.first->second.generation_data =
-                placeholder->data->generation_data;
-        }
-
-        return insert.second;
-    }
-
-    bool id_generator::try_counted_id(placeholder_id* placeholder)
-    {
-        std::string name =
-            placeholder->data->generation_data->base +
-            (placeholder->data->generation_data->needs_underscore ? "_" : "") +
-            boost::lexical_cast<std::string>(
-                    placeholder->data->generation_data->count);
-
-        if (name.length() > max_size)
-        {
-            std::size_t new_end =
-                placeholder->data->generation_data->base.length() -
-                    (name.length() - max_size);
-
-            while (new_end > 0 &&
-                std::isdigit(placeholder->data->generation_data->base[new_end - 1]))
-                    --new_end;
-
-            placeholder->data->generation_data->base.erase(new_end);
-            placeholder->data->generation_data->new_base_value();
-
-            // Return result of try_potential_id to use the truncated id
-            // without a number.
-            try_potential_id(placeholder);
-            return false;
-        }
-
-        placeholder->final_id =
-            placeholder->data->generation_data->parent + name;
-
-        std::pair<boost::unordered_map<std::string, id_data>::iterator, bool>
-            insert = ids.emplace(boost::unordered::piecewise_construct,
-                boost::make_tuple(placeholder->final_id),
-                boost::make_tuple(placeholder->final_id,
-                    placeholder->category, true));
-
-        ++placeholder->data->generation_data->count;
-
-        return insert.second;
-    }
-
-    void id_generator::id_generation_data::new_base_value() {
-        count = 0;
-        needs_underscore = !base.empty() &&
-            std::isdigit(base[base.length() - 1]);
-    }
-
-    // Very simple xml subset parser which replaces id values.
-    //
-    // I originally tried to integrate this into the post processor
-    // but that proved tricky. Alternatively it could use a proper
-    // xml parser, but I want this to be able to survive badly
-    // marked up escapes.
-
-    struct xml_processor
-    {
-        xml_processor();
-    
-        std::string escape_prefix;
-        std::string escape_postfix;
-        std::string processing_instruction_postfix;
-        std::string comment_postfix;
-        std::string whitespace;
-        std::string tag_end;
-        std::string name_end;
-        std::string attribute_assign;
-        std::vector<std::string> id_attributes;
-        
-        std::string replace(std::string const&, id_generator&);
-    };
-
-    std::string id_generator::replace_placeholders(std::string const& source)
-    {
-        xml_processor processor;
-        return processor.replace(source, *this);
-    }
-
-    namespace
-    {
-        char const* id_attributes_[] =
-        {
-            "id",
-            "linkend",
-            "linkends",
-            "arearefs"
-        };
-    }
-
-    xml_processor::xml_processor()
-        : escape_prefix("<!--quickbook-escape-prefix-->")
-        , escape_postfix("<!--quickbook-escape-postfix-->")
-        , processing_instruction_postfix("?>")
-        , comment_postfix("-->")
-        , whitespace(" \t\n\r")
-        , tag_end(" \t\n\r>")
-        , name_end("= \t\n\r>")
-        , attribute_assign("= \t\n\r")
-    {
-        static int const n_id_attributes = sizeof(id_attributes_)/sizeof(char const*);
-        for (int i = 0; i != n_id_attributes; ++i)
-        {
-            id_attributes.push_back(id_attributes_[i]);
-        }
-
-        std::sort(id_attributes.begin(), id_attributes.end());
-    }
-
-    std::string xml_processor::replace(std::string const& source, id_generator& ids)
-    {
-        std::string result;
-
-        typedef std::string::const_iterator iterator;
-
-        // copied is the point up to which the source has been copied, or
-        // replaced, to result.
-        iterator copied = source.begin();
-
-        iterator end = source.end();
-
-        for(iterator it = copied; it != end; it = std::find(it, end, '<'))
-        {
-            assert(copied <= it && it <= end);        
-
-            if (static_cast<std::size_t>(end - it) > escape_prefix.size() &&
-                    std::equal(escape_prefix.begin(), escape_prefix.end(), it))
-            {
-                it = std::search(it + escape_prefix.size(), end,
-                    escape_postfix.begin(), escape_postfix.end());
-
-                if (it == end) break;
-
-                it += escape_postfix.size();
-                continue;
-            }
-
-            ++it;
-            if (it == end) break;
-
-            switch(*it)
-            {
-            case '?':
-                it = std::search(it, end,
-                    processing_instruction_postfix.begin(),
-                    processing_instruction_postfix.end());
-                break;
-
-            case '!':
-                if (end - it > 3 && it[1] == '-' && it[2] == '-')
-                {
-                    it = std::search(it + 3, end,
-                        comment_postfix. begin(), comment_postfix.end());
-                    if (it != end) it += comment_postfix.size();
-                }
-                else
-                {
-                    it = std::find(it, end, '>');
-                }
-                break;
-
-            default:
-                if ((*it >= 'a' && *it <= 'z') ||
-                        (*it >= 'A' && *it <= 'Z') ||
-                        *it == '_' || *it == ':')
-                {
-                    it = std::find_first_of(
-                        it + 1, end, tag_end.begin(), tag_end.end());
-
-                    for (;;) {
-                        while(it != end &&
-                                std::find(whitespace.begin(),
-                                    whitespace.end(), *it)
-                                != whitespace.end())
-                            ++it;
-                            
-                        iterator name_start = it;
-
-                        it = std::find_first_of(
-                            it, end, name_end.begin(), name_end.end());
-                        
-                        if (it == end || *it == '>') break;
-
-                        string_ref name(name_start, it);
-                        ++it;
-
-                        while (it != end &&
-                                std::find(attribute_assign.begin(),
-                                    attribute_assign.end(), *it)
-                                != attribute_assign.end())
-                            ++it;
-
-                        if (it == end || (*it != '"' && *it != '\'')) break;
-
-                        char delim = *it;
-                        ++it;
-
-                        iterator value_start = it;
-
-                        it = std::find(it, end, delim);
-                        string_ref value(value_start, it);
-                        if (it == end) break;
-                        ++it;
-
-                        if (std::find(id_attributes.begin(), id_attributes.end(),
-                                    name)
-                                != id_attributes.end())
-                        {
-                            result.append(copied, value.begin());
-                            string_ref x = ids.get(value);
-                            result.append(x.begin(), x.end());
-                            copied = value.end();
-                        }
-                    }
-                }
-                else
-                {
-                    it = std::find(it, end, '>');
-                }
-            }
-        }
-        
-        result.append(copied, source.end());
-        return result;
-    }
-}
Deleted: branches/release/tools/quickbook/src/id_generator.hpp
==============================================================================
--- branches/release/tools/quickbook/src/id_generator.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,113 +0,0 @@
-/*=============================================================================
-    Copyright (c) 2011 Daniel James
-
-    Use, modification and distribution is subject to the Boost Software
-    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-    http://www.boost.org/LICENSE_1_0.txt)
-=============================================================================*/
-
-#if !defined(BOOST_QUICKBOOK_ID_GENERATOR_HPP)
-#define BOOST_QUICKBOOK_ID_GENERATOR_HPP
-
-#include "fwd.hpp"
-#include <boost/unordered/unordered_map.hpp>
-#include <boost/shared_ptr.hpp>
-#include <deque>
-#include <string>
-
-namespace quickbook
-{
-    struct string_ref;
-
-    struct id_generator
-    {
-    public:
-
-        enum categories
-        {
-            explicit_id = 0,    // Explicitly given by user
-            generated_doc,      // Generated ids for document.
-            generated_section,  // Generated ids for sections.
-            generated_heading,  // Generated ids for headings.
-            generated,          // Generated ids for other elements.
-            numbered,           // Just used to avoid random docbook ids
-            default_category
-        };
-
-    private:
-
-        struct placeholder_id;
-        struct id_data;
-        struct id_generation_data;
-
-        struct placeholder_id
-        {
-            placeholder_id(id_generator::categories category, id_data* data)
-              : category(category),
-                data(data),
-                final_id() {}
-
-            id_generator::categories category;
-            id_data* data;
-            std::string final_id;
-            
-        };
-
-        struct id_data
-        {
-            id_data(std::string const& name,
-                    id_generator::categories category,
-                    bool used = false)
-              : name(name),
-                category(category),
-                used(used),
-                generation_data() {}
-            
-            std::string name;
-            id_generator::categories category;
-            bool used;
-            boost::shared_ptr<id_generation_data> generation_data;
-        };
-        
-        struct id_generation_data
-        {
-            id_generation_data(std::string const& parent, std::string const& base)
-              : parent(parent),
-                base(base),
-                needs_underscore(false),
-                count(0)
-            {
-                new_base_value();
-            }
-
-            void new_base_value();
-
-            std::string parent;
-            std::string base;
-            bool needs_underscore;
-            int count;
-        };
-
-        boost::unordered_map<std::string, id_data> ids;
-        std::deque<placeholder_id> placeholders;
-
-    public:
-        id_generator();
-        ~id_generator();
-
-        std::string add(std::string const& id, categories priority);
-
-        std::string replace_placeholders(std::string const&);
-        string_ref get(string_ref placeholder);
-
-    private:
-        id_generator(id_generator const&);
-        id_generator& operator=(id_generator const&);
-
-        void generate_id(placeholder_id*);
-        bool try_potential_id(placeholder_id*);
-        bool try_counted_id(placeholder_id*);
-    };
-}
-
-#endif
\ No newline at end of file
Modified: branches/release/tools/quickbook/src/input_path.cpp
==============================================================================
--- branches/release/tools/quickbook/src/input_path.cpp	(original)
+++ branches/release/tools/quickbook/src/input_path.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -10,6 +10,7 @@
 #include <iostream>
 #include "input_path.hpp"
 #include "utils.hpp"
+#include "files.hpp"
 
 #if QUICKBOOK_WIDE_PATHS || QUICKBOOK_WIDE_STREAMS
 #include <boost/scoped_ptr.hpp>
@@ -112,13 +113,13 @@
         if (size < 0)
             throw conversion_error("Error converting cygwin path to windows.");
 
-        // TODO: size is in bytes.
-        boost::scoped_array<wchar_t> result(new wchar_t[size]);
+        boost::scoped_array<char> result(new char[size]);
+        void* ptr = result.get();
 
-        if(cygwin_conv_path(flags, path.c_str(), result.get(), size))
+        if(cygwin_conv_path(flags, path.c_str(), ptr, size))
             throw conversion_error("Error converting cygwin path to windows.");
 
-        return fs::path(result.get());
+        return fs::path(static_cast<wchar_t*>(ptr));
     }
     
     stream_string path_to_stream(fs::path const& path)
@@ -229,6 +230,11 @@
         }
     }
 
+    ostream& outerr(file_ptr const& f, string_iterator pos)
+    {
+        return outerr(f->path, f->position_of(pos).line);
+    }
+
     ostream& outwarn(fs::path const& file, int line)
     {
         if (line >= 0)
@@ -243,4 +249,9 @@
             return error_stream() << path_to_stream(file) << ": warning: ";
         }
     }
+
+    ostream& outwarn(file_ptr const& f, string_iterator pos)
+    {
+        return outwarn(f->path, f->position_of(pos).line);
+    }
 }}
Modified: branches/release/tools/quickbook/src/input_path.hpp
==============================================================================
--- branches/release/tools/quickbook/src/input_path.hpp	(original)
+++ branches/release/tools/quickbook/src/input_path.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -14,6 +14,7 @@
 #include <string>
 #include <stdexcept>
 #include <iostream>
+#include "fwd.hpp"
 
 #if defined(__cygwin__) || defined(__CYGWIN__)
 #   define QUICKBOOK_CYGWIN_PATHS 1
@@ -91,6 +92,8 @@
         ostream& outerr();
         ostream& outerr(fs::path const& file, int line = -1);
         ostream& outwarn(fs::path const& file, int line = -1);
+        ostream& outerr(file_ptr const&, string_iterator);
+        ostream& outwarn(file_ptr const&, string_iterator);
         
         struct utf8_proxy
         {
Modified: branches/release/tools/quickbook/src/iterator.hpp
==============================================================================
--- branches/release/tools/quickbook/src/iterator.hpp	(original)
+++ branches/release/tools/quickbook/src/iterator.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -16,59 +16,30 @@
 
 namespace quickbook
 {
-    struct file_position
-    {
-        file_position() : line(1), column(1) {}
-        file_position(int l, int c) : line(l), column(c) {}
-    
-        int line;
-        int column;
-    };
-    
     template <typename Iterator>
-    struct position_iterator
+    struct lookback_iterator
         : boost::forward_iterator_helper<
-            position_iterator<Iterator>,
+            lookback_iterator<Iterator>,
             typename boost::iterator_value<Iterator>::type,
             typename boost::iterator_difference<Iterator>::type,
             typename boost::iterator_pointer<Iterator>::type,
             typename boost::iterator_reference<Iterator>::type
         >
     {
-        position_iterator() {}
-        explicit position_iterator(Iterator base)
-            : original_(base), base_(base), previous_('\0'), position_() {}
-        explicit position_iterator(Iterator base, file_position const& position)
-            : original_(base), base_(base), previous_('\0'), position_(position) {}
+        lookback_iterator() {}
+        explicit lookback_iterator(Iterator base)
+            : original_(base), base_(base) {}
     
         friend bool operator==(
-            position_iterator const& x,
-            position_iterator const& y)
+            lookback_iterator const& x,
+            lookback_iterator const& y)
         {
             return x.base_ == y.base_;
         }
         
-        position_iterator& operator++()
+        lookback_iterator& operator++()
         {
-            char val = *base_;
-    
-            if (val == '\r') {
-                ++position_.line;
-                position_.column = 1;
-            }
-            else if (val == '\n') {
-                if (previous_ != '\r') {
-                    ++position_.line;
-                    position_.column = 1;
-                }
-            }
-            else {
-                ++position_.column;
-            }
-    
-            previous_ = val;
             ++base_;
-
             return *this;
         }
     
@@ -77,10 +48,6 @@
             return *base_;
         }
         
-        file_position const& get_position() const {
-            return position_;
-        }
-    
         Iterator base() const {
             return base_;
         }
@@ -96,8 +63,6 @@
     private:
         Iterator original_;
         Iterator base_;
-        char previous_;
-        file_position position_;
     };
 }
 
Modified: branches/release/tools/quickbook/src/main_grammar.cpp
==============================================================================
--- branches/release/tools/quickbook/src/main_grammar.cpp	(original)
+++ branches/release/tools/quickbook/src/main_grammar.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -16,6 +16,7 @@
 #include "phrase_tags.hpp"
 #include "parsers.hpp"
 #include "scoped.hpp"
+#include "input_path.hpp"
 #include <boost/spirit/include/classic_core.hpp>
 #include <boost/spirit/include/classic_chset.hpp>
 #include <boost/spirit/include/classic_if.hpp>
@@ -23,26 +24,87 @@
 #include <boost/spirit/include/classic_attribute.hpp>
 #include <boost/spirit/include/classic_lazy.hpp>
 #include <boost/spirit/include/phoenix1_primitives.hpp>
+#include <boost/range/algorithm/find_first_of.hpp>
+#include <boost/range/as_literal.hpp>
+
+#include <iostream>
 
 namespace quickbook
 {
     namespace cl = boost::spirit::classic;
 
+    struct list_stack_item {
+        bool root; // Is this the root of the context
+                   // (e.g. top, template, table cell etc.)
+        unsigned int indent;  // Indent of list marker
+                              // (or paragraph if not in a list)
+        unsigned int indent2; // Indent of paragraph
+        char mark;            // List mark, '\0' if not in a list.
+
+        // Example of inside a list:
+        //
+        //   |indent
+        //   * List item
+        //     |indent2 
+
+        list_stack_item() :
+            root(true), indent(0), indent2(0), mark('\0') {}
+
+        list_stack_item(char mark, unsigned int indent, unsigned int indent2) :
+            root(false), indent(indent), indent2(indent2), mark(mark)
+        {}
+
+    };
+
+    struct block_types {
+        enum values {
+            none, code, list, paragraph
+        };
+    };
+
+    template <typename T>
+    struct member_action
+    {
+        typedef void(T::*member_function)(parse_iterator, parse_iterator);
+
+        T& l;
+        member_function mf;
+
+        member_action(T& l, member_function mf) : l(l), mf(mf) {}
+
+        void operator()(parse_iterator first, parse_iterator last) const {
+            (l.*mf)(first, last);
+        }
+    };
+
     struct main_grammar_local
     {
+        ////////////////////////////////////////////////////////////////////////
+        // Local actions
+
+        void start_blocks_impl(parse_iterator first, parse_iterator last);
+        void end_blocks_impl(parse_iterator first, parse_iterator last);
+        void check_indentation_impl(parse_iterator first, parse_iterator last);
+        void check_code_block_impl(parse_iterator first, parse_iterator last);
+        void plain_block(string_iterator first, string_iterator last);
+        void list_block(string_iterator first, string_iterator mark_pos,
+                string_iterator last);
+        void clear_stack();
+
         struct process_element_impl : scoped_action_base {
             process_element_impl(main_grammar_local& l)
                 : l(l) {}
 
             bool start()
             {
-                if (!(l.info.type & l.actions_.context) ||
+                if (!(l.info.type & l.element.context()) ||
                         qbk_version_n < l.info.qbk_version)
                     return false;
 
                 info_ = l.info;
 
-                if (!(info_.type & element_info::in_phrase))
+                if (info_.type != element_info::phrase &&
+                        info_.type != element_info::maybe_block)
                     l.actions_.paragraph();
 
                 l.actions_.values.builder.reset();
@@ -60,36 +122,51 @@
                 return true;
             }
 
-            void success() { l.element_type = info_.type; }
+            void success(parse_iterator, parse_iterator) { l.element_type = info_.type; }
             void failure() { l.element_type = element_info::nothing; }
 
             main_grammar_local& l;
             element_info info_;
         };
-        
-        struct is_block_type
+
+        struct in_list_impl {
+            main_grammar_local& l;
+
+            in_list_impl(main_grammar_local& l) :
+                l(l) {}
+
+            bool operator()() const {
+                return !l.list_stack.top().root;
+            }
+        };
+
+        struct set_no_eols_scoped : scoped_action_base
         {
-            typedef bool result_type;
-            template <typename Arg1 = void>
-            struct result { typedef bool type; };
-        
-            is_block_type(main_grammar_local& l)
-                : l_(l)
-            {}
+            set_no_eols_scoped(main_grammar_local& l)
+                : l(l) {}
 
-            bool operator()() const
-            {
-                return l_.element_type && !(l_.element_type & element_info::in_phrase);
+            bool start() {
+                saved_no_eols = l.no_eols;
+                l.no_eols = false;
+
+                return true;
             }
-            
-            main_grammar_local& l_;
+
+            void cleanup() {
+                l.no_eols = saved_no_eols;
+            }
+
+            main_grammar_local& l;
+            bool saved_no_eols;
         };
 
+        ////////////////////////////////////////////////////////////////////////
+        // Local members
+
         cl::rule<scanner>
-                        top_level, blocks, paragraph_separator,
+                        top_level, indent_check,
+                        paragraph_separator,
                         code, code_line, blank_line, hr,
-                        list, list_item,
-                        escape,
                         inline_code,
                         template_,
                         code_block, macro,
@@ -99,80 +176,235 @@
                         template_args_1_5, template_arg_1_5, template_arg_1_5_content,
                         template_inner_arg_1_5, brackets_1_5,
                         break_,
-                        command_line_macro_identifier, command_line_phrase,
-                        dummy_block
+                        command_line_macro_identifier,
+                        dummy_block, line_dummy_block, square_brackets
                         ;
 
-        cl::rule<scanner> element;
-
         struct simple_markup_closure
             : cl::closure<simple_markup_closure, char>
         {
             member1 mark;
         };
 
+        struct block_item_closure : cl::closure<block_item_closure, bool>
+        {
+            member1 still_in_block;
+        };
+
+        struct context_closure : cl::closure<context_closure, element_info::context>
+        {
+            member1 context;
+        };
+
         cl::rule<scanner, simple_markup_closure::context_t> simple_markup;
         cl::rule<scanner> simple_markup_end;
 
+        cl::rule<scanner, block_item_closure::context_t> paragraph;
+        cl::rule<scanner, context_closure::context_t> paragraph_item;
+        cl::rule<scanner, block_item_closure::context_t> list;
+        cl::rule<scanner, context_closure::context_t> list_item;
+        cl::rule<scanner, context_closure::context_t> common;
+        cl::rule<scanner, context_closure::context_t> element;
+
+        // state
+        std::stack<list_stack_item> list_stack;
+        unsigned int list_indent;
+        bool no_eols;
+
+        // transitory state
+        block_types::values block_type;
         element_info info;
         element_info::type_enum element_type;
 
+        // actions
         quickbook::actions& actions_;
+        member_action<main_grammar_local> check_indentation;
+        member_action<main_grammar_local> check_code_block;
+        member_action<main_grammar_local> start_blocks;
+        member_action<main_grammar_local> end_blocks;
+        in_list_impl in_list;
         scoped_parser<process_element_impl> process_element;
-        is_block_type is_block;
+        scoped_parser<set_no_eols_scoped> scoped_no_eols;
+
+        ////////////////////////////////////////////////////////////////////////
+        // Local constructor
 
         main_grammar_local(quickbook::actions& actions)
-            : actions_(actions)
+            : list_stack()
+            , list_indent(0)
+            , no_eols(true)
+            , actions_(actions)
+            , check_indentation(*this, &main_grammar_local::check_indentation_impl)
+            , check_code_block(*this, &main_grammar_local::check_indentation_impl)
+            , start_blocks(*this, &main_grammar_local::start_blocks_impl)
+            , end_blocks(*this, &main_grammar_local::end_blocks_impl)
+            , in_list(*this)
             , process_element(*this)
-            , is_block(*this)
+            , scoped_no_eols(*this)
             {}
     };
 
+    ////////////////////////////////////////////////////////////////////////////
+    // Local grammar
+
     void quickbook_grammar::impl::init_main()
     {
         main_grammar_local& local = cleanup_.add(
             new main_grammar_local(actions));
 
-        block_skip_initial_spaces =
-            *(cl::blank_p | comment) >> block_start
+        // phrase/phrase_start is used for an entirely self-contained
+        // phrase. For example, any remaining anchors are written out
+        // at the end instead of being saved for any following content.
+        phrase_start =
+            inline_phrase                       [actions.phrase_end]
+            ;
+
+        // nested_phrase is used for a phrase nested inside square
+        // brackets.
+        nested_phrase =
+            actions.values.save()
+            [   *( ~cl::eps_p(']')
+                >>  local.common(element_info::in_phrase)
+                )
+            ]
+            ;
+
+        // paragraph_phrase is like a nested_phrase but is also terminated
+        // by a paragraph end.
+        paragraph_phrase =
+            actions.values.save()
+            [   *( ~cl::eps_p(phrase_end)
+                >>  local.common(element_info::in_phrase)
+                )
+            ]
+            ;
+
+        // extended_phrase is like a paragraph_phrase but allows some block
+        // elements.
+        extended_phrase =
+            actions.values.save()
+            [   *( ~cl::eps_p(phrase_end)
+                >>  local.common(element_info::in_conditional)
+                )
+            ]
+            ;
+
+        // inline_phrase is used a phrase that isn't nested inside
+        // brackets, but is not self contained. An example of this
+        // is expanding a template, which is parsed separately but
+        // is part of the paragraph that contains it.
+        inline_phrase =
+            actions.values.save()
+            [   *local.common(element_info::in_phrase)
+            ]
             ;
 
+        table_title_phrase =
+            actions.values.save()
+            [   *( ~cl::eps_p(space >> (']' | '[' >> space >> '['))
+                >>  local.common(element_info::in_phrase)
+                )
+            ]
+            ;
+
+        inside_preformatted =
+            local.scoped_no_eols()
+            [   paragraph_phrase
+            ]
+            ;
+
+        // Top level blocks
         block_start =
-            local.top_level >> blank
+                (*eol)                          [local.start_blocks]
+            >>  (*local.top_level)              [local.end_blocks]
             ;
 
         local.top_level =
-            actions.scoped_context(element_info::in_block)
-            [   local.blocks
-            >>  *(  local.element
-                >>  !(cl::eps_p(local.is_block) >> +eol >> local.blocks)
-                |   local.paragraph_separator >> local.blocks
-                |   common
-                |   cl::space_p                 [actions.space_char]
-                |   cl::anychar_p               [actions.plain_char]
+                cl::eps_p(local.indent_check)
+            >>  (   cl::eps_p(ph::var(local.block_type) == block_types::code)
+                >>  local.code
+                |   cl::eps_p(ph::var(local.block_type) == block_types::list)
+                >>  local.list
+                |   cl::eps_p(ph::var(local.block_type) == block_types::paragraph)
+                >>  (   local.hr
+                    |   local.paragraph
+                    )
                 )
-            ]
+            >>  *eol
             ;
 
-        local.blocks =
-           *(   local.code
-            |   local.list
-            |   local.hr
-            |   +eol
-            )
+        local.indent_check =
+            (   *cl::blank_p
+            >>  !(  (cl::ch_p('*') | '#')
+                >> *cl::blank_p)
+            )                                   [local.check_indentation]
+            ;
+
+        local.paragraph =
+                cl::eps_p                       [local.paragraph.still_in_block = true]
+            >>  local.paragraph_item(element_info::only_contextual_block)
+            >>  *(  cl::eps_p(local.paragraph.still_in_block)
+                >>  local.paragraph_item(element_info::only_block)
+                )
+            >>  cl::eps_p                       [actions.paragraph]
             ;
 
-        local.paragraph_separator
-            =   cl::eol_p
-            >> *cl::blank_p
-            >>  cl::eol_p                       [actions.paragraph]
+        local.paragraph_item =
+                local.element(local.paragraph_item.context)
+            >>  !eol                            [local.paragraph.still_in_block = false]
+            |   local.paragraph_separator       [local.paragraph.still_in_block = false]
+            |   local.common(element_info::in_phrase)
+            ;
+
+        local.list =
+                *cl::blank_p
+            >>  (cl::ch_p('*') | '#')
+            >>  (*cl::blank_p)                  [local.list.still_in_block = true]
+            >>  *(  cl::eps_p(local.list.still_in_block)
+                >>  local.list_item(element_info::only_block)
+                )
+            >>  cl::eps_p                       [actions.list_item]
+            ;
+
+        local.list_item =
+                local.element(local.list_item.context)
+            >>  !eol                            [local.list.still_in_block = false]
+            |   local.paragraph_separator       [local.list.still_in_block = false]
+            |   local.common(element_info::in_phrase)
+            ;
+
+        local.paragraph_separator =
+                cl::eol_p
+            >>  cl::eps_p
+                (   *cl::blank_p
+                >>  (   cl::eol_p
+                    |   cl::end_p
+                    |   cl::eps_p(local.in_list) >> (cl::ch_p('*') | '#')
+                    )
+                )
+            >>  *eol
+            ;
+
+        // Blocks contains within an element, e.g. a table cell or a footnote.
+        inside_paragraph =
+            actions.values.save()
+            [   *(  local.paragraph_separator   [actions.paragraph]
+                >>  *eol
+                |   ~cl::eps_p(']')
+                >>  local.common(element_info::in_nested_block)
+                )
+            ]                                   [actions.paragraph]
             ;
 
         local.hr =
                 cl::str_p("----")
             >>  actions.values.list(block_tags::hr)
-                [   *(cl::anychar_p - eol)
-                >>  +eol
+                [   (   qbk_since(106u)
+                    >>  *(line_comment | (cl::anychar_p - (cl::eol_p | '[' | ']')))
+                    |   qbk_before(106u)
+                    >>  *(line_comment | (cl::anychar_p - (cl::eol_p | "[/")))
+                    )
+                >>  *eol
                 ]                               [actions.element]
             ;
 
@@ -201,64 +433,53 @@
             ;
 
         local.code_line =
-            cl::blank_p >> *(cl::anychar_p - cl::eol_p) >> cl::eol_p
+            (   *cl::blank_p
+            >>  ~cl::eps_p(cl::eol_p)
+            )                                   [local.check_code_block]
+        >>  cl::eps_p(ph::var(local.block_type) == block_types::code)
+        >>  *(cl::anychar_p - cl::eol_p)
+        >>  (cl::eol_p | cl::end_p)
             ;
 
         local.blank_line =
             *cl::blank_p >> cl::eol_p
             ;
 
-        local.list =
-                cl::eps_p(cl::ch_p('*') | '#')
-                                            [actions.values.reset()]
-            >>  actions.scoped_output()
-                [
-                actions.values.list(block_tags::list)
-                [   +actions.values.list()
-                    [   (*cl::blank_p)      [actions.values.entry(ph::arg1, ph::arg2, general_tags::list_indent)]
-                    >>  (cl::ch_p('*') | '#')
-                                            [actions.values.entry(ph::arg1, ph::arg2, general_tags::list_mark)]
-                    >>  *cl::blank_p
-                    >>  local.list_item     [actions.to_value]
-                    ]
-                ]
-                ]                           [actions.element]
-            ;
-
-        local.list_item =
-            actions.scoped_context(element_info::in_phrase)
-            [
-            actions.values.save()
-            [
-                *(  common
-                |   (cl::anychar_p -
-                        (   cl::eol_p >> *cl::blank_p
-                        >>  (cl::ch_p('*') | '#' | cl::eol_p)
-                        )
-                    )                       [actions.plain_char]
-                )
-            ]
-            ]
-            >> +eol
-            ;
-
-        common =
+        local.common =
                 local.macro
-            |   local.element
+            |   local.element(local.common.context)
             |   local.template_
             |   local.break_
             |   local.code_block
             |   local.inline_code
             |   local.simple_markup
-            |   local.escape
+            |   escape
             |   comment
+            |   qbk_since(106u) >> local.square_brackets
+            |   cl::space_p                 [actions.raw_char]
+            |   cl::anychar_p               [actions.plain_char]
+            ;
+
+        local.square_brackets =
+            (   cl::ch_p('[')           [actions.plain_char]
+            >>  paragraph_phrase
+            >>  (   cl::ch_p(']')       [actions.plain_char]
+                |   cl::eps_p           [actions.error("Missing close bracket")]
+                )
+            |   cl::ch_p(']')           [actions.plain_char]
+            >>  cl::eps_p               [actions.error("Mismatched close bracket")]
+            )
             ;
 
         local.macro =
-            // must not be followed by alpha or underscore
-            cl::eps_p(actions.macro
-                >> (cl::eps_p - (cl::alpha_p | '_')))
-            >> actions.macro                    [actions.do_macro]
+            cl::eps_p
+            (   (   actions.macro
+                >>  ~cl::eps_p(cl::alpha_p | '_')
+                                                // must not be followed by alpha or underscore
+                )
+                &   macro_identifier            // must be a valid macro for the current version
+            )
+            >>  actions.macro                   [actions.do_macro]
             ;
 
         local.template_ =
@@ -279,10 +500,8 @@
             ;
 
         local.template_args =
-                cl::eps_p(qbk_since(105u))
-            >>  local.template_args_1_5
-            |   cl::eps_p(qbk_before(105u))
-            >>  local.template_args_1_4
+                qbk_since(105u) >> local.template_args_1_5
+            |   qbk_before(105u) >> local.template_args_1_4
             ;
 
         local.template_args_1_4 = local.template_arg_1_4 >> *(".." >> local.template_arg_1_4);
@@ -346,21 +565,31 @@
             ;
 
         local.code_block =
-                (
-                    "```" >>
-                    (
-                       *(cl::anychar_p - "```")
-                            >> cl::eps_p("```")
-                    )                           [actions.code_block]
-                    >>  "```"
-                )
-            |   (
-                    "``" >>
-                    (
-                       *(cl::anychar_p - "``")
-                            >> cl::eps_p("``")
-                    )                           [actions.code_block]
-                    >>  "``"
+                "```"
+            >>  ~cl::eps_p("`")
+            >>  *(*cl::blank_p >> cl::eol_p)
+            >>  (   *(  "````" >> *cl::ch_p('`')
+                    |   (   cl::anychar_p
+                        -   (*cl::space_p >> "```" >> ~cl::eps_p("`"))
+                        )
+                    )
+                    >>  !(*cl::blank_p >> cl::eol_p)
+                )                           [actions.code_block]
+            >>  (   *cl::space_p >> "```"
+                |   cl::eps_p               [actions.error("Unfinished code block")]
+                )
+            |   "``"
+            >>  ~cl::eps_p("`")
+            >>  *(*cl::blank_p >> cl::eol_p)
+            >>  (   *(  "```" >> *cl::ch_p('`')
+                    |   (   cl::anychar_p
+                        -   (*cl::space_p >> "``" >> ~cl::eps_p("`"))
+                        )
+                    )
+                    >>  !(*cl::blank_p >> cl::eol_p)
+                )                           [actions.code_block]
+            >>  (   *cl::space_p >> "``"
+                |   cl::eps_p               [actions.error("Unfinished code block")]
                 )
             ;
 
@@ -379,18 +608,17 @@
                 ]
             >>  actions.values.save()
                 [
-                    actions.scoped_output()
+                    actions.to_value()
                     [
-                        (   cl::eps_p(actions.macro >> local.simple_markup_end)
-                        >>  actions.macro       [actions.do_macro]
-                        |   ~cl::eps_p(cl::f_ch_p(local.simple_markup.mark))
-                        >>  +(  ~cl::eps_p
-                                (   lookback [~cl::f_ch_p(local.simple_markup.mark)]
-                                >>  local.simple_markup_end
-                                )
-                            >>  cl::anychar_p   [actions.plain_char]
+                        cl::eps_p((actions.macro & macro_identifier) >> local.simple_markup_end)
+                    >>  actions.macro       [actions.do_macro]
+                    |   ~cl::eps_p(cl::f_ch_p(local.simple_markup.mark))
+                    >>  +(  ~cl::eps_p
+                            (   lookback [~cl::f_ch_p(local.simple_markup.mark)]
+                            >>  local.simple_markup_end
                             )
-                        )                       [actions.to_value]
+                        >>  cl::anychar_p   [actions.plain_char]
+                        )
                     ]
                 >>  cl::f_ch_p(local.simple_markup.mark)
                                                 [actions.simple_markup]
@@ -414,44 +642,7 @@
             |   phrase_end
                 ;
 
-        phrase =
-            actions.scoped_context(element_info::in_phrase)
-            [
-            actions.values.save()
-            [   *(  common
-                |   (cl::anychar_p - phrase_end)
-                                                [actions.plain_char]
-                )
-            ]
-            ]
-            ;
-
-        extended_phrase =
-            actions.scoped_context(element_info::in_conditional)
-            [
-            actions.values.save()
-            [  *(   common
-                |   (cl::anychar_p - phrase_end)
-                                                [actions.plain_char]
-                )
-            ]
-            ]
-            ;
-
-        inside_paragraph =
-            actions.scoped_context(element_info::in_nested_block)
-            [
-            actions.values.save()
-            [   *(  local.paragraph_separator   [actions.paragraph]
-                |   common
-                |   (cl::anychar_p - phrase_end)
-                                                [actions.plain_char]
-                )
-            ]                                   [actions.paragraph]
-            ]
-            ;
-
-        local.escape =
+        escape =
                 cl::str_p("\\n")                [actions.break_]
             |   cl::str_p("\\ ")                // ignore an escaped space
             |   '\\' >> cl::punct_p             [actions.plain_char]
@@ -468,20 +659,21 @@
                 ]
             ;
 
-        //
-        // Simple phrase grammar
-        //
-
-        simple_phrase =
-            actions.scoped_context(element_info::in_phrase)
-            [
-            actions.values.save()
-            [
-           *(   common
-            |   (cl::anychar_p - ']')           [actions.plain_char]
-            )
-            ]
-            ]
+        raw_escape =
+                cl::str_p("\\n")                [actions.error("Newlines invalid here.")]
+            |   cl::str_p("\\ ")                // ignore an escaped space
+            |   '\\' >> cl::punct_p             [actions.raw_char]
+            |   "\\u" >> cl::repeat_p(4) [cl::chset<>("0-9a-fA-F")]
+                                                [actions.escape_unicode]
+            |   "\\U" >> cl::repeat_p(8) [cl::chset<>("0-9a-fA-F")]
+                                                [actions.escape_unicode]
+            |   ('\\' >> cl::anychar_p)         [actions.error("Invalid escape.")]
+                                                [actions.raw_char]
+            |   ("'''" >> !eol)                 [actions.error("Boostbook escape invalid here.")]
+            >>  (*(cl::anychar_p - "'''"))
+            >>  (   cl::str_p("'''")
+                |   cl::eps_p                   [actions.error("Unclosed boostbook escape.")]
+                )                               [actions.element]
             ;
 
         //
@@ -494,29 +686,19 @@
             >>  local.command_line_macro_identifier
                                                 [actions.values.entry(ph::arg1, ph::arg2)]
             >>  *cl::space_p
-            >>  (   '='
+            >>  !(   '='
                 >>  *cl::space_p
-                >>  local.command_line_phrase
+                >>  actions.to_value() [ inline_phrase ]
                 >>  *cl::space_p
-                |   cl::eps_p
-                )                               [actions.to_value]
+                )
+            >>  cl::end_p
             ]                                   [actions.element]
             ;
 
         local.command_line_macro_identifier =
-            +(cl::anychar_p - (cl::space_p | ']' | '='))
-            ;
-
-
-        local.command_line_phrase =
-            actions.scoped_context(element_info::in_phrase)
-            [
-            actions.values.save()
-            [   *(   common
-                |   (cl::anychar_p - ']')       [actions.plain_char]
-                )
-            ]
-            ]
+                qbk_since(106u)
+            >>  +(cl::anychar_p - (cl::space_p | '[' | '\\' | ']' | '='))
+            |   +(cl::anychar_p - (cl::space_p | ']' | '='))
             ;
 
         // Miscellaneous stuff
@@ -540,7 +722,7 @@
 
         phrase_end =
                 ']'
-            |   cl::eps_p(ph::var(actions.no_eols))
+            |   cl::eps_p(ph::var(local.no_eols))
             >>  cl::eol_p >> *cl::blank_p >> cl::eol_p
             ;                                   // Make sure that we don't go
                                                 // past a single block, except
@@ -554,9 +736,198 @@
             '[' >> *(local.dummy_block | (cl::anychar_p - ']')) >> ']'
             ;
 
+        line_comment =
+            "[/" >> *(local.line_dummy_block | (cl::anychar_p - (cl::eol_p | ']'))) >> ']'
+            ;
+
+        local.line_dummy_block =
+            '[' >> *(local.line_dummy_block | (cl::anychar_p - (cl::eol_p | ']'))) >> ']'
+            ;
+
         macro_identifier =
-            +(cl::anychar_p - (cl::space_p | ']'))
+                qbk_since(106u)
+            >>  +(cl::anychar_p - (cl::space_p | '[' | '\\' | ']'))
+            |   qbk_before(106u)
+            >>  +(cl::anychar_p - (cl::space_p | ']'))
             ;
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Indentation Handling
+
+    template <typename Iterator>
+    int indent_length(Iterator first, Iterator end)
+    {
+        int length = 0;
+        for(; first != end; ++first)
+        {
+            if (*first == '\t') {
+                // hardcoded tab to 4 for now
+                length = length + 4 - (length % 4);
+            }
+            else {
+                ++length;
+            }
+        }
+
+        return length;
+    }
+
+    void main_grammar_local::start_blocks_impl(parse_iterator, parse_iterator)
+    {
+        list_stack.push(list_stack_item());
+    }
+
+    void main_grammar_local::end_blocks_impl(parse_iterator, parse_iterator)
+    {
+        clear_stack();
+        list_stack.pop();
+    }
+
+    void main_grammar_local::check_indentation_impl(parse_iterator first_, parse_iterator last_)
+    {
+        string_iterator first = first_.base();
+        string_iterator last = last_.base();
+        string_iterator mark_pos = boost::find_first_of(
+            boost::make_iterator_range(first, last),
+            boost::as_literal("#*"));
+
+        if (mark_pos == last) {
+            plain_block(first, last);
+        }
+        else {
+            list_block(first, mark_pos, last);
+        }
+    }
+
+    void main_grammar_local::check_code_block_impl(parse_iterator first, parse_iterator last)
+    {
+        unsigned int new_indent = indent_length(first.base(), last.base());
+
+        block_type = (new_indent > list_stack.top().indent2) ?
+             block_types::code : block_types::none;
+    }
+
+    void main_grammar_local::plain_block(string_iterator first, string_iterator last)
+    {
+        if (qbk_version_n >= 106u) {
+            unsigned int new_indent = indent_length(first, last);
+
+            if (new_indent > list_stack.top().indent2) {
+                block_type = block_types::code;
+            }
+            else {
+                while (!list_stack.top().root && new_indent < list_stack.top().indent)
+                {
+                    actions_.end_list_item();
+                    actions_.end_list(list_stack.top().mark);
+                    list_stack.pop();
+                    list_indent = list_stack.top().indent;
+                }
+
+                if (!list_stack.top().root && new_indent == list_stack.top().indent)
+                {
+                    // If the paragraph is aligned with the list item's marker,
+                    // then end the current list item if that's aligned (or to
+                    // the left of) the parent's paragraph.
+                    //
+                    // i.e.
+                    //
+                    // * Level 1
+                    //    * Level 2
+                    //
+                    //    Still Level 2
+                    //
+                    // vs.
+                    //
+                    // * Level 1
+                    //   * Level 2
+                    //
+                    //   Back to Level 1
+                
+                    list_stack_item save = list_stack.top();
+                    list_stack.pop();
+
+                    assert(list_stack.top().root ?
+                        new_indent >= list_stack.top().indent :
+                        new_indent > list_stack.top().indent);
+
+                    if (new_indent <= list_stack.top().indent2) {
+                        actions_.end_list_item();
+                        actions_.end_list(save.mark);
+                        list_indent = list_stack.top().indent;
+                    }
+                    else {
+                        list_stack.push(save);
+                    }
+                }
+
+                block_type = block_types::paragraph;
+            }
+        }
+        else {
+            clear_stack();
+
+            if (last == first)
+                block_type = block_types::paragraph;
+            else
+                block_type = block_types::code;
+        }
+    }
+
+    void main_grammar_local::list_block(string_iterator first, string_iterator mark_pos,
+            string_iterator last)
+    {
+        unsigned int new_indent = indent_length(first, mark_pos);
+        unsigned int new_indent2 = indent_length(first, last);
+        char mark = *mark_pos;
+
+        if (list_stack.top().root && new_indent > 0) {
+            block_type = block_types::code;
+            return;
+        }
+
+        if (list_stack.top().root || new_indent > list_indent) {
+            list_stack.push(list_stack_item(mark, new_indent, new_indent2));
+            actions_.start_list(mark);
+        }
+        else if (new_indent == list_indent) {
+            actions_.end_list_item();
+        }
+        else {
+            // This should never reach root, since the first list
+            // has indentation 0.
+            while(!list_stack.top().root && new_indent < list_stack.top().indent)
+            {
+                actions_.end_list_item();
+                actions_.end_list(list_stack.top().mark);
+                list_stack.pop();
+            }
+
+            actions_.end_list_item();
+        }
 
+        list_indent = new_indent;
+
+        if (mark != list_stack.top().mark)
+        {
+            detail::outerr(actions_.current_file, first)
+                << "Illegal change of list style.\n";
+            detail::outwarn(actions_.current_file, first)
+                << "Ignoring change of list style." << std::endl;
+            ++actions_.error_count;
+        }
+
+        actions_.start_list_item();
+        block_type = block_types::list;
+    }
+
+    void main_grammar_local::clear_stack()
+    {
+        while (!list_stack.top().root) {
+            actions_.end_list_item();
+            actions_.end_list(list_stack.top().mark);
+            list_stack.pop();
+        }
     }
 }
Modified: branches/release/tools/quickbook/src/markups.cpp
==============================================================================
--- branches/release/tools/quickbook/src/markups.cpp	(original)
+++ branches/release/tools/quickbook/src/markups.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -34,6 +34,7 @@
                 { block_tags::important, "<important>", "</important>" },
                 { block_tags::note, "<note>", "</note>" },
                 { block_tags::tip, "<tip>", "</tip>" },
+                { block_tags::block, "", "" },
                 { block_tags::ordered_list, "<orderedlist>", "</orderedlist>" },
                 { block_tags::itemized_list, "<itemizedlist>", "</itemizedlist>" },
                 { block_tags::hr, "<para/>", 0 },
Modified: branches/release/tools/quickbook/src/parsers.hpp
==============================================================================
--- branches/release/tools/quickbook/src/parsers.hpp	(original)
+++ branches/release/tools/quickbook/src/parsers.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -28,7 +28,7 @@
     // Impl is a struct with the methods:
     //
     // void start();
-    // void success();
+    // void success(parse_iterator, parse_iterator);
     // void failure();
     // void cleanup();
     //
@@ -83,10 +83,10 @@
                 return in_progress_;
             }
             
-            void success()
+            void success(parse_iterator f, parse_iterator l)
             {
                 in_progress_ = false;
-                impl_.success();
+                impl_.success(f, l);
             }
 
             void failure()
@@ -121,7 +121,8 @@
             bool success = scope.impl_.result(result, scan);
 
             if (success) {
-                scope.success();
+                scope.success(save, scan.first);
+
                 if (result) {
                     return scan.create_match(result.length(), cl::nil_t(), save, scan.first);
                 }
Modified: branches/release/tools/quickbook/src/phrase_element_grammar.cpp
==============================================================================
--- branches/release/tools/quickbook/src/phrase_element_grammar.cpp	(original)
+++ branches/release/tools/quickbook/src/phrase_element_grammar.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -26,7 +26,8 @@
     struct phrase_element_grammar_local
     {
         cl::rule<scanner>
-                        image, anchor, link, empty, cond_phrase, inner_phrase
+                        image, anchor, link, empty, cond_phrase, inner_phrase,
+                        role
                         ;
     };
 
@@ -50,26 +51,48 @@
             ("$", element_info(element_info::phrase, &local.image, phrase_tags::image))
             ;
 
+        // Note that the attribute values here are encoded in plain text not
+        // boostbook.
         local.image =
-                cl::eps_p(qbk_since(105u))
+                qbk_since(105u)
             >>  blank
-            >>  (+(
-                    *cl::space_p
-                >>  +(cl::anychar_p - (cl::space_p | phrase_end | '['))
-                ))                      [actions.values.entry(ph::arg1, ph::arg2)]
+            >>  (   qbk_before(106u)
+                >>  (+(
+                        *cl::space_p
+                    >>  +(cl::anychar_p - (cl::space_p | phrase_end | '['))
+                    ))                  [actions.values.entry(ph::arg1, ph::arg2)]
+                |   qbk_since(106u)
+                >>  actions.to_value()
+                    [   +(  raw_escape
+                        |   (+cl::space_p >> ~cl::eps_p(phrase_end | '['))
+                                        [actions.raw_char]
+                        |   (cl::anychar_p - (cl::space_p | phrase_end | '['))
+                                        [actions.raw_char]
+                        )
+                    ]
+                )
             >>  hard_space
             >>  *actions.values.list()
                 [   '['
                 >>  (*(cl::alnum_p | '_')) 
                                         [actions.values.entry(ph::arg1, ph::arg2)]
                 >>  space
-                >>  (*(cl::anychar_p - (phrase_end | '[')))
+                >>  (   qbk_before(106u)
+                    >>  (*(cl::anychar_p - (phrase_end | '[')))
                                         [actions.values.entry(ph::arg1, ph::arg2)]
+                    |   qbk_since(106u)
+                    >>  actions.to_value()
+                        [   *(  raw_escape
+                            |   (cl::anychar_p - (phrase_end | '['))
+                                                        [actions.raw_char]
+                            )
+                        ]
+                    )
                 >>  ']'
                 >>  space
                 ]
             >>  cl::eps_p(']')
-            |   cl::eps_p(qbk_before(105u))
+            |   qbk_before(105u)
             >>  blank
             >>  (*(cl::anychar_p - phrase_end)) [actions.values.entry(ph::arg1, ph::arg2)]
             >>  cl::eps_p(']')
@@ -90,19 +113,37 @@
 
         local.link =
                 space
-            >>  (*(cl::anychar_p - (']' | hard_space)))
+            >>  (   qbk_before(106u)
+                >>  (*(cl::anychar_p - (']' | space)))
                                                 [actions.values.entry(ph::arg1, ph::arg2)]
+                |   qbk_since(106u)
+                >>  actions.to_value()
+                    [   *(  raw_escape
+                        |   (cl::anychar_p - (']' | space))
+                                                [actions.raw_char]
+                        )
+                    ]
+                )
             >>  hard_space
             >>  local.inner_phrase
             ;
 
         elements.add
-            ("#", element_info(element_info::phrase, &local.anchor, phrase_tags::anchor))
+            ("#", element_info(element_info::maybe_block, &local.anchor, phrase_tags::anchor))
             ;
 
         local.anchor =
                 blank
-            >>  (*(cl::anychar_p - phrase_end)) [actions.values.entry(ph::arg1, ph::arg2)]
+            >>  (   qbk_before(106u)
+                >>  (*(cl::anychar_p - phrase_end)) [actions.values.entry(ph::arg1, ph::arg2)]
+                |   qbk_since(106u)
+                >>  actions.to_value()
+                    [   *(  raw_escape
+                        |   (cl::anychar_p - phrase_end)
+                                                    [actions.raw_char]
+                        )
+                    ]
+                )
             ;
 
         elements.add
@@ -121,14 +162,23 @@
             ("python", element_info(element_info::phrase, &local.empty, source_mode_tags::python))
             ("teletype", element_info(element_info::phrase, &local.empty, source_mode_tags::teletype))
             ;
-        
+
+        elements.add
+            ("role", element_info(element_info::phrase, &local.role, phrase_tags::role, 106u))
+            ;
+
+        local.role
+            =   space
+            >>  (+(cl::alnum_p | '_'))              [actions.values.entry(ph::arg1, ph::arg2)]
+            >>  hard_space
+            >>  local.inner_phrase
+            ;
+
         local.empty = cl::eps_p;
 
         local.inner_phrase =
                 blank
-            >>  actions.scoped_output()
-                [   phrase                          [actions.to_value]
-                ]
+            >>  actions.to_value() [ paragraph_phrase ]
             ;
     }
 }
Modified: branches/release/tools/quickbook/src/phrase_tags.hpp
==============================================================================
--- branches/release/tools/quickbook/src/phrase_tags.hpp	(original)
+++ branches/release/tools/quickbook/src/phrase_tags.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -22,6 +22,7 @@
         (footnote)
         (escape)
         (break_mark)
+        (role)
     )
     
     QUICKBOOK_VALUE_NAMED_TAGS(source_mode_tags, 0x550,
Modified: branches/release/tools/quickbook/src/quickbook.cpp
==============================================================================
--- branches/release/tools/quickbook/src/quickbook.cpp	(original)
+++ branches/release/tools/quickbook/src/quickbook.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -12,8 +12,9 @@
 #include "actions_class.hpp"
 #include "post_process.hpp"
 #include "utils.hpp"
+#include "files.hpp"
 #include "input_path.hpp"
-#include "id_generator.hpp"
+#include "id_manager.hpp"
 #include <boost/program_options.hpp>
 #include <boost/filesystem/v3/path.hpp>
 #include <boost/filesystem/v3/operations.hpp>
@@ -35,7 +36,7 @@
 #pragma warning(disable:4355)
 #endif
 
-#define QUICKBOOK_VERSION "Quickbook Version 1.5.6"
+#define QUICKBOOK_VERSION "Quickbook Version 1.5.7 (trunk)"
 
 namespace quickbook
 {
@@ -45,9 +46,11 @@
     tm* current_time; // the current time
     tm* current_gm_time; // the current UTC time
     bool debug_mode; // for quickbook developers only
+    bool self_linked_headers;
     bool ms_errors = false; // output errors/warnings as if for VS
     std::vector<fs::path> include_path;
     std::vector<std::string> preset_defines;
+    fs::path image_location;
 
     static void set_macros(actions& actor)
     {
@@ -56,12 +59,20 @@
                 end = preset_defines.end();
                 it != end; ++it)
         {
-            // TODO: Set filename in actor???
-            iterator first(it->begin());
-            iterator last(it->end());
+            parse_iterator first(it->begin());
+            parse_iterator last(it->end());
 
-            cl::parse(first, last, actor.grammar().command_line_macro);
-            // TODO: Check result?
+            cl::parse_info<parse_iterator> info =
+                cl::parse(first, last, actor.grammar().command_line_macro);
+
+            if (!info.full) {
+                detail::outerr()
+                    << "Error parsing command line definition: '"
+                    << *it
+                    << "'"
+                    << std::endl;
+                ++actor.error_count;
+            }
         }
     }
 
@@ -70,60 +81,31 @@
     //  Parse a file
     //
     ///////////////////////////////////////////////////////////////////////////
-    int
-    parse_file(fs::path const& filein_, actions& actor, bool ignore_docinfo)
+    void parse_file(actions& actor, value include_doc_id, bool nested_file)
     {
-        using std::vector;
-        using std::string;
-
-        std::string storage;
-        int err = detail::load(filein_, storage);
-        if (err != 0) {
-            ++actor.error_count;
-            return err;
-        }
-
-        iterator first(storage.begin());
-        iterator last(storage.end());
+        parse_iterator first(actor.current_file->source.begin());
+        parse_iterator last(actor.current_file->source.end());
 
-        cl::parse_info<iterator> info = cl::parse(first, last, actor.grammar().doc_info);
+        cl::parse_info<parse_iterator> info = cl::parse(first, last, actor.grammar().doc_info);
+        assert(info.hit);
 
-        if (info.hit || ignore_docinfo)
+        if (!actor.error_count)
         {
-            pre(actor.out, actor, ignore_docinfo);
+            parse_iterator pos = info.stop;
+            std::string doc_type = pre(actor, pos, include_doc_id, nested_file);
 
             info = cl::parse(info.hit ? info.stop : first, last, actor.grammar().block);
-            if (info.full)
-            {
-                post(actor.out, actor, ignore_docinfo);
-            }
-        }
-
-        if (!info.full)
-        {
-            file_position const& pos = info.stop.get_position();
-            detail::outerr(actor.filename, pos.line)
-                << "Syntax Error near column " << pos.column << ".\n";
-            ++actor.error_count;
-        }
 
-        return actor.error_count ? 1 : 0;
-    }
+            post(actor, doc_type);
 
-    static int
-    parse_document(
-        fs::path const& filein_,
-        actions& actor)
-    {        
-        bool r = parse_file(filein_, actor);
-
-        if(actor.error_count)
-        {
-            detail::outerr()
-                << "Error count: " << actor.error_count << ".\n";
+            if (!info.full)
+            {
+                file_position const& pos = actor.current_file->position_of(info.stop.base());
+                detail::outerr(actor.current_file->path, pos.line)
+                    << "Syntax Error near column " << pos.column << ".\n";
+                ++actor.error_count;
+            }
         }
-
-        return r;
     }
 
     static int
@@ -136,18 +118,47 @@
       , bool pretty_print)
     {
         string_stream buffer;
-        id_generator ids;
-        actions actor(filein_, xinclude_base_, buffer, ids);
-        set_macros(actor);
+        id_manager ids;
+
+        int result = 0;
+
+        try {
+            actions actor(filein_, xinclude_base_, buffer, ids);
+            set_macros(actor);
 
-        int result = parse_document(filein_, actor);
+            if (actor.error_count == 0) {
+                actor.current_file = load(filein_); // Throws load_error
 
-        std::string stage2 = ids.replace_placeholders(buffer.str());
+                parse_file(actor);
+
+                if(actor.error_count) {
+                    detail::outerr()
+                        << "Error count: " << actor.error_count << ".\n";
+                }
+            }
+
+            result = actor.error_count ? 1 : 0;
+        }
+        catch (load_error& e) {
+            detail::outerr(filein_) << detail::utf8(e.what()) << std::endl;
+            result = 1;
+        }
 
         if (result == 0)
         {
+            std::string stage2 = ids.replace_placeholders(buffer.str());
+
             fs::ofstream fileout(fileout_);
 
+            if (fileout.fail()) {
+                ::quickbook::detail::outerr()
+                    << "Error opening output file "
+                    << fileout_
+                    << std::endl;
+
+                return 1;
+            }
+
             if (pretty_print)
             {
                 try
@@ -168,7 +179,17 @@
             {
                 fileout << stage2;
             }
+
+            if (fileout.fail()) {
+                ::quickbook::detail::outerr()
+                    << "Error writing to output file "
+                    << fileout_
+                    << std::endl;
+
+                return 1;
+            }
         }
+
         return result;
     }
 }
@@ -218,6 +239,7 @@
             ("help", "produce help message")
             ("version", "print version string")
             ("no-pretty-print", "disable XML pretty printing")
+            ("no-self-linked-headers", "stop headers linking to themselves")
             ("indent", PO_VALUE<int>(), "indent spaces")
             ("linewidth", PO_VALUE<int>(), "line width")
             ("input-file", PO_VALUE<input_string>(), "input file")
@@ -226,6 +248,7 @@
             ("ms-errors", "use Microsoft Visual Studio style error & warn message format")
             ("include-path,I", PO_VALUE< std::vector<input_string> >(), "include path")
             ("define,D", PO_VALUE< std::vector<input_string> >(), "define macro")
+            ("image-location", PO_VALUE<input_string>(), "image location")
         ;
 
         hidden.add_options()
@@ -276,6 +299,7 @@
         notify(vm);
 
         bool expect_errors = vm.count("expect-errors");
+        int error_count = 0;
 
         if (vm.count("help"))
         {
@@ -308,6 +332,8 @@
         if (vm.count("no-pretty-print"))
             pretty_print = false;
 
+        quickbook::self_linked_headers = !vm.count("no-self-link-headers");
+
         if (vm.count("indent"))
             indent = vm["indent"].as<int>();
 
@@ -387,20 +413,40 @@
                     xinclude_base = ".";
             }
 
+            if (!fs::is_directory(xinclude_base))
+            {
+                quickbook::detail::outerr()
+                    << (vm.count("xinclude-base") ?
+                        "xinclude-base is not a directory" :
+                        "parent directory not found for output file");
+                ++error_count;
+            }
+
+            if (vm.count("image-location"))
+            {
+                quickbook::image_location = quickbook::detail::input_to_path(
+                    vm["image-location"].as<input_string>());
+            }
+            else
+            {
+                quickbook::image_location = filein.parent_path() / "html";
+            }
+
             quickbook::detail::out() << "Generating Output File: "
                 << quickbook::detail::path_to_stream(fileout)
                 << std::endl;
 
-            int r = quickbook::parse_document(filein, fileout, xinclude_base, indent, linewidth, pretty_print);
+            if (!error_count)
+                error_count += quickbook::parse_document(filein, fileout, xinclude_base, indent, linewidth, pretty_print);
 
             if (expect_errors)
             {
-                if (!r) quickbook::detail::outerr() << "No errors detected for --expect-errors." << std::endl;
-                return !r;
+                if (!error_count) quickbook::detail::outerr() << "No errors detected for --expect-errors." << std::endl;
+                return !error_count;
             }
             else
             {
-                return r;
+                return error_count;
             }
         }
         else
Modified: branches/release/tools/quickbook/src/quickbook.hpp
==============================================================================
--- branches/release/tools/quickbook/src/quickbook.hpp	(original)
+++ branches/release/tools/quickbook/src/quickbook.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -17,6 +17,7 @@
 #include <string>
 #include <boost/filesystem/v3/path.hpp>
 #include "fwd.hpp"
+#include "values.hpp"
 
 namespace quickbook
 {
@@ -25,11 +26,14 @@
     extern tm* current_time; // the current time
     extern tm* current_gm_time; // the current UTC time
     extern bool debug_mode;
+    extern bool self_linked_headers;
     extern std::vector<fs::path> include_path;
     extern std::vector<std::string> preset_defines;
+    extern fs::path image_location;
 
-    int parse_file(fs::path const& filein_, actions& actor, bool ignore_docinfo = false);
-    
+    void parse_file(actions& actor,
+            value include_doc_id = value(),
+            bool nested_file = false);
     // Some initialisation methods
     //
     // Declared here to avoid including other headers
Modified: branches/release/tools/quickbook/src/scoped.hpp
==============================================================================
--- branches/release/tools/quickbook/src/scoped.hpp	(original)
+++ branches/release/tools/quickbook/src/scoped.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -16,7 +16,8 @@
     struct scoped_action_base
     {
         bool start() { return true; }
-        void success() {}
+        template <typename Iterator>
+        void success(Iterator, Iterator) {}
         void failure() {}
         void cleanup() {}
         
Modified: branches/release/tools/quickbook/src/syntax_highlight.cpp
==============================================================================
--- branches/release/tools/quickbook/src/syntax_highlight.cpp	(original)
+++ branches/release/tools/quickbook/src/syntax_highlight.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -15,11 +15,215 @@
 #include "grammar.hpp"
 #include "grammar_impl.hpp" // Just for context stuff. Should move?
 #include "actions_class.hpp"
+#include "files.hpp"
+#include "input_path.hpp"
 
 namespace quickbook
 {    
     namespace cl = boost::spirit::classic;
 
+    // quickbook::actions is used in a few places here, as 'escape_actions'.
+    // It's named differently to distinguish it from the syntax highlighting
+    // actions, declared below.
+
+    // Syntax Highlight Actions
+
+    struct span
+    {
+        // Decorates c++ code fragments
+
+        span(char const* name, collector& out)
+        : name(name), out(out) {}
+
+        void operator()(parse_iterator first, parse_iterator last) const;
+
+        char const* name;
+        collector& out;
+    };
+
+    struct span_start
+    {
+        span_start(char const* name, collector& out)
+        : name(name), out(out) {}
+
+        void operator()(parse_iterator first, parse_iterator last) const;
+
+        char const* name;
+        collector& out;
+    };
+
+    struct span_end
+    {
+        span_end(collector& out)
+        : out(out) {}
+
+        void operator()(parse_iterator first, parse_iterator last) const;
+
+        collector& out;
+    };
+
+    struct unexpected_char
+    {
+        // Handles unexpected chars in c++ syntax
+
+        unexpected_char(
+            collector& out
+          , quickbook::actions& escape_actions)
+        : out(out)
+        , escape_actions(escape_actions) {}
+
+        void operator()(parse_iterator first, parse_iterator last) const;
+
+        collector& out;
+        quickbook::actions& escape_actions;
+    };
+
+    struct plain_char
+    {
+        // Prints a single plain char.
+        // Converts '<' to "<"... etc See utils.hpp
+
+        plain_char(collector& out)
+        : out(out) {}
+
+        void operator()(char ch) const;
+        void operator()(parse_iterator first, parse_iterator last) const;
+
+        collector& out;
+    };
+
+    struct pre_escape_back
+    {
+        // Escapes back from code to quickbook (Pre)
+
+        pre_escape_back(actions& escape_actions)
+            : escape_actions(escape_actions) {}
+
+        void operator()(parse_iterator first, parse_iterator last) const;
+
+        actions& escape_actions;
+    };
+
+    struct post_escape_back
+    {
+        // Escapes back from code to quickbook (Post)
+
+        post_escape_back(collector& out, actions& escape_actions)
+            : out(out), escape_actions(escape_actions) {}
+
+        void operator()(parse_iterator first, parse_iterator last) const;
+
+        collector& out;
+        actions& escape_actions;
+    };
+
+    void span::operator()(parse_iterator first, parse_iterator last) const
+    {
+        out << "<phrase role=\"" << name << "\">";
+        while (first != last)
+            detail::print_char(*first++, out.get());
+        out << "</phrase>";
+    }
+
+    void span_start::operator()(parse_iterator first, parse_iterator last) const
+    {
+        out << "<phrase role=\"" << name << "\">";
+        while (first != last)
+            detail::print_char(*first++, out.get());
+    }
+
+    void span_end::operator()(parse_iterator first, parse_iterator last) const
+    {
+        while (first != last)
+            detail::print_char(*first++, out.get());
+        out << "</phrase>";
+    }
+
+    void unexpected_char::operator()(parse_iterator first, parse_iterator last) const
+    {
+        file_position const pos = escape_actions.current_file->position_of(first.base());
+
+        detail::outwarn(escape_actions.current_file->path, pos.line)
+            << "in column:" << pos.column
+            << ", unexpected character: " << detail::utf8(first, last)
+            << "\n";
+
+        // print out an unexpected character
+        out << "<phrase role=\"error\">";
+        while (first != last)
+            detail::print_char(*first++, out.get());
+        out << "</phrase>";
+    }
+
+    void plain_char::operator()(char ch) const
+    {
+        detail::print_char(ch, out.get());
+    }
+
+    void plain_char::operator()(parse_iterator first, parse_iterator last) const
+    {
+        while (first != last)
+            detail::print_char(*first++, out.get());
+    }
+
+    void pre_escape_back::operator()(parse_iterator, parse_iterator) const
+    {
+        escape_actions.phrase.push(); // save the stream
+    }
+
+    void post_escape_back::operator()(parse_iterator, parse_iterator) const
+    {
+        out << escape_actions.phrase.str();
+        escape_actions.phrase.pop(); // restore the stream
+    }
+
+    // Syntax
+
+    struct keywords_holder
+    {
+        cl::symbols<> cpp, python;
+
+        keywords_holder()
+        {
+            cpp
+                    =   "and_eq", "and", "asm", "auto", "bitand", "bitor",
+                        "bool", "break", "case", "catch", "char", "class",
+                        "compl", "const_cast", "const", "continue", "default",
+                        "delete", "do", "double", "dynamic_cast",  "else",
+                        "enum", "explicit", "export", "extern", "false",
+                        "float", "for", "friend", "goto", "if", "inline",
+                        "int", "long", "mutable", "namespace", "new", "not_eq",
+                        "not", "operator", "or_eq", "or", "private",
+                        "protected", "public", "register", "reinterpret_cast",
+                        "return", "short", "signed", "sizeof", "static",
+                        "static_cast", "struct", "switch", "template", "this",
+                        "throw", "true", "try", "typedef", "typeid",
+                        "typename", "union", "unsigned", "using", "virtual",
+                        "void", "volatile", "wchar_t", "while", "xor_eq", "xor"
+                    ;
+
+            python
+                    =
+                    "and",       "del",       "for",       "is",        "raise",
+                    "assert",    "elif",      "from",      "lambda",    "return",
+                    "break",     "else",      "global",    "not",       "try",
+                    "class",     "except",    "if",        "or",        "while",
+                    "continue",  "exec",      "import",    "pass",      "yield",
+                    "def",       "finally",   "in",        "print",
+
+                    // Technically "as" and "None" are not yet keywords (at Python
+                    // 2.4). They are destined to become keywords, and we treat them
+                    // as such for syntax highlighting purposes.
+
+                    "as", "None"
+                    ;
+        }
+    };
+
+    namespace {
+        keywords_holder keywords;
+    }
+
     // Grammar for C++ highlighting
     struct cpp_highlight
     : public cl::grammar<cpp_highlight>
@@ -35,7 +239,7 @@
             {
                 program
                     =
-                    *(  (+cl::space_p)  [space(self.out)]
+                    *(  (+cl::space_p)  [plain_char(self.out)]
                     |   macro
                     |   escape
                     |   preprocessor    [span("preprocessor", self.out)]
@@ -58,23 +262,14 @@
                     >> self.escape_actions.macro        [do_macro_action(self.out, self.escape_actions)]
                     ;
 
-                qbk_phrase =
-                    self.escape_actions.scoped_context(element_info::in_phrase)
-                    [  *(   g.common
-                        |   (cl::anychar_p - cl::str_p("``"))
-                                        [self.escape_actions.plain_char]
-                        )
-                    ]
-                    ;
-
                 escape =
-                    cl::str_p("``")     [pre_escape_back(self.escape_actions, save)]
+                    cl::str_p("``")     [pre_escape_back(self.escape_actions)]
                     >>
                     (
                         (
                             (
                                 (+(cl::anychar_p - "``") >> cl::eps_p("``"))
-                                & qbk_phrase
+                                & g.phrase
                             )
                             >>  cl::str_p("``")
                         )
@@ -83,7 +278,7 @@
                             cl::eps_p   [self.escape_actions.error]
                             >> *cl::anychar_p
                         )
-                    )                   [post_escape_back(self.out, self.escape_actions, save)]
+                    )                   [post_escape_back(self.out, self.escape_actions)]
                     ;
 
                 preprocessor
@@ -94,38 +289,21 @@
                     =   cl::str_p("//")         [span_start("comment", self.out)]
                     >>  *(  escape
                         |   (+(cl::anychar_p - (cl::eol_p | "``")))
-                                                [span(0, self.out)]
+                                                [plain_char(self.out)]
                         )
                     >>  cl::eps_p               [span_end(self.out)]
                     |   cl::str_p("/*")         [span_start("comment", self.out)]
                     >>  *(  escape
                         |   (+(cl::anychar_p - (cl::str_p("*/") | "``")))
-                                                [span(0, self.out)]
+                                                [plain_char(self.out)]
                         )
                     >>  (!cl::str_p("*/"))      [span_end(self.out)]
                     ;
 
                 keyword
-                    =   keyword_ >> (cl::eps_p - (cl::alnum_p | '_'))
+                    =   keywords.cpp >> (cl::eps_p - (cl::alnum_p | '_'))
                     ;   // make sure we recognize whole words only
 
-                keyword_
-                    =   "and_eq", "and", "asm", "auto", "bitand", "bitor",
-                        "bool", "break", "case", "catch", "char", "class",
-                        "compl", "const_cast", "const", "continue", "default",
-                        "delete", "do", "double", "dynamic_cast",  "else",
-                        "enum", "explicit", "export", "extern", "false",
-                        "float", "for", "friend", "goto", "if", "inline",
-                        "int", "long", "mutable", "namespace", "new", "not_eq",
-                        "not", "operator", "or_eq", "or", "private",
-                        "protected", "public", "register", "reinterpret_cast",
-                        "return", "short", "signed", "sizeof", "static",
-                        "static_cast", "struct", "switch", "template", "this",
-                        "throw", "true", "try", "typedef", "typeid",
-                        "typename", "union", "unsigned", "using", "virtual",
-                        "void", "volatile", "wchar_t", "while", "xor_eq", "xor"
-                    ;
-
                 special
                     =   +cl::chset_p("~!%^&*()+={[}]:;,<.>?/|\\-")
                     ;
@@ -156,12 +334,10 @@
 
             cl::rule<Scanner>
                             program, macro, preprocessor, comment, special, string_, 
-                            char_, number, identifier, keyword, qbk_phrase, escape,
+                            char_, number, identifier, keyword, escape,
                             string_char;
 
-            cl::symbols<> keyword_;
             quickbook_grammar& g;
-            std::string save;
 
             cl::rule<Scanner> const&
             start() const { return program; }
@@ -188,7 +364,7 @@
             {
                 program
                     =
-                    *(  (+cl::space_p)  [space(self.out)]
+                    *(  (+cl::space_p)  [plain_char(self.out)]
                     |   macro
                     |   escape          
                     |   comment
@@ -209,24 +385,14 @@
                     >> self.escape_actions.macro        [do_macro_action(self.out, self.escape_actions)]
                     ;
 
-                qbk_phrase =
-                    self.escape_actions.scoped_context(element_info::in_phrase)
-                    [
-                       *(   g.common
-                        |   (cl::anychar_p - cl::str_p("``"))
-                                        [self.escape_actions.plain_char]
-                        )
-                    ]
-                    ;
-
                 escape =
-                    cl::str_p("``")     [pre_escape_back(self.escape_actions, save)]
+                    cl::str_p("``")     [pre_escape_back(self.escape_actions)]
                     >>
                     (
                         (
                             (
                                 (+(cl::anychar_p - "``") >> cl::eps_p("``"))
-                                & qbk_phrase
+                                & g.phrase
                             )
                             >>  cl::str_p("``")
                         )
@@ -235,38 +401,22 @@
                             cl::eps_p   [self.escape_actions.error]
                             >> *cl::anychar_p
                         )
-                    )                   [post_escape_back(self.out, self.escape_actions, save)]
+                    )                   [post_escape_back(self.out, self.escape_actions)]
                     ;
 
                 comment
                     =   cl::str_p("#")          [span_start("comment", self.out)]
                     >>  *(  escape
                         |   (+(cl::anychar_p - (cl::eol_p | "``")))
-                                                [span(0, self.out)]
+                                                [plain_char(self.out)]
                         )
                     >>  cl::eps_p               [span_end(self.out)]
                     ;
 
                 keyword
-                    =   keyword_ >> (cl::eps_p - (cl::alnum_p | '_'))
+                    =   keywords.python >> (cl::eps_p - (cl::alnum_p | '_'))
                     ;   // make sure we recognize whole words only
 
-                keyword_
-                    =
-                    "and",       "del",       "for",       "is",        "raise",    
-                    "assert",    "elif",      "from",      "lambda",    "return",   
-                    "break",     "else",      "global",    "not",       "try",  
-                    "class",     "except",    "if",        "or",        "while",    
-                    "continue",  "exec",      "import",    "pass",      "yield",   
-                    "def",       "finally",   "in",        "print",
-
-                    // Technically "as" and "None" are not yet keywords (at Python
-                    // 2.4). They are destined to become keywords, and we treat them 
-                    // as such for syntax highlighting purposes.
-                    
-                    "as", "None"
-                    ;
-
                 special
                     =   +cl::chset_p("~!%^&*()+={[}]:;,<.>/|\\-")
                     ;
@@ -310,11 +460,9 @@
             cl::rule<Scanner>
                             program, macro, comment, special, string_, string_prefix, 
                             short_string, long_string, number, identifier, keyword, 
-                            qbk_phrase, escape, string_char;
+                            escape, string_char;
 
-            cl::symbols<> keyword_;
             quickbook_grammar& g;
-            std::string save;
 
             cl::rule<Scanner> const&
             start() const { return program; }
@@ -341,7 +489,7 @@
                     =
                     *(  macro
                     |   escape          
-                    |   cl::repeat_p(1)[cl::anychar_p]  [plain_char_action(self.out, self.escape_actions)]
+                    |   cl::repeat_p(1)[cl::anychar_p]  [plain_char(self.out)]
                     )
                     ;
 
@@ -352,24 +500,14 @@
                     >> self.escape_actions.macro        [do_macro_action(self.out, self.escape_actions)]
                     ;
 
-                qbk_phrase =
-                    self.escape_actions.scoped_context(element_info::in_phrase)
-                    [
-                       *(   g.common
-                        |   (cl::anychar_p - cl::str_p("``"))
-                                        [self.escape_actions.plain_char]
-                        )
-                    ]
-                    ;
-
                 escape =
-                    cl::str_p("``")     [pre_escape_back(self.escape_actions, save)]
+                    cl::str_p("``")     [pre_escape_back(self.escape_actions)]
                     >>
                     (
                         (
                             (
                                 (+(cl::anychar_p - "``") >> cl::eps_p("``"))
-                                & qbk_phrase
+                                & g.phrase
                             )
                             >>  cl::str_p("``")
                         )
@@ -378,14 +516,13 @@
                             cl::eps_p   [self.escape_actions.error]
                             >> *cl::anychar_p
                         )
-                    )                   [post_escape_back(self.out, self.escape_actions, save)]
+                    )                   [post_escape_back(self.out, self.escape_actions)]
                     ;
             }
 
-            cl::rule<Scanner> program, macro, qbk_phrase, escape;
+            cl::rule<Scanner> program, macro, escape;
 
             quickbook_grammar& g;
-            std::string save;
 
             cl::rule<Scanner> const&
             start() const { return program; }
@@ -396,7 +533,8 @@
     };
 
     std::string syntax_highlight(
-        iterator first, iterator last,
+        parse_iterator first,
+        parse_iterator last,
         actions& escape_actions,
         std::string const& source_mode)
     {
Modified: branches/release/tools/quickbook/src/template_stack.cpp
==============================================================================
--- branches/release/tools/quickbook/src/template_stack.cpp	(original)
+++ branches/release/tools/quickbook/src/template_stack.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -9,6 +9,7 @@
 
 #include <cassert>
 #include "template_stack.hpp"
+#include "files.hpp"
 
 #ifdef BOOST_MSVC
 #pragma warning(disable : 4355)
@@ -16,29 +17,28 @@
 
 namespace quickbook
 {
-    template_body::template_body(
+    template_symbol::template_symbol(
+            std::string const& identifier,
+            std::vector<std::string> const& params,
             value const& content,
-            fs::path const& filename,
-            content_type type
-        )
-        : content(content)
-        , filename(filename)
-        , type(type)
+            template_scope const* lexical_parent)
+       : identifier(identifier)
+       , params(params)
+       , content(content)
+       , lexical_parent(lexical_parent)
     {
         assert(content.get_tag() == template_tags::block ||
-            content.get_tag() == template_tags::phrase);
-    }
-
-    bool template_body::is_block() const
-    {
-        return content.get_tag() == template_tags::block;
+            content.get_tag() == template_tags::phrase ||
+            content.get_tag() == template_tags::snippet);
     }
 
     template_stack::template_stack()
         : scope(template_stack::parser(*this))
         , scopes()
+        , parent_1_4(0)
     {
         scopes.push_front(template_scope());
+        parent_1_4 = &scopes.front();
     }
     
     template_symbol* template_stack::find(std::string const& symbol) const
@@ -68,11 +68,10 @@
         return scopes.front();
     }
     
-    // TODO: Should symbols defined by '[import]' use the current scope?
     bool template_stack::add(template_symbol const& ts)
     {
         BOOST_ASSERT(!scopes.empty());
-        BOOST_ASSERT(ts.parent);
+        BOOST_ASSERT(ts.lexical_parent);
         
         if (this->find_top_scope(ts.identifier)) {
             return false;
@@ -88,17 +87,32 @@
     {
         template_scope const& old_front = scopes.front();
         scopes.push_front(template_scope());
-        set_parent_scope(old_front);
+        scopes.front().parent_1_4 = parent_1_4;
+        scopes.front().parent_scope = &old_front;
+        parent_1_4 = &scopes.front();
     }
 
     void template_stack::pop()
     {
+        parent_1_4 = scopes.front().parent_1_4;
         scopes.pop_front();
     }
 
-    void template_stack::set_parent_scope(template_scope const& parent)
+    void template_stack::start_template(template_symbol const* symbol)
     {
-        scopes.front().parent_scope = &parent;
+        // Quickbook 1.4-: When expanding the template continue to use the
+        //                 current scope (the dynamic scope).
+        // Quickbook 1.5+: Use the scope the template was defined in
+        //                 (the static scope).
+        if (symbol->content.get_file()->version() >= 105u)
+        {
+            parent_1_4 = scopes.front().parent_1_4;
+            scopes.front().parent_scope = symbol->lexical_parent;
+        }
+        else
+        {
+            scopes.front().parent_scope = scopes.front().parent_1_4;
+        }
     }
 }
 
Modified: branches/release/tools/quickbook/src/template_stack.hpp
==============================================================================
--- branches/release/tools/quickbook/src/template_stack.hpp	(original)
+++ branches/release/tools/quickbook/src/template_stack.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -12,6 +12,7 @@
 #include <string>
 #include <deque>
 #include <vector>
+#include <cassert>
 #include <boost/tuple/tuple.hpp>
 #include <boost/assert.hpp>
 #include <boost/spirit/include/classic_functor_parser.hpp>
@@ -26,22 +27,6 @@
 {
     namespace fs = boost::filesystem;
 
-    struct template_body
-    {
-        enum content_type
-        {
-            quickbook,
-            raw_output
-        };
-    
-        template_body(value const&, fs::path const&, content_type = quickbook);
-        bool is_block() const;
-
-        stored_value content;
-        fs::path filename;        
-        content_type type;
-    };
-
     struct template_scope;
 
     struct template_symbol
@@ -49,44 +34,23 @@
         template_symbol(
                 std::string const& identifier,
                 std::vector<std::string> const& params,
-                template_body const& body,
-                template_scope const* parent = 0)
-           : identifier(identifier)
-           , params(params)
-           , body(body)
-           , parent(parent)
-           , callouts() {}
-
-           template_symbol(
-                std::string const& identifier,
-                std::vector<std::string> const& params,
                 value const& content,
-                fs::path const& filename,
-                template_scope const* parent = 0)
-           : identifier(identifier)
-           , params(params)
-           , body(content, filename)
-           , parent(parent)
-           , callouts() {}
+                template_scope const* parent = 0);
 
         std::string identifier;
         std::vector<std::string> params;
-        template_body body;
-        
-        // This is only used for quickbook 1.5+, 1.4 uses the dynamic scope.
-        // TODO: I should probably call this something like lexical_parent
-        // or static_parent for clarity.
-        template_scope const* parent;
+        value content;
 
-        stored_value callouts;
+        template_scope const* lexical_parent;
     };
 
     typedef boost::spirit::classic::symbols<template_symbol> template_symbols;
     
     // template scope
     //
-    // 1.4-: parent_scope is the previous scope on the stack
-    //       (the template's dynamic parent).
+    // 1.4-: parent_scope is the previous scope on the dynamic
+    //       lookup chain. This moves up the stack skipping
+    //       1.5 templates (but not 1.5 included files).
     // 1.5+: parent_scope is the template's lexical parent.
     //
     // This means that a search along the parent_scope chain will follow the
@@ -96,8 +60,9 @@
     
     struct template_scope
     {
-        template_scope() : parent_scope() {}
+        template_scope() : parent_scope(), parent_1_4() {}
         template_scope const* parent_scope;
+        template_scope const* parent_1_4;
         template_symbols symbols;
     };
 
@@ -145,8 +110,7 @@
         void push();
         void pop();
 
-        // Set the current scope's parent.
-        void set_parent_scope(template_scope const&);
+        void start_template(template_symbol const*);
 
         boost::spirit::classic::functor_parser<parser> scope;
 
@@ -154,6 +118,7 @@
 
         friend struct parser;
         deque scopes;
+        template_scope const* parent_1_4;
     };
 }
 
Modified: branches/release/tools/quickbook/src/template_tags.hpp
==============================================================================
--- branches/release/tools/quickbook/src/template_tags.hpp	(original)
+++ branches/release/tools/quickbook/src/template_tags.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -19,6 +19,7 @@
         (identifier)
         (block)
         (phrase)
+        (snippet)
     )
 }
 
Modified: branches/release/tools/quickbook/src/utils.cpp
==============================================================================
--- branches/release/tools/quickbook/src/utils.cpp	(original)
+++ branches/release/tools/quickbook/src/utils.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -8,15 +8,9 @@
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 #include "utils.hpp"
-#include "input_path.hpp"
-#include <boost/spirit/include/classic_core.hpp>
-#include <boost/filesystem/v3/fstream.hpp>
 
 #include <cctype>
 #include <cstring>
-#include <stdexcept>
-#include <fstream>
-#include <ostream>
 #include <map>
 
 namespace quickbook { namespace detail
@@ -44,11 +38,6 @@
         }
     }
 
-    void print_space(char ch, std::ostream& out)
-    {
-        out << ch;
-    }
-
     char filter_identifier_char(char ch)
     {
         if (!std::isalnum(static_cast<unsigned char>(ch)))
@@ -56,66 +45,6 @@
         return static_cast<char>(std::tolower(static_cast<unsigned char>(ch)));
     }
 
-    // un-indent a code segment
-    void unindent(std::string& program)
-    {
-        // Erase leading blank lines and newlines:
-        std::string::size_type start = program.find_first_not_of(" \t");
-        if (start != std::string::npos &&
-            (program[start] == '\r' || program[start] == '\n'))
-        {
-            program.erase(0, start);
-        }
-        start = program.find_first_not_of("\r\n");
-        program.erase(0, start);
-
-        if (program.size() == 0)
-            return; // nothing left to do
-
-        // Get the first line indent
-        std::string::size_type indent = program.find_first_not_of(" \t");
-        std::string::size_type pos = 0;
-        if (std::string::npos == indent)
-        {
-            // Nothing left to do here. The code is empty (just spaces).
-            // We clear the program to signal the caller that it is empty
-            // and return early.
-            program.clear();
-            return;
-        }
-
-        // Calculate the minimum indent from the rest of the lines
-        do
-        {
-            pos = program.find_first_not_of("\r\n", pos);
-            if (std::string::npos == pos)
-                break;
-
-            std::string::size_type n = program.find_first_not_of(" \t", pos);
-            if (n != std::string::npos)
-            {
-                char ch = program[n];
-                if (ch != '\r' && ch != '\n') // ignore empty lines
-                    indent = (std::min)(indent, n-pos);
-            }
-        }
-        while (std::string::npos != (pos = program.find_first_of("\r\n", pos)));
-
-        // Trim white spaces from column 0..indent
-        pos = 0;
-        program.erase(0, indent);
-        while (std::string::npos != (pos = program.find_first_of("\r\n", pos)))
-        {
-            if (std::string::npos == (pos = program.find_first_not_of("\r\n", pos)))
-            {
-                break;
-            }
-
-            std::string::size_type next = program.find_first_of("\r\n", pos);
-            program.erase(pos, (std::min)(indent, next-pos));
-        }
-    }
-
     std::string escape_uri(std::string uri)
     {
         for (std::string::size_type n = 0; n < uri.size(); ++n)
@@ -133,124 +62,7 @@
         }
         return uri;
     }
-
-    // Read the first few bytes in a file to see it starts with a byte order
-    // mark. If it doesn't, then write the characters we've already read in.
-    // Although, given how UTF-8 works, if we've read anything in, the files
-    // probably broken.
-
-    template <typename InputIterator, typename OutputIterator>
-    bool check_bom(InputIterator& begin, InputIterator end,
-            OutputIterator out, char const* chars, int length)
-    {
-        char const* ptr = chars;
-
-        while(begin != end && *begin == *ptr) {
-            ++begin;
-            ++ptr;
-            --length;
-            if(length == 0) return true;
-        }
-
-        // Failed to match, so write the skipped characters to storage:
-        while(chars != ptr) *out++ = *chars++;
-
-        return false;
-    }
     
-    template <typename InputIterator, typename OutputIterator>
-    std::string read_bom(InputIterator& begin, InputIterator end,
-            OutputIterator out)
-    {
-        if(begin == end) return "";
-
-        const char* utf8 = "\xef\xbb\xbf" ;
-        const char* utf32be = "\0\0\xfe\xff";
-        const char* utf32le = "\xff\xfe\0\0";
-
-        unsigned char c = *begin;
-        switch(c)
-        {
-        case 0xEF: { // UTF-8
-            return check_bom(begin, end, out, utf8, 3) ? "UTF-8" : "";
-        }
-        case 0xFF: // UTF-16/UTF-32 little endian
-            return !check_bom(begin, end, out, utf32le, 2) ? "" :
-                check_bom(begin, end, out, utf32le + 2, 2) ? "UTF-32" : "UTF-16";
-        case 0: // UTF-32 big endian
-            return check_bom(begin, end, out, utf32be, 4) ? "UTF-32" : "";
-        case 0xFE: // UTF-16 big endian
-            return check_bom(begin, end, out, utf32be + 2, 2) ? "UTF-16" : "";
-        default:
-            return "";
-        }
-    }
-
-    // Copy a string, converting mac and windows style newlines to unix
-    // newlines.
-
-    template <typename InputIterator, typename OutputIterator>
-    bool normalize(InputIterator begin, InputIterator end,
-            OutputIterator out, fs::path const& filename)
-    {
-        std::string encoding = read_bom(begin, end, out);
-
-        if(encoding != "UTF-8" && encoding != "") {
-            outerr(filename) << encoding.c_str()
-                << " is not supported. Please use UTF-8."
-                << std::endl;
-
-            return false;
-        }
-    
-        while(begin != end) {
-            if(*begin == '\r') {
-                *out++ = '\n';
-                ++begin;
-                if(begin != end && *begin == '\n') ++begin;
-            }
-            else {
-                *out++ = *begin++;
-            }
-        }
-        
-        return true;
-    }
-
-    int load(fs::path const& filename, std::string& storage)
-    {
-        using std::endl;
-        using std::ios;
-        using std::ifstream;
-        using std::istream_iterator;
-
-        fs::ifstream in(filename, std::ios_base::in);
-
-        if (!in)
-        {
-            outerr(filename) << "Could not open input file." << endl;
-            return 1;
-        }
-
-        // Turn off white space skipping on the stream
-        in.unsetf(ios::skipws);
-
-        if(!normalize(
-            istream_iterator<char>(in),
-            istream_iterator<char>(),
-            std::back_inserter(storage),
-            filename))
-        {
-            return 1;
-        }
-
-        //  ensure that we have enough trailing newlines to eliminate
-        //  the need to check for end of file in the grammar.
-        storage.push_back('\n');
-        storage.push_back('\n');
-        return 0;
-    }
-
     file_type get_file_type(std::string const& extension)
     {
         static std::map<std::string, file_type> ftypes;
@@ -270,5 +82,3 @@
     }
 
 }}
-
-
Modified: branches/release/tools/quickbook/src/utils.hpp
==============================================================================
--- branches/release/tools/quickbook/src/utils.hpp	(original)
+++ branches/release/tools/quickbook/src/utils.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -11,22 +11,13 @@
 #define BOOST_SPIRIT_QUICKBOOK_UTILS_HPP
 
 #include <string>
-#include <cctype>
-#include <boost/assert.hpp>
-#include <boost/filesystem/v3/path.hpp>
+#include <ostream>
 #include <boost/range/algorithm_ext/push_back.hpp>
 #include <boost/range/adaptor/transformed.hpp>
 
-
-namespace quickbook {
-
-    namespace fs = boost::filesystem;
-
-namespace detail
-{
+namespace quickbook { namespace detail {
     void print_char(char ch, std::ostream& out);
     void print_string(std::basic_string<char> const& str, std::ostream& out);
-    void print_space(char ch, std::ostream& out);
     char filter_identifier_char(char ch);
 
     template <typename Range>
@@ -41,15 +32,8 @@
         return out_name;
     }
 
-    // un-indent a code segment
-    void unindent(std::string& program);
-
     std::string escape_uri(std::string uri);
 
-    // load file into memory with extra trailing newlines to eliminate
-    //  the need to check for end of file in the grammar.
-    int load(fs::path const& filename, std::string& storage);
-
     // given a file extension, return the type of the source file
     // we'll have an internal database for known file types.
 
Modified: branches/release/tools/quickbook/src/values.cpp
==============================================================================
--- branches/release/tools/quickbook/src/values.cpp	(original)
+++ branches/release/tools/quickbook/src/values.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -7,7 +7,7 @@
 =============================================================================*/
 
 #include "values.hpp"
-#include <boost/intrusive_ptr.hpp>
+#include "files.hpp"
 #include <boost/current_function.hpp>
 #include <boost/lexical_cast.hpp>
 
@@ -47,19 +47,17 @@
         value_node::~value_node() {
         }
         
-        value_node* value_node::store() { return this; }
-
-        file_position value_node::get_position() const { UNDEFINED_ERROR(); }
+        file_ptr value_node::get_file() const { UNDEFINED_ERROR(); }
+        string_iterator value_node::get_position() const { UNDEFINED_ERROR(); }
         int value_node::get_int() const { UNDEFINED_ERROR(); }
-        std::string value_node::get_quickbook() const { UNDEFINED_ERROR(); }
-        value_node::qbk_range value_node::get_quickbook_range() const { UNDEFINED_ERROR(); }
-        std::string value_node::get_boostbook() const { UNDEFINED_ERROR(); }
+        string_ref value_node::get_quickbook() const { UNDEFINED_ERROR(); }
+        std::string value_node::get_encoded() const { UNDEFINED_ERROR(); }
         value_node* value_node::get_list() const { UNDEFINED_ERROR(); }
 
         bool value_node::empty() const { return false; }
         bool value_node::check() const { return true; }
         bool value_node::is_list() const { return false; }
-        bool value_node::is_string() const { return false; }
+        bool value_node::is_encoded() const { return false; }
         bool value_node::equals(value_node*) const { UNDEFINED_ERROR(); }
     }
 
@@ -90,7 +88,7 @@
             bool empty() const { UNDEFINED_ERROR(); }
             bool check() const { UNDEFINED_ERROR(); }
             bool is_list() const { UNDEFINED_ERROR(); }
-            bool is_string() const { UNDEFINED_ERROR(); }
+            bool is_encoded() const { UNDEFINED_ERROR(); }
         };
 
         value_list_end_impl value_list_end_impl::instance;
@@ -104,19 +102,19 @@
 
     namespace detail
     {
-        struct value_empty_impl : public value_node
+        struct empty_value_impl : public value_node
         {
             static value_node* new_(value::tag_type t);
 
         protected:
-            explicit value_empty_impl(value::tag_type t)
+            explicit empty_value_impl(value::tag_type t)
                 : value_node(t) {}
 
         private:
             char const* type_name() const { return "empty"; }
         
             virtual value_node* clone() const
-                { return new value_empty_impl(tag_); }
+                { return new empty_value_impl(tag_); }
 
             virtual bool empty() const
                 { return true; }
@@ -130,12 +128,12 @@
             friend value quickbook::empty_value(value::tag_type);
         };
     
-        struct value_nil_impl : public value_empty_impl
+        struct value_nil_impl : public empty_value_impl
         {
             static value_nil_impl instance;
         private:
             value_nil_impl()
-                : value_empty_impl(value::default_tag)
+                : empty_value_impl(value::default_tag)
             {
                 intrusive_ptr_add_ref(&instance);
                 next_ = &value_list_end_impl::instance;
@@ -144,7 +142,7 @@
 
         value_nil_impl value_nil_impl::instance;
 
-        value_node* value_empty_impl::new_(value::tag_type t) {
+        value_node* empty_value_impl::new_(value::tag_type t) {
             // The return value from this function is always placed in an
             // intrusive_ptr which will manage the memory correctly.
             // Note that value_nil_impl increments its reference count
@@ -154,13 +152,13 @@
             if (t == value::default_tag)
                 return &value_nil_impl::instance;
             else
-                return new value_empty_impl(t);
+                return new empty_value_impl(t);
         }
     }
 
     value empty_value(value::tag_type t)
     {
-        return value(detail::value_empty_impl::new_(t));
+        return value(detail::empty_value_impl::new_(t));
     }
 
     ////////////////////////////////////////////////////////////////////////////
@@ -232,81 +230,57 @@
     }
 
     ////////////////////////////////////////////////////////////////////////////
-    // stored_value
-
-    stored_value::stored_value()
-        : detail::value_counted()
-    {
-    }
-
-    stored_value::stored_value(stored_value const& x)
-        : detail::value_counted(x)
-    {
-    }
-
-    stored_value::stored_value(detail::value_base const& x)
-        : detail::value_counted(x.value_->store())
-    {
-    }
-
-    stored_value& stored_value::operator=(stored_value x)
-    {
-        swap(x);
-        return *this;
-    }
-
-    ////////////////////////////////////////////////////////////////////////////
     // Integers
 
     namespace detail
     {
-        struct value_int_impl : public value_node
+        struct int_value_impl : public value_node
         {
         public:
-            explicit value_int_impl(int, value::tag_type);
+            explicit int_value_impl(int, value::tag_type);
         private:
             char const* type_name() const { return "integer"; }
             virtual value_node* clone() const;
             virtual int get_int() const;
-            virtual std::string get_quickbook() const;
-            virtual std::string get_boostbook() const;
+            virtual std::string get_encoded() const;
             virtual bool empty() const;
+            virtual bool is_encoded() const;
             virtual bool equals(value_node*) const;
 
             int value_;
         };
 
-        value_int_impl::value_int_impl(int v, value::tag_type t)
+        int_value_impl::int_value_impl(int v, value::tag_type t)
             : value_node(t)
             , value_(v)
         {}
 
-        value_node* value_int_impl::clone() const
+        value_node* int_value_impl::clone() const
         {
-            return new value_int_impl(value_, tag_);
+            return new int_value_impl(value_, tag_);
         }
 
-        int value_int_impl::get_int() const
+        int int_value_impl::get_int() const
         {
             return value_;
         }
 
-        std::string value_int_impl::get_quickbook() const
+        std::string int_value_impl::get_encoded() const
         {
             return boost::lexical_cast<std::string>(value_);
         }
 
-        std::string value_int_impl::get_boostbook() const
+        bool int_value_impl::empty() const
         {
-            return boost::lexical_cast<std::string>(value_);
+            return false;
         }
 
-        bool value_int_impl::empty() const
+        bool int_value_impl::is_encoded() const
         {
-            return false;
+            return true;
         }
 
-        bool value_int_impl::equals(value_node* other) const {
+        bool int_value_impl::equals(value_node* other) const {
             try {
                 return value_ == other->get_int();
             }
@@ -318,7 +292,7 @@
 
     value int_value(int v, value::tag_type t)
     {
-        return value(new detail::value_int_impl(v, t));
+        return value(new detail::int_value_impl(v, t));
     }
 
     ////////////////////////////////////////////////////////////////////////////
@@ -326,105 +300,79 @@
 
     namespace detail
     {
-        struct value_string_impl : public value_node
+        struct encoded_value_impl : public value_node
         {
         public:
-            explicit value_string_impl(std::string const&, value::tag_type);
+            explicit encoded_value_impl(std::string const&, value::tag_type);
         private:
-            char const* type_name() const { return "boostbook"; }
+            char const* type_name() const { return "encoded text"; }
 
-            virtual ~value_string_impl();
+            virtual ~encoded_value_impl();
             virtual value_node* clone() const;
-            virtual std::string get_boostbook() const;
-            virtual bool is_string() const;
+            virtual std::string get_encoded() const;
             virtual bool empty() const;
+            virtual bool is_encoded() const;
             virtual bool equals(value_node*) const;
 
             std::string value_;
         };
     
-        struct value_qbk_string_impl : public value_node
+        struct qbk_value_impl : public value_node
         {
         public:
-            explicit value_qbk_string_impl(
-                    std::string const&, file_position, value::tag_type);
-            explicit value_qbk_string_impl(
-                    quickbook::iterator begin, quickbook::iterator end,
+            explicit qbk_value_impl(
+                    file_ptr const&,
+                    string_iterator begin,
+                    string_iterator end,
                     value::tag_type);
         private:
             char const* type_name() const { return "quickbook"; }
 
-            virtual ~value_qbk_string_impl();
-            virtual value_node* clone() const;
-            virtual file_position get_position() const;
-            virtual std::string get_quickbook() const;
-            qbk_range get_quickbook_range() const;
-            virtual bool is_string() const;
-            virtual bool empty() const;
-            virtual bool equals(value_node*) const;
-    
-            std::string value_;
-            file_position position_;
-        };
-
-        struct value_qbk_ref_impl : public value_node
-        {
-        public:
-            explicit value_qbk_ref_impl(quickbook::iterator begin, quickbook::iterator end, value::tag_type);
-        private:
-            char const* type_name() const { return "quickbook"; }
-
-            virtual ~value_qbk_ref_impl();
+            virtual ~qbk_value_impl();
             virtual value_node* clone() const;
-            virtual value_node* store();
-            virtual file_position get_position() const;
-            virtual std::string get_quickbook() const;
-            qbk_range get_quickbook_range() const;
-            virtual bool is_string() const;
+            virtual file_ptr get_file() const;
+            virtual string_iterator get_position() const;
+            virtual string_ref get_quickbook() const;
             virtual bool empty() const;
             virtual bool equals(value_node*) const;
 
-            quickbook::iterator begin_;
-            quickbook::iterator end_;
+            file_ptr file_;
+            string_iterator begin_;
+            string_iterator end_;
         };
     
-        struct value_qbk_bbk_impl : public value_node
+        struct encoded_qbk_value_impl : public value_node
         {
         private:
-            char const* type_name() const { return "quickbook/boostbook"; }
+            char const* type_name() const { return "encoded text with quickbook reference"; }
 
-            value_qbk_bbk_impl(
-                std::string const& qbk, std::string const& bbk,
-                file_position const&, value::tag_type);
-            value_qbk_bbk_impl(std::string const&, value::tag_type);
-            value_qbk_bbk_impl(
-                    quickbook::iterator, quickbook::iterator,
+            encoded_qbk_value_impl(file_ptr const&,
+                    string_iterator, string_iterator,
                     std::string const&, value::tag_type);
     
-            virtual ~value_qbk_bbk_impl();
+            virtual ~encoded_qbk_value_impl();
             virtual value_node* clone() const;
-            virtual file_position get_position() const;
-            virtual std::string get_quickbook() const;
-            qbk_range get_quickbook_range() const;
-            virtual std::string get_boostbook() const;
-            virtual bool is_string() const;
+            virtual file_ptr get_file() const;
+            virtual string_iterator get_position() const;
+            virtual string_ref get_quickbook() const;
+            virtual std::string get_encoded() const;
             virtual bool empty() const;
+            virtual bool is_encoded() const;
             virtual bool equals(value_node*) const;
 
-            std::string qbk_value_;
-            std::string bbk_value_;
-            file_position position_;
+            file_ptr file_;
+            string_iterator begin_;
+            string_iterator end_;
+            std::string encoded_value_;
             
-            friend quickbook::value quickbook::qbk_bbk_value(
-                    std::string const&, quickbook::value::tag_type);
-            friend quickbook::value quickbook::qbk_bbk_value(
-                    quickbook::iterator, quickbook::iterator,
+            friend quickbook::value quickbook::encoded_qbk_value(
+                    file_ptr const&, string_iterator, string_iterator,
                     std::string const&, quickbook::value::tag_type);
         };
 
-        // value_string_impl
+        // encoded_value_impl
     
-        value_string_impl::value_string_impl(
+        encoded_value_impl::encoded_value_impl(
                 std::string const& val,
                 value::tag_type tag
             )
@@ -432,125 +380,66 @@
         {
         }
     
-        value_string_impl::~value_string_impl()
+        encoded_value_impl::~encoded_value_impl()
         {
         }
 
-        value_node* value_string_impl::clone() const
+        value_node* encoded_value_impl::clone() const
         {
-            return new value_string_impl(value_, tag_);
+            return new encoded_value_impl(value_, tag_);
         }
     
-        std::string value_string_impl::get_boostbook() const
+        std::string encoded_value_impl::get_encoded() const
             { return value_; }
 
-        bool value_string_impl::is_string() const
-            { return true; }
-
-        bool value_string_impl::empty() const
+        bool encoded_value_impl::empty() const
             { return value_.empty(); }
 
-        bool value_string_impl::equals(value_node* other) const {
-            try {
-                return value_ == other->get_boostbook();
-            }
-            catch(value_undefined_method&) {
-                return false;
-            }
-        }
-
-        // value_qbk_string_impl
-    
-        value_qbk_string_impl::value_qbk_string_impl(
-                std::string const& v,
-                file_position p,
-                value::tag_type tag)
-            : value_node(tag)
-            , value_(v)
-            , position_(p)
-        {}
-
-        value_qbk_string_impl::value_qbk_string_impl(
-                quickbook::iterator begin, quickbook::iterator end,
-                value::tag_type tag)
-            : value_node(tag)
-            , value_(begin, end)
-            , position_(begin.get_position())
-        {}
-    
-        value_qbk_string_impl::~value_qbk_string_impl()
-        {}
-    
-        value_node* value_qbk_string_impl::clone() const
-        {
-            return new value_qbk_string_impl(value_, position_, tag_);
-        }
-
-        file_position value_qbk_string_impl::get_position() const
-            { return position_; }
-
-        std::string value_qbk_string_impl::get_quickbook() const
-            { return value_; }
-
-        value::qbk_range value_qbk_string_impl::get_quickbook_range() const
-            { return qbk_range(
-                iterator(value_.begin(), position_),
-                iterator(value_.end())); }
-
-        bool value_qbk_string_impl::is_string() const
+        bool encoded_value_impl::is_encoded() const
             { return true; }
 
-        bool value_qbk_string_impl::empty() const
-            { return value_.empty(); }
-
-        bool value_qbk_string_impl::equals(value_node* other) const {
+        bool encoded_value_impl::equals(value_node* other) const {
             try {
-                return value_ == other->get_quickbook();
+                return value_ == other->get_encoded();
             }
             catch(value_undefined_method&) {
                 return false;
             }
         }
 
-        // value_qbk_ref_impl
+        // qbk_value_impl
     
-        value_qbk_ref_impl::value_qbk_ref_impl(
-                quickbook::iterator begin, quickbook::iterator end,
+        qbk_value_impl::qbk_value_impl(
+                file_ptr const& f,
+                string_iterator begin,
+                string_iterator end,
                 value::tag_type tag
-            ) : value_node(tag), begin_(begin), end_(end)
+            ) : value_node(tag), file_(f), begin_(begin), end_(end)
         {
         }
     
-        value_qbk_ref_impl::~value_qbk_ref_impl()
+        qbk_value_impl::~qbk_value_impl()
         {
         }
     
-        value_node* value_qbk_ref_impl::clone() const
+        value_node* qbk_value_impl::clone() const
         {
-            return new value_qbk_ref_impl(begin_, end_, tag_);
+            return new qbk_value_impl(file_, begin_, end_, tag_);
         }
 
-        value_node* value_qbk_ref_impl::store()
-        {
-            return new value_qbk_string_impl(begin_, end_, tag_);
-        }
+        file_ptr qbk_value_impl::get_file() const
+            { return file_; }
 
-        file_position value_qbk_ref_impl::get_position() const
-            { return begin_.get_position(); }
+        string_iterator qbk_value_impl::get_position() const
+            { return begin_; }
 
-        std::string value_qbk_ref_impl::get_quickbook() const
-            { return std::string(begin_.base(), end_.base()); }
+        string_ref qbk_value_impl::get_quickbook() const
+            { return string_ref(begin_, end_); }
 
-        value::qbk_range value_qbk_ref_impl::get_quickbook_range() const
-            { return qbk_range(begin_, end_); }
-
-        bool value_qbk_ref_impl::is_string() const
-            { return true; }
-
-        bool value_qbk_ref_impl::empty() const
+        bool qbk_value_impl::empty() const
             { return begin_ == end_; }
     
-        bool value_qbk_ref_impl::equals(value_node* other) const {
+        bool qbk_value_impl::equals(value_node* other) const {
             try {
                 return this->get_quickbook() == other->get_quickbook();
             }
@@ -559,83 +448,60 @@
             }
         }
 
-        // value_qbk_bbk_impl
+        // encoded_qbk_value_impl
     
-        value_qbk_bbk_impl::value_qbk_bbk_impl(
-                std::string const& qbk,
-                std::string const& bbk,
-                file_position const& pos,
+        encoded_qbk_value_impl::encoded_qbk_value_impl(
+                file_ptr const& f,
+                string_iterator begin,
+                string_iterator end,
+                std::string const& encoded,
                 value::tag_type tag)
             : value_node(tag)
-            , qbk_value_(qbk)
-            , bbk_value_(bbk)
-            , position_(pos)
+            , file_(f)
+            , begin_(begin)
+            , end_(end)
+            , encoded_value_(encoded)
             
         {
         }
     
-        value_qbk_bbk_impl::value_qbk_bbk_impl(
-                quickbook::iterator begin,
-                quickbook::iterator end,
-                std::string const& bbk,
-                value::tag_type tag)
-            : value_node(tag)
-            , qbk_value_(begin.base(), end.base())
-            , bbk_value_(bbk)
-            , position_(begin.get_position())
-            
-        {
-        }
-    
-        value_qbk_bbk_impl::value_qbk_bbk_impl(
-                std::string const& val,
-                value::tag_type tag)
-            : value_node(tag)
-            , qbk_value_(val)
-            , bbk_value_(val)
-            , position_()
-        {
-        }
-    
-        value_qbk_bbk_impl::~value_qbk_bbk_impl()
+        encoded_qbk_value_impl::~encoded_qbk_value_impl()
         {
         }
 
-        value_node* value_qbk_bbk_impl::clone() const
+        value_node* encoded_qbk_value_impl::clone() const
         {
-            return new value_qbk_bbk_impl(
-                    qbk_value_, bbk_value_, position_, tag_);
+            return new encoded_qbk_value_impl(
+                    file_, begin_, end_, encoded_value_, tag_);
         }
 
-        file_position value_qbk_bbk_impl::get_position() const
-            { return position_; }
+        file_ptr encoded_qbk_value_impl::get_file() const
+            { return file_; }
 
-        std::string value_qbk_bbk_impl::get_quickbook() const
-            { return qbk_value_; }
+        string_iterator encoded_qbk_value_impl::get_position() const
+            { return begin_; }
 
-        value::qbk_range value_qbk_bbk_impl::get_quickbook_range() const
-            { return qbk_range(
-                iterator(qbk_value_.begin(), position_),
-                iterator(qbk_value_.end())); }
+        string_ref encoded_qbk_value_impl::get_quickbook() const
+            { return string_ref(begin_, end_); }
 
-        std::string value_qbk_bbk_impl::get_boostbook() const
-            { return bbk_value_; }
-
-        bool value_qbk_bbk_impl::is_string() const
-            { return true; }
+        std::string encoded_qbk_value_impl::get_encoded() const
+            { return encoded_value_; }
 
         // Should this test the quickbook, the boostbook or both?
-        bool value_qbk_bbk_impl::empty() const
-            { return bbk_value_.empty(); }
+        bool encoded_qbk_value_impl::empty() const
+            { return encoded_value_.empty(); }
 
-        bool value_qbk_bbk_impl::equals(value_node* other) const {
+        bool encoded_qbk_value_impl::is_encoded() const
+            { return true; }
+
+        bool encoded_qbk_value_impl::equals(value_node* other) const {
             try {
                 return this->get_quickbook() == other->get_quickbook();
             }
             catch(value_undefined_method&) {}
 
             try {
-                return this->get_boostbook() == other->get_boostbook();
+                return this->get_encoded() == other->get_encoded();
             }
             catch(value_undefined_method&) {}
 
@@ -643,31 +509,21 @@
         }
     }
 
-    value qbk_value(iterator x, iterator y, value::tag_type t)
+    value qbk_value(file_ptr const& f, string_iterator x, string_iterator y, value::tag_type t)
     {
-        return value(new detail::value_qbk_ref_impl(x, y, t));
+        return value(new detail::qbk_value_impl(f, x, y, t));
     }
 
-    value qbk_value(std::string const& x, file_position pos, value::tag_type t)
+    value encoded_value(std::string const& x, value::tag_type t)
     {
-        return value(new detail::value_qbk_string_impl(x, pos, t));
+        return value(new detail::encoded_value_impl(x, t));
     }
 
-    value bbk_value(std::string const& x, value::tag_type t)
-    {
-        return value(new detail::value_string_impl(x, t));
-    }
-
-    value qbk_bbk_value(std::string const& x, value::tag_type t)
-    {
-        return value(new detail::value_qbk_bbk_impl(x,t));
-    }
-
-    value qbk_bbk_value(
-            iterator x, iterator y,
+    value encoded_qbk_value(
+            file_ptr const& f, string_iterator x, string_iterator y,
             std::string const& z, value::tag_type t)
     {
-        return value(new detail::value_qbk_bbk_impl(x,y,z,t));
+        return value(new detail::encoded_qbk_value_impl(f,x,y,z,t));
     }
 
     //////////////////////////////////////////////////////////////////////////
@@ -789,7 +645,6 @@
 
             virtual ~value_list_impl();
             virtual value_node* clone() const;
-            virtual value_node* store();
             virtual bool empty() const;
             virtual bool equals(value_node*) const;
 
@@ -825,35 +680,6 @@
             return new value_list_impl(*this);
         }
 
-        value_node* value_list_impl::store()
-        {
-            value_node* pos = head_;
-            boost::intrusive_ptr<value_node> new_node;
-
-            for(;;) {
-                if(pos == &value_list_end_impl::instance)
-                    return this;
-                new_node = pos->store();
-                if(new_node.get() != pos) break;
-                pos = pos->next_;
-            }
-
-            value_list_builder build;
-
-            value_node* pos2 = head_;
-
-            for(;pos2 != pos; pos2 = pos2->next_)
-                build.append(pos2);
-
-            build.append(new_node.get());
-            pos2 = pos2->next_;
-
-            for(;pos2 != &value_list_end_impl::instance; pos2 = pos2->next_)
-                build.append(pos2->store());
-
-            return new value_list_impl(build, tag_);
-        }
-
         bool value_list_impl::empty() const
         {
             return head_ == &value_list_end_impl::instance;
@@ -979,6 +805,10 @@
         list_tag = value::default_tag;
     }
 
+    void value_builder::set_tag(value::tag_type tag) {
+        list_tag = tag;
+    }
+
     void value_builder::insert(value const& item) {
         current.append(item.value_);
     }
Modified: branches/release/tools/quickbook/src/values.hpp
==============================================================================
--- branches/release/tools/quickbook/src/values.hpp	(original)
+++ branches/release/tools/quickbook/src/values.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -16,14 +16,14 @@
 #include <cassert>
 #include <boost/scoped_ptr.hpp>
 #include <boost/iterator/iterator_traits.hpp>
-#include <boost/range/iterator_range.hpp>
 #include <stdexcept>
 #include "fwd.hpp"
+#include "string_ref.hpp"
+#include "files.hpp"
 
 namespace quickbook
 {
     struct value;
-    struct stored_value;
     struct value_builder;
     struct value_error;
 
@@ -40,7 +40,6 @@
 
         public:
             typedef int tag_type;
-            typedef boost::iterator_range<quickbook::iterator> qbk_range;
 
         protected:
             explicit value_node(tag_type);
@@ -49,18 +48,17 @@
         public:
             virtual char const* type_name() const = 0;
             virtual value_node* clone() const = 0;
-            virtual value_node* store();
 
-            virtual file_position get_position() const;
-            virtual std::string get_quickbook() const;
-            virtual std::string get_boostbook() const;
-            virtual qbk_range get_quickbook_range() const;
+            virtual file_ptr get_file() const;
+            virtual string_iterator get_position() const;
+            virtual string_ref get_quickbook() const;
+            virtual std::string get_encoded() const;
             virtual int get_int() const;
 
             virtual bool check() const;
             virtual bool empty() const;
+            virtual bool is_encoded() const;
             virtual bool is_list() const;
-            virtual bool is_string() const;
             virtual bool equals(value_node*) const;
 
             virtual value_node* get_list() const;
@@ -89,7 +87,6 @@
             typedef iterator const_iterator;
             typedef value_node::tag_type tag_type;
             enum { default_tag = 0 };
-            typedef boost::iterator_range<quickbook::iterator> qbk_range;
 
         protected:
             explicit value_base(value_node* base)
@@ -104,22 +101,22 @@
         public:
             bool check() const { return value_->check(); }
             bool empty() const { return value_->empty(); }
+            bool is_encoded() const { return value_->is_encoded(); }
             bool is_list() const { return value_->is_list(); }
-            bool is_string() const { return value_->is_string(); }
 
             iterator begin() const;
             iterator end() const;
 
             // Item accessors
             int get_tag() const { return value_->tag_; }
-            file_position get_position() const
+            file_ptr get_file() const
+            { return value_->get_file(); }
+            string_iterator get_position() const
             { return value_->get_position(); }
-            std::string get_quickbook() const
+            string_ref get_quickbook() const
             { return value_->get_quickbook(); }
-            qbk_range get_quickbook_range() const
-            { return value_->get_quickbook_range(); }
-            std::string get_boostbook() const
-            { return value_->get_boostbook(); }
+            std::string get_encoded() const
+            { return value_->get_encoded(); }
             int get_int() const
             { return value_->get_int(); }
 
@@ -134,7 +131,6 @@
             // value_builder needs to access 'value_' to get the node
             // from a value.
             friend struct quickbook::value_builder;
-            friend struct quickbook::stored_value;
         };
         
         ////////////////////////////////////////////////////////////////////////
@@ -237,33 +233,27 @@
         void swap(value& x) { detail::value_counted::swap(x); }
     };
     
-    struct stored_value : public detail::value_counted
-    {
-    public:
-        stored_value();
-        stored_value(stored_value const&);
-        stored_value(detail::value_base const&);
-        stored_value& operator=(stored_value);
-        void swap(stored_value& x) { detail::value_counted::swap(x); }
-    };
-
     // Empty
     value empty_value(value::tag_type = value::default_tag);
 
     // Integers
     value int_value(int, value::tag_type = value::default_tag);
 
-    // Boostbook and quickbook strings
-    value qbk_value(iterator, iterator, value::tag_type = value::default_tag);
-    value qbk_value(std::string const&,
-            file_position = file_position(),
-            value::tag_type = value::default_tag);
-    value bbk_value(std::string const&, value::tag_type = value::default_tag);
-    value qbk_bbk_value(std::string const&,
+    // String types
+
+    // Quickbook strings contain a reference to the original quickbook source.
+    value qbk_value(file_ptr const&, string_iterator, string_iterator,
             value::tag_type = value::default_tag);
-    value qbk_bbk_value(iterator, iterator, std::string const&,
+
+    // Encoded strings are either plain text or boostbook.
+    value encoded_value(std::string const&,
             value::tag_type = value::default_tag);
 
+    // An encoded quickbook string is an encoded string that contains a
+    // reference to the quickbook source it was generated from.
+    value encoded_qbk_value(file_ptr const&, string_iterator, string_iterator,
+            std::string const&, value::tag_type = value::default_tag);
+
     ////////////////////////////////////////////////////////////////////////////
     // Value Builder
     //
Modified: branches/release/tools/quickbook/src/values_parse.hpp
==============================================================================
--- branches/release/tools/quickbook/src/values_parse.hpp	(original)
+++ branches/release/tools/quickbook/src/values_parse.hpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -44,7 +44,7 @@
             return true;
         }
 
-        void success() { builder.finish_list(); }
+        void success(parse_iterator, parse_iterator) { builder.finish_list(); }
         void failure() { builder.clear_list(); }
 
         value_builder& builder;
@@ -57,24 +57,15 @@
             typedef void type;
         };
 
-        value_entry(value_builder& b)
-            : b(b) {}
+        value_entry(value_builder& b, file_ptr* current_file)
+            : b(b), current_file(current_file) {}
 
-        template <typename Iterator>
-        void operator()(Iterator begin, Iterator end,
+        void operator()(parse_iterator begin, parse_iterator end,
                 value::tag_type tag = value::default_tag) const
         {
-            b.insert(qbk_value(begin, end, tag));
+            b.insert(qbk_value(*current_file, begin.base(), end.base(), tag));
         }
 
-        template <typename Iterator>
-        void operator()(Iterator begin, Iterator,
-                std::string const& v,
-                value::tag_type tag = value::default_tag) const
-        {
-            b.insert(qbk_value(v, begin.get_position(), tag));
-        }
-        
         void operator()(int v,
             value::tag_type tag = value::default_tag) const
         {
@@ -82,22 +73,9 @@
         }
 
         value_builder& b;
+        file_ptr* current_file;
     };
 
-    struct value_reset
-    {
-        typedef void result_type;
-    
-        value_reset(value_builder& b)
-            : b(b) {}
-
-        void operator()() const {
-            b.reset();
-        }
-
-        value_builder& b;
-    };
-    
     struct value_sort
     {
         typedef void result_type;
@@ -114,12 +92,11 @@
 
     struct value_parser
     {
-        value_parser()
+        value_parser(file_ptr* current_file)
             : builder()
             , save(builder)
             , list(builder)
-            , entry(builder)
-            , reset(builder)
+            , entry(value_entry(builder, current_file))
             , sort(builder)
             {}
     
@@ -129,7 +106,6 @@
         scoped_parser<value_builder_save> save;
         scoped_parser<value_builder_list> list;
         ph::function<value_entry> entry;
-        ph::function<value_reset> reset;
         ph::function<value_sort> sort;
     };
 }
Modified: branches/release/tools/quickbook/test/Jamfile.v2
==============================================================================
--- branches/release/tools/quickbook/test/Jamfile.v2	(original)
+++ branches/release/tools/quickbook/test/Jamfile.v2	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -16,81 +16,100 @@
 build-project command-line ;
 build-project snippets ;
 build-project "include" ;
+build-project versions ;
+build-project xinclude ;
 
 import quickbook-testing : quickbook-test quickbook-error-test ;
 
 test-suite quickbook.test :
-    [ quickbook-test quickbook-manual ]
-    [ quickbook-test code-block ]
-    [ quickbook-test code-block-1 ]
-    [ quickbook-test code-block-2 ]
-    [ quickbook-test code-block-3 ]
-    [ quickbook-test code-block-teletype ]
-    [ quickbook-test code-block-cpp ]
-    [ quickbook-test code-block-python ]
-    [ quickbook-test code-snippet ]
-    [ quickbook-test preformatted ]
-    [ quickbook-test link ]
-    [ quickbook-test escape ]
-    [ quickbook-test templates ]
-    [ quickbook-test templates_1_4 ]
-    [ quickbook-test templates_1_5 ]
-    [ quickbook-test template-section ]
-    [ quickbook-test mismatched-brackets-1 ]
-    [ quickbook-test mismatched-brackets-2 ]
-    [ quickbook-error-test mismatched-brackets-3 ]
-    [ quickbook-test xinclude : : : <quickbook-xinclude-base>../src ]
-    [ quickbook-test import ]
-    [ quickbook-test include_1_5 ]
-    [ quickbook-test include_1_6 ]
-    [ quickbook-test include_1_6-2 ]
-    [ quickbook-test section_1_4 ]
-    [ quickbook-test section_1_5 ]
-    [ quickbook-test section_1_5-unclosed ]
-    [ quickbook-test heading_1_1 ]
-    [ quickbook-test heading_1_3 ]
-    [ quickbook-test heading_1_6 ]
-    [ quickbook-test identifier_1_5 ]
-    [ quickbook-test identifier_1_6 ]
-    [ quickbook-test para-test ]
-    [ quickbook-test variablelist ]
-    [ quickbook-test table_1_3 ]
-    [ quickbook-test table_1_5 ]
-    [ quickbook-test image_1_5 ]
-    [ quickbook-test list_test ]
-    [ quickbook-test cond_phrase ]
-    [ quickbook-test macro ]
-    [ quickbook-test callouts ]
-    [ quickbook-test simple_markup ]
-    [ quickbook-test xml-escape_1_2 ]
-    [ quickbook-test xml-escape_1_5 ]
-    [ quickbook-test blocks ]
-    [ quickbook-test elements_1_5 ]
-    [ quickbook-test elements_1_6 ]
-    [ quickbook-test newline ]
-    [ quickbook-test anchor ]
-    [ quickbook-test command_line_macro : : : <quickbook-test-define>__macro__=*bold* ]
-    [ quickbook-error-test fail-include ]
-    [ quickbook-error-test fail-import ]
-    [ quickbook-error-test fail-template-arguments1 ]
-    [ quickbook-error-test fail-template-arguments2 ]
-    [ quickbook-error-test fail-template-arguments3 ]
-    [ quickbook-error-test fail-cpp-mismatched-escape ]
-    [ quickbook-error-test fail-python-mismatched-escape ]
-    [ quickbook-error-test fail-post-process ]
-    [ quickbook-error-test fail-parse-error1 ]
-    [ quickbook-error-test fail-parse-error2 ]
-    [ quickbook-error-test fail-template-lookup1 ]
-    [ quickbook-error-test fail-template-section-1 ]
-    [ quickbook-error-test fail-template-section-2 ]
-    [ quickbook-error-test fail-template-section-3 ]
-    [ quickbook-error-test fail-unknown-quickbook-1 ]
-    [ quickbook-error-test fail-unknown-quickbook-2 ]
-    [ quickbook-error-test fail-unknown-quickbook-3 ]
-    [ quickbook-error-test fail-mismatched-boostbook-escape ]
-    [ quickbook-test utf-8 ]
-    [ quickbook-test utf-8-bom ]
-    [ quickbook-test unicode-escape ]
-    [ quickbook-error-test utf-16be-bom ]
-    [ quickbook-error-test utf-16le-bom ]
+    [ quickbook-test anchor-1_1 ]
+    [ quickbook-test anchor-1_6 ]
+    [ quickbook-test blocks-1_5 ]
+    [ quickbook-test callouts-1_5 ]
+    [ quickbook-test code-1_1 ]
+    [ quickbook-test code-1_5 ]
+    [ quickbook-test code_cpp-1_5 ]
+    [ quickbook-error-test code_cpp_mismatched_escape-1_4-fail ]
+    [ quickbook-test code_python-1_5 ]
+    [ quickbook-error-test code_python_mismatched_escape-1_4-fail ]
+    [ quickbook-test code_snippet-1_1 ]
+    [ quickbook-test code_teletype-1_5 ]
+    [ quickbook-test command_line_macro-1_1 : : :
+        <quickbook-test-define>__macro__=*bold*
+        <quickbook-test-define>__empty__ ]
+    [ quickbook-error-test command_line_macro-1_1-invalid :
+        command_line_macro-1_1.quickbook :
+        <testing.arg>-Dsomething[] ]
+    [ quickbook-test cond_phrase-1_5 ]
+    [ quickbook-test elements-1_5 ]
+    [ quickbook-test elements-1_6 ]
+    [ quickbook-test escape-1_1 ]
+    [ quickbook-test escape-1_6 ]
+    [ quickbook-error-test escape-mismatched-1_5-fail ]
+    [ quickbook-test heading-1_1 ]
+    [ quickbook-test heading-1_3 ]
+    [ quickbook-test heading-1_5 ]
+    [ quickbook-test heading-1_6 ]
+    [ quickbook-error-test heading_unclosed-1_4-fail ]
+    [ quickbook-test hr-1_5 ]
+    [ quickbook-test hr-1_6 ]
+    [ quickbook-test identifier-1_5 ]
+    [ quickbook-test identifier-1_6 ]
+    [ quickbook-test image-1_5 ]
+    [ quickbook-test image-1_6 ]
+    [ quickbook-error-test import-1_1-fail ]
+    [ quickbook-error-test include-1_1-fail ]
+    [ quickbook-test include-1_5 ]
+    [ quickbook-test include-1_6 ]
+    [ quickbook-test include2-1_6 ]
+    [ quickbook-error-test include_win_path-1_6-fail ]
+    [ quickbook-test link-1_1 ]
+    [ quickbook-test link-1_6 ]
+    [ quickbook-test list_test-1_5 ]
+    [ quickbook-test list_test-1_6 ]
+    [ quickbook-test macro-1_5 ]
+    [ quickbook-test macro-1_6 ]
+    [ quickbook-error-test mismatched_brackets-1_1-fail ]
+    [ quickbook-test mismatched_brackets1-1_1 ]
+    [ quickbook-test mismatched_brackets2-1_1 ]
+    [ quickbook-test newline-1_1 ]
+    [ quickbook-test para_test-1_5 ]
+    [ quickbook-error-test post_process-fail ]
+    [ quickbook-test preformatted-1_1 ]
+    [ quickbook-test preformatted-1_6 ]
+    [ quickbook-test role-1_6 ]
+    [ quickbook-test section-1_4 ]
+    [ quickbook-test section-1_5-unclosed ]
+    [ quickbook-test section-1_5 ]
+    [ quickbook-test simple_markup-1_5 ]
+    [ quickbook-test svg-1_1 ]
+    [ quickbook-test table-1_3 ]
+    [ quickbook-test table-1_5 ]
+    [ quickbook-test table-1_6 ]
+    [ quickbook-error-test template_arguments1-1_1-fail ]
+    [ quickbook-error-test template_arguments2-1_1-fail ]
+    [ quickbook-error-test template_arguments3-1_1-fail ]
+    [ quickbook-test template_section-1_5 ]
+    [ quickbook-error-test template_section1-1_5-fail ]
+    [ quickbook-error-test template_section2-1_5-fail ]
+    [ quickbook-error-test template_section3-1_5-fail ]
+    [ quickbook-test templates-1_3 ]
+    [ quickbook-test templates-1_4 ]
+    [ quickbook-test templates-1_5 ]
+    [ quickbook-test unicode_escape-1_5 ]
+    [ quickbook-test unmatched_element-1_5 ]
+    [ quickbook-test unmatched_element-1_6 ]
+    [ quickbook-error-test utf16be_bom-1_5-fail ]
+    [ quickbook-error-test utf16le_bom-1_5-fail ]
+    [ quickbook-test utf8-1_5 ]
+    [ quickbook-test utf8_bom-1_5 ]
+    [ quickbook-error-test variablelist-1_5-fail ]
+    [ quickbook-test variablelist-1_5 ]
+    [ quickbook-error-test version-0_1-fail ]
+    [ quickbook-error-test version-1_7-fail ]
+    [ quickbook-error-test version-2_0-fail ]
+    [ quickbook-test xml_escape-1_2 ]
+    [ quickbook-test xml_escape-1_5 ]
+
+    [ quickbook-test quickbook_manual-1_4 ]
     ;
Deleted: branches/release/tools/quickbook/test/anchor.gold
==============================================================================
--- branches/release/tools/quickbook/test/anchor.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="anchor_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Anchor Test</title>
-  <section id="anchor_test.anchors">
-    <title>Anchors</title>
-    <para>
-      <anchor id="a1"/>A paragraph containing several anchors. <anchor id="a2"/>We
-      want to make sure they appear in the correct place. <anchor id="a3"/>
-    </para>
-    <bridgehead renderas="sect3" id="anchor_test.anchors.h0">
-      <phrase id="anchor_test.anchors.this_heading_shouldn_t_pick_up_the_previous_anchor"/><link
-      linkend="anchor_test.anchors.this_heading_shouldn_t_pick_up_the_previous_anchor">This
-      heading shouldn't pick up the previous anchor</link>
-    </bridgehead>
-    <anchor id="a4"/>
-    <bridgehead renderas="sect3" id="anchor_test.anchors.h1">
-      <phrase id="anchor_test.anchors.this_heading_should_pick_up_the_previous_anchor"/><link
-      linkend="anchor_test.anchors.this_heading_should_pick_up_the_previous_anchor">This
-      heading should pick up the previous anchor</link>
-    </bridgehead>
-    <anchor id="a5"/>
-    <bridgehead renderas="sect3" id="anchor_test.anchors.h2">
-      <phrase id="anchor_test.anchors.and_this_one"/><link linkend="anchor_test.anchors.and_this_one">And
-      this one</link>
-    </bridgehead>
-    <anchor id="a6"/>
-    <bridgehead renderas="sect3" id="anchor_test.anchors.h3">
-      <phrase id="anchor_test.anchors.also_this_one"/><link linkend="anchor_test.anchors.also_this_one">Also
-      this one</link>
-    </bridgehead>
-    <anchor id="a7"/>
-    <bridgehead renderas="sect3" id="anchors.finally_this">
-      Finally this
-    </bridgehead>
-    <anchor id="a8"/>
-  </section>
-  <section id="anchor_test.section_anchor">
-    <title><anchor id="a9"/>Section Anchor</title>
-    <section id="anchor_test.nested_section">
-      <title><anchor id="a10"/>Nested Section</title>
-    </section>
-    <anchor id="a11"/>
-  </section>
-  <section id="anchor_test.conditional_section_anchor">
-    <title><anchor id="a12"/>Conditional Section Anchor</title>
-  </section>
-  <section id="anchor_test.lists">
-    <title>Lists</title> <anchor id="a14"/>
-    <itemizedlist>
-      <listitem>
-        <simpara>
-          Item 1
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Item 2
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Nested List <anchor id="a15"/>
-          <itemizedlist>
-            <listitem>
-              <simpara>
-                Nested Item 1
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-                Nested Item 2
-              </simpara>
-            </listitem>
-          </itemizedlist>
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Item 3
-        </simpara>
-      </listitem>
-    </itemizedlist>
-  </section>
-</article>
Deleted: branches/release/tools/quickbook/test/anchor.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/anchor.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,50 +0,0 @@
-[article Anchor Test
-]
-
-[section Anchors]
-
-[#a1] A paragraph containing several anchors. [#a2] We want to make sure
-they appear in the correct place. [#a3]
-
-[heading This heading shouldn't pick up the previous anchor]
-
-[#a4]
-
-[heading This heading should pick up the previous anchor]
-
-[#a5]
-[heading And this one]
-
-[#a6][heading Also this one]
-
-[#a7][h3 Finally this]
-
-[#a8]
-
-[endsect]
-
-[#a9]
-[section Section Anchor]
-[#a10][section Nested Section]
-[endsect]
-[/ This anchor is invalid, I'm not sure what to do with it]
-[#a11]
-[endsect]
-
-[#a12][?__not_defined__ #a13]
-[section Conditional Section Anchor]
-[endsect]
-
-[section Lists]
-
-[#a14]
-
-* Item 1
-* Item 2
-* Nested List
-  [#a15]
-  * Nested Item 1
-  * Nested Item 2
-* Item 3
-
-[endsect]
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/blocks.gold
==============================================================================
--- branches/release/tools/quickbook/test/blocks.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="various_blocks" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Various blocks</title>
-  <bridgehead renderas="sect2" id="various_blocks.h0">
-    <phrase id="various_blocks.blockquotes"/><link linkend="various_blocks.blockquotes">Blockquotes</link>
-  </bridgehead>
-  <para>
-    Here's a blockquote:
-  </para>
-  <blockquote>
-    <para>
-      Blockquote.
-    </para>
-  </blockquote>
-  <para>
-    And another:
-  </para>
-  <blockquote>
-    <para>
-      Blockquote first paragraph.
-    </para>
-    <para>
-      Blockquote second paragraph.
-    </para>
-  </blockquote>
-  <bridgehead renderas="sect2" id="various_blocks.h1">
-    <phrase id="various_blocks.admonitions"/><link linkend="various_blocks.admonitions">Admonitions</link>
-  </bridgehead>
-  <warning>
-    <para>
-      Warning
-    </para>
-  </warning>
-  <caution>
-    <para>
-      Caution
-    </para>
-  </caution>
-  <important>
-    <para>
-      Important
-    </para>
-  </important>
-  <note>
-    <para>
-      Note
-    </para>
-  </note>
-  <tip>
-    <para>
-      Tip
-    </para>
-  </tip>
-  <warning>
-    <para>
-      Warning first paragraph.
-    </para>
-    <para>
-      Warning second paragraph.
-    </para>
-  </warning>
-  <bridgehead renderas="sect2" id="various_blocks.h2">
-    <phrase id="various_blocks.blurb"/><link linkend="various_blocks.blurb">Blurb</link>
-  </bridgehead>
-  <sidebar role="blurb">
-  <para>
-    Blurb
-  </para>
-  </sidebar>
-  <bridgehead renderas="sect2" id="various_blocks.h3">
-    <phrase id="various_blocks.inline_blocks"/><link linkend="various_blocks.inline_blocks">Inline
-    blocks</link>
-  </bridgehead>
-  <blockquote>
-    <para>
-      Blockquote containing a footnote<footnote id="various_blocks.f0">
-      <para>
-        Here it is!
-      </para>
-      </footnote>.
-    </para>
-  </blockquote>
-  <para>
-    [tipping point]
-  </para>
-  <para>
-    Multiple paragraphs because of the inline blocks.
-  </para>
-  <warning>
-    <para>
-      Warning
-    </para>
-  </warning>
-  <para>
-    This line should appear as a separate paragraph.
-  </para>
-  <warning>
-    <para>
-      Warning
-    </para>
-  </warning>
-  <itemizedlist>
-    <listitem>
-      <simpara>
-        This should be a list item because it's preceded by block markup.
-      </simpara>
-    </listitem>
-  </itemizedlist>
-</article>
Deleted: branches/release/tools/quickbook/test/blocks.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/blocks.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,46 +0,0 @@
-[article Various blocks
-[quickbook 1.5]
-]
-
-[heading Blockquotes]
-
-Here's a blockquote:
-
-[:Blockquote.]
-
-And another:
-
-[:
-Blockquote first paragraph.
-
-Blockquote second paragraph.
-]
-
-[heading Admonitions]
-
-[warning Warning]
-[caution Caution]
-[important Important]
-[note Note]
-[tip Tip]
-
-[warning Warning first paragraph.
-
-Warning second paragraph.]
-
-[heading Blurb]
-
-[blurb Blurb]
-
-[heading Inline blocks]
-
-[: Blockquote containing a footnote[footnote Here it is!].]
-
-[/ Unfortunately footnotes currently can't contain blocks.]
-
-[/ Quickbook shouldn't think that this is a tip]
-[tipping point]
-
-Multiple paragraphs because of the inline blocks. [warning Warning] This
-line should appear as a separate paragraph.[warning Warning]
-* This should be a list item because it's preceded by block markup.
\ No newline at end of file
Copied: branches/release/tools/quickbook/test/callouts-1_5.gold (from r75700, /trunk/tools/quickbook/test/callouts-1_5.gold)
==============================================================================
--- /trunk/tools/quickbook/test/callouts-1_5.gold	(original)
+++ branches/release/tools/quickbook/test/callouts-1_5.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -12,7 +12,8 @@
   <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c0" linkends="callout_tests.c1" />
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
   </para>
   <calloutlist>
     <callout arearefs="callout_tests.c0" id="callout_tests.c1">
@@ -27,7 +28,8 @@
   <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <co id="callout_tests.c2" linkends="callout_tests.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
   </para>
   <calloutlist>
     <callout arearefs="callout_tests.c2" id="callout_tests.c3">
@@ -44,7 +46,8 @@
   <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <co id="callout_tests.c4" linkends="callout_tests.c5" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
   </para>
   <calloutlist>
     <callout arearefs="callout_tests.c4" id="callout_tests.c5">
@@ -61,7 +64,8 @@
   <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <co id="callout_tests.c6" linkends="callout_tests.c7" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
   </para>
   <calloutlist>
     <callout arearefs="callout_tests.c6" id="callout_tests.c7">
@@ -79,7 +83,8 @@
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <co id="callout_tests.c8" linkends="callout_tests.c9" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
   <co id="callout_tests.c10" linkends="callout_tests.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c12" linkends="callout_tests.c13" />
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
   </para>
   <calloutlist>
     <callout arearefs="callout_tests.c8" id="callout_tests.c9">
@@ -99,7 +104,8 @@
     </callout>
   </calloutlist>
   <para>
-<programlisting><co id="callout_tests.c14" linkends="callout_tests.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c16" linkends="callout_tests.c17" /></programlisting>
+<programlisting><co id="callout_tests.c14" linkends="callout_tests.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c16" linkends="callout_tests.c17" />
+</programlisting>
   </para>
   <calloutlist>
     <callout arearefs="callout_tests.c14" id="callout_tests.c15">
@@ -124,7 +130,8 @@
     <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c0" linkends="callout_tests.test_section.c1" />
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
     </para>
     <calloutlist>
       <callout arearefs="callout_tests.test_section.c0" id="callout_tests.test_section.c1">
@@ -139,7 +146,8 @@
     <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <co id="callout_tests.test_section.c2" linkends="callout_tests.test_section.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
     </para>
     <calloutlist>
       <callout arearefs="callout_tests.test_section.c2" id="callout_tests.test_section.c3">
@@ -156,7 +164,8 @@
     <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <co id="callout_tests.test_section.c4" linkends="callout_tests.test_section.c5" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
     </para>
     <calloutlist>
       <callout arearefs="callout_tests.test_section.c4" id="callout_tests.test_section.c5">
@@ -173,7 +182,8 @@
     <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <co id="callout_tests.test_section.c6" linkends="callout_tests.test_section.c7" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
     </para>
     <calloutlist>
       <callout arearefs="callout_tests.test_section.c6" id="callout_tests.test_section.c7">
@@ -191,7 +201,8 @@
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <co id="callout_tests.test_section.c8" linkends="callout_tests.test_section.c9" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
   <co id="callout_tests.test_section.c10" linkends="callout_tests.test_section.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c12" linkends="callout_tests.test_section.c13" />
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
     </para>
     <calloutlist>
       <callout arearefs="callout_tests.test_section.c8" id="callout_tests.test_section.c9">
@@ -211,7 +222,8 @@
       </callout>
     </calloutlist>
     <para>
-<programlisting><co id="callout_tests.test_section.c14" linkends="callout_tests.test_section.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c16" linkends="callout_tests.test_section.c17" /></programlisting>
+<programlisting><co id="callout_tests.test_section.c14" linkends="callout_tests.test_section.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c16" linkends="callout_tests.test_section.c17" />
+</programlisting>
     </para>
     <calloutlist>
       <callout arearefs="callout_tests.test_section.c14" id="callout_tests.test_section.c15">
Deleted: branches/release/tools/quickbook/test/callouts.gold
==============================================================================
--- branches/release/tools/quickbook/test/callouts.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,251 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="callout_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Callout Tests</title>
-  <para>
-    Example 1:
-  </para>
-  <para>
-    Now we can define a function that simulates an ordinary six-sided die.
-  </para>
-  <para>
-<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
-  <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c0" linkends="callout_tests.c1" />
-<phrase role="special">}</phrase>
-
-</programlisting>
-  </para>
-  <calloutlist>
-    <callout arearefs="callout_tests.c0" id="callout_tests.c1">
-      <para>
-        create a uniform_int distribution
-      </para>
-    </callout>
-  </calloutlist>
-  <para>
-    Example 2:
-  </para>
-  <para>
-<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
-  <co id="callout_tests.c2" linkends="callout_tests.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase>
-
-</programlisting>
-  </para>
-  <calloutlist>
-    <callout arearefs="callout_tests.c2" id="callout_tests.c3">
-      <important>
-        <para>
-          test
-        </para>
-      </important>
-    </callout>
-  </calloutlist>
-  <para>
-    Example 3:
-  </para>
-  <para>
-<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
-  <co id="callout_tests.c4" linkends="callout_tests.c5" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase>
-
-</programlisting>
-  </para>
-  <calloutlist>
-    <callout arearefs="callout_tests.c4" id="callout_tests.c5">
-      <important>
-        <para>
-          test
-        </para>
-      </important>
-    </callout>
-  </calloutlist>
-  <para>
-    Example 3 (again!):
-  </para>
-  <para>
-<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
-  <co id="callout_tests.c6" linkends="callout_tests.c7" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase>
-
-</programlisting>
-  </para>
-  <calloutlist>
-    <callout arearefs="callout_tests.c6" id="callout_tests.c7">
-      <important>
-        <para>
-          test
-        </para>
-      </important>
-    </callout>
-  </calloutlist>
-  <para>
-    Example 4:
-  </para>
-  <para>
-<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
-  <co id="callout_tests.c8" linkends="callout_tests.c9" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<co id="callout_tests.c10" linkends="callout_tests.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c12" linkends="callout_tests.c13" />
-<phrase role="special">}</phrase>
-
-</programlisting>
-  </para>
-  <calloutlist>
-    <callout arearefs="callout_tests.c8" id="callout_tests.c9">
-      <para>
-        callout 1
-      </para>
-    </callout>
-    <callout arearefs="callout_tests.c10" id="callout_tests.c11">
-      <para>
-        callout 2
-      </para>
-    </callout>
-    <callout arearefs="callout_tests.c12" id="callout_tests.c13">
-      <para>
-        create a uniform_int distribution
-      </para>
-    </callout>
-  </calloutlist>
-  <para>
-<programlisting><co id="callout_tests.c14" linkends="callout_tests.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c16" linkends="callout_tests.c17" />
-</programlisting>
-  </para>
-  <calloutlist>
-    <callout arearefs="callout_tests.c14" id="callout_tests.c15">
-      <para>
-        callout 2
-      </para>
-    </callout>
-    <callout arearefs="callout_tests.c16" id="callout_tests.c17">
-      <para>
-        create a uniform_int distribution
-      </para>
-    </callout>
-  </calloutlist>
-  <section id="callout_tests.test_section">
-    <title><link linkend="callout_tests.test_section">Try callouts in a section</link></title>
-    <para>
-      Example 1:
-    </para>
-    <para>
-      Now we can define a function that simulates an ordinary six-sided die.
-    </para>
-    <para>
-<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
-  <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c0" linkends="callout_tests.test_section.c1" />
-<phrase role="special">}</phrase>
-
-</programlisting>
-    </para>
-    <calloutlist>
-      <callout arearefs="callout_tests.test_section.c0" id="callout_tests.test_section.c1">
-        <para>
-          create a uniform_int distribution
-        </para>
-      </callout>
-    </calloutlist>
-    <para>
-      Example 2:
-    </para>
-    <para>
-<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
-  <co id="callout_tests.test_section.c2" linkends="callout_tests.test_section.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase>
-
-</programlisting>
-    </para>
-    <calloutlist>
-      <callout arearefs="callout_tests.test_section.c2" id="callout_tests.test_section.c3">
-        <important>
-          <para>
-            test
-          </para>
-        </important>
-      </callout>
-    </calloutlist>
-    <para>
-      Example 3:
-    </para>
-    <para>
-<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
-  <co id="callout_tests.test_section.c4" linkends="callout_tests.test_section.c5" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase>
-
-</programlisting>
-    </para>
-    <calloutlist>
-      <callout arearefs="callout_tests.test_section.c4" id="callout_tests.test_section.c5">
-        <important>
-          <para>
-            test
-          </para>
-        </important>
-      </callout>
-    </calloutlist>
-    <para>
-      Example 3 (again!):
-    </para>
-    <para>
-<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
-  <co id="callout_tests.test_section.c6" linkends="callout_tests.test_section.c7" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase>
-
-</programlisting>
-    </para>
-    <calloutlist>
-      <callout arearefs="callout_tests.test_section.c6" id="callout_tests.test_section.c7">
-        <important>
-          <para>
-            test
-          </para>
-        </important>
-      </callout>
-    </calloutlist>
-    <para>
-      Example 4:
-    </para>
-    <para>
-<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
-  <co id="callout_tests.test_section.c8" linkends="callout_tests.test_section.c9" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<co id="callout_tests.test_section.c10" linkends="callout_tests.test_section.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c12" linkends="callout_tests.test_section.c13" />
-<phrase role="special">}</phrase>
-
-</programlisting>
-    </para>
-    <calloutlist>
-      <callout arearefs="callout_tests.test_section.c8" id="callout_tests.test_section.c9">
-        <para>
-          callout 1
-        </para>
-      </callout>
-      <callout arearefs="callout_tests.test_section.c10" id="callout_tests.test_section.c11">
-        <para>
-          callout 2
-        </para>
-      </callout>
-      <callout arearefs="callout_tests.test_section.c12" id="callout_tests.test_section.c13">
-        <para>
-          create a uniform_int distribution
-        </para>
-      </callout>
-    </calloutlist>
-    <para>
-<programlisting><co id="callout_tests.test_section.c14" linkends="callout_tests.test_section.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c16" linkends="callout_tests.test_section.c17" />
-</programlisting>
-    </para>
-    <calloutlist>
-      <callout arearefs="callout_tests.test_section.c14" id="callout_tests.test_section.c15">
-        <para>
-          callout 2
-        </para>
-      </callout>
-      <callout arearefs="callout_tests.test_section.c16" id="callout_tests.test_section.c17">
-        <para>
-          create a uniform_int distribution
-        </para>
-      </callout>
-    </calloutlist>
-  </section>
-</article>
Deleted: branches/release/tools/quickbook/test/callouts.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/callouts.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,51 +0,0 @@
-[article Callout Tests
-    [quickbook 1.5]
-]
-
-[import callouts.cpp]
-
-Example 1:
-
-[example1]
-
-Example 2:
-
-[example2]
-
-Example 3:
-
-[example3]
-
-Example 3 (again!):
-
-[example3]
-
-Example 4:
-
-[example4]
-[example4a]
-
-[section:test_section Try callouts in a section]
-
-Example 1:
-
-[example1]
-
-Example 2:
-
-[example2]
-
-Example 3:
-
-[example3]
-
-Example 3 (again!):
-
-[example3]
-
-Example 4:
-
-[example4]
-[example4a]
-
-[endsect]
\ No newline at end of file
Copied: branches/release/tools/quickbook/test/code-1_1.gold (from r75700, /trunk/tools/quickbook/test/code-1_1.gold)
==============================================================================
--- /trunk/tools/quickbook/test/code-1_1.gold	(original)
+++ branches/release/tools/quickbook/test/code-1_1.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -28,13 +28,15 @@
 <phrase role="special">{</phrase>
     <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special"><<</phrase> <phrase role="string">"Hello, World!"</phrase> <phrase role="special"><<</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
     <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
     </para>
   </section>
   <section id="code_block.test_3">
     <title>Test 3</title>
     <para>
-<programlisting><phrase role="keyword">print</phrase> <phrase role="string">"\xfabln\xeck"</phrase></programlisting>
+<programlisting><phrase role="keyword">print</phrase> <phrase role="string">"\xfabln\xeck"</phrase>
+</programlisting>
     </para>
   </section>
   <section id="code_block.test_4">
@@ -43,7 +45,8 @@
       This isn't valid C++ but I think we should accept it;
     </para>
     <para>
-<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase><phrase role="special"><<</phrase><phrase role="string">"\xfabln\xeck"</phrase><phrase role="special"><<</phrase><phrase role="string">"\n"</phrase><phrase role="special">;</phrase></programlisting>
+<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase><phrase role="special"><<</phrase><phrase role="string">"\xfabln\xeck"</phrase><phrase role="special"><<</phrase><phrase role="string">"\n"</phrase><phrase role="special">;</phrase>
+</programlisting>
     </para>
   </section>
 </article>
Deleted: branches/release/tools/quickbook/test/code-block-1.gold
==============================================================================
--- branches/release/tools/quickbook/test/code-block-1.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="code_block_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Code Block 1</title>
-  <section id="code_block_1.a_code_block">
-    <title>A code block</title>
-    <para>
-      A code block with proper indentation ;-)
-    </para>
-<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">iostream</phrase><phrase role="special">></phrase>
-
-<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
-<phrase role="special">{</phrase>
-    <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special"><<</phrase> <phrase role="string">"Hello, World!"</phrase> <phrase role="special"><<</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
-    <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
-  </section>
-</article>
Deleted: branches/release/tools/quickbook/test/code-block-1.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/code-block-1.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,16 +0,0 @@
-[article Code Block 1
-]
-
-[section A code block]
-
-A code block with proper indentation ;-)
-
-    #include <iostream>
-
-    int main()
-    {
-        std::cout << "Hello, World!" << std::endl;
-        return 0;
-    }
-
-[endsect]
Deleted: branches/release/tools/quickbook/test/code-block-2.gold
==============================================================================
--- branches/release/tools/quickbook/test/code-block-2.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="code_block_2" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Code Block 2</title>
-  <section id="code_block_2.a_code_block">
-    <title>A code block</title>
-    <para>
-      A code block with proper indentation ;-)
-    </para>
-    <para>
-<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">iostream</phrase><phrase role="special">></phrase>
-
-<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
-<phrase role="special">{</phrase>
-    <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special"><<</phrase> <phrase role="string">"Hello, World!"</phrase> <phrase role="special"><<</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
-    <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
-    </para>
-  </section>
-</article>
Deleted: branches/release/tools/quickbook/test/code-block-2.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/code-block-2.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,18 +0,0 @@
-[article Code Block 2
-]
-
-[section A code block]
-
-A code block with proper indentation ;-)
-
-``
-    #include <iostream>
-
-    int main()
-    {
-        std::cout << "Hello, World!" << std::endl;
-        return 0;
-    }
-``
-
-[endsect]
Deleted: branches/release/tools/quickbook/test/code-block-3.gold
==============================================================================
--- branches/release/tools/quickbook/test/code-block-3.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="code_block_3" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Code Block 3</title>
-  <section id="code_block_3.python_code_block">
-    <title>Python code block</title>
-    <para>
-<programlisting><phrase role="keyword">print</phrase> <phrase role="string">"\xfabln\xeck"</phrase>
-</programlisting>
-    </para>
-  </section>
-  <section id="code_block_3.c___code_block">
-    <title>C++ code block</title>
-    <para>
-      This isn't valid C++ but I think we should accept it;
-    </para>
-    <para>
-<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase><phrase role="special"><<</phrase><phrase role="string">"\xfabln\xeck"</phrase><phrase role="special"><<</phrase><phrase role="string">"\n"</phrase><phrase role="special">;</phrase>
-</programlisting>
-    </para>
-  </section>
-</article>
Deleted: branches/release/tools/quickbook/test/code-block-3.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/code-block-3.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,21 +0,0 @@
-[article Code Block 3]
-
-[section Python code block]
-
-[python]
-``
-    print "\xfabln\xeck"
-``
-
-[endsect]
-
-[section C++ code block]
-
-This isn't valid C++ but I think we should accept it;
-
-[c++]
-``
-    std::cout<<"\xfabln\xeck"<<"\n";
-``
-
-[endsect]
Deleted: branches/release/tools/quickbook/test/code-block-cpp.gold
==============================================================================
--- branches/release/tools/quickbook/test/code-block-cpp.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="c___code_blocks" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>C++ Code Blocks</title>
-<programlisting><phrase role="comment">// No escape</phrase>
-<phrase role="comment">/* No escape */</phrase>
-<phrase role="comment">/* No escape
- * with newlines
- */</phrase>
-<phrase role="comment">// In Header: <<ulink url="boost:/boost/optional/optional.hpp">boost/optional/optional.hpp</ulink>></phrase>
-<phrase role="comment">/* In Header: <<ulink url="boost:/boost/optional/optional.hpp">boost/optional/optional.hpp</ulink>> */</phrase>
-<phrase role="comment">/* Multiple escapes: <emphasis>italic</emphasis>
- * <emphasis role="underline">underline</emphasis><emphasis role="bold">bold</emphasis>
- */</phrase>
-</programlisting>
-  <para>
-    A badly formed comment:
-  </para>
-<programlisting><phrase role="comment">/* Oh dear
-</phrase></programlisting>
-  <para>
-    A badly formed comment with an escape:
-  </para>
-<programlisting><phrase role="comment">/* Oh dear <emphasis role="bold">bold</emphasis>
-</phrase></programlisting>
-</article>
Deleted: branches/release/tools/quickbook/test/code-block-cpp.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/code-block-cpp.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,22 +0,0 @@
-[article C++ Code Blocks
-[quickbook 1.5]
-]
-
-    // No escape
-    /* No escape */
-    /* No escape
-     * with newlines
-     */
-    // In Header: <``[@boost:/boost/optional/optional.hpp boost/optional/optional.hpp]``>
-    /* In Header: <``[@boost:/boost/optional/optional.hpp boost/optional/optional.hpp]``> */
-    /* Multiple escapes: ``/italic/``
-     * ``_underline_````*bold*``
-     */
-
-A badly formed comment:
-
-    /* Oh dear
-
-A badly formed comment with an escape:
-
-    /* Oh dear ``*bold*``
Deleted: branches/release/tools/quickbook/test/code-block-python.gold
==============================================================================
--- branches/release/tools/quickbook/test/code-block-python.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="python_code_blocks" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Python Code Blocks</title>
-<programlisting><phrase role="comment"># No escape</phrase>
-<phrase role="comment"># Escape: <emphasis role="bold">bold</emphasis></phrase>
-<phrase role="comment"># Escape: <emphasis role="underline">underline</emphasis><emphasis>italic</emphasis></phrase>
-</programlisting>
-</article>
Deleted: branches/release/tools/quickbook/test/code-block-python.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/code-block-python.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,8 +0,0 @@
-[article Python Code Blocks
-[quickbook 1.5]
-[source-mode python]
-]
-
-    # No escape
-    # Escape: ``*bold*``
-    # Escape: ``_underline_````/italic/``
Deleted: branches/release/tools/quickbook/test/code-block-teletype.gold
==============================================================================
--- branches/release/tools/quickbook/test/code-block-teletype.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="code_block_teletype_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Code Block Teletype 1</title>
-  <section id="code_block_teletype_1.a_code_block">
-    <title><link linkend="code_block_teletype_1.a_code_block">A code block</link></title>
-<programlisting>Just some plain text.
-With some <emphasis role="bold">quickbook</emphasis> thrown in?
-</programlisting>
-  </section>
-</article>
Deleted: branches/release/tools/quickbook/test/code-block-teletype.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/code-block-teletype.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,14 +0,0 @@
-[article Code Block Teletype 1
-    [quickbook 1.5]
-]
-
-[teletype]
-
-[section A code block]
-
-[def __text__ text]
-
-    Just some plain __text__.
-    ``With some *quickbook* thrown in?``
-
-[endsect]
Deleted: branches/release/tools/quickbook/test/code-block.gold
==============================================================================
--- branches/release/tools/quickbook/test/code-block.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="indented_code_blocks" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Indented code blocks</title>
-  <para>
-    In a paragraph. Still in a paragraph.
-  </para>
-<programlisting>In a code block.
-</programlisting>
-  <para>
-    Back in a paragraph.
-  </para>
-<programlisting>   Code block line 1.
-Code block line 2.
-       Code block line 3.
-</programlisting>
-  <para>
-    Paragraph.
-  </para>
-<programlisting>Code block with no trailing blank lines.
-</programlisting>
-  <para>
-    Paragraph.
-  </para>
-  <bridgehead renderas="sect2" id="indented_code_blocks.h0">
-    <phrase id="indented_code_blocks.code_blocks_separated_by_comment"/><link linkend="indented_code_blocks.code_blocks_separated_by_comment">Code
-    blocks separated by comment</link>
-  </bridgehead>
-<programlisting>First code block.
-</programlisting>
-<programlisting>Second code block.
-[/ Comment in second code block]
-Still second code block.
-[/ Comment trailing second code block]
-</programlisting>
-</article>
Deleted: branches/release/tools/quickbook/test/code-block.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/code-block.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,29 +0,0 @@
-[article Indented code blocks
-    [quickbook 1.5]
-    [source-mode teletype]
-]
-
-In a paragraph.
-    Still in a paragraph.
-
-    In a code block.
-
-Back in a paragraph.
-
-    Code block line 1.
- Code block line 2.
-        Code block line 3.
-
-Paragraph.
-
-    Code block with no trailing blank lines.
-Paragraph.
-
-[heading Code blocks separated by comment]
-
-    First code block.
-[/ Comment]
-    Second code block.
-    [/ Comment in second code block]
-    Still second code block.
-    [/ Comment trailing second code block]
Deleted: branches/release/tools/quickbook/test/code-snippet.gold
==============================================================================
--- branches/release/tools/quickbook/test/code-snippet.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="code_snippets" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Code Snippets</title>
-  <section id="code_snippets.a_code_snippet">
-    <title>A code snippet</title>
-    <para>
-      Code snippets inlined in text, as in <code><phrase role="keyword">namespace</phrase>
-      <phrase role="identifier">quickbook</phrase> <phrase role="special">{</phrase>
-      <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase>
-      <phrase role="keyword">int</phrase> <phrase role="identifier">value</phrase>
-      <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
-      <phrase role="special">}</phrase></code>, should be properly formatted and
-      not glued to the surrounding text.
-    </para>
-    <para>
-      There shoud be no spacees around (<code><phrase role="keyword">this</phrase></code>),
-      and spaces around <code><phrase role="keyword">this</phrase></code> code.
-    </para>
-  </section>
-</article>
Deleted: branches/release/tools/quickbook/test/code-snippet.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/code-snippet.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,12 +0,0 @@
-[article Code Snippets
-]
-
-[section A code snippet]
-
-Code snippets inlined in text, as in `namespace quickbook { static const int
-value = 0; }`, should be properly formatted and not glued to the surrounding
-text.
-
-There shoud be no spacees around (`this`), and spaces around `this` code.
-
-[endsect]
Modified: branches/release/tools/quickbook/test/command-line/Jamfile.v2
==============================================================================
--- branches/release/tools/quickbook/test/command-line/Jamfile.v2	(original)
+++ branches/release/tools/quickbook/test/command-line/Jamfile.v2	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -7,14 +7,22 @@
 #   http://www.boost.org/LICENSE_1_0.txt)
 #
 
-# Just checking that expect-errors works as advertised.
-
 project quickook/tests/command-line ;
 
 import quickbook-testing : quickbook-test quickbook-fail-test quickbook-error-test ;
 
 test-suite command-line.test :
+    # Check that expect-errors works as advertised.
     [ quickbook-fail-test error-fail : : <testing.arg>--expect-errors ]
     [ quickbook-error-test error1 ]
     [ quickbook-error-test error2 ]
+
+    [ quickbook-error-test
+        non_existent_output :
+        basic-1_6.quickbook :
+        <testing.arg>--output-file=non-existent/basic.xml ]
+    [ quickbook-error-test
+        output_nested_in_file :
+        basic-1_6.quickbook :
+        <testing.arg>--output-file=basic-1_6.quickbook/basic.xml ]
     ;
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/command_line_macro.gold
==============================================================================
--- branches/release/tools/quickbook/test/command_line_macro.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="command_line_macro" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Command Line Macro</title>
-  <para>
-    <emphasis role="bold">bold</emphasis>
-  </para>
-</article>
Deleted: branches/release/tools/quickbook/test/command_line_macro.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/command_line_macro.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,6 +0,0 @@
-[article Command Line Macro
-]
-
-[/ This test relies on __macro__ being defined at the command line.]
-
-__macro__
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/cond_phrase.gold
==============================================================================
--- branches/release/tools/quickbook/test/cond_phrase.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="coniditional_phrase_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Coniditional Phrase Test</title>
-  <para>
-    This should show
-  </para>
-  <para>
-    The should be no space inserted.
-  </para>
-  <para>
-    <emphasis role="bold">Bold text</emphasis>
-  </para>
-</article>
Deleted: branches/release/tools/quickbook/test/cond_phrase.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/cond_phrase.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,12 +0,0 @@
-[article Coniditional Phrase Test
-    [quickbook 1.5]
-]
-
-[def __defined__]
-
-[? __defined__ This should show]
-[? __undefined__ This should not show]
-
-The should be no sp[?__undefined__ just some junk]ace inserted.
-
-[? __defined__ [*Bold text]]
\ No newline at end of file
Modified: branches/release/tools/quickbook/test/doc-info/Jamfile.v2
==============================================================================
--- branches/release/tools/quickbook/test/doc-info/Jamfile.v2	(original)
+++ branches/release/tools/quickbook/test/doc-info/Jamfile.v2	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -24,4 +24,11 @@
     [ quickbook-test copyright1 ]
     [ quickbook-error-test copyright-fail1 ]
     [ quickbook-error-test copyright-fail2 ]
+    [ quickbook-test id1-1.5 ]
+    [ quickbook-test title_trailing_space-1_1 ]
+    [ quickbook-test title_trailing_space-1_6 ]
+    [ quickbook-test empty_title-1_1 ]
+    [ quickbook-test empty_title-1_5 ]
+    [ quickbook-test empty_title-1_6 ]
+    [ quickbook-error-test missing_doc_info-1_6-fail ]
     ;
Modified: branches/release/tools/quickbook/test/doc-info/escape-1.6.gold
==============================================================================
--- branches/release/tools/quickbook/test/doc-info/escape-1.6.gold	(original)
+++ branches/release/tools/quickbook/test/doc-info/escape-1.6.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="karel_vom_u00e1_u010dka_and_tom_u00e1_u0161_martin_u00edk" lang="en"
-last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+<article id="karel_vom_u00e1_u010dka_and_tom_" lang="en" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
   <title>Karel Vomáčka and Tomáš Martiník</title>
   <articleinfo>
     <authorgroup>
Modified: branches/release/tools/quickbook/test/doc-info/source-mode-1.6.gold
==============================================================================
--- branches/release/tools/quickbook/test/doc-info/source-mode-1.6.gold	(original)
+++ branches/release/tools/quickbook/test/doc-info/source-mode-1.6.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="c___test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+<article id="c_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
   <title>C++ test</title>
   <articleinfo>
-    <legalnotice id="c___test.legal">
+    <legalnotice id="c_test.legal">
       <para>
         <code><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase
         role="special">(</phrase><phrase role="identifier">x</phrase><phrase role="special">):</phrase>
@@ -14,25 +14,29 @@
       <code>This shouldn't be highlighted</code>
     </articlepurpose>
   </articleinfo>
-  <para>
 <programlisting>This shouldn't be highlighted.</programlisting>
-  </para>
-  <para>
+  <article id="c___source_mode_include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+    <title>C++ source mode include</title>
+    <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
-  </para>
-  <para>
+    </para>
+  </article>
 <programlisting>This shouldn't be highlighted.</programlisting>
-  </para>
-  <para>
+  <article id="python_source_mode_include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+    <title>Python source mode include</title>
+    <para>
 <programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">():</phrase></programlisting>
-  </para>
-  <para>
+    </para>
+  </article>
 <programlisting>This shouldn't be highlighted.</programlisting>
-  </para>
-  <para>
+  <article id="teletype_source_mode_include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+    <title>Teletype source mode include</title>
+    <para>
 <programlisting>This shouldn't be highlighted</programlisting>
-  </para>
-  <para>
+    </para>
+  </article>
 <programlisting>This shouldn't be highlighted.</programlisting>
-  </para>
 </article>
Modified: branches/release/tools/quickbook/test/doc-info/source-mode-cpp-include.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/doc-info/source-mode-cpp-include.quickbook	(original)
+++ branches/release/tools/quickbook/test/doc-info/source-mode-cpp-include.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -1,5 +1,4 @@
-[article C++ source mode include
 [source-mode c++]
-]
+[article C++ source mode include]
 
 ```int main() {}```
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/elements_1_5.gold
==============================================================================
--- branches/release/tools/quickbook/test/elements_1_5.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="1_5_elements" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>1.5 Elements</title>
-  <para>
-    [ordered_list [item1][item2]]
-  </para>
-  <para>
-    [itemized_list [item1][item2]]
-  </para>
-</article>
Deleted: branches/release/tools/quickbook/test/elements_1_5.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/elements_1_5.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,9 +0,0 @@
-[article 1.5 Elements
-[quickbook 1.5]
-]
-
-[/ elements from 1.6]
-
-[ordered_list [item1][item2]]
-
-[itemized_list [item1][item2]]
Deleted: branches/release/tools/quickbook/test/elements_1_6.gold
==============================================================================
--- branches/release/tools/quickbook/test/elements_1_6.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="1_6_elements" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>1.6 Elements</title>
-  <orderedlist>
-    <listitem>
-      <para>
-        item1
-      </para>
-    </listitem>
-    <listitem>
-      <para>
-        item2
-      </para>
-    </listitem>
-  </orderedlist>
-  <itemizedlist>
-    <listitem>
-      <para>
-        item1
-      </para>
-    </listitem>
-    <listitem>
-      <para>
-        item2
-      </para>
-    </listitem>
-  </itemizedlist>
-</article>
Deleted: branches/release/tools/quickbook/test/elements_1_6.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/elements_1_6.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,9 +0,0 @@
-[article 1.6 Elements
-[quickbook 1.6]
-]
-
-[/ elements from 1.6]
-
-[ordered_list [item1][item2]]
-
-[itemized_list [item1][item2]]
Deleted: branches/release/tools/quickbook/test/empty.quickbook
==============================================================================
Deleted: branches/release/tools/quickbook/test/escape.gold
==============================================================================
--- branches/release/tools/quickbook/test/escape.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="escape" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Escape</title>
-  <section id="escape.escape">
-    <title>Escape</title>
-    <para>
-      <emphasis>Da do do do. Da da da da. That's all I have to say to you.</emphasis>
-    </para>
-    <para>
-      This letter α should have a space either side of it.
-    </para>
-    <para>
-      These should be properly encoded: > < "
-    </para>
-    <para>
-      This <link linkend="$0">link</link> shouldn't be changed.
-    </para>
-    <para>
-      Some other problematic links:
-<link linkend="$157">one</link>,
-<link linkend="$-256">two</link>,
-<link linkend="$text">three</link>.
-    </para>
-  </section>
-</article>
Deleted: branches/release/tools/quickbook/test/escape.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/escape.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,28 +0,0 @@
-[article Escape
-]
-
-[section Escape]
-
-'''
-<emphasis>Da do do do. Da da da da. That's all I have to say to you.</emphasis>
-'''
-
-This letter '''α''' should have a space either side of it.
-
-These should be properly encoded: \> \< \"
-
-[/ The following tests are based on internal knowledge of
-   how quickbook's id generator works. They make sure it
-   doesn't mess up escaped docbook. ]
-
-'''This <link linkend="$0">link</link> shouldn't be changed.'''
-
-'''
-Some other problematic links:
-<link linkend="$157">one</link>,
-<link linkend="$-256">two</link>,
-<link linkend="$text">three</link>.
-'''
-
-[endsect]
-
Deleted: branches/release/tools/quickbook/test/fail-cpp-mismatched-escape.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-cpp-mismatched-escape.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,5 +0,0 @@
-[article Odd code markup. [quickbook 1.4] ]
-
-[c++]
-
-   `` int main() {}
Deleted: branches/release/tools/quickbook/test/fail-import.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-import.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,11 +0,0 @@
-[article Expect import Fail
-]
-
-[section Failure]
-
-[import this-is-not-a-file.cpp]
-
-[endsect]
-
-     
-
Deleted: branches/release/tools/quickbook/test/fail-include.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-include.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,11 +0,0 @@
-[article Expect xinclude Fail
-]
-
-[section Failure]
-
-[include this-is-not-a-file.qbk]
-
-[endsect]
-
-     
-
Deleted: branches/release/tools/quickbook/test/fail-mismatched-boostbook-escape.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-mismatched-boostbook-escape.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,5 +0,0 @@
-[article Badly escaped boostbook
-[quickbook 1.5]
-]
-
-'''<emphasis>something</emphasis>
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/fail-parse-error1.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-parse-error1.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,3 +0,0 @@
-[article Parse error [quickbook 1.4]]
-
-[heading Incomplete heading
Deleted: branches/release/tools/quickbook/test/fail-parse-error2.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-parse-error2.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,5 +0,0 @@
-[article Parse error [quickbook 1.4]]
-
-[variablelist Variable List
-[[1234]]
-]
Deleted: branches/release/tools/quickbook/test/fail-post-process.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-post-process.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,3 +0,0 @@
-[article Fail post process due to invalid embedded xml [quickbook 1.4] ]
-
-Invalid xml follows: '''<!--quickbook-escape-postfix--><>'''
Deleted: branches/release/tools/quickbook/test/fail-python-mismatched-escape.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-python-mismatched-escape.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,5 +0,0 @@
-[article Odd code markup. [quickbook 1.4] ]
-
-[python]
-
-   print "Hello World." ``
Deleted: branches/release/tools/quickbook/test/fail-template-arguments1.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-template-arguments1.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,13 +0,0 @@
-[article Expect template to fail because there are too many arguments.
-]
-
-[template unary[x] [x]]
-
-[section Failure]
-
-[unary a..b ]
-
-[endsect]
-
-     
-
Deleted: branches/release/tools/quickbook/test/fail-template-arguments2.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-template-arguments2.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,13 +0,0 @@
-[article Expect template to fail because there are not enough arguments.
-]
-
-[template ternary[x y z] [x][y][z]]
-
-[section Failure]
-
-[ternary a b ]
-
-[endsect]
-
-     
-
Deleted: branches/release/tools/quickbook/test/fail-template-arguments3.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-template-arguments3.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,6 +0,0 @@
-[article Expect template to fail because there are not enough arguments on 1.5.
-    [quickbook 1.5]
-]
-
-[template ternary[x y z] {[x]-[y]-[z]}]
-[ternary 1..2 3 4]
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/fail-template-lookup1.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-template-lookup1.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,7 +0,0 @@
-[article Fail Template Lookup 1
-    [quickbook 1.5]
-]
-
-[template test1[] [a]]
-[template test2[a] [test1]]
-[test2 1]
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/fail-template-section-1.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-template-section-1.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,9 +0,0 @@
-[article Template should contain balanced sections
-    [quickbook 1.5]
-]
-
-[template begin_no_end[]
-[section Test]
-]
-
-[begin_no_end]
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/fail-template-section-2.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-template-section-2.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,10 +0,0 @@
-[article Template should contain balanced sections
-    [quickbook 1.5]
-]
-
-[template end_before_begin[]
-[endsect]
-[section Test]
-]
-
-[end_before_begin]
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/fail-template-section-3.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-template-section-3.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,9 +0,0 @@
-[article Template should contain balanced sections
-    [quickbook 1.5]
-]
-
-[template end_no_begin[]
-[endsect]
-]
-
-[end_no_begin]
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/fail-unknown-quickbook-1.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-unknown-quickbook-1.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,5 +0,0 @@
-[article Future version of quickbook
-    [quickbook 1.7]
-]
-
-This should fail...
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/fail-unknown-quickbook-2.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-unknown-quickbook-2.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,5 +0,0 @@
-[article Far future version of quickbook
-    [quickbook 2.0]
-]
-
-This should fail...
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/fail-unknown-quickbook-3.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/fail-unknown-quickbook-3.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,5 +0,0 @@
-[article Non-existant version of quickbook
-    [quickbook 0.1]
-]
-
-This should fail...
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/heading_1_1.gold
==============================================================================
--- branches/release/tools/quickbook/test/heading_1_1.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="heading_1_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Heading 1.1</title>
-  <bridgehead renderas="sect1" id=".first_heading">
-    First heading
-  </bridgehead>
-  <section id="heading_1_1.section">
-    <title>Section</title>
-    <bridgehead renderas="sect2" id="section.second_heading">
-      Second heading
-    </bridgehead>
-  </section>
-</article>
Deleted: branches/release/tools/quickbook/test/heading_1_1.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/heading_1_1.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,9 +0,0 @@
-[article Heading 1.1]
-
-[h1 First heading]
-
-[section Section]
-
-[h2 Second heading]
-
-[endsect]
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/heading_1_3.gold
==============================================================================
--- branches/release/tools/quickbook/test/heading_1_3.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="header" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Header</title>
-  <bridgehead renderas="sect2" id="header.h0">
-    <phrase id="header.header_test"/><link linkend="header.header_test">Header Test</link>
-  </bridgehead>
-  <para>
-    Testing headers without sections.
-  </para>
-  <bridgehead renderas="sect2" id="header.h1">
-    <phrase id="header._not_an_id"/><link linkend="header._not_an_id">:Not an Id</link>
-  </bridgehead>
-  <para>
-    Paragraph.
-  </para>
-  <bridgehead renderas="sect3" id="header.h2">
-    <phrase id="header._not_an_id_again"/><link linkend="header._not_an_id_again">:Not
-    an Id again</link>
-  </bridgehead>
-  <para>
-    Paragraph.
-  </para>
-</article>
Deleted: branches/release/tools/quickbook/test/heading_1_3.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/heading_1_3.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,16 +0,0 @@
-[article Header
-    [quickbook 1.3]
-    [id header]
-]
-
-[heading Header Test]
-
-Testing headers without sections.
-
-[heading:Not an Id]
-
-Paragraph.
-
-[h3:Not an Id again]
-
-Paragraph.
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/heading_1_5.gold
==============================================================================
--- branches/release/tools/quickbook/test/heading_1_5.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="heading_test_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Heading Test 1.5</title>
-  <bridgehead renderas="sect2" id="heading_test_1_5.h0">
-    <phrase id="heading_test_1_5.generic_header"/><link linkend="heading_test_1_5.generic_header">Generic
-    header</link>
-  </bridgehead>
-  <bridgehead renderas="sect1" id="heading_test_1_5.h2">
-    <phrase id="heading_test_1_5.level_1"/><link linkend="heading_test_1_5.level_1">Level
-    1</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="heading_test_1_5.h3">
-    <phrase id="heading_test_1_5.level_2"/><link linkend="heading_test_1_5.level_2">Level
-    2</link>
-  </bridgehead>
-  <bridgehead renderas="sect3" id="heading_test_1_5.h4">
-    <phrase id="heading_test_1_5.level_3"/><link linkend="heading_test_1_5.level_3">Level
-    3</link>
-  </bridgehead>
-  <bridgehead renderas="sect4" id="heading_test_1_5.h5">
-    <phrase id="heading_test_1_5.level_4"/><link linkend="heading_test_1_5.level_4">Level
-    4</link>
-  </bridgehead>
-  <bridgehead renderas="sect5" id="heading_test_1_5.h6">
-    <phrase id="heading_test_1_5.level_5"/><link linkend="heading_test_1_5.level_5">Level
-    5</link>
-  </bridgehead>
-  <bridgehead renderas="sect6" id="heading_test_1_5.h8">
-    <phrase id="heading_test_1_5.level_6"/><link linkend="heading_test_1_5.level_6">Level
-    6</link>
-  </bridgehead>
-  <bridgehead renderas="sect1" id="heading_test_1_5.h9">
-    <phrase id="heading_test_1_5._emphasis_role__bold__bold__emphasis_"/><link linkend="heading_test_1_5._emphasis_role__bold__bold__emphasis_"><emphasis
-    role="bold">Bold</emphasis></link>
-  </bridgehead>
-  <bridgehead renderas="sect1" id="heading_test_1_5.h10">
-    <phrase id="heading_test_1_5.comment"/><link linkend="heading_test_1_5.comment">Comment</link>
-  </bridgehead>
-  <bridgehead renderas="sect1" id="heading_test_1_5.h11">
-    <phrase id="heading_test_1_5._notanid"/><link linkend="heading_test_1_5._notanid">:notanid</link>
-  </bridgehead>
-  <bridgehead renderas="sect1" id="heading_test_1_5.h12">
-    <phrase id="heading_test_1_5._also_not_an_id"/><link linkend="heading_test_1_5._also_not_an_id">:also
-    not an id</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="heading_test_1_5.h13">
-    <phrase id="heading_test_1_5.h1"/><link linkend="heading_test_1_5.h1">H1</link>
-  </bridgehead>
-  <section id="heading_test_1_5.s1">
-    <title><link linkend="heading_test_1_5.s1">S1</link></title>
-    <bridgehead renderas="sect2" id="heading_test_1_5.s1.h0">
-      <phrase id="heading_test_1_5.s1.h2"/><link linkend="heading_test_1_5.s1.h2">H2</link>
-    </bridgehead>
-    <section id="heading_test_1_5.s1.s2">
-      <title><link linkend="heading_test_1_5.s1.s2">S2</link></title>
-      <bridgehead renderas="sect3" id="heading_test_1_5.s1.s2.h0">
-        <phrase id="heading_test_1_5.s1.s2.h3"/><link linkend="heading_test_1_5.s1.s2.h3">H3</link>
-      </bridgehead>
-    </section>
-    <bridgehead renderas="sect2" id="heading_test_1_5.s1.h1">
-      <phrase id="heading_test_1_5.s1.h4"/><link linkend="heading_test_1_5.s1.h4">H4</link>
-    </bridgehead>
-    <section id="heading_test_1_5.s1.s3">
-      <title><link linkend="heading_test_1_5.s1.s3">S3</link></title>
-      <bridgehead renderas="sect4" id="heading_test_1_5.s1.s3.h0">
-        <phrase id="heading_test_1_5.s1.s3.h5"/><link linkend="heading_test_1_5.s1.s3.h5">H5</link>
-      </bridgehead>
-    </section>
-    <bridgehead renderas="sect2" id="heading_test_1_5.s1.h3">
-      <phrase id="heading_test_1_5.s1.h6"/><link linkend="heading_test_1_5.s1.h6">H6</link>
-    </bridgehead>
-  </section>
-  <bridgehead renderas="sect1" id="heading_test_1_5.h14">
-    <phrase id="heading_test_1_5.h7"/><link linkend="heading_test_1_5.h7">H7</link>
-  </bridgehead>
-</article>
Deleted: branches/release/tools/quickbook/test/heading_1_6.gold
==============================================================================
--- branches/release/tools/quickbook/test/heading_1_6.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="header" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Header</title>
-  <bridgehead renderas="sect2" id="header.h0">
-    <phrase id="header.header_test"/><link linkend="header.header_test">Header Test</link>
-  </bridgehead>
-  <para>
-    Paragraph.
-  </para>
-  <bridgehead renderas="sect2" id="header.h1">
-    <phrase id="header.heading_id"/><link linkend="header.heading_id">Heading with
-    an id</link>
-  </bridgehead>
-  <para>
-    Paragraph.
-  </para>
-  <bridgehead renderas="sect3" id="header.h2">
-    <phrase id="header.heading_id2"/><link linkend="header.heading_id2">Heading with
-    an id</link>
-  </bridgehead>
-  <para>
-    Paragraph.
-  </para>
-</article>
Deleted: branches/release/tools/quickbook/test/heading_1_6.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/heading_1_6.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,16 +0,0 @@
-[article Header
-    [quickbook 1.6]
-    [id header]
-]
-
-[heading Header Test]
-
-Paragraph.
-
-[heading:heading_id Heading with an id]
-
-Paragraph.
-
-[h3:heading_id2 Heading with an id]
-
-Paragraph.
Deleted: branches/release/tools/quickbook/test/identifier_1_5.gold
==============================================================================
--- branches/release/tools/quickbook/test/identifier_1_5.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,610 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="identifiers_in_quickbook_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Identifiers in quickbook 1.5</title>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h0">
-    <phrase id="identifiers_in_quickbook_1_5.test_heading_with__code__phrase_role__identifier__code__phrase___code_"/><link
-    linkend="identifiers_in_quickbook_1_5.test_heading_with__code__phrase_role__identifier__code__phrase___code_">Test
-    heading with <code><phrase role="identifier">code</phrase></code></link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h1">
-    <phrase id="identifiers_in_quickbook_1_5.identifier_10_0"/><link linkend="identifiers_in_quickbook_1_5.identifier_10_0">Identifier
-    10</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h2">
-    <phrase id="identifiers_in_quickbook_1_5.identifier_10_1"/><link linkend="identifiers_in_quickbook_1_5.identifier_10_1">Identifier
-    10</link>
-  </bridgehead>
-  <table frame="all" id="identifiers_in_quickbook_1_5.identifier_10_2">
-    <title>Identifier 10</title>
-    <tgroup cols="1">
-      <tbody>
-        <row>
-          <entry>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </table>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h3">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_several_headers"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_several_headers">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h4">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d0"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d0">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h5">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_lots_of_headers"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_lots_of_headers">Generate
-    a really long id and duplicate it by having lots of headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h6">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d1"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d1">Generate
-    a really long id and duplicate it by having lots of headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h7">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d2"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d2">Generate
-    a really long id and duplicate it by having lots of headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h8">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d3"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d3">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h9">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d5"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d5">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h10">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d6"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d6">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h11">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d7"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d7">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h12">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_too_many_headers"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_too_many_headers">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h13">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d8"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d8">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h14">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d9"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d9">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h15">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_0"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_0">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h16">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_1"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_1">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h17">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_2"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_2">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h18">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_3"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_3">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h19">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_4"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_4">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h20">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_5"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_5">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h21">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_6"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_6">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h22">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_7"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_7">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h23">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_8"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_8">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h24">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_9"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_9">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h25">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_10"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_10">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h26">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_11"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_11">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h27">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_12"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_12">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h28">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_13"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_13">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h29">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_14"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_14">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h30">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_16"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_16">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h31">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_17"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_17">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h32">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_18"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_18">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h33">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_19"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_19">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h34">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_20"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_20">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h35">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_21"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_21">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h36">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_22"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_22">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h37">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_23"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_23">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h38">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_24"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_24">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h39">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_25"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_25">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h40">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_26"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_26">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h41">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_even_more_headers"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_even_more_headers">Generate
-    a really long id and duplicate it by having even more headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h42">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_27"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_27">Generate
-    a really long id and duplicate it by having even more headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h43">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_28"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_28">Generate
-    a really long id and duplicate it by having even more headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h44">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_29"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_29">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h45">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d4"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d4">Generate
-    a really long id and d4</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h46">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_15"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_15">Generate
-    a really long id and 15</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h47">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_30"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_30">Generate
-    a really long id and d4</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h48">
-    <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_31"/><link
-    linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_31">Generate
-    a really long id and 15</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h49">
-    <phrase id="identifiers_in_quickbook_1_5.a2345678901234567890123456789012"/><link
-    linkend="identifiers_in_quickbook_1_5.a2345678901234567890123456789012">a2345678901234567890123456789012</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h50">
-    <phrase id="identifiers_in_quickbook_1_5.a0"/><link linkend="identifiers_in_quickbook_1_5.a0">a2345678901234567890123456789012</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h51">
-    <phrase id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcdef"/><link
-    linkend="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcdef">abcdefghijklmnopqrstuvwxyzabcdef</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h52">
-    <phrase id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde0"/><link
-    linkend="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde0">abcdefghijklmnopqrstuvwxyzabcdef</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h53">
-    <phrase id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde1"/><link
-    linkend="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde1">abcdefghijklmnopqrstuvwxyzabcdef</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h54">
-    <phrase id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde2"/><link
-    linkend="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde2">abcdefghijklmnopqrstuvwxyzabcdef</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h55">
-    <phrase id="identifiers_in_quickbook_1_5.markup_in__code__phrase_role__identifier__heading__phrase___code___in__emphasis_role__bold__order__emphasis__to_test_normalization"/><link
-    linkend="identifiers_in_quickbook_1_5.markup_in__code__phrase_role__identifier__heading__phrase___code___in__emphasis_role__bold__order__emphasis__to_test_normalization">Markup
-    in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
-    to test normalization</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h56">
-    <phrase id="identifiers_in_quickbook_1_5.markup_in_code_phrase_role_iden0"/><link
-    linkend="identifiers_in_quickbook_1_5.markup_in_code_phrase_role_iden0">Markup
-    in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
-    to test normalization</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h57">
-    <phrase id="identifiers_in_quickbook_1_5.markup_in_code_phrase_role_iden1"/><link
-    linkend="identifiers_in_quickbook_1_5.markup_in_code_phrase_role_iden1">Markup
-    in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
-    to test normalization</link>
-  </bridgehead>
-  <section id="identifiers_in_quickbook_1_5.identifier_10">
-    <title><link linkend="identifiers_in_quickbook_1_5.identifier_10">Identifier
-    10</link></title>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h0">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_several_headers"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_several_headers">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h1">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d0"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d0">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h2">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_lots_of_headers"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_lots_of_headers">Generate
-      a really long id and duplicate it by having lots of headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h4">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d1"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d1">Generate
-      a really long id and duplicate it by having lots of headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h5">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d2"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d2">Generate
-      a really long id and duplicate it by having lots of headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h6">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d3"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d3">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h7">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d5"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d5">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h8">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d6"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d6">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h9">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d7"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d7">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h10">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_too_many_headers"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_too_many_headers">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h11">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d8"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d8">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h12">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d9"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d9">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h13">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_0"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_0">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h14">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_1"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_1">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h15">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_2"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_2">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h16">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_3"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_3">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h17">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_4"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_4">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h18">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_5"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_5">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h19">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_6"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_6">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h20">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_7"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_7">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h21">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_8"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_8">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h22">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_9"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_9">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h23">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_10"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_10">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h24">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_11"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_11">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h25">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_12"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_12">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h26">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_13"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_13">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h27">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_14"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_14">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h28">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_16"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_16">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h29">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_17"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_17">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h30">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_18"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_18">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h31">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_19"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_19">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h32">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_20"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_20">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h33">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_21"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_21">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h34">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_22"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_22">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h35">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_23"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_23">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h36">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_24"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_24">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h37">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_25"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_25">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h38">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_26"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_26">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h39">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_even_more_headers"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_even_more_headers">Generate
-      a really long id and duplicate it by having even more headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h40">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_27"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_27">Generate
-      a really long id and duplicate it by having even more headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h41">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_28"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_28">Generate
-      a really long id and duplicate it by having even more headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h42">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_29"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_29">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h43">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d4"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d4">Generate
-      a really long id and d4</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h44">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_15"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_15">Generate
-      a really long id and 15</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h45">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_30"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_30">Generate
-      a really long id and d4</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h46">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_31"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_31">Generate
-      a really long id and 15</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h47">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.a2345678901234567890123456789012"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.a2345678901234567890123456789012">a2345678901234567890123456789012</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h48">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.a0"/><link linkend="identifiers_in_quickbook_1_5.identifier_10.a0">a2345678901234567890123456789012</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h49">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcdef"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcdef">abcdefghijklmnopqrstuvwxyzabcdef</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h50">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde0"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde0">abcdefghijklmnopqrstuvwxyzabcdef</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h51">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde1"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde1">abcdefghijklmnopqrstuvwxyzabcdef</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h52">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde2"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde2">abcdefghijklmnopqrstuvwxyzabcdef</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h53">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.markup_in__code__phrase_role__identifier__heading__phrase___code___in__emphasis_role__bold__order__emphasis__to_test_normalization"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.markup_in__code__phrase_role__identifier__heading__phrase___code___in__emphasis_role__bold__order__emphasis__to_test_normalization">Markup
-      in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
-      to test normalization</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h54">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.markup_in_code_phrase_role_iden0"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.markup_in_code_phrase_role_iden0">Markup
-      in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
-      to test normalization</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h55">
-      <phrase id="identifiers_in_quickbook_1_5.identifier_10.markup_in_code_phrase_role_iden1"/><link
-      linkend="identifiers_in_quickbook_1_5.identifier_10.markup_in_code_phrase_role_iden1">Markup
-      in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
-      to test normalization</link>
-    </bridgehead>
-    <table frame="all" id="identifiers_in_quickbook_1_5.identifier_10.h3">
-      <title>h3</title>
-      <tgroup cols="1">
-        <tbody>
-          <row>
-            <entry>
-            </entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-    <table frame="all" id="identifiers_in_quickbook_1_5.identifier_10.h3_0">
-      <title>h3</title>
-      <tgroup cols="1">
-        <tbody>
-          <row>
-            <entry>
-            </entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-  </section>
-  <section id="identifiers_in_quickbook_1_5.punctuation___stuff">
-    <title><link linkend="identifiers_in_quickbook_1_5.punctuation___stuff">Punctuation
-    & stuff</link></title>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.punctuation___stuff.h0">
-      <phrase id="identifiers_in_quickbook_1_5.punctuation___stuff.a___b"/><link
-      linkend="identifiers_in_quickbook_1_5.punctuation___stuff.a___b">A + B</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.punctuation___stuff.h1">
-      <phrase id="identifiers_in_quickbook_1_5.punctuation___stuff.a_b0"/><link linkend="identifiers_in_quickbook_1_5.punctuation___stuff.a_b0">A
-      + B</link>
-    </bridgehead>
-  </section>
-</article>
Deleted: branches/release/tools/quickbook/test/identifier_1_5.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/identifier_1_5.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,148 +0,0 @@
-[article Identifiers in quickbook 1.5
-    [quickbook 1.5]
-]
-
-[heading Test heading with `code`]
-
-[heading Identifier 10]
-[heading Identifier 10]
-[table Identifier 10
-[[]]
-]
-
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having lots of headers]
-[heading Generate a really long id and duplicate it by having lots of headers]
-[heading Generate a really long id and duplicate it by having lots of headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having even more headers]
-[heading Generate a really long id and duplicate it by having even more headers]
-[heading Generate a really long id and duplicate it by having even more headers]
-[heading Generate a really long id and duplicate it by having several headers]
-
-[heading Generate a really long id and d4]
-[heading Generate a really long id and 15]
-[heading Generate a really long id and d4]
-[heading Generate a really long id and 15]
-
-[heading a2345678901234567890123456789012]
-[heading a2345678901234567890123456789012]
-[heading abcdefghijklmnopqrstuvwxyzabcdef]
-[heading abcdefghijklmnopqrstuvwxyzabcdef]
-[heading abcdefghijklmnopqrstuvwxyzabcdef]
-[heading abcdefghijklmnopqrstuvwxyzabcdef]
-
-[heading Markup in `heading`  in *order* to test normalization]
-[heading Markup in `heading`  in *order* to test normalization]
-[heading Markup in `heading`  in *order* to test normalization]
-
-[section Identifier 10]
-
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having lots of headers]
-[heading Generate a really long id and duplicate it by having lots of headers]
-[heading Generate a really long id and duplicate it by having lots of headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having even more headers]
-[heading Generate a really long id and duplicate it by having even more headers]
-[heading Generate a really long id and duplicate it by having even more headers]
-[heading Generate a really long id and duplicate it by having several headers]
-
-[heading Generate a really long id and d4]
-[heading Generate a really long id and 15]
-[heading Generate a really long id and d4]
-[heading Generate a really long id and 15]
-
-[heading a2345678901234567890123456789012]
-[heading a2345678901234567890123456789012]
-[heading abcdefghijklmnopqrstuvwxyzabcdef]
-[heading abcdefghijklmnopqrstuvwxyzabcdef]
-[heading abcdefghijklmnopqrstuvwxyzabcdef]
-[heading abcdefghijklmnopqrstuvwxyzabcdef]
-
-[heading Markup in `heading`  in *order* to test normalization]
-[heading Markup in `heading`  in *order* to test normalization]
-[heading Markup in `heading`  in *order* to test normalization]
-
-[table h3
-[[]]
-]
-
-[table h3
-[[]]
-]
-
-[endsect]
-
-[section Punctuation & stuff]
-
-[heading A + B]
-[heading A + B]
-
-[endsect]
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/identifier_1_6.gold
==============================================================================
--- branches/release/tools/quickbook/test/identifier_1_6.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,609 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="identifiers_in_quickbook_1_6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Identifiers in quickbook 1.6</title>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h0">
-    <phrase id="identifiers_in_quickbook_1_6.test_heading_with__code_"/><link linkend="identifiers_in_quickbook_1_6.test_heading_with__code_">Test
-    heading with <code><phrase role="identifier">code</phrase></code></link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h1">
-    <phrase id="identifiers_in_quickbook_1_6.identifier_10_0"/><link linkend="identifiers_in_quickbook_1_6.identifier_10_0">Identifier
-    10</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h2">
-    <phrase id="identifiers_in_quickbook_1_6.identifier_10_1"/><link linkend="identifiers_in_quickbook_1_6.identifier_10_1">Identifier
-    10</link>
-  </bridgehead>
-  <table frame="all" id="identifiers_in_quickbook_1_6.identifier_10_2">
-    <title>Identifier 10</title>
-    <tgroup cols="1">
-      <tbody>
-        <row>
-          <entry>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </table>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h3">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_duplicate_it_by_having_several_headers"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_duplicate_it_by_having_several_headers">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h4">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d0"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d0">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h5">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_duplicate_it_by_having_lots_of_headers"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_duplicate_it_by_having_lots_of_headers">Generate
-    a really long id and duplicate it by having lots of headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h6">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d1"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d1">Generate
-    a really long id and duplicate it by having lots of headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h7">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d2"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d2">Generate
-    a really long id and duplicate it by having lots of headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h8">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d3"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d3">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h9">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d5"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d5">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h10">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d6"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d6">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h11">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d7"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d7">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h12">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_duplicate_it_by_having_too_many_headers"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_duplicate_it_by_having_too_many_headers">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h13">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d8"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d8">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h14">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d9"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d9">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h15">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_0"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_0">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h16">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_1"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_1">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h17">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_2"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_2">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h18">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_3"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_3">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h19">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_4"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_4">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h20">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_5"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_5">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h21">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_6"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_6">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h22">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_7"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_7">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h23">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_8"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_8">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h24">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_9"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_9">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h25">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_10"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_10">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h26">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_11"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_11">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h27">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_12"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_12">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h28">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_13"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_13">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h29">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_14"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_14">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h30">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_16"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_16">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h31">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_17"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_17">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h32">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_18"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_18">Generate
-    a really long id and duplicate it by having too many headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h33">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_19"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_19">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h34">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_20"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_20">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h35">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_21"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_21">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h36">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_22"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_22">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h37">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_23"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_23">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h38">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_24"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_24">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h39">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_25"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_25">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h40">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_26"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_26">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h41">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_duplicate_it_by_having_even_more_headers"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_duplicate_it_by_having_even_more_headers">Generate
-    a really long id and duplicate it by having even more headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h42">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_27"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_27">Generate
-    a really long id and duplicate it by having even more headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h43">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_28"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_28">Generate
-    a really long id and duplicate it by having even more headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h44">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_29"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_29">Generate
-    a really long id and duplicate it by having several headers</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h45">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d4"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d4">Generate
-    a really long id and d4</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h46">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_15"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_15">Generate
-    a really long id and 15</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h47">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_30"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_30">Generate
-    a really long id and d4</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h48">
-    <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_31"/><link
-    linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_31">Generate
-    a really long id and 15</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h49">
-    <phrase id="identifiers_in_quickbook_1_6.a2345678901234567890123456789012"/><link
-    linkend="identifiers_in_quickbook_1_6.a2345678901234567890123456789012">a2345678901234567890123456789012</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h50">
-    <phrase id="identifiers_in_quickbook_1_6.a0"/><link linkend="identifiers_in_quickbook_1_6.a0">a2345678901234567890123456789012</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h51">
-    <phrase id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcdef"/><link
-    linkend="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcdef">abcdefghijklmnopqrstuvwxyzabcdef</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h52">
-    <phrase id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde0"/><link
-    linkend="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde0">abcdefghijklmnopqrstuvwxyzabcdef</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h53">
-    <phrase id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde1"/><link
-    linkend="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde1">abcdefghijklmnopqrstuvwxyzabcdef</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h54">
-    <phrase id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde2"/><link
-    linkend="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde2">abcdefghijklmnopqrstuvwxyzabcdef</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h55">
-    <phrase id="identifiers_in_quickbook_1_6.markup_in__heading___in__order__to_test_normalization"/><link
-    linkend="identifiers_in_quickbook_1_6.markup_in__heading___in__order__to_test_normalization">Markup
-    in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
-    to test normalization</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h56">
-    <phrase id="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_t0"/><link
-    linkend="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_t0">Markup
-    in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
-    to test normalization</link>
-  </bridgehead>
-  <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h57">
-    <phrase id="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_t1"/><link
-    linkend="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_t1">Markup
-    in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
-    to test normalization</link>
-  </bridgehead>
-  <section id="identifiers_in_quickbook_1_6.identifier_10">
-    <title><link linkend="identifiers_in_quickbook_1_6.identifier_10">Identifier
-    10</link></title>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h0">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_several_headers"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_several_headers">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h1">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d0"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d0">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h2">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_lots_of_headers"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_lots_of_headers">Generate
-      a really long id and duplicate it by having lots of headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h4">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d1"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d1">Generate
-      a really long id and duplicate it by having lots of headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h5">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d2"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d2">Generate
-      a really long id and duplicate it by having lots of headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h6">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d3"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d3">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h7">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d5"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d5">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h8">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d6"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d6">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h9">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d7"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d7">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h10">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_too_many_headers"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_too_many_headers">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h11">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d8"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d8">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h12">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d9"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d9">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h13">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_0"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_0">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h14">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_1"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_1">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h15">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_2"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_2">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h16">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_3"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_3">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h17">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_4"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_4">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h18">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_5"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_5">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h19">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_6"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_6">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h20">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_7"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_7">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h21">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_8"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_8">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h22">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_9"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_9">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h23">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_10"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_10">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h24">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_11"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_11">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h25">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_12"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_12">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h26">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_13"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_13">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h27">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_14"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_14">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h28">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_16"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_16">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h29">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_17"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_17">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h30">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_18"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_18">Generate
-      a really long id and duplicate it by having too many headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h31">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_19"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_19">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h32">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_20"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_20">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h33">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_21"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_21">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h34">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_22"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_22">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h35">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_23"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_23">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h36">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_24"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_24">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h37">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_25"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_25">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h38">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_26"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_26">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h39">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_even_more_headers"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_even_more_headers">Generate
-      a really long id and duplicate it by having even more headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h40">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_27"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_27">Generate
-      a really long id and duplicate it by having even more headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h41">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_28"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_28">Generate
-      a really long id and duplicate it by having even more headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h42">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_29"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_29">Generate
-      a really long id and duplicate it by having several headers</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h43">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d4"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d4">Generate
-      a really long id and d4</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h44">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_15"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_15">Generate
-      a really long id and 15</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h45">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_30"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_30">Generate
-      a really long id and d4</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h46">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_31"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_31">Generate
-      a really long id and 15</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h47">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.a2345678901234567890123456789012"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.a2345678901234567890123456789012">a2345678901234567890123456789012</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h48">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.a0"/><link linkend="identifiers_in_quickbook_1_6.identifier_10.a0">a2345678901234567890123456789012</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h49">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcdef"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcdef">abcdefghijklmnopqrstuvwxyzabcdef</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h50">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde0"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde0">abcdefghijklmnopqrstuvwxyzabcdef</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h51">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde1"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde1">abcdefghijklmnopqrstuvwxyzabcdef</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h52">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde2"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde2">abcdefghijklmnopqrstuvwxyzabcdef</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h53">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.markup_in__heading___in__order__to_test_normalization"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.markup_in__heading___in__order__to_test_normalization">Markup
-      in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
-      to test normalization</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h54">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_t0"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_t0">Markup
-      in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
-      to test normalization</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h55">
-      <phrase id="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_t1"/><link
-      linkend="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_t1">Markup
-      in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
-      to test normalization</link>
-    </bridgehead>
-    <table frame="all" id="identifiers_in_quickbook_1_6.identifier_10.h3">
-      <title>h3</title>
-      <tgroup cols="1">
-        <tbody>
-          <row>
-            <entry>
-            </entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-    <table frame="all" id="identifiers_in_quickbook_1_6.identifier_10.h3_0">
-      <title>h3</title>
-      <tgroup cols="1">
-        <tbody>
-          <row>
-            <entry>
-            </entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-  </section>
-  <section id="identifiers_in_quickbook_1_6.punctuation___stuff">
-    <title><link linkend="identifiers_in_quickbook_1_6.punctuation___stuff">Punctuation
-    & stuff</link></title>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.punctuation___stuff.h0">
-      <phrase id="identifiers_in_quickbook_1_6.punctuation___stuff.a___b"/><link
-      linkend="identifiers_in_quickbook_1_6.punctuation___stuff.a___b">A + B</link>
-    </bridgehead>
-    <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.punctuation___stuff.h1">
-      <phrase id="identifiers_in_quickbook_1_6.punctuation___stuff.a_b0"/><link linkend="identifiers_in_quickbook_1_6.punctuation___stuff.a_b0">A
-      + B</link>
-    </bridgehead>
-  </section>
-</article>
Deleted: branches/release/tools/quickbook/test/identifier_1_6.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/identifier_1_6.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,148 +0,0 @@
-[article Identifiers in quickbook 1.6
-    [quickbook 1.6]
-]
-
-[heading Test heading with `code`]
-
-[heading Identifier 10]
-[heading Identifier 10]
-[table Identifier 10
-[[]]
-]
-
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having lots of headers]
-[heading Generate a really long id and duplicate it by having lots of headers]
-[heading Generate a really long id and duplicate it by having lots of headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having even more headers]
-[heading Generate a really long id and duplicate it by having even more headers]
-[heading Generate a really long id and duplicate it by having even more headers]
-[heading Generate a really long id and duplicate it by having several headers]
-
-[heading Generate a really long id and d4]
-[heading Generate a really long id and 15]
-[heading Generate a really long id and d4]
-[heading Generate a really long id and 15]
-
-[heading a2345678901234567890123456789012]
-[heading a2345678901234567890123456789012]
-[heading abcdefghijklmnopqrstuvwxyzabcdef]
-[heading abcdefghijklmnopqrstuvwxyzabcdef]
-[heading abcdefghijklmnopqrstuvwxyzabcdef]
-[heading abcdefghijklmnopqrstuvwxyzabcdef]
-
-[heading Markup in `heading`  in *order* to test normalization]
-[heading Markup in `heading`  in *order* to test normalization]
-[heading Markup in `heading`  in *order* to test normalization]
-
-[section Identifier 10]
-
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having lots of headers]
-[heading Generate a really long id and duplicate it by having lots of headers]
-[heading Generate a really long id and duplicate it by having lots of headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having too many headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having several headers]
-[heading Generate a really long id and duplicate it by having even more headers]
-[heading Generate a really long id and duplicate it by having even more headers]
-[heading Generate a really long id and duplicate it by having even more headers]
-[heading Generate a really long id and duplicate it by having several headers]
-
-[heading Generate a really long id and d4]
-[heading Generate a really long id and 15]
-[heading Generate a really long id and d4]
-[heading Generate a really long id and 15]
-
-[heading a2345678901234567890123456789012]
-[heading a2345678901234567890123456789012]
-[heading abcdefghijklmnopqrstuvwxyzabcdef]
-[heading abcdefghijklmnopqrstuvwxyzabcdef]
-[heading abcdefghijklmnopqrstuvwxyzabcdef]
-[heading abcdefghijklmnopqrstuvwxyzabcdef]
-
-[heading Markup in `heading`  in *order* to test normalization]
-[heading Markup in `heading`  in *order* to test normalization]
-[heading Markup in `heading`  in *order* to test normalization]
-
-[table h3
-[[]]
-]
-
-[table h3
-[[]]
-]
-
-[endsect]
-
-[section Punctuation & stuff]
-
-[heading A + B]
-[heading A + B]
-
-[endsect]
\ No newline at end of file
Copied: branches/release/tools/quickbook/test/image-1_5.gold (from r75700, /trunk/tools/quickbook/test/image-1_5.gold)
==============================================================================
--- /trunk/tools/quickbook/test/image-1_5.gold	(original)
+++ branches/release/tools/quickbook/test/image-1_5.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -3,12 +3,25 @@
 <article id="images_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
   <title>Images 1.5</title>
   <para>
-    <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject></inlinemediaobject>
-    <inlinemediaobject><imageobject><imagedata fileref="test this.gif"></imagedata></imageobject></inlinemediaobject>
-    <inlinemediaobject><imageobject><imagedata fileref="test&this.gif"></imagedata></imageobject></inlinemediaobject>
-    <inlinemediaobject><imageobject><imagedata fileref="test.gif" height="10cm" width="10cm"></imagedata></imageobject></inlinemediaobject>
     <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
     <textobject>
+      <phrase>test</phrase>
+    </textobject>
+    </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test this.gif"></imagedata></imageobject>
+    <textobject>
+      <phrase>test this</phrase>
+    </textobject>
+    </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test&this.gif"></imagedata></imageobject>
+    <textobject>
+      <phrase>test&this</phrase>
+    </textobject>
+    </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"
+    height="10cm" width="10cm"></imagedata></imageobject>
+    <textobject>
+      <phrase>test</phrase>
+    </textobject>
+    </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+    <textobject>
       <phrase>Foo</phrase>
     </textobject>
     </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
@@ -27,15 +40,25 @@
     </inlinemediaobject>
   </para>
   <para>
-    <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject></inlinemediaobject>
-    <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject></inlinemediaobject>
     <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
     <textobject>
+      <phrase>test</phrase>
+    </textobject>
+    </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+    <textobject>
+      <phrase>test</phrase>
+    </textobject>
+    </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+    <textobject>
       <phrase>comment</phrase>
     </textobject>
     </inlinemediaobject>
   </para>
   <para>
-    <inlinemediaobject><imageobject><imagedata fileref="test.gif" height="10cm" width="10cm"></imagedata></imageobject></inlinemediaobject>
+    <inlinemediaobject><imageobject><imagedata fileref="test.gif" height="10cm" width="10cm"></imagedata></imageobject>
+    <textobject>
+      <phrase>test</phrase>
+    </textobject>
+    </inlinemediaobject>
   </para>
 </article>
Deleted: branches/release/tools/quickbook/test/image_1_5.gold
==============================================================================
--- branches/release/tools/quickbook/test/image_1_5.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="images_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Images 1.5</title>
-  <para>
-    <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
-    <textobject>
-      <phrase>test</phrase>
-    </textobject>
-    </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test this.gif"></imagedata></imageobject>
-    <textobject>
-      <phrase>test this</phrase>
-    </textobject>
-    </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test&this.gif"></imagedata></imageobject>
-    <textobject>
-      <phrase>test&this</phrase>
-    </textobject>
-    </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"
-    height="10cm" width="10cm"></imagedata></imageobject>
-    <textobject>
-      <phrase>test</phrase>
-    </textobject>
-    </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
-    <textobject>
-      <phrase>Foo</phrase>
-    </textobject>
-    </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
-    <textobject>
-      <phrase>Foobie foobie foo</phrase>
-    </textobject>
-    </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
-    <textobject>
-      <phrase>Foo & bar</phrase>
-    </textobject>
-    </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"
-    height="10cm" width="10cm"></imagedata></imageobject>
-    <textobject>
-      <phrase>Foo</phrase>
-    </textobject>
-    </inlinemediaobject>
-  </para>
-  <para>
-    <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
-    <textobject>
-      <phrase>test</phrase>
-    </textobject>
-    </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
-    <textobject>
-      <phrase>test</phrase>
-    </textobject>
-    </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
-    <textobject>
-      <phrase>comment</phrase>
-    </textobject>
-    </inlinemediaobject>
-  </para>
-  <para>
-    <inlinemediaobject><imageobject><imagedata fileref="test.gif" height="10cm" width="10cm"></imagedata></imageobject>
-    <textobject>
-      <phrase>test</phrase>
-    </textobject>
-    </inlinemediaobject>
-  </para>
-</article>
Deleted: branches/release/tools/quickbook/test/image_1_5.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/image_1_5.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,19 +0,0 @@
-[article Images 1.5
-    [quickbook 1.5]
-]
-
-[$test.gif]
-[$test this.gif]
-[$test&this.gif]
-[$test.gif [width 10cm] [height 10cm]]
-[$test.gif [alt Foo]]
-[$test.gif [alt Foobie foobie foo]]
-[$test.gif [alt Foo & bar]]
-[$test.gif [alt Foo] [width 10cm] [height 10cm]]
-
-[$ [/comment] test.gif  ]
-[$ [/comment] test.gif [/comment] ]
-[$ [/comment] test.gif [/comment] [alt comment] ]
-
-[/ This should warn about repeated attribute and then ignore it. ]
-[$test.gif [width 10cm] [height 10cm] [width 20cm]]
Deleted: branches/release/tools/quickbook/test/import.gold
==============================================================================
--- branches/release/tools/quickbook/test/import.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,139 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="import" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Import</title>
-  <para>
-    This is the <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
-  </para>
-  <para>
-    This description can have paragraphs...
-  </para>
-  <itemizedlist>
-    <listitem>
-      <simpara>
-        lists
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        etc.
-      </simpara>
-    </listitem>
-  </itemizedlist>
-  <para>
-    And any quickbook block markup.
-  </para>
-  <para>
-<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase>
-<phrase role="special">{</phrase>
-    <phrase role="comment">// return 'em, foo man!</phrase>
-    <phrase role="keyword">return</phrase> <phrase role="string">"foo"</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
-  </para>
-  <para>
-    This is the Python <emphasis role="bold"><emphasis>foo</emphasis></emphasis>
-    function.
-  </para>
-  <para>
-    This description can have paragraphs...
-  </para>
-  <itemizedlist>
-    <listitem>
-      <simpara>
-        lists
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        etc.
-      </simpara>
-    </listitem>
-  </itemizedlist>
-  <para>
-    And any quickbook block markup.
-  </para>
-  <para>
-<programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">():</phrase>
-    <phrase role="comment"># return 'em, foo man!</phrase>
-    <phrase role="keyword">return</phrase> <phrase role="string">"foo"</phrase>
-
-</programlisting>
-  </para>
-  <para>
-    This is the C <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
-  </para>
-  <para>
-    This description can have paragraphs...
-  </para>
-  <itemizedlist>
-    <listitem>
-      <simpara>
-        lists
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        etc.
-      </simpara>
-    </listitem>
-  </itemizedlist>
-  <para>
-    And any quickbook block markup.
-  </para>
-  <para>
-<programlisting><phrase role="keyword">char</phrase><phrase role="special">*</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase>
-<phrase role="special">{</phrase>
-    <phrase role="comment">// return 'em, foo man!</phrase>
-    <phrase role="keyword">return</phrase> <phrase role="string">"foo"</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
-  </para>
-  <para>
-<programlisting><phrase role="keyword">class</phrase> <phrase role="identifier">x</phrase>
-<phrase role="special">{</phrase>
-<phrase role="keyword">public</phrase><phrase role="special">:</phrase>
-
-    <co id="import.c0" linkends="import.c1" /><phrase role="identifier">x</phrase><phrase role="special">()</phrase> <phrase role="special">:</phrase> <phrase role="identifier">n</phrase><phrase role="special">(</phrase><phrase role="number">0</phrase><phrase role="special">)</phrase>
-    <phrase role="special">{</phrase>
-    <phrase role="special">}</phrase>
-
-    <co id="import.c2" linkends="import.c3" /><phrase role="special">~</phrase><phrase role="identifier">x</phrase><phrase role="special">()</phrase>
-    <phrase role="special">{</phrase>
-    <phrase role="special">}</phrase>
-
-    <co id="import.c4" linkends="import.c5" /><phrase role="keyword">int</phrase> <phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="keyword">const</phrase>
-    <phrase role="special">{</phrase>
-        <phrase role="keyword">return</phrase> <phrase role="identifier">n</phrase><phrase role="special">;</phrase>
-    <phrase role="special">}</phrase>
-
-    <co id="import.c6" linkends="import.c7" /><phrase role="keyword">void</phrase> <phrase role="identifier">set</phrase><phrase role="special">(</phrase><phrase role="keyword">int</phrase> <phrase role="identifier">n_</phrase><phrase role="special">)</phrase>
-    <phrase role="special">{</phrase>
-        <phrase role="identifier">n</phrase> <phrase role="special">=</phrase> <phrase role="identifier">n_</phrase><phrase role="special">;</phrase>
-    <phrase role="special">}</phrase>
-<phrase role="special">};</phrase>
-</programlisting>
-  </para>
-  <calloutlist>
-    <callout arearefs="import.c0" id="import.c1">
-      <para>
-        Constructor
-      </para>
-    </callout>
-    <callout arearefs="import.c2" id="import.c3">
-      <para>
-        Destructor
-      </para>
-    </callout>
-    <callout arearefs="import.c4" id="import.c5">
-      <para>
-        Get the <code><phrase role="identifier">n</phrase></code> member variable
-      </para>
-    </callout>
-    <callout arearefs="import.c6" id="import.c7">
-      <para>
-        Set the <code><phrase role="identifier">n</phrase></code> member variable
-      </para>
-    </callout>
-  </calloutlist>
-</article>
Deleted: branches/release/tools/quickbook/test/import.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/import.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,13 +0,0 @@
-[article Import]
-
-[import stub.c]
-[import stub.py]
-[import stub.cpp]
-
-[foo]
-
-[foo_py]
-
-[foo_c]
-
-[class_]
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/include-sub.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/include-sub.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,6 +0,0 @@
-[article Include Test Sub Document
-    [quickbook 1.5]
-    [id include-sub]
-]
-
-[/ Empty. Shouldn't really need this comment.]
Deleted: branches/release/tools/quickbook/test/include-sub2.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/include-sub2.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,9 +0,0 @@
-[/ I'm trying not to break existing behaviour even when buggy.
-   In this case, this section will get an id using the title from
-   the previous 'include'.]
-
-[section:test Test]
-
-Just testing.
-
-[endsect]
\ No newline at end of file
Modified: branches/release/tools/quickbook/test/include/Jamfile.v2
==============================================================================
--- branches/release/tools/quickbook/test/include/Jamfile.v2	(original)
+++ branches/release/tools/quickbook/test/include/Jamfile.v2	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -14,6 +14,31 @@
 import quickbook-testing : quickbook-test quickbook-error-test ;
 
 test-suite quickbook.test :
+    [ quickbook-test import-basic-1.6 ]
     [ quickbook-test filename ]
     [ quickbook-test filename-path : : : <quickbook-test-include>sub ]
-    ;
\ No newline at end of file
+    [ quickbook-test doc-title1-1.5 ]
+    [ quickbook-test doc-title1a-1.5 ]
+    [ quickbook-test section ]
+    [ quickbook-test section-unclosed ]
+    [ quickbook-test templates-1.5 ]
+    [ quickbook-test templates-1.6 ]
+    [ quickbook-test macros-1.5 ]
+    [ quickbook-test macros-1.6 ]
+    [ quickbook-test code-import ]
+    [ quickbook-test code-include ]
+    [ quickbook-test include-id-1.5 ]
+    [ quickbook-test include-id-1.6 ]
+    [ quickbook-test include_id_unbalanced-1_6 ]
+    [ quickbook-error-test section-fail1 ]
+    [ quickbook-error-test section-fail2 ]
+    [ quickbook-test in_section-1_5 ]
+    [ quickbook-test in_section-1_6 ]
+    [ quickbook-test compatibility-1_1 ]
+    [ quickbook-test compatibility-1_5 ]
+    [ quickbook-test compatibility-1_6 ]
+    [ quickbook-test source_mode-1_5 ]
+    [ quickbook-test source_mode-1_6 ]
+    [ quickbook-test nested_compatibility-1_5 ]
+    [ quickbook-test nested_compatibility-1_6 ]
+    ;
Copied: branches/release/tools/quickbook/test/include/code-import.gold (from r75700, /trunk/tools/quickbook/test/include/code-import.gold)
==============================================================================
--- /trunk/tools/quickbook/test/include/code-import.gold	(original)
+++ branches/release/tools/quickbook/test/include/code-import.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -28,7 +28,8 @@
 <phrase role="special">{</phrase>
     <phrase role="comment">// return 'em, foo man!</phrase>
     <phrase role="keyword">return</phrase> <phrase role="string">"foo"</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
   </para>
   <para>
     This is the Python <emphasis role="bold"><emphasis>foo</emphasis></emphasis>
@@ -55,7 +56,8 @@
   <para>
 <programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">():</phrase>
     <phrase role="comment"># return 'em, foo man!</phrase>
-    <phrase role="keyword">return</phrase> <phrase role="string">"foo"</phrase></programlisting>
+    <phrase role="keyword">return</phrase> <phrase role="string">"foo"</phrase>
+</programlisting>
   </para>
   <para>
     This is the C <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
@@ -83,7 +85,8 @@
 <phrase role="special">{</phrase>
     <phrase role="comment">// return 'em, foo man!</phrase>
     <phrase role="keyword">return</phrase> <phrase role="string">"foo"</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
   </para>
   <para>
 <programlisting><phrase role="keyword">class</phrase> <phrase role="identifier">x</phrase>
@@ -107,7 +110,8 @@
     <phrase role="special">{</phrase>
         <phrase role="identifier">n</phrase> <phrase role="special">=</phrase> <phrase role="identifier">n_</phrase><phrase role="special">;</phrase>
     <phrase role="special">}</phrase>
-<phrase role="special">};</phrase></programlisting>
+<phrase role="special">};</phrase>
+</programlisting>
   </para>
   <calloutlist>
     <callout arearefs="import.c0" id="import.c1">
Copied: branches/release/tools/quickbook/test/include/code-include.gold (from r75700, /trunk/tools/quickbook/test/include/code-include.gold)
==============================================================================
--- /trunk/tools/quickbook/test/include/code-include.gold	(original)
+++ branches/release/tools/quickbook/test/include/code-include.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -26,13 +26,12 @@
   <para>
     And any quickbook block markup.
   </para>
-  <para>
 <programlisting><phrase role="keyword">char</phrase><phrase role="special">*</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase>
 <phrase role="special">{</phrase>
     <phrase role="comment">// return 'em, foo man!</phrase>
     <phrase role="keyword">return</phrase> <phrase role="string">"foo"</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase></programlisting>
-  </para>
+<phrase role="special">}</phrase>
+</programlisting>
   <para>
     This should appear when <literal>stub.py</literal> is included.
   </para>
Deleted: branches/release/tools/quickbook/test/include_1_5.gold
==============================================================================
--- branches/release/tools/quickbook/test/include_1_5.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="include-test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Include Test</title>
-  <section id="include_test_sub_document.test">
-    <title><link linkend="include_test_sub_document.test">Test</link></title>
-    <para>
-      Just testing.
-    </para>
-  </section>
-  <section id="foo.test">
-    <title><link linkend="foo.test">Test</link></title>
-    <para>
-      Just testing.
-    </para>
-  </section>
-  <para>
-    Just trying including in a conditional macro.
-  </para>
-  <section id="foo2.test">
-    <title><link linkend="foo2.test">Test</link></title>
-    <para>
-      Just testing.
-    </para>
-  </section>
-  <para>
-    With some text around it.
-  </para>
-</article>
Deleted: branches/release/tools/quickbook/test/include_1_5.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/include_1_5.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,16 +0,0 @@
-[article Include Test
-    [quickbook 1.5]
-    [id include-test]
-]
-
-[include include-sub.quickbook]
-[include include-sub2.quickbook]
-[include:foo include-sub2.quickbook]
-[include empty.quickbook]
-
-[def __defined__]
-
-[? __undefined__ [include:foo1 include-sub2.quickbook] ]
-[? __defined__
-  Just trying including in a conditional macro. [include:foo2 include-sub2.quickbook]
-  With some text around it.]
Deleted: branches/release/tools/quickbook/test/include_1_6-2.gold
==============================================================================
--- branches/release/tools/quickbook/test/include_1_6-2.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="include-test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Include Test</title>
-  <section id="include-test.test">
-    <title><link linkend="include-test.test">Test</link></title>
-    <para>
-      Just testing.
-    </para>
-  </section>
-  <section id="foo.test">
-    <title><link linkend="foo.test">Test</link></title>
-    <para>
-      Just testing.
-    </para>
-  </section>
-</article>
Deleted: branches/release/tools/quickbook/test/include_1_6-2.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/include_1_6-2.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,8 +0,0 @@
-[article Include Test
-    [quickbook 1.6]
-    [id include-test]
-]
-
-[include include-sub.quickbook]
-[include include-sub2.quickbook]
-[include:foo include-sub2.quickbook]
Deleted: branches/release/tools/quickbook/test/include_1_6.gold
==============================================================================
--- branches/release/tools/quickbook/test/include_1_6.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="include-test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Include Test</title>
-  <section id="include-test.test">
-    <title><link linkend="include-test.test">Test</link></title>
-    <para>
-      Just testing.
-    </para>
-  </section>
-  <section id="foo.test">
-    <title><link linkend="foo.test">Test</link></title>
-    <para>
-      Just testing.
-    </para>
-  </section>
-  <para>
-    Just trying including in a conditional macro.
-  </para>
-  <section id="foo2.test">
-    <title><link linkend="foo2.test">Test</link></title>
-    <para>
-      Just testing.
-    </para>
-  </section>
-  <para>
-    With some text around it.
-  </para>
-</article>
Deleted: branches/release/tools/quickbook/test/include_1_6.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/include_1_6.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,14 +0,0 @@
-[article Include Test
-    [quickbook 1.6]
-    [id include-test]
-]
-
-[include include-sub2.quickbook]
-[include:foo include-sub2.quickbook]
-
-[def __defined__]
-
-[? __undefined__ [include:foo1 include-sub2.quickbook] ]
-[? __defined__
-  Just trying including in a conditional macro. [include:foo2 include-sub2.quickbook]
-  With some text around it.]
Deleted: branches/release/tools/quickbook/test/link.gold
==============================================================================
--- branches/release/tools/quickbook/test/link.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="link_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Link tests</title>
-  <section id="link_tests.different_types_of_links">
-    <title>Different types of links</title>
-    <para>
-      <ulink url="http://www.boost.org/">http://www.boost.org/> <ulink url="http://www.boost.org/">Boost</ulink>
-      <link linkend="link-id">link-id</link> <link linkend="link-id">Link Text</link>
-      <anchor id="link-id"/><functionname alt="foo">foo</functionname> <functionname
-      alt="foo">link text</functionname> <classname alt="foo">foo</classname> <classname
-      alt="foo">link text</classname> <methodname alt="foo">foo</methodname> <methodname
-      alt="foo">link text</methodname> <enumname alt="foo">foo</enumname> <enumname
-      alt="foo">link text</enumname> <macroname alt="foo">foo</macroname> <macroname
-      alt="foo">link text</macroname> <headername alt="foo">foo</headername> <headername
-      alt="foo">link text</headername> <conceptname alt="foo">foo</conceptname>
-      <conceptname alt="foo">link text</conceptname> <globalname alt="foo">foo</globalname>
-      <globalname alt="foo">link text</globalname>
-    </para>
-  </section>
-  <section id="link_tests.side_by_side_links">
-    <title>Side-by-side links</title>
-    <para>
-      <link linkend="x">x</link> and <link linkend="y">y</link> are two distinct
-      links, which should be separated by whitespace when they appear together as
-      in <link linkend="x">x</link> <link linkend="y">y</link>. Also in <link linkend="x">x</link>
-      <link linkend="y">y</link>, and in <link linkend="x">x</link> <link linkend="y">y</link>
-      as well.
-    </para>
-  </section>
-</article>
Deleted: branches/release/tools/quickbook/test/link.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/link.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,39 +0,0 @@
-[article Link tests
-]
-
-[section Different types of links]
-
-[@http://www.boost.org/]
-[@  http://www.boost.org/ Boost]
-[link link-id]
-[link link-id Link Text]
-[#link-id]
-[funcref foo]
-[funcref foo link text]
-[classref foo]
-[classref foo link text]
-[memberref foo]
-[memberref foo link text]
-[enumref foo]
-[enumref foo link text]
-[macroref foo]
-[macroref foo link text]
-[headerref foo]
-[headerref foo link text]
-[conceptref foo]
-[conceptref foo link text]
-[globalref foo]
-[globalref foo link text]
-
-[endsect]
-
-[section Side-by-side links]
-
-[link x] and [link y] are two distinct links, which should be separated by
-whitespace when they appear together as in [link x] [link y]. Also in [link x]
-[link y], and in
-[link x]
-[link y]
-as well.
-
-[endsect]
Copied: branches/release/tools/quickbook/test/list_test-1_6.gold (from r75700, /trunk/tools/quickbook/test/list_test-1_6.gold)
==============================================================================
--- /trunk/tools/quickbook/test/list_test-1_6.gold	(original)
+++ branches/release/tools/quickbook/test/list_test-1_6.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -426,30 +426,49 @@
     <itemizedlist>
       <listitem>
         <simpara>
-          One
+          A1
           <para>
-            Two
+            A2
           </para>
         </simpara>
       </listitem>
       <listitem>
         <simpara>
-          Three
+          B1
           <itemizedlist>
             <listitem>
               <simpara>
-                Four
+                C1
                 <para>
-                  Five
+                  C2
                 </para>
               </simpara>
             </listitem>
           </itemizedlist>
+          <para>
+            B2
+          </para>
         </simpara>
       </listitem>
       <listitem>
         <simpara>
-          Six
+          D1
+          <itemizedlist>
+            <listitem>
+              <simpara>
+                E1
+                <para>
+                  E2
+                </para>
+                <para>
+                  E3
+                </para>
+              </simpara>
+            </listitem>
+          </itemizedlist>
+          <para>
+            D2
+          </para>
         </simpara>
       </listitem>
     </itemizedlist>
Copied: branches/release/tools/quickbook/test/list_test-1_6.quickbook (from r75700, /trunk/tools/quickbook/test/list_test-1_6.quickbook)
==============================================================================
--- /trunk/tools/quickbook/test/list_test-1_6.quickbook	(original)
+++ branches/release/tools/quickbook/test/list_test-1_6.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -105,14 +105,24 @@
 
 [section Paragraphs in list items]
 
-* One
+* A1
 
-  Two
+  A2
 
-* Three
-  * Four
+* B1
+  * C1
 
-    Five
-* Six
+   C2
+
+  B2
+
+* D1
+    * E1
+
+     E2
+
+    E3
+
+   D2
 
 [endsect]
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/list_test.gold
==============================================================================
--- branches/release/tools/quickbook/test/list_test.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,263 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="list_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>List Test</title>
-  <para>
-    Simple list:
-  </para>
-  <itemizedlist>
-    <listitem>
-      <simpara>
-        A
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        B
-      </simpara>
-    </listitem>
-  </itemizedlist>
-  <para>
-    Simple list:
-  </para>
-  <orderedlist>
-    <listitem>
-      <simpara>
-        A
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        B
-      </simpara>
-    </listitem>
-  </orderedlist>
-  <para>
-    Two level list:
-  </para>
-  <itemizedlist>
-    <listitem>
-      <simpara>
-        A
-        <itemizedlist>
-          <listitem>
-            <simpara>
-              A
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              B
-            </simpara>
-          </listitem>
-        </itemizedlist>
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        B
-        <itemizedlist>
-          <listitem>
-            <simpara>
-              A
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              B
-            </simpara>
-          </listitem>
-        </itemizedlist>
-      </simpara>
-    </listitem>
-  </itemizedlist>
-  <para>
-    Two level list:
-  </para>
-  <orderedlist>
-    <listitem>
-      <simpara>
-        A
-        <itemizedlist>
-          <listitem>
-            <simpara>
-              A
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              B
-            </simpara>
-          </listitem>
-        </itemizedlist>
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        B
-        <itemizedlist>
-          <listitem>
-            <simpara>
-              A
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              B
-            </simpara>
-          </listitem>
-        </itemizedlist>
-      </simpara>
-    </listitem>
-  </orderedlist>
-  <para>
-    Three level list:
-  </para>
-  <orderedlist>
-    <listitem>
-      <simpara>
-        A
-        <itemizedlist>
-          <listitem>
-            <simpara>
-              A
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              B
-              <itemizedlist>
-                <listitem>
-                  <simpara>
-                    C
-                  </simpara>
-                </listitem>
-                <listitem>
-                  <simpara>
-                    D
-                  </simpara>
-                </listitem>
-              </itemizedlist>
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              E
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              F
-              <itemizedlist>
-                <listitem>
-                  <simpara>
-                    G
-                  </simpara>
-                </listitem>
-                <listitem>
-                  <simpara>
-                    H
-                  </simpara>
-                </listitem>
-              </itemizedlist>
-            </simpara>
-          </listitem>
-        </itemizedlist>
-      </simpara>
-    </listitem>
-  </orderedlist>
-  <para>
-    Three level list:
-  </para>
-  <orderedlist>
-    <listitem>
-      <simpara>
-        A
-        <itemizedlist>
-          <listitem>
-            <simpara>
-              A
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              B
-              <orderedlist>
-                <listitem>
-                  <simpara>
-                    C
-                  </simpara>
-                </listitem>
-                <listitem>
-                  <simpara>
-                    D
-                  </simpara>
-                </listitem>
-              </orderedlist>
-            </simpara>
-          </listitem>
-        </itemizedlist>
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        G
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        H
-      </simpara>
-    </listitem>
-  </orderedlist>
-  <para>
-    Markup in list:
-  </para>
-  <itemizedlist>
-    <listitem>
-      <simpara>
-        <emphasis role="bold">Bold</emphasis>
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        <emphasis role="bold">Bold</emphasis>
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        <quote>Quoted</quote>
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        <footnote id="list_test.f0">
-        <para>
-          Footnote
-        </para>
-        </footnote>
-      </simpara>
-    </listitem>
-  </itemizedlist>
-  <section id="list_test.list_immediately_following_markup">
-    <title><link linkend="list_test.list_immediately_following_markup">List immediately
-    following markup</link></title>
-    <itemizedlist>
-      <listitem>
-        <simpara>
-          One
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Two
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Three
-        </simpara>
-      </listitem>
-    </itemizedlist>
-  </section>
-</article>
Deleted: branches/release/tools/quickbook/test/list_test.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/list_test.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,67 +0,0 @@
-[article List Test
-[quickbook 1.5]
-]
-
-Simple list:
-
-* A
-* B
-
-Simple list:
-
-# A
-# B
-
-Two level list:
-
-* A
-  * A
-  * B
-* B
-  * A
-  * B
-
-Two level list:
-
-# A
-  * A
-  * B
-# B
-  * A
-  * B
-  
-Three level list:
-
-# A
-  * A
-  * B
-      * C
-      * D
-  * E
-  * F
-      * G
-      * H
-
-Three level list:
-
-# A
-  * A
-  * B
-      # C
-      # D
-# G
-# H
-
-Markup in list:
-
-*   *Bold*
-*   [*Bold]
-*   ["Quoted]
-*   [footnote Footnote]
-
-[section List immediately following markup]
-* One
-* Two
-* Three
-
-[endsect]
Deleted: branches/release/tools/quickbook/test/macro.gold
==============================================================================
--- branches/release/tools/quickbook/test/macro.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="macro_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Macro Test</title>
-  <para>
-    1
-  </para>
-  <para>
-    2
-  </para>
-  <para>
-    two
-  </para>
-</article>
Deleted: branches/release/tools/quickbook/test/macro.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/macro.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,16 +0,0 @@
-[article Macro Test
-[quickbook 1.5]
-]
-
-[def one 1]
-
-one
-
-[template foo[]
-
-[def two 2]
-two
-]
-
-[foo]
-two [/This shouldn't expand]
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/mismatched-brackets-1.gold
==============================================================================
--- branches/release/tools/quickbook/test/mismatched-brackets-1.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="mismatched_brackets" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Mismatched brackets</title>
-  <para>
-    [foo
-  </para>
-  <para>
-    Eek
-  </para>
-</article>
Deleted: branches/release/tools/quickbook/test/mismatched-brackets-1.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/mismatched-brackets-1.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,7 +0,0 @@
-[article Mismatched brackets]
-
-[template foo Oops]
-
-[foo
-[template blah Eek]
-[blah]
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/mismatched-brackets-2.gold
==============================================================================
--- branches/release/tools/quickbook/test/mismatched-brackets-2.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="mismatched_brackets" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Mismatched brackets</title>
-  <para>
-    [foo Eek
-  </para>
-</article>
Deleted: branches/release/tools/quickbook/test/mismatched-brackets-2.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/mismatched-brackets-2.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,7 +0,0 @@
-[article Mismatched brackets]
-
-[template foo Oops]
-[template blah Eek]
-
-[foo
-[blah]
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/mismatched-brackets-3.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/mismatched-brackets-3.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,5 +0,0 @@
-[article Mismatched brackets]
-
-[template foo Oops]
-[template blah Eek
-[foo]
Deleted: branches/release/tools/quickbook/test/newline.gold
==============================================================================
--- branches/release/tools/quickbook/test/newline.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="test_newlines" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Test newlines</title>
-  <para>
-    Line 1<sbr/> Line 2
-  </para>
-  <blockquote>
-    <para>
-      <quote>It is better to be approximately right than exactly wrong.</quote><sbr/>
-      <emphasis>-- Old adage</emphasis>
-    </para>
-  </blockquote>
-  <para>
-    Line 1<sbr/> Line 2
-  </para>
-  <blockquote>
-    <para>
-      <quote>It is better to be approximately right than exactly wrong.</quote><sbr/>
-      <emphasis>-- Old adage</emphasis>
-    </para>
-  </blockquote>
-</article>
Deleted: branches/release/tools/quickbook/test/newline.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/newline.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,10 +0,0 @@
-[article Test newlines
-]
-
-Line 1\nLine 2
-
-[:["It is better to be approximately right than exactly wrong.]\n['-- Old adage]]
-
-Line 1[br]Line 2
-
-[:["It is better to be approximately right than exactly wrong.][br]['-- Old adage]]
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/para-test.gold
==============================================================================
--- branches/release/tools/quickbook/test/para-test.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="paragraph_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Paragraph Test</title>
-  <section id="paragraph_test.some_paragraphs">
-    <title><link linkend="paragraph_test.some_paragraphs">Some Paragraphs</link></title>
-    <para>
-      Shouldn't be a code block.
-    </para>
-    <para>
-      <emphasis role="bold">Should be bold</emphasis>.
-    </para>
-    <para>
-      Should be a single paragraph.
-    </para>
-    <para>
-      Single paragraph.
-    </para>
-    <para>
-      Single paragraph.
-    </para>
-    <para>
-      Single paragraph.
-    </para>
-    <para>
-      Single paragraph.
-    </para>
-    <para>
-      Lots of newlines round this paragraph.
-    </para>
-    <para>
-      Last paragraph.
-    </para>
-  </section>
-  <section id="paragraph_test.inside___breaking_comment__blocks">
-    <title><link linkend="paragraph_test.inside___breaking_comment__blocks">Inside
-    blocks</link></title>
-    <variablelist>
-      <title></title>
-      <varlistentry>
-        <term>Paragraphs</term>
-        <listitem>
-          <para>
-            Shouldn't be a code block.
-          </para>
-          <para>
-            <emphasis role="bold">Should be bold</emphasis>.
-          </para>
-          <para>
-            Should be a single paragraph.
-          </para>
-          <para>
-            Single paragraph.
-          </para>
-          <para>
-            Single paragraph.
-          </para>
-          <para>
-            Single paragraph.
-          </para>
-          <para>
-            Single paragraph.
-          </para>
-          <para>
-            Lots of newlines round this paragraph.
-          </para>
-          <para>
-            Last paragraph.
-          </para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </section>
-</article>
Deleted: branches/release/tools/quickbook/test/para-test.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/para-test.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,81 +0,0 @@
-[article Paragraph Test
-  [quickbook 1.5]
-]
-
-[section Some Paragraphs]
-
-[/ Leading comment ] Shouldn't be a code block.
-
-[/ Leading comment ]*Should be bold*.
-
-Should be a
-[/ Breaking comment]
-single paragraph.
-
-Single paragraph.
-[/ Breaking comment]
-
-Single paragraph.
-
-[/ Breaking comment]
-Single paragraph.
-
-Single paragraph.[/ Trailing comment]
-
-
-
-
-
-
-Lots of newlines round this paragraph.
-
-
-
-
-
-
-
-
-Last paragraph.[endsect]
-
-[section Inside
-[/Breaking comment]
-blocks]
-
-[variablelist
-[[Paragraphs][
-[/ Leading comment ] Shouldn't be a code block.
-
-[/ Leading comment ]*Should be bold*.
-
-Should be a
-[/ Breaking comment]
-single paragraph.
-
-Single paragraph.
-[/ Breaking comment]
-
-Single paragraph.
-
-[/ Breaking comment]
-Single paragraph.
-
-Single paragraph.[/ Trailing comment]
-
-
-
-
-
-
-Lots of newlines round this paragraph.
-
-
-
-
-
-
-
-
-Last paragraph.]]]
-
-[endsect]
\ No newline at end of file
Deleted: branches/release/tools/quickbook/test/preformatted.gold
==============================================================================
--- branches/release/tools/quickbook/test/preformatted.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="preformatted" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Preformatted</title>
-  <section id="preformatted.preformatted">
-    <title>Preformatted</title>
-    <para>
-      Here's the ubiquitous <emphasis>Hello World</emphasis> program in C++.
-    </para>
-<programlisting>#include <iostream>
-
-int main()
-{
-    std::cout << "Hello, World!" << std::endl;
-    return 0;
-}
-</programlisting>
-    <para>
-      The code should appear as a single block of code in a monospaced font and with
-      no syntax highlighting. The fifth and sixth lines should appear indented to
-      the right, aligning under <code><phrase role="identifier">main</phrase></code>,
-      on line 3.
-    </para>
-  </section>
-</article>
Deleted: branches/release/tools/quickbook/test/preformatted.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/preformatted.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,22 +0,0 @@
-[article Preformatted
-]
-
-[section Preformatted]
-
-Here's the ubiquitous /Hello World/ program in C++.
-
-[pre
-#include <iostream>
-
-int main()
-{
-    std::cout << "Hello, World!" << std::endl;
-    return 0;
-}
-]
-
-The code should appear as a single block of code in a monospaced font and with
-no syntax highlighting. The fifth and sixth lines should appear indented to the
-right, aligning under `main`, on line 3.
-
-[endsect]
Deleted: branches/release/tools/quickbook/test/quickbook-manual.gold
==============================================================================
--- branches/release/tools/quickbook/test/quickbook-manual.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,3944 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="quickbook" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Quickbook 1.4</title>
-  <articleinfo>
-    <authorgroup>
-    <author>
-      <firstname>Joel</firstname> <surname>de Guzman</surname>
-    </author>
-    <author>
-      <firstname>Eric</firstname> <surname>Niebler</surname>
-    </author>
-    </authorgroup>
-    <copyright>
-      <year>2002</year> <year>2004</year> <year>2006</year> <holder>Joel de Guzman,
-      Eric Niebler</holder>
-    </copyright>
-    <legalnotice id="quickbook.legal">
-      <para>
-        Distributed under the Boost Software License, Version 1.0. (See accompanying
-        file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt>)
-      </para>
-    </legalnotice>
-    <articlepurpose>
-      <emphasis>WikiWiki</emphasis> style documentation tool
-    </articlepurpose>
-  </articleinfo>
-  <section id="quickbook.intro">
-    <title><link linkend="quickbook.intro">Introduction</link></title>
-    <blockquote>
-      <para>
-        <emphasis role="bold"><emphasis><quote>Why program by hand in five days what
-        you can spend five years of your life automating?</quote></emphasis></emphasis>
-      </para>
-      <para>
-        -- Terrence Parr, author ANTLR/PCCTS
-      </para>
-    </blockquote>
-    <para>
-      Well, QuickBook started as a weekend hack. It was originally intended to be
-      a sample application using <ulink url="http://spirit.sourceforge.net">Spirit</ulink>.
-      What is it? What you are viewing now, this documentation, is autogenerated
-      by QuickBook. These files were generated from one master:
-    </para>
-    <blockquote>
-      <para>
-        <ulink url="../quickbook.qbk">quickbook.qbk</ulink>
-      </para>
-    </blockquote>
-    <para>
-      Originally named QuickDoc, this funky tool that never dies evolved into a funkier
-      tool thanks to Eric Niebler who resurrected the project making it generate
-      <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>
-      instead of HTML. The <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>
-      documentation format is an extension of <ulink url="http://www.docbook.org/">DocBook</ulink>,
-      an SGML or XML based format for describing documentation.
-    </para>
-    <para>
-      QuickBook is a WikiWiki style documentation tool geared towards C++ documentation
-      using simple rules and markup for simple formatting tasks. QuickBook extends
-      the WikiWiki concept. Like the WikiWiki, QuickBook documents are simple text
-      files. A single QuickBook document can generate a fully linked set of nice
-      HTML and PostScript/PDF documents complete with images and syntax- colorized
-      source code.
-    </para>
-    <para>
-      Features include:
-    </para>
-    <itemizedlist>
-      <listitem>
-        <simpara>
-          generate <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>
-          xml, to generate HTML, PostScript and PDF
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          simple markup to link to Doxygen-generated entities
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          macro system for simple text substitution
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          simple markup for italics, bold, preformatted, blurbs, code samples, tables,
-          URLs, anchors, images, etc.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          automatic syntax coloring of code samples
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          CSS support
-        </simpara>
-      </listitem>
-    </itemizedlist>
-  </section>
-  <section id="quickbook.change_log">
-    <title><link linkend="quickbook.change_log">Change Log</link></title>
-    <bridgehead renderas="sect3" id="quickbook.change_log.h0">
-      <phrase id="quickbook.change_log.version_1_3"/><link linkend="quickbook.change_log.version_1_3">Version
-      1.3</link>
-    </bridgehead>
-    <itemizedlist>
-      <listitem>
-        <simpara>
-          Quickbook file inclusion [include].
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Better xml output (pretty layout). Check out the generated XML.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Regression testing facility: to make sure your document will always be
-          compatible (full backward compatibility) regardless of changes to QuickBook.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Code cleanup and refactoring.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Allow phrase markup in the doc-info.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Preformatted code blocks via ``code`` (double ticks) allows code in tables
-          and lists, for example.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Quickbook versioning; allows full backward compatibility. You have to add
-          [quickbook 1.3] to the doc-info header to enable the new features. Without
-          this, QuickBook will assume that the document is a pre-1.3 document.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Better (intuitive) paragraph termination. Some markups may terminate a
-          paragraph. Example:
-<programlisting><phrase role="special">[</phrase><phrase role="identifier">section</phrase> <phrase role="identifier">x</phrase><phrase role="special">]</phrase>
-<phrase role="identifier">blah</phrase><phrase role="special">...</phrase>
-<phrase role="special">[</phrase><phrase role="identifier">endsect</phrase><phrase role="special">]</phrase></programlisting>
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Fully qualified section and headers. Subsection names are concatenated
-          to the ID to avoid clashing. Example: <code><phrase role="identifier">doc_name</phrase><phrase
-          role="special">.</phrase><phrase role="identifier">sect_name</phrase><phrase
-          role="special">.</phrase><phrase role="identifier">sub_sect_name</phrase><phrase
-          role="special">.</phrase><phrase role="identifier">sub_sub_sect_name</phrase></code>
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Better &nbsp; and whitespace handling in code snippets.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          [xinclude] fixes up the relative path to the target XML file when input_directory
-          is not the same as the output_directory.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Allow untitled tables.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Allow phrase markups in section titles.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Allow escaping back to QuickBook from code, code blocks and inline code.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Footnotes, with the [footnote This is the footnote] syntax.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Post-processor bug fix for escaped XML code that it does not recognize.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Replaceable, with the [~replacement] syntax.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Generic Headers
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Code changes to allow full recursion (i.e. Collectors and push/pop functions)
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Various code cleanup/maintenance
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Templates!
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          [conceptref] for referencing BoostBook <concept> entities.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Allow escape of spaces. The escaped space is removed from the output. Syntax:
-          <code><phrase role="special">\</phrase> </code>.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Nested comments are now allowed.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Quickbook blocks can nest inside comments.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          <link linkend="quickbook.syntax.block.import">Import</link> facility.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Callouts on imported code
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          Simple markups can now span a whole block.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          <link linkend="quickbook.syntax.block.blurbs">Blurbs</link>, <link linkend="quickbook.syntax.block.admonitions">Admonitions</link>
-          and table cells (see <link linkend="quickbook.syntax.block.tables">Tables</link>)
-          may now contain paragraphs.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          <code><phrase role="special">\</phrase><phrase role="identifier">n</phrase></code>
-          and <code><phrase role="special">[</phrase><phrase role="identifier">br</phrase><phrase
-          role="special">]</phrase></code> are now deprecated.
-        </simpara>
-      </listitem>
-    </itemizedlist>
-  </section>
-  <section id="quickbook.syntax">
-    <title><link linkend="quickbook.syntax">Syntax Summary</link></title>
-    <para>
-      A QuickBook document is composed of one or more blocks. An example of a block
-      is the paragraph or a C++ code snippet. Some blocks have special mark-ups.
-      Blocks, except code snippets which have their own grammar (C++ or Python),
-      are composed of one or more phrases. A phrase can be a simple contiguous run
-      of characters. Phrases can have special mark-ups. Marked up phrases can recursively
-      contain other phrases, but cannot contain blocks. A terminal is a self contained
-      block-level or phrase-level element that does not nest anything.
-    </para>
-    <para>
-      Blocks, in general, are delimited by two end-of-lines (the block terminator).
-      Phrases in each block cannot contain a block terminator. This way, syntax errors
-      such as un-matched closing brackets do not go haywire and corrupt anything
-      past a single block.
-    </para>
-    <section id="quickbook.syntax.comments">
-      <title><link linkend="quickbook.syntax.comments">Comments</link></title>
-      <para>
-        Can be placed anywhere.
-      </para>
-<programlisting><!--quickbook-escape-prefix-->[/ comment (no output generated) ]<!--quickbook-escape-postfix-->
-</programlisting>
-<programlisting><!--quickbook-escape-prefix-->[/ comments can be nested [/ some more here] ]<!--quickbook-escape-postfix-->
-</programlisting>
-<programlisting><!--quickbook-escape-prefix-->[/ Quickbook blocks can nest inside comments. [*Comment this out too!] ]<!--quickbook-escape-postfix-->
-</programlisting>
-    </section>
-    <section id="quickbook.syntax.phrase">
-      <title><link linkend="quickbook.syntax.phrase">Phrase Level Elements</link></title>
-      <section id="quickbook.syntax.phrase.font_styles">
-        <title><link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link></title>
-<programlisting><!--quickbook-escape-prefix-->['italic], [*bold], [_underline], [^teletype], [-strikethrough]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          will generate:
-        </para>
-        <para>
-          <emphasis>italic</emphasis>, <emphasis role="bold">bold</emphasis>, <emphasis
-          role="underline">underline</emphasis>, <literal>teletype</literal>, <emphasis
-          role="strikethrough">strikethrough</emphasis>
-        </para>
-        <para>
-          Like all non-terminal phrase level elements, this can of course be nested:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[*['bold-italic]]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          will generate:
-        </para>
-        <para>
-          <emphasis role="bold"><emphasis>bold-italic</emphasis></emphasis>
-        </para>
-      </section>
-      <section id="quickbook.syntax.phrase.replaceable">
-        <title><link linkend="quickbook.syntax.phrase.replaceable">Replaceable</link></title>
-        <para>
-          When you want content that may or must be replaced by the user, use the
-          syntax:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[~replacement]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          This will generate:
-        </para>
-        <para>
-          <replaceable>replacement</replaceable>
-        </para>
-      </section>
-      <section id="quickbook.syntax.phrase.quotations">
-        <title><link linkend="quickbook.syntax.phrase.quotations">Quotations</link></title>
-<programlisting><!--quickbook-escape-prefix-->["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          will generate:
-        </para>
-        <para>
-          <quote>A question that sometimes drives me hazy: am I or are the others
-          crazy?</quote>--Einstein
-        </para>
-        <para>
-          Note the proper left and right quote marks. Also, while you can simply
-          use ordinary quote marks like "quoted", our quotation, above,
-          will generate correct DocBook quotations (e.g. <quote>quoted</quote>).
-        </para>
-        <para>
-          Like all phrase elements, quotations may be nested. Example:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->["Here's the rule for bargains: ["Do other men, for they would do you.] That's
-the true business precept.]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          will generate:
-        </para>
-        <para>
-          <quote>Here's the rule for bargains: <quote>Do other men, for they would
-          do you.</quote> That's the true business precept.</quote>
-        </para>
-      </section>
-      <section id="quickbook.syntax.phrase.simple_formatting">
-        <title><link linkend="quickbook.syntax.phrase.simple_formatting">Simple formatting</link></title>
-        <para>
-          Simple markup for formatting text, common in many applications, is now
-          supported:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->/italic/, *bold*, _underline_, =teletype=
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          will generate:
-        </para>
-        <para>
-          <emphasis>italic</emphasis>, <emphasis role="bold">bold</emphasis>, <emphasis
-          role="underline">underline</emphasis>, <literal>teletype</literal>
-        </para>
-        <para>
-          Unlike QuickBook's standard formatting scheme, the rules for simpler alternatives
-          are much stricter<footnote id="quickbook.syntax.phrase.simple_formatting.f0">
-          <para>
-            Thanks to David Barrett, author of <ulink url="http://quinthar.com/qwikiwiki/index.php?page=Home">Qwiki</ulink>,
-            for sharing these samples and teaching me these obscure formatting rules.
-            I wasn't sure at all if <ulink url="http://spirit.sourceforge.net">Spirit</ulink>,
-            being more or less a formal EBNF parser, can handle the context sensitivity
-            and ambiguity.
-          </para>
-          </footnote>.
-        </para>
-        <itemizedlist>
-          <listitem>
-            <simpara>
-              Simple markups cannot nest. You can combine a simple markup with a
-              nestable markup.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              Simple markups cannot contain any other form of quickbook markup.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              A non-space character must follow the leading markup
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              A non-space character must precede the trailing markup
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              A space or a punctuation must follow the trailing markup
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              If the matching markup cannot be found within a block, the formatting
-              will not be applied. This is to ensure that un-matched formatting markups,
-              which can be a common mistake, does not corrupt anything past a single
-              block. We do not want the rest of the document to be rendered bold
-              just because we forgot a trailing '*'. A single block is terminated
-              by two end of lines or the close bracket: ']'.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              A line starting with the star will be interpreted as an unordered list.
-              See <link linkend="quickbook.syntax.block.lists.unordered_lists">Unordered
-              lists</link>.
-            </simpara>
-          </listitem>
-        </itemizedlist>
-        <table frame="all" id="quickbook.syntax.phrase.simple_formatting.t0">
-          <title>More Formatting Samples</title>
-          <tgroup cols="2">
-            <thead>
-              <row>
-                <entry>
-                  <para>
-                    Markup
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    Result
-                  </para>
-                </entry>
-              </row>
-            </thead>
-            <tbody>
-              <row>
-                <entry>
-                  <para>
-                    <literal>*Bold*</literal>
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    <emphasis role="bold">Bold</emphasis>
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    <literal>*Is bold*</literal>
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    <emphasis role="bold">Is bold</emphasis>
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    <literal>* Not bold* *Not bold * * Not bold *</literal>
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    * Not bold* *Not bold * * Not bold *
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    <literal>This*Isn't*Bold (no bold)</literal>
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    This*Isn't*Bold (no bold)
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    <literal>(*Bold Inside*) (parenthesis not bold)</literal>
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    (<emphasis role="bold">Bold Inside</emphasis>) (parenthesis not
-                    bold)
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    <literal>*(Bold Outside)* (parenthesis bold)</literal>
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    <emphasis role="bold">(Bold Outside)</emphasis> (parenthesis
-                    bold)
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    <literal>3*4*5 = 60 (no bold)</literal>
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    3*4*5 = 60 (no bold)
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    <literal>3 * 4 * 5 = 60 (no bold)</literal>
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    3 * 4 * 5 = 60 (no bold)
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    <literal>3 *4* 5 = 60 (4 is bold)</literal>
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    3 <emphasis role="bold">4</emphasis> 5 = 60 (4 is bold)
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    <literal>*This is bold* this is not *but this is*</literal>
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    <emphasis role="bold">This is bold</emphasis> this is not <emphasis
-                    role="bold">but this is</emphasis>
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    <literal>*This is bold*.</literal>
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    <emphasis role="bold">This is bold</emphasis>.
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    <literal>*B*. (bold B)</literal>
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    <emphasis role="bold">B</emphasis>. (bold B)
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    <literal>['*Bold-Italic*]</literal>
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    <emphasis><emphasis role="bold">Bold-Italic</emphasis></emphasis>
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    <literal>*side-by*/-side/</literal>
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    <emphasis role="bold">side-by</emphasis><emphasis>-side</emphasis>
-                  </para>
-                </entry>
-              </row>
-            </tbody>
-          </tgroup>
-        </table>
-        <para>
-          As mentioned, simple markups cannot go past a single block. The text from
-          "have" to "full" in the following paragraph will be
-          rendered as bold:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->Baa baa black sheep, *have you any wool?
-Yes sir, yes sir, three bags full!*
-One for the master, one for the dame,
-And one for the little boy who lives down the lane.
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          Baa baa black sheep, <emphasis role="bold">have you any wool? Yes sir,
-          yes sir, three bags full!</emphasis> One for the master, one for the dame,
-          And one for the little boy who lives down the lane.
-        </para>
-        <para>
-          But in the following paragraph, bold is not applied:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->Baa baa black sheep, *have you any wool?
-Yes sir, yes sir, three bags full!
-One for the master, one for the dame,
-And one for the little boy who lives down the lane.
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          Baa baa black sheep, *have you any wool? Yes sir, yes sir, three bags full!
-          One for the master, one for the dame, And one for the little boy who lives
-          down the lane.
-        </para>
-      </section>
-      <section id="quickbook.syntax.phrase.inline_code">
-        <title><link linkend="quickbook.syntax.phrase.inline_code">Inline code</link></title>
-        <para>
-          Inlining code in paragraphs is quite common when writing C++ documentation.
-          We provide a very simple markup for this. For example, this:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->This text has inlined code `int main() { return 0; }` in it.
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          will generate:
-        </para>
-        <para>
-          This text has inlined code <code><phrase role="keyword">int</phrase> <phrase
-          role="identifier">main</phrase><phrase role="special">()</phrase> <phrase
-          role="special">{</phrase> <phrase role="keyword">return</phrase> <phrase
-          role="number">0</phrase><phrase role="special">;</phrase> <phrase role="special">}</phrase></code>
-          in it. The code will be syntax highlighted.
-        </para>
-        <note>
-          <para>
-            We simply enclose the code with the tick: <literal>"`"</literal>, not the
-            single quote: <code><phrase role="string">"'"</phrase></code>.
-            Note too that <literal>`some code`</literal> is preferred over <literal>[^some code]</literal>.
-          </para>
-        </note>
-      </section>
-      <section id="quickbook.syntax.phrase.code_blocks">
-        <title><link linkend="quickbook.syntax.phrase.code_blocks">Code blocks</link></title>
-        <para>
-          Preformatted code simply starts with a space or a tab (See <link linkend="quickbook.syntax.block.code">Code</link>).
-          However, such a simple syntax cannot be used as phrase elements in lists
-          (See <link linkend="quickbook.syntax.block.lists.ordered_lists">Ordered
-          lists</link> and <link linkend="quickbook.syntax.block.lists.unordered_lists">Unordered
-          lists</link>), tables (See <link linkend="quickbook.syntax.block.tables">Tables</link>),
-          etc. Inline code (see above) can. The problem is, inline code does not
-          allow formatting with newlines, spaces, and tabs. These are lost.
-        </para>
-        <para>
-          We provide a phrase level markup that is a mix between the two. By using
-          the double-tick, instead of the single-tick, we are telling QuickBook to
-          use preformatted blocks of code. Example:
-        </para>
-<programlisting>``
-    #include <iostream>
-
-    int main()
-    {
-        std::cout << "Hello, World!" << std::endl;
-        return 0;
-    }
-``
-</programlisting>
-        <para>
-          will generate:
-        </para>
-        <para>
-<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">iostream</phrase><phrase role="special">></phrase>
-
-<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
-<phrase role="special">{</phrase>
-    <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special"><<</phrase> <phrase role="string">"Hello, World!"</phrase> <phrase role="special"><<</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
-    <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
-        </para>
-      </section>
-      <section id="quickbook.syntax.phrase.source_mode">
-        <title><link linkend="quickbook.syntax.phrase.source_mode">Source Mode</link></title>
-        <para>
-          If a document contains more than one type of source code then the source
-          mode may be changed dynamically as the document is processed. All QuickBook
-          documents are initially in C++ mode by default, though an alternative initial
-          value may be set in the <link linkend="quickbook.syntax.block.document">Document</link>
-          section.
-        </para>
-        <para>
-          To change the source mode, use the <literal>[source-mode]</literal> markup,
-          where <literal>source-mode</literal> is one of the supported modes. For
-          example, this:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->Python's [python] `import` is rather like C++'s [c++] `#include`. A
-C++ comment `// looks like this` whereas a Python comment [python]
-`# looks like this`.
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          will generate:
-        </para>
-        <para>
-          Python's <code><phrase role="keyword">import</phrase></code> is rather
-          like C++'s <code><phrase role="preprocessor">#include</phrase></code>.
-          A C++ comment <code><phrase role="comment">// looks like this</phrase></code>
-          whereas a Python comment <code><phrase role="comment">#looks like this</phrase></code>.
-        </para>
-        <table frame="all" id="quickbook.syntax.phrase.source_mode.t0">
-          <title>Supported Source Modes</title>
-          <tgroup cols="2">
-            <thead>
-              <row>
-                <entry>
-                  <para>
-                    Mode
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    Source Mode Markup
-                  </para>
-                </entry>
-              </row>
-            </thead>
-            <tbody>
-              <row>
-                <entry>
-                  <para>
-                    C++
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    <literal>[c++]</literal>
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    Python
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    <literal>[python]</literal>
-                  </para>
-                </entry>
-              </row>
-            </tbody>
-          </tgroup>
-        </table>
-        <note>
-          <para>
-            The source mode strings are lowercase.
-          </para>
-        </note>
-      </section>
-      <section id="quickbook.syntax.phrase.line_break">
-        <title><link linkend="quickbook.syntax.phrase.line_break">line-break</link></title>
-<programlisting><!--quickbook-escape-prefix-->[br]
-<!--quickbook-escape-postfix--></programlisting>
-        <warning>
-          <para>
-            <code><phrase role="special">[</phrase><phrase role="identifier">br</phrase><phrase
-            role="special">]</phrase></code> is now deprecated. <link linkend="quickbook.syntax.block.blurbs">Blurbs</link>,
-            <link linkend="quickbook.syntax.block.admonitions">Admonitions</link>
-            and table cells (see <link linkend="quickbook.syntax.block.tables">Tables</link>)
-            may now contain paragraphs.
-          </para>
-        </warning>
-      </section>
-      <section id="quickbook.syntax.phrase.anchors">
-        <title><link linkend="quickbook.syntax.phrase.anchors">Anchors</link></title>
-<programlisting><!--quickbook-escape-prefix-->[#named_anchor]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          A named anchor is a hook that can be referenced by a link elsewhere in
-          the document. You can then reference an anchor with <literal>[link named_anchor
-Some link text]</literal>.
-          See <link linkend="quickbook.syntax.phrase.anchor_links">Anchor links</link>,
-          <link linkend="quickbook.syntax.block.section">Section</link> and <link
-          linkend="quickbook.syntax.block.headings">Heading</link>.
-        </para>
-      </section>
-      <section id="quickbook.syntax.phrase.links">
-        <title><link linkend="quickbook.syntax.phrase.links">Links</link></title>
-<programlisting><!--quickbook-escape-prefix-->[@http://www.boost.org this is [*boost's] website....]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          will generate:
-        </para>
-        <para>
-          <ulink url="http://www.boost.org">this is <emphasis role="bold">boost's</emphasis>
-          website....</ulink>
-        </para>
-        <para>
-          URL links where the link text is the link itself is common. Example:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->see http://spirit.sourceforge.net/
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          so, when the text is absent in a link markup, the URL is assumed. Example:
-        </para>
-<programlisting>see <!--quickbook-escape-prefix-->[@http://spirit.sourceforge.net/]<!--quickbook-escape-postfix-->
-</programlisting>
-        <para>
-          will generate:
-        </para>
-        <para>
-          see <ulink url="http://spirit.sourceforge.net/">http://spirit.sourceforge.net/>
-        </para>
-      </section>
-      <section id="quickbook.syntax.phrase.anchor_links">
-        <title><link linkend="quickbook.syntax.phrase.anchor_links">Anchor links</link></title>
-        <para>
-          You can link within a document using:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[link section_id.normalized_header_text The link text]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          See sections <link linkend="quickbook.syntax.block.section">Section</link>
-          and <link linkend="quickbook.syntax.block.headings">Heading</link> for
-          more info.
-        </para>
-      </section>
-      <section id="quickbook.syntax.phrase.refentry_links">
-        <title><link linkend="quickbook.syntax.phrase.refentry_links">refentry links</link></title>
-        <para>
-          In addition, you can link internally to an XML refentry like:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[link xml.refentry The link text]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          This gets converted into <literal><link linkend="xml.refentry">The
-          link text</link></literal>.
-        </para>
-        <para>
-          Like URLs, the link text is optional. If this is not present, the link
-          text will automatically be the refentry. Example:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[link xml.refentry]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          This gets converted into <literal><link linkend="xml.refentry">xml.refentry</link></literal>.
-        </para>
-      </section>
-      <section id="quickbook.syntax.phrase.code_links">
-        <title><link linkend="quickbook.syntax.phrase.code_links">Code Links</link></title>
-        <para>
-          If you want to link to a function, class, member, enum, concept or header
-          in the reference section, you can use:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[funcref fully::qualified::function_name The link text]
-[classref fully::qualified::class_name The link text]
-[memberref fully::qualified::member_name The link text]
-[enumref fully::qualified::enum_name The link text]
-[macroref MACRO_NAME The link text]
-[conceptref ConceptName The link text]
-[headerref path/to/header.hpp The link text]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          Again, the link text is optional. If this is not present, the link text
-          will automatically be the function, class, member, enum, macro, concept
-          or header. Example:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[classref boost::bar::baz]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          would have "boost::bar::baz" as the link text.
-        </para>
-      </section>
-      <section id="quickbook.syntax.phrase.escape">
-        <title><link linkend="quickbook.syntax.phrase.escape">Escape</link></title>
-        <para>
-          The escape mark-up is used when we don't want to do any processing.
-        </para>
-<programlisting>'''
-escape (no processing/formatting)
-'''
-</programlisting>
-        <para>
-          Escaping allows us to pass XML markup to <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>
-          or <ulink url="http://www.docbook.org/">DocBook</ulink>. For example:
-        </para>
-<programlisting>'''
-<emphasis role="bold">This is direct XML markup</emphasis>
-'''
-</programlisting>
-        <para>
-          <emphasis role="bold">This is direct XML markup</emphasis>
-        </para>
-        <important>
-          <para>
-            Be careful when using the escape. The text must conform to <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>/<ulink
-            url="http://www.docbook.org/">DocBook</ulink> syntax.
-          </para>
-        </important>
-      </section>
-      <section id="quickbook.syntax.phrase.single_char_escape">
-        <title><link linkend="quickbook.syntax.phrase.single_char_escape">Single
-        char escape</link></title>
-        <para>
-          The backslash may be used to escape a single punctuation character. The
-          punctuation immediately after the backslash is passed without any processing.
-          This is useful when we need to escape QuickBook punctuations such as <code><phrase
-          role="special">[</phrase></code> and <code><phrase role="special">]</phrase></code>.
-          For example, how do you escape the triple quote? Simple: <literal>\'\'\'</literal>
-        </para>
-        <para>
-          <code><phrase role="special">\</phrase><phrase role="identifier">n</phrase></code>
-          has a special meaning. It is used to generate line breaks.
-        </para>
-        <warning>
-          <para>
-            <code><phrase role="special">\</phrase><phrase role="identifier">n</phrase></code>
-            and <code><phrase role="special">[</phrase><phrase role="identifier">br</phrase><phrase
-            role="special">]</phrase></code> are now deprecated. <link linkend="quickbook.syntax.block.blurbs">Blurbs</link>,
-            <link linkend="quickbook.syntax.block.admonitions">Admonitions</link>
-            and table cells (see <link linkend="quickbook.syntax.block.tables">Tables</link>)
-            may now contain paragraphs.
-          </para>
-        </warning>
-        <para>
-          The escaped space: <code><phrase role="special">\</phrase> </code> also
-          has a special meaning. The escaped space is removed from the output.
-        </para>
-      </section>
-      <section id="quickbook.syntax.phrase.images">
-        <title><link linkend="quickbook.syntax.phrase.images">Images</link></title>
-<programlisting><!--quickbook-escape-prefix-->[$image.jpg]
-<!--quickbook-escape-postfix--></programlisting>
-      </section>
-      <section id="quickbook.syntax.phrase.footnotes">
-        <title><link linkend="quickbook.syntax.phrase.footnotes">Footnotes</link></title>
-        <para>
-          As of version 1.3, QuickBook supports footnotes. Just put the text of the
-          footnote in a <code><phrase role="special">[</phrase><phrase role="identifier">footnote</phrase><phrase
-          role="special">]</phrase></code> block, and the text will be put at the
-          bottom of the current page. For example, this:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[footnote A sample footnote]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          will generate this<footnote id="quickbook.syntax.phrase.footnotes.f0">
-          <para>
-            A sample footnote
-          </para>
-          </footnote>.
-        </para>
-        <section id="quickbook.syntax.phrase.footnotes.macro_expansion">
-          <title><link linkend="quickbook.syntax.phrase.footnotes.macro_expansion">Macro
-          Expansion</link></title>
-<programlisting><!--quickbook-escape-prefix-->__a_macro_identifier__
-<!--quickbook-escape-postfix--></programlisting>
-          <para>
-            See <link linkend="quickbook.syntax.block.macros">Macros</link> for details.
-          </para>
-        </section>
-        <section id="quickbook.syntax.phrase.footnotes.template_expansion">
-          <title><link linkend="quickbook.syntax.phrase.footnotes.template_expansion">Template
-          Expansion</link></title>
-<programlisting><!--quickbook-escape-prefix-->[a_template_identifier]
-<!--quickbook-escape-postfix--></programlisting>
-          <para>
-            See <link linkend="quickbook.syntax.block.templates">Templates</link>
-            for details.
-          </para>
-        </section>
-      </section>
-    </section>
-    <section id="quickbook.syntax.block">
-      <title><link linkend="quickbook.syntax.block">Block Level Elements</link></title>
-      <section id="quickbook.syntax.block.document">
-        <title><link linkend="quickbook.syntax.block.document">Document</link></title>
-        <para>
-          Every document must begin with a Document Info section, which should look
-          like this:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[document-type The Document Title
-    [quickbook 1.3]
-    [version 1.0]
-    [id the_document_name]
-    [dirname the_document_dir]
-    [copyright 2000 2002 2003 Joe Blow, Jane Doe]
-    [purpose The document's reason for being]
-    [category The document's category]
-    [authors [Blow, Joe], [Doe, Jane]]
-    [license The document's license]
-    [source-mode source-type]
-]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          Where document-type is one of:
-        </para>
-        <itemizedlist>
-          <listitem>
-            <simpara>
-              book
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              article
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              library
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              chapter
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              part
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              appendix
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              preface
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              qandadiv
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              qandaset
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              reference
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              set
-            </simpara>
-          </listitem>
-        </itemizedlist>
-        <para>
-          quickbook 1.3 declares the version of quickbook the document is written
-          for. In its absence, version 1.1 is assumed.
-        </para>
-        <para>
-          <literal>version</literal>, <literal>id</literal>, <literal>dirname</literal>,
-          <literal>copyright</literal>, <literal>purpose</literal>, <literal>category</literal>,
-          <literal>authors</literal>, <literal>license</literal>, <literal>last-revision</literal>
-          and <literal>source-mode</literal> are optional information.
-        </para>
-        <para>
-          <literal>source-type</literal> is a lowercase string setting the initial
-          <link linkend="quickbook.syntax.phrase.source_mode">Source Mode</link>.
-          If the <literal>source-mode</literal> field is omitted, a default value
-          of <literal>c++</literal> will be used.
-        </para>
-      </section>
-      <section id="quickbook.syntax.block.section">
-        <title><link linkend="quickbook.syntax.block.section">Section</link></title>
-        <para>
-          Starting a new section is accomplished with:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[section:id The Section Title]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          where <emphasis>id</emphasis> is optional. id will be the filename of the
-          generated section. If it is not present, "The Section Title"
-          will be normalized and become the id. Valid characters are <literal>a-Z</literal>,
-          <literal>A-Z</literal>, <literal>0-9</literal> and <literal>_</literal>.
-          All non-valid characters are converted to underscore and all upper-case
-          are converted to lower case. Thus: "The Section Title" will be
-          normalized to "the_section_title".
-        </para>
-        <para>
-          End a section with:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[endsect]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          Sections can nest, and that results in a hierarchy in the table of contents.
-        </para>
-      </section>
-      <section id="quickbook.syntax.block.xinclude">
-        <title><link linkend="quickbook.syntax.block.xinclude">xinclude</link></title>
-        <para>
-          You can include another XML file with:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[xinclude file.xml]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          This is useful when file.xml has been generated by Doxygen and contains
-          your reference section.
-        </para>
-      </section>
-      <section id="quickbook.syntax.block.paragraphs">
-        <title><link linkend="quickbook.syntax.block.paragraphs">Paragraphs</link></title>
-        <para>
-          Paragraphs start left-flushed and are terminated by two or more newlines.
-          No markup is needed for paragraphs. QuickBook automatically detects paragraphs
-          from the context. Block markups [section, endsect, h1, h2, h3, h4, h5,
-          h6, blurb, (block-quote) ':', pre, def, table and include ] may also terminate
-          a paragraph.
-        </para>
-      </section>
-      <section id="quickbook.syntax.block.lists">
-        <title><link linkend="quickbook.syntax.block.lists">Lists</link></title>
-        <section id="quickbook.syntax.block.lists.ordered_lists">
-          <title><link linkend="quickbook.syntax.block.lists.ordered_lists">Ordered
-          lists</link></title>
-<programlisting># One
-# Two
-# Three
-</programlisting>
-          <para>
-            will generate:
-          </para>
-          <orderedlist>
-            <listitem>
-              <simpara>
-                One
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-                Two
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-                Three
-              </simpara>
-            </listitem>
-          </orderedlist>
-        </section>
-        <section id="quickbook.syntax.block.lists.list_hierarchies">
-          <title><link linkend="quickbook.syntax.block.lists.list_hierarchies">List
-          Hierarchies</link></title>
-          <para>
-            List hierarchies are supported. Example:
-          </para>
-<programlisting># One
-# Two
-# Three
-    # Three.a
-    # Three.b
-    # Three.c
-# Four
-    # Four.a
-        # Four.a.i
-        # Four.a.ii
-# Five
-</programlisting>
-          <para>
-            will generate:
-          </para>
-          <orderedlist>
-            <listitem>
-              <simpara>
-                One
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-                Two
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-                Three
-                <orderedlist>
-                  <listitem>
-                    <simpara>
-                      Three.a
-                    </simpara>
-                  </listitem>
-                  <listitem>
-                    <simpara>
-                      Three.b
-                    </simpara>
-                  </listitem>
-                  <listitem>
-                    <simpara>
-                      Three.c
-                    </simpara>
-                  </listitem>
-                </orderedlist>
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-                Fourth
-                <orderedlist>
-                  <listitem>
-                    <simpara>
-                      Four.a
-                      <orderedlist>
-                        <listitem>
-                          <simpara>
-                            Four.a.i
-                          </simpara>
-                        </listitem>
-                        <listitem>
-                          <simpara>
-                            Four.a.ii
-                          </simpara>
-                        </listitem>
-                      </orderedlist>
-                    </simpara>
-                  </listitem>
-                </orderedlist>
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-                Five
-              </simpara>
-            </listitem>
-          </orderedlist>
-        </section>
-        <section id="quickbook.syntax.block.lists.long_list_lines">
-          <title><link linkend="quickbook.syntax.block.lists.long_list_lines">Long
-          List Lines</link></title>
-          <para>
-            Long lines will be wrapped appropriately. Example:
-          </para>
-<programlisting># A short item.
-# A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-# A short item.
-</programlisting>
-          <orderedlist>
-            <listitem>
-              <simpara>
-                A short item.
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-                A very long item. A very long item. A very long item. A very long
-                item. A very long item. A very long item. A very long item. A very
-                long item. A very long item. A very long item. A very long item.
-                A very long item. A very long item. A very long item. A very long
-                item.
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-                A short item.
-              </simpara>
-            </listitem>
-          </orderedlist>
-        </section>
-        <section id="quickbook.syntax.block.lists.unordered_lists">
-          <title><link linkend="quickbook.syntax.block.lists.unordered_lists">Unordered
-          lists</link></title>
-<programlisting><!--quickbook-escape-prefix-->* First
-* Second
-* Third
-<!--quickbook-escape-postfix--></programlisting>
-          <para>
-            will generate:
-          </para>
-          <itemizedlist>
-            <listitem>
-              <simpara>
-                First
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-                Second
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-                Third
-              </simpara>
-            </listitem>
-          </itemizedlist>
-        </section>
-        <section id="quickbook.syntax.block.lists.mixed_lists">
-          <title><link linkend="quickbook.syntax.block.lists.mixed_lists">Mixed lists</link></title>
-          <para>
-            Mixed lists (ordered and unordered) are supported. Example:
-          </para>
-<programlisting><!--quickbook-escape-prefix--># One
-# Two
-# Three
-    * Three.a
-    * Three.b
-    * Three.c
-# Four
-<!--quickbook-escape-postfix--></programlisting>
-          <para>
-            will generate:
-          </para>
-          <orderedlist>
-            <listitem>
-              <simpara>
-                One
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-                Two
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-                Three
-                <itemizedlist>
-                  <listitem>
-                    <simpara>
-                      Three.a
-                    </simpara>
-                  </listitem>
-                  <listitem>
-                    <simpara>
-                      Three.b
-                    </simpara>
-                  </listitem>
-                  <listitem>
-                    <simpara>
-                      Three.c
-                    </simpara>
-                  </listitem>
-                </itemizedlist>
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-                Four
-              </simpara>
-            </listitem>
-          </orderedlist>
-          <para>
-            And...
-          </para>
-<programlisting><!--quickbook-escape-prefix--># 1
-    * 1.a
-        # 1.a.1
-        # 1.a.2
-    * 1.b
-# 2
-    * 2.a
-    * 2.b
-        # 2.b.1
-        # 2.b.2
-            * 2.b.2.a
-            * 2.b.2.b
-<!--quickbook-escape-postfix--></programlisting>
-          <para>
-            will generate:
-          </para>
-          <orderedlist>
-            <listitem>
-              <simpara>
-                1
-                <itemizedlist>
-                  <listitem>
-                    <simpara>
-                      1.a
-                      <orderedlist>
-                        <listitem>
-                          <simpara>
-                            1.a.1
-                          </simpara>
-                        </listitem>
-                        <listitem>
-                          <simpara>
-                            1.a.2
-                          </simpara>
-                        </listitem>
-                      </orderedlist>
-                    </simpara>
-                  </listitem>
-                  <listitem>
-                    <simpara>
-                      1.b
-                    </simpara>
-                  </listitem>
-                </itemizedlist>
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-                2
-                <itemizedlist>
-                  <listitem>
-                    <simpara>
-                      2.a
-                    </simpara>
-                  </listitem>
-                  <listitem>
-                    <simpara>
-                      2.b
-                      <orderedlist>
-                        <listitem>
-                          <simpara>
-                            2.b.1
-                          </simpara>
-                        </listitem>
-                        <listitem>
-                          <simpara>
-                            2.b.2
-                            <itemizedlist>
-                              <listitem>
-                                <simpara>
-                                  2.b.2.a
-                                </simpara>
-                              </listitem>
-                              <listitem>
-                                <simpara>
-                                  2.b.2.b
-                                </simpara>
-                              </listitem>
-                            </itemizedlist>
-                          </simpara>
-                        </listitem>
-                      </orderedlist>
-                    </simpara>
-                  </listitem>
-                </itemizedlist>
-              </simpara>
-            </listitem>
-          </orderedlist>
-        </section>
-      </section>
-      <section id="quickbook.syntax.block.code">
-        <title><link linkend="quickbook.syntax.block.code">Code</link></title>
-        <para>
-          Preformatted code starts with a space or a tab. The code will be syntax
-          highlighted according to the current <link linkend="quickbook.syntax.phrase.source_mode">Source
-          Mode</link>:
-        </para>
-<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">iostream</phrase><phrase role="special">></phrase>
-
-<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
-<phrase role="special">{</phrase>
-    <phrase role="comment">// Sample code</phrase>
-    <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special"><<</phrase> <phrase role="string">"Hello, World\n"</phrase><phrase role="special">;</phrase>
-    <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
-<programlisting><phrase role="keyword">import</phrase> <phrase role="identifier">cgi</phrase>
-
-<phrase role="keyword">def</phrase> <phrase role="identifier">cookForHtml</phrase><phrase role="special">(</phrase><phrase role="identifier">text</phrase><phrase role="special">):</phrase>
-    <phrase role="string">'''"Cooks" the input text for HTML.'''</phrase>
-
-    <phrase role="keyword">return</phrase> <phrase role="identifier">cgi</phrase><phrase role="special">.</phrase><phrase role="identifier">escape</phrase><phrase role="special">(</phrase><phrase role="identifier">text</phrase><phrase role="special">)</phrase>
-</programlisting>
-        <para>
-          Macros that are already defined are expanded in source code. Example:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[def __array__ [@http://www.boost.org/doc/html/array/reference.html array]]
-[def __boost__ [@http://www.boost.org/libs/libraries.htm boost]]
-
-    using __boost__::__array__;
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          Generates:
-        </para>
-<programlisting><phrase role="keyword">using</phrase> <ulink url="http://www.boost.org/libs/libraries.htm">boost</ulink><phrase role="special">::</phrase><ulink url="http://www.boost.org/doc/html/array/reference.html">array</ulink><phrase role="special">;</phrase>
-</programlisting>
-      </section>
-      <section id="quickbook.syntax.block.escape_back">
-        <title><link linkend="quickbook.syntax.block.escape_back">Escaping Back To
-        QuickBook</link></title>
-        <para>
-          Inside code, code blocks and inline code, QuickBook does not allow any
-          markup to avoid conflicts with the target syntax (e.g. c++). In case you
-          need to switch back to QuickBook markup inside code, you can do so using
-          a language specific <emphasis>escape-back</emphasis> delimiter. In C++
-          and Python, the delimiter is the double tick (back-quote): "``"
-          and "``". Example:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``()
-{
-}
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          Will generate:
-        </para>
-<programlisting><phrase role="keyword">void</phrase> <ulink url="http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz">foo</ulink><phrase role="special">()</phrase>
-<phrase role="special">{</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
-        <para>
-          When escaping from code to QuickBook, only phrase level markups are allowed.
-          Block level markups like lists, tables etc. are not allowed.
-        </para>
-      </section>
-      <section id="quickbook.syntax.block.preformatted">
-        <title><link linkend="quickbook.syntax.block.preformatted">Preformatted</link></title>
-        <para>
-          Sometimes, you don't want some preformatted text to be parsed as C++. In
-          such cases, use the <literal>[pre ... ]</literal> markup block.
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[pre
-
-    Some *preformatted* text                    Some *preformatted* text
-
-        Some *preformatted* text            Some *preformatted* text
-
-            Some *preformatted* text    Some *preformatted* text
-
-]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          Spaces, tabs and newlines are rendered as-is. Unlike all quickbook block
-          level markup, pre (and Code) are the only ones that allow multiple newlines.
-          The markup above will generate:
-        </para>
-<programlisting>Some <emphasis role="bold">preformatted</emphasis> text                    Some <emphasis role="bold">preformatted</emphasis> text
-
-    Some <emphasis role="bold">preformatted</emphasis> text            Some <emphasis role="bold">preformatted</emphasis> text
-
-        Some <emphasis role="bold">preformatted</emphasis> text    Some <emphasis role="bold">preformatted</emphasis> text
-
-</programlisting>
-        <para>
-          Notice that unlike Code, phrase markup such as font style is still permitted
-          inside <literal>pre</literal> blocks.
-        </para>
-      </section>
-      <section id="quickbook.syntax.block.blockquote">
-        <title><link linkend="quickbook.syntax.block.blockquote">Blockquote</link></title>
-<programlisting><!--quickbook-escape-prefix-->[:sometext...]<!--quickbook-escape-postfix-->
-</programlisting>
-        <blockquote>
-          <para>
-            Indents the paragraph. This applies to one paragraph only.
-          </para>
-        </blockquote>
-      </section>
-      <section id="quickbook.syntax.block.admonitions">
-        <title><link linkend="quickbook.syntax.block.admonitions">Admonitions</link></title>
-<programlisting><!--quickbook-escape-prefix-->[note This is a note]
-[tip This is a tip]
-[important This is important]
-[caution This is a caution]
-[warning This is a warning]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          generates <ulink url="http://www.docbook.org/">DocBook</ulink> admonitions:
-        </para>
-        <note>
-          <para>
-            This is a note
-          </para>
-        </note>
-        <tip>
-          <para>
-            This is a tip
-          </para>
-        </tip>
-        <important>
-          <para>
-            This is important
-          </para>
-        </important>
-        <caution>
-          <para>
-            This is a caution
-          </para>
-        </caution>
-        <warning>
-          <para>
-            This is a warning
-          </para>
-        </warning>
-        <para>
-          These are the only admonitions supported by <ulink url="http://www.docbook.org/">DocBook</ulink>.
-          So, for example <literal>[information This is some information]</literal>
-          is unlikely to produce the desired effect.
-        </para>
-      </section>
-      <section id="quickbook.syntax.block.headings">
-        <title><link linkend="quickbook.syntax.block.headings">Headings</link></title>
-<programlisting><!--quickbook-escape-prefix-->[h1 Heading 1]
-[h2 Heading 2]
-[h3 Heading 3]
-[h4 Heading 4]
-[h5 Heading 5]
-[h6 Heading 6]
-<!--quickbook-escape-postfix--></programlisting>
-        <bridgehead renderas="sect1" id="quickbook.syntax.block.headings.h0">
-          <phrase id="quickbook.syntax.block.headings.heading_1"/><link linkend="quickbook.syntax.block.headings.heading_1">Heading
-          1</link>
-        </bridgehead>
-        <bridgehead renderas="sect2" id="quickbook.syntax.block.headings.h1">
-          <phrase id="quickbook.syntax.block.headings.heading_2"/><link linkend="quickbook.syntax.block.headings.heading_2">Heading
-          2</link>
-        </bridgehead>
-        <bridgehead renderas="sect3" id="quickbook.syntax.block.headings.h2">
-          <phrase id="quickbook.syntax.block.headings.heading_3"/><link linkend="quickbook.syntax.block.headings.heading_3">Heading
-          3</link>
-        </bridgehead>
-        <bridgehead renderas="sect4" id="quickbook.syntax.block.headings.h3">
-          <phrase id="quickbook.syntax.block.headings.heading_4"/><link linkend="quickbook.syntax.block.headings.heading_4">Heading
-          4</link>
-        </bridgehead>
-        <bridgehead renderas="sect5" id="quickbook.syntax.block.headings.h4">
-          <phrase id="quickbook.syntax.block.headings.heading_5"/><link linkend="quickbook.syntax.block.headings.heading_5">Heading
-          5</link>
-        </bridgehead>
-        <bridgehead renderas="sect6" id="quickbook.syntax.block.headings.h5">
-          <phrase id="quickbook.syntax.block.headings.heading_6"/><link linkend="quickbook.syntax.block.headings.heading_6">Heading
-          6</link>
-        </bridgehead>
-        <para>
-          Headings 1-3 [h1 h2 and h3] will automatically have anchors with normalized
-          names with <literal>name="section_id.normalized_header_text"</literal>
-          (i.e. valid characters are <literal>a-z</literal>, <literal>A-Z</literal>,
-          <literal>0-9</literal> and <literal>_</literal>. All non-valid characters
-          are converted to underscore and all upper-case are converted to lower-case.
-          For example: Heading 1 in section Section 2 will be normalized to <literal>section_2.heading_1</literal>).
-          You can use:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[link section_id.normalized_header_text The link text]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          to link to them. See <link linkend="quickbook.syntax.phrase.anchor_links">Anchor
-          links</link> and <link linkend="quickbook.syntax.block.section">Section</link>
-          for more info.
-        </para>
-      </section>
-      <section id="quickbook.syntax.block.generic_heading">
-        <title><link linkend="quickbook.syntax.block.generic_heading">Generic Heading</link></title>
-        <para>
-          In cases when you don't want to care about the heading level (1 to 6),
-          you can use the <emphasis>Generic Heading</emphasis>:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[heading Heading]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          The <emphasis>Generic Heading</emphasis> assumes the level, plus one, of
-          the innermost section where it is placed. For example, if it is placed
-          in the outermost section, then, it assumes <emphasis>h2</emphasis>.
-        </para>
-        <para>
-          Headings are often used as an alternative to sections. It is used particularly
-          if you do not want to start a new section. In many cases, however, headings
-          in a particular section is just flat. Example:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[section A]
-[h2 X]
-[h2 Y]
-[h2 Z]
-[endsect]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          Here we use h2 assuming that section A is the outermost level. If it is
-          placed in an inner level, you'll have to use h3, h4, etc. depending on
-          where the section is. In general, it is the section level plus one. It
-          is rather tedious, however, to scan the section level everytime. If you
-          rewrite the example above as shown below, this will be automatic:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[section A]
-[heading X]
-[heading Y]
-[heading Z]
-[endsect]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          They work well regardless where you place them. You can rearrange sections
-          at will without any extra work to ensure correct heading levels. In fact,
-          with <emphasis>section</emphasis> and <emphasis>heading</emphasis>, you
-          have all you need. <emphasis>h1</emphasis>..<emphasis>h6</emphasis> becomes
-          redundant. <emphasis>h1</emphasis>..<emphasis>h6</emphasis> might be deprecated
-          in the future.
-        </para>
-      </section>
-      <section id="quickbook.syntax.block.macros">
-        <title><link linkend="quickbook.syntax.block.macros">Macros</link></title>
-<programlisting><!--quickbook-escape-prefix-->[def macro_identifier some text]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          When a macro is defined, the identifier replaces the text anywhere in the
-          file, in paragraphs, in markups, etc. macro_identifier is a string of non-
-          white space characters except ']'. A macro may not follow an alphabetic
-          character or the underscore. The replacement text can be any phrase (even
-          marked up). Example:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]]
-sf_logo
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          Now everywhere the sf_logo is placed, the picture will be inlined.
-        </para>
-        <para>
-          <inlinemediaobject><imageobject><imagedata fileref="http://sourceforge.net/sflogo.php?group_id=28447&type=1"></imagedata></imageobject>
-          <textobject>
-            <phrase>sflogo</phrase>
-          </textobject>
-          </inlinemediaobject>
-        </para>
-        <tip>
-          <para>
-            It's a good idea to use macro identifiers that are distinguishable. For
-            instance, in this document, macro identifiers have two leading and trailing
-            underscores (e.g. <literal>__spirit__</literal>). The reason is to avoid unwanted
-            macro replacement.
-          </para>
-        </tip>
-        <para>
-          Links (URLS) and images are good candidates for macros. <emphasis role="bold">1</emphasis>)
-          They tend to change a lot. It is a good idea to place all links and images
-          in one place near the top to make it easy to make changes. <emphasis role="bold">2</emphasis>)
-          The syntax is not pretty. It's easier to read and write, e.g. <literal>__spirit__</literal>
-          than <literal>[@http://spirit.sourceforge.net Spirit]</literal>.
-        </para>
-        <para>
-          Some more examples:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[def :-)            [$theme/smiley.png]]
-[def __spirit__     [@http://spirit.sourceforge.net Spirit]]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          (See <link linkend="quickbook.syntax.phrase.images">Images</link> and
-          <link linkend="quickbook.syntax.phrase.links">Links</link>)
-        </para>
-        <para>
-          Invoking these macros:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->Hi __spirit__  :-)
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          will generate this:
-        </para>
-        <para>
-          Hi <ulink url="http://spirit.sourceforge.net">Spirit</ulink> <inlinemediaobject><imageobject><imagedata
-          fileref="images/smiley.png"></imagedata></imageobject>
-          <textobject>
-            <phrase>smiley</phrase>
-          </textobject>
-          </inlinemediaobject>
-        </para>
-      </section>
-      <section id="quickbook.syntax.block.predefined_macros">
-        <title><link linkend="quickbook.syntax.block.predefined_macros">Predefined
-        Macros</link></title>
-        <para>
-          Quickbook has some predefined macros that you can already use.
-        </para>
-        <table frame="all" id="quickbook.syntax.block.predefined_macros.t0">
-          <title>Predefined Macros</title>
-          <tgroup cols="3">
-            <thead>
-              <row>
-                <entry>
-                  <para>
-                    Macro
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    Meaning
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    Example
-                  </para>
-                </entry>
-              </row>
-            </thead>
-            <tbody>
-              <row>
-                <entry>
-                  <para>
-                    __DATE__
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    Today's date
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    2000-Dec-20
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    __TIME__
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    The current time
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    12:00:00 PM
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    __FILENAME__
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    Quickbook source filename
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    quickbook-manual.quickbook
-                  </para>
-                </entry>
-              </row>
-            </tbody>
-          </tgroup>
-        </table>
-      </section>
-      <section id="quickbook.syntax.block.templates">
-        <title><link linkend="quickbook.syntax.block.templates">Templates</link></title>
-        <para>
-          Templates provide a more versatile text substitution mechanism. Templates
-          come in handy when you need to create parameterizable, multi-line, boilerplate
-          text that you specify once and expand many times. Templates accept one
-          or more arguments. These arguments act like place-holders for text replacement.
-          Unlike simple macros, which are limited to phrase level markup, templates
-          can contain block level markup (e.g. paragraphs, code blocks and tables).
-        </para>
-        <para>
-          Example template:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[template person[name age what]
-
-Hi, my name is [name]. I am [age] years old. I am a [what].
-
-]
-<!--quickbook-escape-postfix--></programlisting>
-        <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h0">
-          <phrase id="quickbook.syntax.block.templates.template_identifier"/><link
-          linkend="quickbook.syntax.block.templates.template_identifier">Template
-          Identifier</link>
-        </bridgehead>
-        <para>
-          Template identifiers can either consist of:
-        </para>
-        <itemizedlist>
-          <listitem>
-            <simpara>
-              An initial alphabetic character or the underscore, followed by zero
-              or more alphanumeric characters or the underscore. This is similar
-              to your typical C/C++ identifier.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              A single character punctuation (a non-alphanumeric printable character)
-            </simpara>
-          </listitem>
-        </itemizedlist>
-        <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h1">
-          <phrase id="quickbook.syntax.block.templates.formal_template_arguments"/><link
-          linkend="quickbook.syntax.block.templates.formal_template_arguments">Formal
-          Template Arguments</link>
-        </bridgehead>
-        <para>
-          Template formal arguments are identifiers consisting of an initial alphabetic
-          character or the underscore, followed by zero or more alphanumeric characters
-          or the underscore. This is similar to your typical C/C++ identifier.
-        </para>
-        <para>
-          A template formal argument temporarily hides a template of the same name
-          at the point where the <link linkend="quickbook.syntax.block.templates.template_expansion">template
-          is expanded</link>. Note that the body of the <literal>person</literal>
-          template above refers to <literal>name</literal> <literal>age</literal>
-          and <literal>what</literal> as <literal>[name]</literal> <literal>[age]</literal>
-          and <literal>[what]</literal>. <literal>name</literal> <literal>age</literal>
-          and <literal>what</literal> are actually templates that exist in the duration
-          of the template call.
-        </para>
-        <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h2">
-          <phrase id="quickbook.syntax.block.templates.template_body"/><link linkend="quickbook.syntax.block.templates.template_body">Template
-          Body</link>
-        </bridgehead>
-        <para>
-          The template body can be just about any QuickBook block or phrase. There
-          are actually two forms. Templates may be phrase or block level. Phrase
-          templates are of the form:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[template sample[arg1 arg2...argN] replacement text... ]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          Block templates are of the form:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[template sample[arg1 arg2...argN]
-replacement text...
-]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          The basic rule is as follows: if a newline immediately follows the argument
-          list, then it is a block template, otherwise, it is a phrase template.
-          Phrase templates are typically expanded as part of phrases. Like macros,
-          block level elements are not allowed in phrase templates.
-        </para>
-        <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h3">
-          <phrase id="quickbook.syntax.block.templates.template_expansion"/><link
-          linkend="quickbook.syntax.block.templates.template_expansion">Template
-          Expansion</link>
-        </bridgehead>
-        <para>
-          You expand a template this way:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[template_identifier arg1..arg2..arg3]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          At template expansion, you supply the actual arguments. The template will
-          be expanded with your supplied arguments. Example:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[person James Bond..39..Spy]
-[person Santa Clause..87..Big Red Fatso]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          Which will expand to:
-        </para>
-        <para>
-          Hi, my name is James Bond. I am 39 years old. I am a Spy.
-        </para>
-        <para>
-          Hi, my name is Santa Clause. I am 87 years old. I am a Big Red Fatso.
-        </para>
-        <caution>
-          <para>
-            A word of caution: Templates are recursive. A template can call another
-            template or even itself, directly or indirectly. There are no control
-            structures in QuickBook (yet) so this will always mean infinite recursion.
-            QuickBook can detect this situation and report an error if recursion
-            exceeds a certain limit.
-          </para>
-        </caution>
-        <para>
-          Each actual argument can be a word, a text fragment or just about any
-          <link linkend="quickbook.syntax.phrase">QuickBook phrase</link>. Arguments
-          are separated by the double dot <literal>".."</literal> and terminated
-          by the close parenthesis.
-        </para>
-        <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h4">
-          <phrase id="quickbook.syntax.block.templates.nullary_templates"/><link
-          linkend="quickbook.syntax.block.templates.nullary_templates">Nullary Templates</link>
-        </bridgehead>
-        <para>
-          Nullary templates look and act like simple macros. Example:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[template alpha[]'''&#945;''']
-[template beta[]'''&#946;''']
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          Expanding:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->Some squigles...[*[alpha][beta]]<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          We have:
-        </para>
-        <para>
-          Some squiggles...<emphasis role="bold">αβ</emphasis>
-        </para>
-        <para>
-          The difference with macros are
-        </para>
-        <itemizedlist>
-          <listitem>
-            <simpara>
-              The explicit <link linkend="quickbook.syntax.block.templates.template_expansion">template
-              expansion syntax</link>. This is an advantage because, now, we don't
-              have to use obscure naming conventions like double underscores (e.g.
-              __alpha__) to avoid unwanted macro replacement.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              The template is expanded at the point where it is invoked. A macro
-              is expanded immediately at its point of declaration. This is subtle
-              and can cause a slight difference in behavior especially if you refer
-              to other macros and templates in the body.
-            </simpara>
-          </listitem>
-        </itemizedlist>
-        <para>
-          The empty brackets after the template identifier (<literal>alpha[]</literal>)
-          indicates no arguments. If the template body does not look like a template
-          argument list, we can elide the empty brackets. Example:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[template aristotle_quote Aristotle: [*['Education is the best provision
-for the journey to old age.]]]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          Expanding:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->Here's a quote from [aristotle_quote].
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          We have:
-        </para>
-        <para>
-          Here's a quote from Aristotle: <emphasis role="bold"><emphasis>Education
-          is the best provision for the journey to old age.</emphasis></emphasis>.
-        </para>
-        <para>
-          The disadvantage is that you can't avoid the space between the template
-          identifier, <code><phrase role="identifier">aristotle_quote</phrase></code>,
-          and the template body "Aristotle...". This space will be part
-          of the template body. If that space is unwanted, use empty brackets or
-          use the space escape: "<code><phrase role="special">\</phrase> </code>".
-          Example:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[template tag\ _tag]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          Then expanding:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->`struct` x[tag];
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          We have:
-        </para>
-        <para>
-          <code><phrase role="keyword">struct</phrase></code> x_tag;
-        </para>
-        <para>
-          You have a couple of ways to do it. I personally prefer the explicit empty
-          brackets, though.
-        </para>
-        <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h5">
-          <phrase id="quickbook.syntax.block.templates.simple_arguments"/><link linkend="quickbook.syntax.block.templates.simple_arguments">Simple
-          Arguments</link>
-        </bridgehead>
-        <para>
-          As mentioned, arguments are separated by the double dot <literal>".."</literal>.
-          If there are less arguments passed than expected, QuickBook attempts to
-          break the last argument into two or more arguments following this logic:
-        </para>
-        <itemizedlist>
-          <listitem>
-            <simpara>
-              Break the last argument into two, at the first space found (<literal>'',
-              '\n', \t' or '\r'</literal>).
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              Repeat until there are enough arguments or if there are no more spaces
-              found (in which case, an error is reported).
-            </simpara>
-          </listitem>
-        </itemizedlist>
-        <para>
-          For example:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[template simple[a b c d] [a][b][c][d]]
-[simple w x y z]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          will produce:
-        </para>
-        <para>
-          wxyz
-        </para>
-        <para>
-          "w x y z" is initially treated as a single argument because we
-          didn't supply any <literal>".."</literal> separators. However,
-          since <literal>simple</literal> expects 4 arguments, "w x y z"
-          is broken down iteratively (applying the logic above) until we have "w",
-          "x", "y" and "z".
-        </para>
-        <para>
-          QuickBook only tries to get the arguments it needs. For example:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[simple w x y z trail]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          will produce:
-        </para>
-        <para>
-          wxyz trail
-        </para>
-        <para>
-          The arguments being: "w", "x", "y" and "z
-          trail".
-        </para>
-        <para>
-          It should be obvious now that for simple arguments with no spaces, we can
-          get by without separating the arguments with <literal>".."</literal>
-          separators. It is possible to combine <literal>".."</literal>
-          separators with the argument passing simplification presented above. Example:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[simple what do you think ..m a n?]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          will produce:
-        </para>
-        <para>
-          what do you think man?
-        </para>
-        <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h6">
-          <phrase id="quickbook.syntax.block.templates.punctuation_templates"/><link
-          linkend="quickbook.syntax.block.templates.punctuation_templates">Punctuation
-          Templates</link>
-        </bridgehead>
-        <para>
-          With templates, one of our objectives is to allow us to rewrite QuickBook
-          in QuickBook (as a qbk library). For that to happen, we need to accommodate
-          single character punctuation templates which are fairly common in QuickBook.
-          You might have noticed that single character punctuations are allowed as
-          <link linkend="quickbook.syntax.block.templates.template_identifier">template
-          identifiers</link>. Example:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[template ![bar] <!--quickbook-escape-postfix--><hey><!--quickbook-escape-prefix-->[bar]<!--quickbook-escape-postfix--></hey><!--quickbook-escape-prefix-->]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          Now, expanding this:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[!baz]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          We will have:
-        </para>
-<programlisting><hey>baz</hey>
-</programlisting>
-      </section>
-      <section id="quickbook.syntax.block.blurbs">
-        <title><link linkend="quickbook.syntax.block.blurbs">Blurbs</link></title>
-<programlisting><!--quickbook-escape-prefix-->[blurb :-) [*An eye catching advertisement or note...]
-
-    __spirit__ is an object-oriented recursive-descent parser generator framework
-    implemented using template meta-programming techniques. Expression templates
-    allow us to approximate the syntax of Extended Backus-Normal Form (EBNF)
-    completely in C++.
-]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          will generate this:
-        </para>
-        <sidebar role="blurb">
-        <para>
-          <inlinemediaobject><imageobject><imagedata fileref="images/smiley.png"></imagedata></imageobject>
-          <textobject>
-            <phrase>smiley</phrase>
-          </textobject>
-          </inlinemediaobject> <emphasis role="bold">An eye catching advertisement
-          or note...</emphasis>
-        </para>
-        <para>
-          <ulink url="http://spirit.sourceforge.net">Spirit</ulink> is an object-oriented
-          recursive-descent parser generator framework implemented using template
-          meta-programming techniques. Expression templates allow us to approximate
-          the syntax of Extended Backus-Normal Form (EBNF) completely in C++.
-        </para>
-        </sidebar>
-        <note>
-          <para>
-            Prefer <link linkend="quickbook.syntax.block.admonitions">admonitions</link>
-            wherever appropriate.
-          </para>
-        </note>
-      </section>
-      <section id="quickbook.syntax.block.tables">
-        <title><link linkend="quickbook.syntax.block.tables">Tables</link></title>
-<programlisting><!--quickbook-escape-prefix-->[table A Simple Table
-    [[Heading 1] [Heading 2] [Heading 3]]
-    [[R0-C0]     [R0-C1]     [R0-C2]]
-    [[R1-C0]     [R1-C1]     [R1-C2]]
-    [[R2-C0]     [R2-C1]     [R2-C2]]
-]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          will generate:
-        </para>
-        <table frame="all" id="quickbook.syntax.block.tables.t0">
-          <title>A Simple Table</title>
-          <tgroup cols="3">
-            <thead>
-              <row>
-                <entry>
-                  <para>
-                    Heading 1
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    Heading 2
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    Heading 3
-                  </para>
-                </entry>
-              </row>
-            </thead>
-            <tbody>
-              <row>
-                <entry>
-                  <para>
-                    R0-C0
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    R0-C1
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    R0-C2
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    R2-C0
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    R2-C1
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    R2-C2
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    R3-C0
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    R3-C1
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    R3-C2
-                  </para>
-                </entry>
-              </row>
-            </tbody>
-          </tgroup>
-        </table>
-        <para>
-          The table title is optional. The first row of the table is automatically
-          treated as the table header; that is, it is wrapped in <literal><thead>...</thead></literal>
-          XML tags. Note that unlike the original QuickDoc, the columns are nested
-          in [ cells... ]. The syntax is free-format and allows big cells to be formatted
-          nicely. Example:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[table Table with fat cells
-    [[Heading 1] [Heading 2]]
-    [
-        [Row 0, Col 0: a small cell]
-        [
-            Row 0, Col 1: a big fat cell with paragraphs
-
-            Boost provides free peer-reviewed portable C++ source libraries.
-
-            We emphasize libraries that work well with the C++ Standard Library.
-            Boost libraries are intended to be widely useful, and usable across
-            a broad spectrum of applications. The Boost license encourages both
-            commercial and non-commercial use.
-        ]
-    ]
-    [
-        [Row 1, Col 0: a small cell]
-        [Row 1, Col 1: a small cell]
-    ]
-]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          and thus:
-        </para>
-        <table frame="all" id="quickbook.syntax.block.tables.t1">
-          <title>Table with fat cells</title>
-          <tgroup cols="2">
-            <thead>
-              <row>
-                <entry>
-                  <para>
-                    Heading 1
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    Heading 2
-                  </para>
-                </entry>
-              </row>
-            </thead>
-            <tbody>
-              <row>
-                <entry>
-                  <para>
-                    Row 0, Col 0: a small cell
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    Row 0, Col 1: a big fat cell with paragraphs
-                  </para>
-                  <para>
-                    Boost provides free peer-reviewed portable C++ source libraries.
-                  </para>
-                  <para>
-                    We emphasize libraries that work well with the C++ Standard Library.
-                    Boost libraries are intended to be widely useful, and usable
-                    across a broad spectrum of applications. The Boost license encourages
-                    both commercial and non-commercial use.
-                  </para>
-                </entry>
-              </row>
-              <row>
-                <entry>
-                  <para>
-                    Row 1, Col 0: a small cell
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    Row 1, Col 1: a small cell
-                  </para>
-                </entry>
-              </row>
-            </tbody>
-          </tgroup>
-        </table>
-        <para>
-          Here's how to have preformatted blocks of code in a table cell:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[table Table with code
-    [[Comment] [Code]]
-    [
-        [My first program]
-        [<!--quickbook-escape-postfix-->``
-            #include <iostream>
-
-            int main()
-            {
-                std::cout << "Hello, World!" << std::endl;
-                return 0;
-            }
-        ``<!--quickbook-escape-prefix-->]
-    ]
-]
-<!--quickbook-escape-postfix--></programlisting>
-        <table frame="all" id="quickbook.syntax.block.tables.t2">
-          <title>Table with code</title>
-          <tgroup cols="2">
-            <thead>
-              <row>
-                <entry>
-                  <para>
-                    Comment
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-                    Code
-                  </para>
-                </entry>
-              </row>
-            </thead>
-            <tbody>
-              <row>
-                <entry>
-                  <para>
-                    My first program
-                  </para>
-                </entry>
-                <entry>
-                  <para>
-<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">iostream</phrase><phrase role="special">></phrase>
-
-<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
-<phrase role="special">{</phrase>
-    <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special"><<</phrase> <phrase role="string">"Hello, World!"</phrase> <phrase role="special"><<</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
-    <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
-                  </para>
-                </entry>
-              </row>
-            </tbody>
-          </tgroup>
-        </table>
-      </section>
-      <section id="quickbook.syntax.block.variable_lists">
-        <title><link linkend="quickbook.syntax.block.variable_lists">Variable Lists</link></title>
-<programlisting><!--quickbook-escape-prefix-->[variablelist A Variable List
-    [[term 1] [The definition of term 1]]
-    [[term 2] [The definition of term 2]]
-    [[term 3] [The definition of term 3]]
-]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          will generate:
-        </para>
-        <variablelist>
-          <title>A Variable List</title>
-          <varlistentry>
-            <term>term 1</term>
-            <listitem>
-              <para>
-                The definition of term 1
-              </para>
-            </listitem>
-          </varlistentry>
-          <varlistentry>
-            <term>term 2</term>
-            <listitem>
-              <para>
-                The definition of term 2
-              </para>
-            </listitem>
-          </varlistentry>
-          <varlistentry>
-            <term>term 3</term>
-            <listitem>
-              <para>
-                The definition of term 3
-              </para>
-            </listitem>
-          </varlistentry>
-        </variablelist>
-        <para>
-          The rules for variable lists are the same as for tables, except that only
-          2 "columns" are allowed. The first column contains the terms,
-          and the second column contains the definitions. Those familiar with HTML
-          will recognize this as a "definition list".
-        </para>
-      </section>
-      <section id="quickbook.syntax.block.include">
-        <title><link linkend="quickbook.syntax.block.include">Include</link></title>
-        <para>
-          You can include one QuickBook file from another. The syntax is simply:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[include someother.qbk]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          The included file will be processed as if it had been cut and pasted into
-          the current document, with the following exceptions:
-        </para>
-        <itemizedlist>
-          <listitem>
-            <simpara>
-              The __FILENAME__ predefined macro will reflect the name of the file currently being
-              processed.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              Any macros defined in the included file are scoped to that file.
-            </simpara>
-          </listitem>
-        </itemizedlist>
-        <para>
-          The <literal>[include]</literal> directive lets you specify a document
-          id to use for the included file. When this id is not explicitly specified,
-          the id defaults to the filename ("someother", in the example
-          above). You can specify the id like this:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[include:someid someother.qbk]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          All auto-generated anchors will use the document id as a unique prefix.
-          So for instance, if there is a top section in someother.qbk named "Intro",
-          the named anchor for that section will be "someid.intro", and
-          you can link to it with <literal>[link someid.intro The Intro]</literal>.
-        </para>
-      </section>
-      <section id="quickbook.syntax.block.import">
-        <title><link linkend="quickbook.syntax.block.import">Import</link></title>
-        <para>
-          When documenting code, you'd surely need to present code from actual source
-          files. While it is possible to copy some code and paste them in your QuickBook
-          file, doing so is error prone and the extracted code in the documentation
-          tends to get out of sync with the actual code as the code evolves. The
-          problem, as always, is that once documentation is written, the tendency
-          is for the docs to languish in the archives without maintenance.
-        </para>
-        <para>
-          QuickBook's import facility provides a nice solution.
-        </para>
-        <bridgehead renderas="sect5" id="quickbook.syntax.block.import.h0">
-          <phrase id="quickbook.syntax.block.import.example"/><link linkend="quickbook.syntax.block.import.example">Example</link>
-        </bridgehead>
-        <para>
-          You can effortlessly import code snippets from source code into your QuickBook.
-          The following illustrates how this is done:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[import ../test/stub.cpp]
-[foo]
-[bar]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          The first line:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[import ../test/stub.cpp]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          collects specially marked-up code snippets from <ulink url="../../test/stub.cpp">stub.cpp</ulink>
-          and places them in your QuickBook file as virtual templates. Each of the
-          specially marked-up code snippets has a name (e.g. <code><phrase role="identifier">foo</phrase></code>
-          and <code><phrase role="identifier">bar</phrase></code> in the example
-          above). This shall be the template identifier for that particular code
-          snippet. The second and third line above does the actual template expansion:
-        </para>
-<programlisting><!--quickbook-escape-prefix-->[foo]
-[bar]
-<!--quickbook-escape-postfix--></programlisting>
-        <para>
-          And the result is:
-        </para>
-        <para>
-          This is the <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
-        </para>
-        <para>
-          This description can have paragraphs...
-        </para>
-        <itemizedlist>
-          <listitem>
-            <simpara>
-              lists
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              etc.
-            </simpara>
-          </listitem>
-        </itemizedlist>
-        <para>
-          And any quickbook block markup.
-        </para>
-        <para>
-<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase>
-<phrase role="special">{</phrase>
-    <phrase role="comment">// return 'em, foo man!</phrase>
-    <phrase role="keyword">return</phrase> <phrase role="string">"foo"</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
-        </para>
-        <para>
-          This is the <emphasis role="bold"><emphasis>bar</emphasis></emphasis> function
-        </para>
-        <para>
-<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">bar</phrase><phrase role="special">()</phrase>
-<phrase role="special">{</phrase>
-    <phrase role="comment">// return 'em, bar man!</phrase>
-    <phrase role="keyword">return</phrase> <phrase role="string">"bar"</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase></programlisting>
-        </para>
-        <para>
-          Some trailing text here
-        </para>
-        <bridgehead renderas="sect5" id="quickbook.syntax.block.import.h1">
-          <phrase id="quickbook.syntax.block.import.code_snippet_markup"/><link linkend="quickbook.syntax.block.import.code_snippet_markup">Code
-          Snippet Markup</link>
-        </bridgehead>
-        <para>
-          Note how the code snippets in <ulink url="../../test/stub.cpp">stub.cpp</ulink>
-          get marked up. We use distinguishable comments following the form:
-        </para>
-<programlisting><phrase role="comment">//[id</phrase>
-<phrase role="identifier">some</phrase> <phrase role="identifier">code</phrase> <phrase role="identifier">here</phrase>
-<phrase role="comment">//]</phrase>
-</programlisting>
-        <para>
-          The first comment line above initiates a named code-snippet. This prefix
-          will not be visible in quickbook. The entire code-snippet in between <code><phrase
-          role="comment">//[id</phrase></code> and <code><phrase role="comment">//]</phrase></code>
-          will be inserted as a template in quickbook with name <emphasis><emphasis>id</emphasis></emphasis>.
-          The comment <code><phrase role="comment">//]</phrase></code> ends a code-snippet
-          This too will not be visible in quickbook.
-        </para>
-        <bridgehead renderas="sect5" id="quickbook.syntax.block.import.h2">
-          <phrase id="quickbook.syntax.block.import.special_comments"/><link linkend="quickbook.syntax.block.import.special_comments">Special
-          Comments</link>
-        </bridgehead>
-        <para>
-          Special comments of the form:
-        </para>
-<programlisting><phrase role="comment">//` some [*quickbook] markup here</phrase>
-</programlisting>
-        <para>
-          and:
-        </para>
-<programlisting><phrase role="comment">/*` some [*quickbook] markup here */</phrase>
-</programlisting>
-        <para>
-          will be parsed by QuickBook. This can contain quickbook <emphasis>blocks</emphasis>
-          (e.g. sections, paragraphs, tables, etc). In the first case, the initial
-          slash-slash, tick and white-space shall be ignored. In the second, the
-          initial slash-star-tick and the final star-slash shall be ignored.
-        </para>
-        <bridgehead renderas="sect5" id="quickbook.syntax.block.import.h3">
-          <phrase id="quickbook.syntax.block.import.callouts"/><link linkend="quickbook.syntax.block.import.callouts">Callouts</link>
-        </bridgehead>
-        <para>
-          Special comments of the form:
-        </para>
-<programlisting><phrase role="comment">/*< some [*quickbook] markup here >*/</phrase>
-</programlisting>
-        <para>
-          will be regarded as callouts. These will be collected, numbered and rendered
-          as a "callout bug" (a small icon with a number). After the whole
-          snippet is parsed, the callout list is generated. See <ulink url="http://www.docbook.org/tdg/en/html/callout.html">Callouts</ulink>
-          for details. Example:
-        </para>
-        <para>
-<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">foo_bar</phrase><phrase role="special">()</phrase> <co id="quickbook.syntax.block.import.c0" linkends="quickbook.syntax.block.import.c1" />
-<phrase role="special">{</phrase>
-    <phrase role="keyword">return</phrase> <phrase role="string">"foo-bar"</phrase><phrase role="special">;</phrase> <co id="quickbook.syntax.block.import.c2" linkends="quickbook.syntax.block.import.c3" />
-<phrase role="special">}</phrase>
-</programlisting>
-        </para>
-        <calloutlist>
-          <callout arearefs="quickbook.syntax.block.import.c0" id="quickbook.syntax.block.import.c1">
-            <para>
-              The <emphasis>Mythical</emphasis> FooBar. See <ulink url="http://en.wikipedia.org/wiki/Foobar">Foobar
-              for details</ulink>
-            </para>
-          </callout>
-          <callout arearefs="quickbook.syntax.block.import.c2" id="quickbook.syntax.block.import.c3">
-            <para>
-              return 'em, foo-bar man!
-            </para>
-          </callout>
-        </calloutlist>
-        <para>
-          Checkout <ulink url="../../test/stub.cpp">stub.cpp</ulink> to see the actual
-          code.
-        </para>
-      </section>
-    </section>
-  </section>
-  <section id="quickbook.install">
-    <title><link linkend="quickbook.install">Installation and configuration</link></title>
-    <para>
-      This section provides some guidelines on how to install and configure BoostBook
-      and Quickbook under several operating systems.
-    </para>
-    <para>
-      Before continuing, it is very important that you keep this in mind: if you
-      try to build some documents and the process breaks due to misconfiguration,
-      be absolutely sure to delete any <code><phrase role="identifier">bin</phrase></code>
-      and <code><phrase role="identifier">bin</phrase><phrase role="special">.</phrase><phrase
-      role="identifier">v2</phrase></code> directories generated by the build before
-      trying again. Otherwise your configuration fixes will not take any effect.
-    </para>
-    <section id="quickbook.install.windows">
-      <title><link linkend="quickbook.install.windows">Windows 2000, XP, 2003, Vista</link></title>
-      <blockquote>
-        <para>
-          <emphasis>Section contributed by Julio M. Merino Vidal</emphasis>
-        </para>
-      </blockquote>
-      <para>
-        The following instructions apply to any Windows system based on Windows 2000,
-        including Windows XP, Windows 2003 Server and Windows Vista. The paths shown
-        below are taken from a Windows Vista machine; you will need to adjust them
-        to match your system in case you are running an older version.
-      </para>
-      <orderedlist>
-        <listitem>
-          <simpara>
-            First of all you need to have a copy of <code><phrase role="identifier">xsltproc</phrase></code>
-            for Windows. There are many ways to get this tool, but to keep things
-            simple, use the <ulink url="http://www.zlatkovic.com/pub/libxml/">binary
-            packages</ulink> made by Igor Zlatkovic. At the very least, you need
-            to download the following packages: <code><phrase role="identifier">iconv</phrase></code>,
-            <code><phrase role="identifier">zlib</phrase></code>, <code><phrase role="identifier">libxml2</phrase></code>
-            and <code><phrase role="identifier">libxslt</phrase></code>.
-          </simpara>
-        </listitem>
-        <listitem>
-          <simpara>
-            Unpack all these packages in the same directory so that you get unique
-            <code><phrase role="identifier">bin</phrase></code>, <code><phrase role="identifier">include</phrase></code>
-            and <code><phrase role="identifier">lib</phrase></code> directories within
-            the hierarchy. These instructions use <code><phrase role="identifier">C</phrase><phrase
-            role="special">:\</phrase><phrase role="identifier">Users</phrase><phrase
-            role="special">\</phrase><phrase role="identifier">example</phrase><phrase
-            role="special">\</phrase><phrase role="identifier">Documents</phrase><phrase
-            role="special">\</phrase><phrase role="identifier">boost</phrase><phrase
-            role="special">\</phrase><phrase role="identifier">xml</phrase></code>
-            as the root for all files.
-          </simpara>
-        </listitem>
-        <listitem>
-          <simpara>
-            From the command line, go to the <code><phrase role="identifier">bin</phrase></code>
-            directory and launch <code><phrase role="identifier">xsltproc</phrase><phrase
-            role="special">.</phrase><phrase role="identifier">exe</phrase></code>
-            to ensure it works. You should get usage information on screen.
-          </simpara>
-        </listitem>
-        <listitem>
-          <simpara>
-            Download <ulink url="http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip">Docbook
-            XML 4.2</ulink> and unpack it in the same directory used above. That
-            is: <code><phrase role="identifier">C</phrase><phrase role="special">:\</phrase><phrase
-            role="identifier">Users</phrase><phrase role="special">\</phrase><phrase
-            role="identifier">example</phrase><phrase role="special">\</phrase><phrase
-            role="identifier">Documents</phrase><phrase role="special">\</phrase><phrase
-            role="identifier">boost</phrase><phrase role="special">\</phrase><phrase
-            role="identifier">xml</phrase><phrase role="special">\</phrase><phrase
-            role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase
-            role="identifier">xml</phrase></code>.
-          </simpara>
-        </listitem>
-        <listitem>
-          <simpara>
-            Download the latest <ulink url="http://sourceforge.net/project/showfiles.php?group_id=21935&package_id=16608">Docbook
-            XSL</ulink> version and unpack it, again in the same directory used before.
-            To make things easier, rename the directory created during the extraction
-            to <code><phrase role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase
-            role="identifier">xsl</phrase></code> (bypassing the version name):
-            <code><phrase role="identifier">C</phrase><phrase role="special">:\</phrase><phrase
-            role="identifier">Users</phrase><phrase role="special">\</phrase><phrase
-            role="identifier">example</phrase><phrase role="special">\</phrase><phrase
-            role="identifier">Documents</phrase><phrase role="special">\</phrase><phrase
-            role="identifier">boost</phrase><phrase role="special">\</phrase><phrase
-            role="identifier">xml</phrase><phrase role="special">\</phrase><phrase
-            role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase
-            role="identifier">xsl</phrase></code>.
-          </simpara>
-        </listitem>
-        <listitem>
-          <simpara>
-            Add the following to your <code><phrase role="identifier">user</phrase><phrase
-            role="special">-</phrase><phrase role="identifier">config</phrase><phrase
-            role="special">.</phrase><phrase role="identifier">jam</phrase></code>
-            file, which should live in your home directory (<code><phrase role="special">%</phrase><phrase
-            role="identifier">HOMEDRIVE</phrase><phrase role="special">%%</phrase><phrase
-            role="identifier">HOMEPATH</phrase><phrase role="special">%</phrase></code>).
-            You must already have it somewhere or otherwise you could not be building
-            Boost (i.e. missing tools configuration).
-          </simpara>
-        </listitem>
-      </orderedlist>
-<programlisting><phrase role="identifier">using</phrase> <phrase role="identifier">xsltproc</phrase>
-    <phrase role="special">:</phrase> <phrase role="string">"C:/Users/example/Documents/boost/xml/bin/xsltproc.exe"</phrase>
-    <phrase role="special">;</phrase>
-
-<phrase role="identifier">using</phrase> <phrase role="identifier">boostbook</phrase>
-    <phrase role="special">:</phrase> <phrase role="string">"C:/Users/example/Documents/boost/xml/docbook-xsl"</phrase>
-    <phrase role="special">:</phrase> <phrase role="string">"C:/Users/example/Documents/boost/xml/docbook-xml"</phrase>
-    <phrase role="special">;</phrase>
-</programlisting>
-      <para>
-        The above steps are enough to get a functional BoostBook setup. Quickbook
-        will be automatically built when needed. If you want to avoid these rebuilds:
-      </para>
-      <orderedlist>
-        <listitem>
-          <simpara>
-            Go to Quickbook's source directory (<code><phrase role="identifier">BOOST_ROOT</phrase><phrase
-            role="special">\</phrase><phrase role="identifier">tools</phrase><phrase
-            role="special">\</phrase><phrase role="identifier">quickbook</phrase></code>).
-          </simpara>
-        </listitem>
-        <listitem>
-          <simpara>
-            Build the utility by issuing <code><phrase role="identifier">bjam</phrase>
-            <phrase role="special">--</phrase><phrase role="identifier">v2</phrase></code>.
-          </simpara>
-        </listitem>
-        <listitem>
-          <simpara>
-            Copy the resulting <code><phrase role="identifier">quickbook</phrase><phrase
-            role="special">.</phrase><phrase role="identifier">exe</phrase></code>
-            binary (located under the <code><phrase role="identifier">BOOST_ROOT</phrase><phrase
-            role="special">\</phrase><phrase role="identifier">bin</phrase><phrase
-            role="special">.</phrase><phrase role="identifier">v2</phrase></code>
-            hierarchy) to a safe place. Following our previous example, you can install
-            it into: <code><phrase role="identifier">C</phrase><phrase role="special">:\</phrase><phrase
-            role="identifier">Users</phrase><phrase role="special">\</phrase><phrase
-            role="identifier">example</phrase><phrase role="special">\</phrase><phrase
-            role="identifier">Documents</phrase><phrase role="special">\</phrase><phrase
-            role="identifier">boost</phrase><phrase role="special">\</phrase><phrase
-            role="identifier">xml</phrase><phrase role="special">\</phrase><phrase
-            role="identifier">bin</phrase></code>.
-          </simpara>
-        </listitem>
-        <listitem>
-          <simpara>
-            Add the following to your <code><phrase role="identifier">user</phrase><phrase
-            role="special">-</phrase><phrase role="identifier">config</phrase><phrase
-            role="special">.</phrase><phrase role="identifier">jam</phrase></code>
-            file:
-          </simpara>
-        </listitem>
-      </orderedlist>
-<programlisting><phrase role="identifier">using</phrase> <phrase role="identifier">quickbook</phrase>
-    <phrase role="special">:</phrase> <phrase role="string">"C:/Users/example/Documents/boost/xml/bin/quickbook.exe"</phrase>
-    <phrase role="special">;</phrase>
-</programlisting>
-    </section>
-    <section id="quickbook.install.linux">
-      <title><link linkend="quickbook.install.linux">Debian, Ubuntu</link></title>
-      <para>
-        The following instructions apply to Debian and its derivatives. They are
-        based on a Ubuntu Edgy install but should work on other Debian based systems.
-      </para>
-      <para>
-        First install the <code><phrase role="identifier">bjam</phrase></code>,
-        <code><phrase role="identifier">xsltproc</phrase></code>, <code><phrase role="identifier">docbook</phrase><phrase
-        role="special">-</phrase><phrase role="identifier">xsl</phrase></code> and
-        <code><phrase role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase
-        role="identifier">xml</phrase></code> packages. For example, using <code><phrase
-        role="identifier">apt</phrase><phrase role="special">-</phrase><phrase role="identifier">get</phrase></code>:
-      </para>
-<programlisting><phrase role="identifier">sudo</phrase> <phrase role="identifier">apt</phrase><phrase role="special">-</phrase><phrase role="identifier">get</phrase> <phrase role="identifier">install</phrase> <phrase role="identifier">xsltprc</phrase> <phrase role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase role="identifier">xsl</phrase> <phrase role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase role="identifier">xml</phrase>
-</programlisting>
-      <para>
-        If you're planning on building boost's documentation, you'll also need to
-        install the <code><phrase role="identifier">doxygen</phrase></code> package
-        as well.
-      </para>
-      <para>
-        Next, we need to configure Boost Build to compile BoostBook files. Add the
-        following to your <code><phrase role="identifier">user</phrase><phrase role="special">-</phrase><phrase
-        role="identifier">config</phrase><phrase role="special">.</phrase><phrase
-        role="identifier">jam</phrase></code> file, which should be in your home
-        directory. If you don't have one, create a file containing this text. For
-        more information on setting up <code><phrase role="identifier">user</phrase><phrase
-        role="special">-</phrase><phrase role="identifier">config</phrase><phrase
-        role="special">.</phrase><phrase role="identifier">jam</phrase></code>, see
-        the <ulink url="http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html">Boost
-        Build documentation</ulink>.
-      </para>
-<programlisting><phrase role="identifier">using</phrase> <phrase role="identifier">xsltproc</phrase> <phrase role="special">;</phrase>
-
-<phrase role="identifier">using</phrase> <phrase role="identifier">boostbook</phrase>
-    <phrase role="special">:</phrase> <phrase role="special">/</phrase><phrase role="identifier">usr</phrase><phrase role="special">/</phrase><phrase role="identifier">share</phrase><phrase role="special">/</phrase><phrase role="identifier">xml</phrase><phrase role="special">/</phrase><phrase role="identifier">docbook</phrase><phrase role="special">/</phrase><phrase role="identifier">stylesheet</phrase><phrase role="special">/</phrase><phrase role="identifier">nwalsh</phrase>
-    <phrase role="special">:</phrase> <phrase role="special">/</phrase><phrase role="identifier">usr</phrase><phrase role="special">/</phrase><phrase role="identifier">share</phrase><phrase role="special">/</phrase><phrase role="identifier">xml</phrase><phrase role="special">/</phrase><phrase role="identifier">docbook</phrase><phrase role="special">/</phrase><phrase role="identifier">schema</phrase><phrase role="special">/</phrase><phrase role="identifier">dtd</phrase><phrase role="special">/</phrase><phrase role="number">4.2</phrase>
-    <phrase role="special">;</phrase>
-
-<phrase role="comment"># Remove this line if you're not using doxygen</phrase>
-<phrase role="identifier">using</phrase> <phrase role="identifier">doxygen</phrase> <phrase role="special">;</phrase>
-</programlisting>
-      <para>
-        The above steps are enough to get a functional BoostBook setup. Quickbook
-        will be automatically built when needed. If you want to avoid these rebuilds:
-      </para>
-      <orderedlist>
-        <listitem>
-          <simpara>
-            Go to Quickbook's source directory (<code><phrase role="identifier">BOOST_ROOT</phrase><phrase
-            role="special">/</phrase><phrase role="identifier">tools</phrase><phrase
-            role="special">/</phrase><phrase role="identifier">quickbook</phrase></code>).
-          </simpara>
-        </listitem>
-        <listitem>
-          <simpara>
-            Build the utility by issuing <code><phrase role="identifier">bjam</phrase>
-            <phrase role="special">--</phrase><phrase role="identifier">v2</phrase></code>.
-          </simpara>
-        </listitem>
-        <listitem>
-          <simpara>
-            Copy the resulting <code><phrase role="identifier">quickbook</phrase></code>
-            binary (located under the <code><phrase role="identifier">BOOST_ROOT</phrase><phrase
-            role="special">/</phrase><phrase role="identifier">bin</phrase><phrase
-            role="special">.</phrase><phrase role="identifier">v2</phrase></code>
-            hierarchy) to a safe place. The traditional location is <code><phrase
-            role="special">/</phrase><phrase role="identifier">usr</phrase><phrase
-            role="special">/</phrase><phrase role="identifier">local</phrase><phrase
-            role="special">/</phrase><phrase role="identifier">bin</phrase></code>.
-          </simpara>
-        </listitem>
-        <listitem>
-          <simpara>
-            Add the following to your <code><phrase role="identifier">user</phrase><phrase
-            role="special">-</phrase><phrase role="identifier">config</phrase><phrase
-            role="special">.</phrase><phrase role="identifier">jam</phrase></code>
-            file, using the full path of the quickbook executable:
-          </simpara>
-        </listitem>
-      </orderedlist>
-<programlisting><phrase role="identifier">using</phrase> <phrase role="identifier">quickbook</phrase>
-    <phrase role="special">:</phrase> <phrase role="special">/</phrase><phrase role="identifier">usr</phrase><phrase role="special">/</phrase><phrase role="identifier">local</phrase><phrase role="special">/</phrase><phrase role="identifier">bin</phrase><phrase role="special">/</phrase><phrase role="identifier">quickbook</phrase>
-    <phrase role="special">;</phrase>
-</programlisting>
-    </section>
-  </section>
-  <section id="quickbook.editors">
-    <title><link linkend="quickbook.editors">Editor Support</link></title>
-    <para>
-      Editing quickbook files is usually done with text editors both simple and powerful.
-      The following sections list the settings for some editors which can help make
-      editing quickbook files a bit easier.
-    </para>
-    <sidebar role="blurb">
-    <para>
-      <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
-      <textobject>
-        <phrase>note</phrase>
-      </textobject>
-      </inlinemediaobject> You may submit your settings, tips, and suggestions to
-      the authors, or through the <ulink url="https://lists.sourceforge.net/lists/listinfo/boost-">docs
-      Boost Docs mailing list</ulink>.
-    </para>
-    </sidebar>
-    <section id="quickbook.editors.scite">
-      <title><link linkend="quickbook.editors.scite">Scintilla Text Editor</link></title>
-      <blockquote>
-        <para>
-          <emphasis>Section contributed by Dean Michael Berris</emphasis>
-        </para>
-      </blockquote>
-      <para>
-        The Scintilla Text Editor (SciTE) is a free source code editor for Win32
-        and X. It uses the SCIntilla source code editing component.
-      </para>
-      <sidebar role="blurb">
-      <para>
-        <inlinemediaobject><imageobject><imagedata fileref="images/tip.png"></imagedata></imageobject>
-        <textobject>
-          <phrase>tip</phrase>
-        </textobject>
-        </inlinemediaobject> SciTE can be downloaded from <ulink url="http://www.scintilla.org/SciTE.html">http://www.scintilla.org/SciTE.html>
-      </para>
-      </sidebar>
-      <para>
-        You can use the following settings to highlight quickbook tags when editing
-        quickbook files.
-      </para>
-<programlisting><!--quickbook-escape-prefix-->qbk=*.qbk
-lexer.*.qbk=props
-use.tabs.$(qbk)=0
-tab.size.$(qbk)=4
-indent.size.$(qbk)=4
-style.props.32=$(font.base)
-comment.stream.start.props=[/
-comment.stream.end.props=]
-comment.box.start.props=[/
-comment.box.middle.props=
-comment.box.end.props=]
-<!--quickbook-escape-postfix--></programlisting>
-      <sidebar role="blurb">
-      <para>
-        <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
-        <textobject>
-          <phrase>note</phrase>
-        </textobject>
-        </inlinemediaobject> Thanks to Rene Rivera for the above SciTE settings.
-      </para>
-      </sidebar>
-    </section>
-  </section>
-  <section id="quickbook.faq">
-    <title><link linkend="quickbook.faq">Frequently Asked Questions</link></title>
-    <bridgehead renderas="sect3" id="quickbook.faq.h0">
-      <phrase id="quickbook.faq.can_i_use_quickbook_for_non_boost_documentation_"/><link
-      linkend="quickbook.faq.can_i_use_quickbook_for_non_boost_documentation_">Can
-      I use QuickBook for non-Boost documentation?</link>
-    </bridgehead>
-    <para>
-      QuickBook can be used for non-Boost documentation with a little extra work.
-    </para>
-    <blockquote>
-      <para>
-        <emphasis>Faq contributed by Michael Marcin</emphasis>
-      </para>
-    </blockquote>
-    <para>
-      When building HTML documentation with BoostBook a Boost C++ Libraries header
-      is added to the files. When using QuickBook to document projects outside of
-      Boost this is not desirable. This behavior can be overridden at the BoostBook
-      level by specifying some XSLT options. When using Boost Build version 2 (BBv2)
-      this can be achieved by adding parameters to the BoostBook target declaration.
-    </para>
-    <para>
-      For example:
-    </para>
-<programlisting>using quickbook ;
-
-xml my_doc : my_doc.qbk ;
-
-boostbook standalone
-    :
-        my_doc
-    :
-        <xsl:param>boost.image.src=images/my_project_logo.png
-        <xsl:param>boost.image.alt="\"My Project\""
-        <xsl:param>boost.image.w=100
-        <xsl:param>boost.image.h=50
-        <xsl:param>nav.layout=none
-    ;
-</programlisting>
-  </section>
-  <section id="quickbook.ref">
-    <title><link linkend="quickbook.ref">Quick Reference</link></title>
-    <para>
-      [cpp]
-    </para>
-    <table frame="all" id="quickbook.ref.t0">
-      <title>Syntax Compendium</title>
-      <tgroup cols="3">
-        <thead>
-          <row>
-            <entry>
-              <para>
-                To do this...
-              </para>
-            </entry>
-            <entry>
-              <para>
-                Use this...
-              </para>
-            </entry>
-            <entry>
-              <para>
-                See this...
-              </para>
-            </entry>
-          </row>
-        </thead>
-        <tbody>
-          <row>
-            <entry>
-              <para>
-                comment
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[/ some comment]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.comments">Comments</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                <emphasis>italics</emphasis>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>['italics] or /italics/</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link>
-                and <link linkend="quickbook.syntax.phrase.simple_formatting">Simple
-                formatting</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                <emphasis role="bold">bold</emphasis>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[*bold] or *bold*</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link>
-                and <link linkend="quickbook.syntax.phrase.simple_formatting">Simple
-                formatting</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                <emphasis role="underline">underline</emphasis>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[_underline] or _underline_</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link>
-                and <link linkend="quickbook.syntax.phrase.simple_formatting">Simple
-                formatting</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                <literal>teletype</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[^teletype] or =teletype=</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link>
-                and <link linkend="quickbook.syntax.phrase.simple_formatting">Simple
-                formatting</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                <emphasis role="strikethrough">strikethrough</emphasis>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[-strikethrough]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link>
-                and <link linkend="quickbook.syntax.phrase.simple_formatting">Simple
-                formatting</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                <replaceable>replaceable</replaceable>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[~replaceable]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.replaceable">Replaceble</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                source mode
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[c++]</literal> or <literal>[python]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.source_mode">Source Mode</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                inline code
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>`int main();`</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.inline_code">Inline code</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                code block
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>``int main();``</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.code">Code</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                code escape
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>``from c++ to QuickBook``</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.escape_back">Escaping Back
-                To QuickBook</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                line break
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[br] or \n</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.line_break">line-break</link>
-                <emphasis role="bold">DEPRECATED</emphasis>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                anchor
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[#anchor]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.anchors">Anchors</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                link
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[@http://www.boost.org Boost]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.links">Links</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                anchor link
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[link section.anchor Link text]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.anchor_links">Anchor links</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                refentry link
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[link xml.refentry Link text]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.refentry_links">refentry links</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                function link
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[funcref fully::qualified::function_name Link text]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.code_links">function, class,
-                member, enum, macro, concept or header links</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                class link
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[classref fully::qualified::class_name Link text]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.code_links">function, class,
-                member, enum, macro, concept or header links</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                member link
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[memberref fully::qualified::member_name Link text]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.code_links">function, class,
-                member, enum, macro, concept or header links</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                enum link
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[enumref fully::qualified::enum_name Link text]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.code_links">function, class,
-                member, enum, macro, concept or header links</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                macro link
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[macroref MACRO_NAME Link text]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.code_links">function, class,
-                member, enum, macro, concept or header links</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                concept link
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[conceptref ConceptName Link text]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.code_links">function, class,
-                member, enum, macro, concept or header links</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                header link
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[headerref path/to/header.hpp Link text]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.code_links">function, class,
-                member, enum, macro, concept or header links</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                escape
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>'''escaped text (no processing/formatting)'''</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.escape">Escape</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                single char escape
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>\c</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.single_char_escape">Single
-                char escape</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                images
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[$image.jpg]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.phrase.images">Images</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                begin section
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[section The Section Title]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.section">Section</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                end section
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[endsect]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.section">Section</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                paragraph
-              </para>
-            </entry>
-            <entry>
-              <para>
-                No markup. Paragraphs start left-flushed and are terminated by two
-                or more newlines.
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.paragraphs">Paragraphs</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                ordered list
-              </para>
-            </entry>
-            <entry>
-<programlisting><!--quickbook-escape-prefix--># one
-# two
-# three
-<!--quickbook-escape-postfix--></programlisting>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.lists.ordered_lists">Ordered
-                lists</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                unordered list
-              </para>
-            </entry>
-            <entry>
-<programlisting><!--quickbook-escape-prefix-->* one
-* two
-* three
-<!--quickbook-escape-postfix--></programlisting>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.lists.unordered_lists">Unordered
-                lists</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                code
-              </para>
-            </entry>
-            <entry>
-              <para>
-                No markup. Preformatted code starts with a space or a tab.
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.code">Code</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                preformatted
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[pre preformatted]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.preformatted">Preformatted</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                block quote
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[:sometext...]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.blockquote">Blockquote</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                heading 1
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[h1 Heading 1]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.headings">Heading</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                heading 2
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[h2 Heading 2]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.headings">Heading</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                heading 3
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[h3 Heading 3]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.headings">Heading</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                heading 4
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[h4 Heading 4]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.headings">Heading</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                heading 5
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[h5 Heading 5]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.headings">Heading</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                heading 6
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[h6 Heading 6]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.headings">Heading</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                macro
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[def macro_identifier some text]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.macros">Macros</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                template
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[template[a b] [a] body [b]]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.templates">Templates</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                blurb
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[blurb advertisement or note...]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.blurbs">Blurbs</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                admonition
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[warning Warning text...]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.admonitions">Admonitions</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                table
-              </para>
-            </entry>
-            <entry>
-<programlisting><!--quickbook-escape-prefix-->[table Title
-[[a][b][c]]
-[[a][b][c]]
-]
-<!--quickbook-escape-postfix--></programlisting>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.tables">Tables</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                variablelist
-              </para>
-            </entry>
-            <entry>
-<programlisting><!--quickbook-escape-prefix-->[variablelist Title
-[[a][b]]
-[[a][b]]
-]
-<!--quickbook-escape-postfix--></programlisting>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.variable_lists">Variable Lists</link>
-              </para>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                include
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <literal>[include someother.qbk]</literal>
-              </para>
-            </entry>
-            <entry>
-              <para>
-                <link linkend="quickbook.syntax.block.include">Include</link>
-              </para>
-            </entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-  </section>
-</article>
Deleted: branches/release/tools/quickbook/test/quickbook-manual.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/quickbook-manual.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,1981 +0,0 @@
-[article Quickbook
-    [quickbook 1.4]
-    [version 1.4]
-    [authors [de Guzman, Joel], [Niebler, Eric]]
-    [copyright 2002 2004 2006 Joel de Guzman, Eric Niebler]
-    [purpose /WikiWiki/ style documentation tool]
-    [license
-        Distributed under the Boost Software License, Version 1.0.
-        (See accompanying file LICENSE_1_0.txt or copy at
-        [@http://www.boost.org/LICENSE_1_0.txt])
-    ]
-]
-
-[/ QuickBook Document version 1.3 ]
-[/ Sept 24, 2002 ]
-[/ Sept 2, 2004 ]
-[/ Feb 14, 2005 ]
-[/ Sept 13, 2005 ]
-
-[/ Some links]
-
-[def __note__       [$images/note.png]]
-[def __alert__      [$images/alert.png]]
-[def __tip__        [$images/tip.png]]
-[def :-)            [$images/smiley.png]]
-[def __spirit__     [@http://spirit.sourceforge.net Spirit]]
-[def __boostbook__  [@http://www.boost.org/doc/html/boostbook.html BoostBook]]
-[def __docbook__    [@http://www.docbook.org/ DocBook]]
-
-[def __comments__           [link quickbook.syntax.comments Comments]]
-
-[def __font_styles__        [link quickbook.syntax.phrase.font_styles Font Styles]]
-[def __quotations__         [link quickbook.syntax.phrase.quotations Quotations]]
-[def __replaceable__        [link quickbook.syntax.phrase.replaceable Replaceble]]
-[def __simple_formatting__  [link quickbook.syntax.phrase.simple_formatting Simple formatting]]
-[def __inline_code__        [link quickbook.syntax.phrase.inline_code Inline code]]
-[def __code_blocks__        [link quickbook.syntax.phrase.code_blocks Code blocks]]
-[def __source_mode__        [link quickbook.syntax.phrase.source_mode Source Mode]]
-[def __line_break__         [link quickbook.syntax.phrase.line_break line-break]]
-[def __anchors__            [link quickbook.syntax.phrase.anchors Anchors]]
-[def __links__              [link quickbook.syntax.phrase.links Links]]
-[def __anchor_links__       [link quickbook.syntax.phrase.anchor_links Anchor links]]
-[def __refentry_links__     [link quickbook.syntax.phrase.refentry_links refentry links]]
-[def __code_links__         [link quickbook.syntax.phrase.code_links function, class, member, enum, macro, concept or header links]]
-[def __escape__             [link quickbook.syntax.phrase.escape Escape]]
-[def __single_char_escape__ [link quickbook.syntax.phrase.single_char_escape Single char escape]]
-[def __images__             [link quickbook.syntax.phrase.images Images]]
-
-[def __document__           [link quickbook.syntax.block.document Document]]
-[def __section__            [link quickbook.syntax.block.section Section]]
-[def __xinclude__           [link quickbook.syntax.block.xinclude  xinclude]]
-[def __paragraphs__         [link quickbook.syntax.block.paragraphs Paragraphs]]
-[def __ordered_lists__      [link quickbook.syntax.block.lists.ordered_lists Ordered lists]]
-[def __list_hierarchies__   [link quickbook.syntax.block.lists.list_hierarchies List Hierarchies]]
-[def __long_list_lines__    [link quickbook.syntax.block.lists.long_list_lines Long List Lines]]
-[def __unordered_lists__    [link quickbook.syntax.block.lists.unordered_lists Unordered lists]]
-[def __mixed_lists__        [link quickbook.syntax.block.lists.mixed_lists Mixed lists]]
-[def __code__               [link quickbook.syntax.block.code Code]]
-[def __escape_back__        [link quickbook.syntax.block.escape_back Escaping Back To QuickBook]]
-[def __preformatted__       [link quickbook.syntax.block.preformatted Preformatted]]
-[def __blockquote__         [link quickbook.syntax.block.blockquote Blockquote]]
-[def __heading__            [link quickbook.syntax.block.headings Heading]]
-[def __macros__             [link quickbook.syntax.block.macros Macros]]
-[def __templates__          [link quickbook.syntax.block.templates Templates]]
-[def __predefined_macros__  [link quickbook.syntax.block.predefined_macros Predefined Macros]]
-[def __blurbs__             [link quickbook.syntax.block.blurbs Blurbs]]
-[def __admonitions__        [link quickbook.syntax.block.admonitions Admonitions]]
-[def __tables__             [link quickbook.syntax.block.tables Tables]]
-[def __variable_lists__     [link quickbook.syntax.block.variable_lists Variable Lists]]
-[def __include__            [link quickbook.syntax.block.include Include]]
-[def __import__             [link quickbook.syntax.block.import Import]]
-
-[section:intro Introduction]
-
-[:[*['["Why program by hand in five days what you can spend five years of your
-life automating?]]]
-
--- Terrence Parr, author ANTLR/PCCTS
-]
-
-Well, QuickBook started as a weekend hack. It was originally intended to be a
-sample application using __spirit__. What is it? What you are viewing now, this
-documentation, is autogenerated by QuickBook. These files were generated from
-one master:
-
-[:[@../quickbook.qbk quickbook.qbk]]
-
-Originally named QuickDoc, this funky tool that never dies evolved into a
-funkier tool thanks to Eric Niebler who resurrected the project making it
-generate __boostbook__ instead of HTML. The __boostbook__ documentation format
-is an extension of __docbook__, an SGML or XML based format for describing
-documentation.
-
-QuickBook is a WikiWiki style documentation tool geared towards C++
-documentation using simple rules and markup for simple formatting tasks.
-QuickBook extends the WikiWiki concept. Like the WikiWiki, QuickBook documents are
-simple text files. A single QuickBook document can generate a fully linked set
-of nice HTML and PostScript/PDF documents complete with images and syntax-
-colorized source code.
-
-Features include:
-
-* generate __boostbook__ xml, to generate HTML, PostScript and PDF
-* simple markup to link to Doxygen-generated entities
-* macro system for simple text substitution
-* simple markup for italics, bold, preformatted, blurbs, code samples,
-  tables, URLs, anchors, images, etc.
-* automatic syntax coloring of code samples
-* CSS support
-
-[endsect]
-
-[section:change_log Change Log]
-
-[h3 Version 1.3]
-
-* Quickbook file inclusion \[include\].
-* Better xml output (pretty layout). Check out the generated XML.
-* Regression testing facility: to make sure your document will always be
-  compatible (full backward compatibility) regardless of changes to
-  QuickBook.
-* Code cleanup and refactoring.
-* Allow phrase markup in the doc-info.
-* Preformatted code blocks via \`\`code\`\` (double ticks) allows code in tables
-  and lists, for example.
-* Quickbook versioning; allows full backward compatibility. You have to add
-  \[quickbook 1.3\] to the doc-info header to enable the new features. Without
-  this, QuickBook will assume that the document is a pre-1.3 document.
-* Better (intuitive) paragraph termination. Some markups may terminate a paragraph.
-  Example:``
-  [section x]
-  blah...
-  [endsect]``
-* Fully qualified section and headers. Subsection names are concatenated to the
-  ID to avoid clashing. Example: `doc_name.sect_name.sub_sect_name.sub_sub_sect_name`
-* Better   and whitespace handling in code snippets.
-* \[xinclude\] fixes up the relative path to the target XML file when
-  input_directory is not the same as the output_directory.
-* Allow untitled tables.
-* Allow phrase markups in section titles.
-* Allow escaping back to QuickBook from code, code blocks and inline code.
-* Footnotes, with the \[footnote This is the footnote\] syntax.
-* Post-processor bug fix for escaped XML code that it does not recognize.
-* Replaceable, with the \[~replacement\] syntax.
-* Generic Headers
-* Code changes to allow full recursion (i.e. Collectors and push/pop functions)
-* Various code cleanup/maintenance
-* Templates!
-* \[conceptref\] for referencing BoostBook <concept> entities.
-* Allow escape of spaces. The escaped space is removed from the output. Syntax:
-  `\ `.
-* Nested comments are now allowed.
-* Quickbook blocks can nest inside comments.
-* __import__ facility.
-* Callouts on imported code
-* Simple markups can now span a whole block.
-* __blurbs__, __admonitions__ and table cells (see __tables__) may now
-  contain paragraphs.
-* `\n` and `[br]` are now deprecated.
-
-[endsect]
-
-[section:syntax Syntax Summary]
-
-A QuickBook document is composed of one or more blocks. An example of
-a block is the paragraph or a C++ code snippet. Some blocks have
-special mark-ups. Blocks, except code snippets which have their own
-grammar (C++ or Python), are composed of one or more phrases. A phrase
-can be a simple contiguous run of characters. Phrases can have special
-mark-ups. Marked up phrases can recursively contain other phrases, but
-cannot contain blocks. A terminal is a self contained block-level or
-phrase-level element that does not nest anything.
-
-Blocks, in general, are delimited by two end-of-lines (the block terminator).
-Phrases in each block cannot contain a block terminator. This way, syntax errors
-such as un-matched closing brackets do not go haywire and corrupt anything past
-a single block.
-
-[section Comments]
-
-Can be placed anywhere.
-
-[pre
-'''[/ comment (no output generated) ]'''
-]
-
-[/ for testing only... ]
-
-[pre
-'''[/ comments can be nested [/ some more here] ]'''
-]
-
-[/ for testing [/ only ] ]
-
-[pre
-'''[/ Quickbook blocks can nest inside comments. [*Comment this out too!] ]'''
-]
-
-[/ for testing [*only ] ]
-
-[endsect]
-
-[section:phrase Phrase Level Elements]
-
-[section Font Styles]
-
-[pre'''
-['italic], [*bold], [_underline], [^teletype], [-strikethrough]
-''']
-
-will generate:
-
-['italic], [*bold], [_underline], [^teletype], [-strikethrough]
-
-Like all non-terminal phrase level elements, this can of course be nested:
-
-[pre'''
-[*['bold-italic]]
-''']
-
-will generate:
-
-[*['bold-italic]]
-
-[endsect]
-
-[section Replaceable]
-
-When you want content that may or must be replaced by the user, use the syntax:
-
-[pre'''
-[~replacement]
-''']
-
-This will generate:
-
-[~replacement]
-
-[endsect]
-
-[section Quotations]
-
-[pre'''
-["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein
-''']
-
-will generate:
-
-["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein
-
-Note the proper left and right quote marks. Also, while you can simply use
-ordinary quote marks like "quoted", our quotation, above, will generate correct
-DocBook quotations (e.g. <quote>quoted</quote>).
-
-Like all phrase elements, quotations may be nested. Example:
-
-[pre'''
-["Here's the rule for bargains: ["Do other men, for they would do you.] That's
-the true business precept.]
-''']
-
-will generate:
-
-["Here's the rule for bargains: ["Do other men, for they would do you.]
-That's the true business precept.]
-
-[endsect]
-[section Simple formatting]
-
-Simple markup for formatting text, common in many applications, is now supported:
-
-[pre'''
-/italic/, *bold*, _underline_, =teletype=
-''']
-
-will generate:
-
-/italic/, *bold*, _underline_, =teletype=
-
-Unlike QuickBook's standard formatting scheme, the rules for simpler
-alternatives are much stricter[footnote Thanks to David Barrett, author of
-[@http://quinthar.com/qwikiwiki/index.php?page=Home Qwiki], for sharing
-these samples and teaching me these obscure formatting rules. I wasn't sure
-at all if __spirit__, being more or less a formal EBNF parser, can handle
-the context sensitivity and ambiguity.].
-
-* Simple markups cannot nest. You can combine a simple markup with a nestable markup.
-* Simple markups cannot contain any other form of quickbook markup.
-* A non-space character must follow the leading markup
-* A non-space character must precede the trailing markup
-* A space or a punctuation must follow the trailing markup
-* If the matching markup cannot be found within a block, the formatting
-  will not be applied. This is to ensure that un-matched formatting markups,
-  which can be a common mistake, does not corrupt anything past a single block.
-  We do not want the rest of the document to be rendered bold just because we
-  forgot a trailing '*'. A single block is terminated by two end of lines or
-  the close bracket: ']'.
-* A line starting with the star will be interpreted as an unordered list.
-  See __unordered_lists__.
-
-[table More Formatting Samples
-    [[Markup]                                           [Result]]
-    [[[^'''*Bold*''']]                                  [*Bold*]]
-    [[[^'''*Is bold*''']]                               [*Is bold*]]
-    [[[^'''* Not bold* *Not bold * * Not bold *''']]    [* Not bold* *Not bold * * Not bold *]]
-    [[[^'''This*Isn't*Bold (no bold)''']]               [This*Isn't*Bold (no bold)]]
-    [[[^'''(*Bold Inside*) (parenthesis not bold)''']]  [(*Bold Inside*) (parenthesis not bold)]]
-    [[[^'''*(Bold Outside)* (parenthesis bold)''']]     [*(Bold Outside)* (parenthesis bold)]]
-    [[[^'''3*4*5 = 60 (no bold)''']]                    [3*4*5 = 60 (no bold)]]
-    [[[^'''3 * 4 * 5 = 60 (no bold)''']]                [3 * 4 * 5 = 60 (no bold)]]
-    [[[^'''3 *4* 5 = 60 (4 is bold)''']]                [3 *4* 5 = 60 (4 is bold)]]
-    [[[^'''*This is bold* this is not *but this is*''']][*This is bold* this is not *but this is*]]
-    [[[^'''*This is bold*.''']]                         [*This is bold*.]]
-    [[[^'''*B*. (bold B)''']]                           [*B*. (bold B)]]
-    [[[^'''['*Bold-Italic*]''']]                        [['*Bold-Italic*]]]
-    [[[^'''*side-by*/-side/''']]                        [*side-by*/-side/]]
-]
-
-As mentioned, simple markups cannot go past a single block. The text
-from "have" to "full" in the following paragraph will be rendered as
-bold:
-
-[pre'''
-Baa baa black sheep, *have you any wool?
-Yes sir, yes sir, three bags full!*
-One for the master, one for the dame,
-And one for the little boy who lives down the lane.
-''']
-
-Baa baa black sheep, *have you any wool?
-Yes sir, yes sir, three bags full!*
-One for the master, one for the dame,
-And one for the little boy who lives down the lane.
-
-But in the following paragraph, bold is not applied:
-
-[pre'''
-Baa baa black sheep, *have you any wool?
-Yes sir, yes sir, three bags full!
-One for the master, one for the dame,
-And one for the little boy who lives down the lane.
-''']
-
-Baa baa black sheep, *have you any wool?
-Yes sir, yes sir, three bags full!
-One for the master, one for the dame,
-And one for the little boy who lives down the lane.
-
-[endsect]
-[section Inline code]
-
-Inlining code in paragraphs is quite common when writing C++ documentation. We
-provide a very simple markup for this. For example, this:
-
-[pre'''
-This text has inlined code `int main() { return 0; }` in it.
-''']
-
-will generate:
-
-This text has inlined code `int main() { return 0; }` in it. The code will be
-syntax highlighted.
-
-[note We simply enclose the code with the tick: [^'''"`"'''], not the
-single quote: `"'"`. Note too that [^'''`some code`'''] is preferred over
-[^'''[^some code]''']. ]
-
-[endsect]
-[section Code blocks]
-
-Preformatted code simply starts with a space or a tab (See __code__).
-However, such a simple syntax cannot be used as phrase elements in lists
-(See __ordered_lists__ and __unordered_lists__), tables (See __tables__),
-etc. Inline code (see above) can. The problem is, inline code does not
-allow formatting with newlines, spaces, and tabs. These are lost.
-
-We provide a phrase level markup that is a mix between the two. By using the
-double-tick, instead of the single-tick, we are telling QuickBook to use
-preformatted blocks of code. Example:
-
-[pre
-\`\`
-    #include <iostream>
-
-    int main()
-    {
-        std::cout << "Hello, World!" << std::endl;
-        return 0;
-    }
-\`\`
-]
-
-will generate:
-
-``
-    #include <iostream>
-
-    int main()
-    {
-        std::cout << "Hello, World!" << std::endl;
-        return 0;
-    }
-``
-
-[endsect]
-[section Source Mode]
-
-If a document contains more than one type of source code then the source
-mode may be changed dynamically as the document is processed. All QuickBook
-documents are initially in C++ mode by default, though an alternative
-initial value may be set in the __document__ section.
-
-To change the source mode, use the [^\[source-mode\]] markup, where
-=source-mode= is one of the supported modes. For example, this:
-
-[pre'''
-Python's [python] `import` is rather like C++'s [c++] `#include`. A
-C++ comment `// looks like this` whereas a Python comment [python]
-`# looks like this`.
-''']
-
-will generate:
-
-Python's [python] `import` is rather like C++'s [c++] `#include`. A
-C++ comment `// looks like this` whereas a Python comment [python]
-`#looks like this`.
-
-[table Supported Source Modes
-    [[Mode]                 [Source Mode Markup]]
-    [[C++]                  [[^\[c++\]]]]
-    [[Python]               [[^\[python\]]]]
-]
-
-[note The source mode strings are lowercase.]
-
-[endsect]
-[section line-break]
-
-[pre'''
-[br]
-''']
-
-[warning `[br]` is now deprecated. __blurbs__, __admonitions__ and
-table cells (see __tables__) may now contain paragraphs.]
-
-[endsect]
-[section Anchors]
-
-[pre'''
-[#named_anchor]
-''']
-
-A named anchor is a hook that can be referenced by a link elsewhere in the
-document. You can then reference an anchor with [^'''[link named_anchor
-Some link text]''']. See __anchor_links__, __section__ and __heading__.
-
-[endsect]
-[section Links]
-
-[pre'''
-[@http://www.boost.org this is [*boost's] website....]
-''']
-
-will generate:
-
-[@http://www.boost.org this is [*boost's] website....]
-
-URL links where the link text is the link itself is common. Example:
-
-[pre'''
-see http://spirit.sourceforge.net/
-''']
-
-so, when the text is absent in a link markup, the URL is assumed. Example:
-
-[pre
-see '''[@http://spirit.sourceforge.net/]'''
-]
-
-will generate:
-
-see [@http://spirit.sourceforge.net/]
-
-[endsect]
-[section Anchor links]
-
-You can link within a document using:
-
-[pre'''
-[link section_id.normalized_header_text The link text]
-''']
-
-See sections __section__ and __heading__ for more info.
-
-[endsect]
-[section refentry links]
-
-In addition, you can link internally to an XML refentry like:
-
-[pre'''
-[link xml.refentry The link text]
-''']
-
-This gets converted into [^<link linkend="xml.refentry">The link text</link>].
-
-Like URLs, the link text is optional. If this is not present, the link text will
-automatically be the refentry. Example:
-
-[pre'''
-[link xml.refentry]
-''']
-
-This gets converted into [^<link linkend="xml.refentry">xml.refentry</link>].
-
-[endsect]
-[section:code_links Code Links]
-
-If you want to link to a function, class, member, enum, concept or header in the reference
-section, you can use:
-
-[pre'''
-[funcref fully::qualified::function_name The link text]
-[classref fully::qualified::class_name The link text]
-[memberref fully::qualified::member_name The link text]
-[enumref fully::qualified::enum_name The link text]
-[macroref MACRO_NAME The link text]
-[conceptref ConceptName The link text]
-[headerref path/to/header.hpp The link text]
-''']
-
-Again, the link text is optional. If this is not present, the link text will
-automatically be the function, class, member, enum, macro, concept or header. Example:
-
-[pre'''
-[classref boost::bar::baz]
-''']
-
-would have "boost::bar::baz" as the link text.
-
-[endsect]
-[section Escape]
-
-The escape mark-up is used when we don't want to do any processing.
-
-[pre
-\'\'\'
-escape (no processing/formatting)
-\'\'\'
-]
-
-Escaping allows us to pass XML markup to __boostbook__ or __docbook__. For example:
-
-[pre
-\'\'\'
-<emphasis role="bold">This is direct XML markup</emphasis>
-\'\'\'
-]
-
-'''
-<emphasis role="bold">This is direct XML markup</emphasis>
-'''
-
-[important Be careful when using the escape. The text must conform to
-__boostbook__/__docbook__ syntax.]
-
-[endsect]
-[section Single char escape]
-
-The backslash may be used to escape a single punctuation character. The
-punctuation immediately after the backslash is passed without any processing.
-This is useful when we need to escape QuickBook punctuations such as `[` and `]`.
-For example, how do you escape the triple quote? Simple: [^\\'\\'\\']
-
-
-`\n` has a special meaning. It is used to generate line breaks.
-
-[warning `\n` and `[br]` are now deprecated. __blurbs__, __admonitions__
-and table cells (see __tables__) may now contain paragraphs.]
-
-The escaped space: `\ ` also has a special meaning. The escaped space is removed
-from the output.
-
-[endsect]
-[section Images]
-
-[pre'''
-[$image.jpg]
-''']
-
-[endsect]
-[section Footnotes]
-
-As of version 1.3, QuickBook supports footnotes. Just put the text of the
-footnote in a `[footnote]` block, and the text will be put at the bottom
-of the current page. For example, this:
-
-[pre'''
-[footnote A sample footnote]
-''']
-
-will generate this[footnote A sample footnote].
-
-[section Macro Expansion]
-
-[pre'''
-__a_macro_identifier__
-''']
-
-See __macros__ for details.
-
-[endsect]
-
-[section Template Expansion]
-
-[pre'''
-[a_template_identifier]
-''']
-
-See __templates__ for details.
-
-[endsect]
-
-[endsect]
-[endsect]
-[section:block Block Level Elements]
-
-[section Document]
-
-Every document must begin with a Document Info section, which should look
-like this:
-
-[pre'''
-[document-type The Document Title
-    [quickbook 1.3]
-    [version 1.0]
-    [id the_document_name]
-    [dirname the_document_dir]
-    [copyright 2000 2002 2003 Joe Blow, Jane Doe]
-    [purpose The document's reason for being]
-    [category The document's category]
-    [authors [Blow, Joe], [Doe, Jane]]
-    [license The document's license]
-    [source-mode source-type]
-]
-''']
-
-Where document-type is one of:
-
-* book
-* article
-* library
-* chapter
-* part
-* appendix
-* preface
-* qandadiv
-* qandaset
-* reference
-* set
-
-quickbook 1.3 declares the version of quickbook the document is written for.
-In its absence, version 1.1 is assumed.
-
-=version=, =id=, =dirname=, =copyright=, =purpose=, =category=, =authors=,
-=license=, =last-revision= and =source-mode= are optional information.
-
-=source-type= is a lowercase string setting the initial __source_mode__. If
-the =source-mode= field is omitted, a default value of =c++= will be used.
-
-[endsect]
-[section Section]
-
-Starting a new section is accomplished with:
-
-[pre'''
-[section:id The Section Title]
-''']
-
-where /id/ is optional. id will be the filename of the generated section.
-If it is not present, "The Section Title" will be normalized and become the id.
-Valid characters are =a-Z=, =A-Z=, =0-9= and =_=. All non-valid characters are
-converted to underscore and all upper-case are converted to lower case.
-Thus: "The Section Title" will be normalized to "the_section_title".
-
-End a section with:
-
-[pre'''
-[endsect]
-''']
-
-Sections can nest, and that results in a hierarchy in the table of contents.
-
-[endsect]
-[section xinclude]
-
-You can include another XML file with:
-
-[pre'''
-[xinclude file.xml]
-''']
-
-This is useful when file.xml has been generated by Doxygen and contains your
-reference section.
-
-[endsect]
-[section Paragraphs]
-
-Paragraphs start left-flushed and are terminated by two or more newlines. No
-markup is needed for paragraphs. QuickBook automatically detects paragraphs from
-the context. Block markups \[section, endsect, h1, h2, h3, h4, h5, h6, blurb,
-(block-quote) ':', pre, def, table and include \] may also terminate a paragraph.
-
-[endsect]
-
-[section Lists]
-[section Ordered lists]
-
-[pre
-# One
-# Two
-# Three
-]
-
-will generate:
-
-# One
-# Two
-# Three
-
-[endsect]
-[section List Hierarchies]
-
-List hierarchies are supported. Example:
-
-[pre
-# One
-# Two
-# Three
-    # Three.a
-    # Three.b
-    # Three.c
-# Four
-    # Four.a
-        # Four.a.i
-        # Four.a.ii
-# Five
-]
-
-will generate:
-
-# One
-# Two
-# Three
-    # Three.a
-    # Three.b
-    # Three.c
-# Fourth
-    # Four.a
-        # Four.a.i
-        # Four.a.ii
-# Five
-
-[endsect]
-[section Long List Lines]
-
-Long lines will be wrapped appropriately. Example:
-
-[pre
-# A short item.
-# A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-# A short item.
-]
-
-# A short item.
-# A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-  A very long item. A very long item. A very long item.
-# A short item.
-
-[endsect]
-[section Unordered lists]
-
-[pre'''
-* First
-* Second
-* Third
-''']
-
-will generate:
-
-* First
-* Second
-* Third
-
-[endsect]
-[section Mixed lists]
-
-Mixed lists (ordered and unordered) are supported. Example:
-
-[pre'''
-# One
-# Two
-# Three
-    * Three.a
-    * Three.b
-    * Three.c
-# Four
-''']
-
-will generate:
-
-# One
-# Two
-# Three
-    * Three.a
-    * Three.b
-    * Three.c
-# Four
-
-And...
-
-[pre'''
-# 1
-    * 1.a
-        # 1.a.1
-        # 1.a.2
-    * 1.b
-# 2
-    * 2.a
-    * 2.b
-        # 2.b.1
-        # 2.b.2
-            * 2.b.2.a
-            * 2.b.2.b
-''']
-
-will generate:
-
-# 1
-    * 1.a
-        # 1.a.1
-        # 1.a.2
-    * 1.b
-# 2
-    * 2.a
-    * 2.b
-        # 2.b.1
-        # 2.b.2
-            * 2.b.2.a
-            * 2.b.2.b
-
-[endsect]
-[endsect]
-
-[section Code]
-
-Preformatted code starts with a space or a tab. The code will be
-syntax highlighted according to the current __source_mode__:
-
-[c++]
-
-    #include <iostream>
-
-    int main()
-    {
-        // Sample code
-        std::cout << "Hello, World\n";
-        return 0;
-    }
-
-[python]
-
-    import cgi
-
-    def cookForHtml(text):
-        '''"Cooks" the input text for HTML.'''
-
-        return cgi.escape(text)
-
-[c++]
-
-Macros that are already defined are expanded in source code. Example:
-
-[pre'''
-[def __array__ [@http://www.boost.org/doc/html/array/reference.html array]]
-[def __boost__ [@http://www.boost.org/libs/libraries.htm boost]]
-
-    using __boost__::__array__;
-''']
-
-Generates:
-
-[def __array__ [@http://www.boost.org/doc/html/array/reference.html array]]
-[def __boost__ [@http://www.boost.org/libs/libraries.htm boost]]
-
-    using __boost__::__array__;
-
-[endsect]
-[section:escape_back Escaping Back To QuickBook]
-
-Inside code, code blocks and inline code, QuickBook does not allow any
-markup to avoid conflicts with the target syntax (e.g. c++). In case you
-need to switch back to QuickBook markup inside code, you can do so using a
-language specific /escape-back/ delimiter. In C++ and Python, the delimiter
-is the double tick (back-quote): "\`\`" and "\`\`". Example:
-
-[pre'''
-void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``()
-{
-}
-''']
-
-Will generate:
-
-    void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``()
-    {
-    }
-
-When escaping from code to QuickBook, only phrase level markups are
-allowed. Block level markups like lists, tables etc. are not allowed.
-
-[endsect]
-[section Preformatted]
-
-Sometimes, you don't want some preformatted text to be parsed as C++. In such
-cases, use the [^[pre ... \]] markup block.
-
-[pre'''
-[pre
-
-    Some *preformatted* text                    Some *preformatted* text
-
-        Some *preformatted* text            Some *preformatted* text
-
-            Some *preformatted* text    Some *preformatted* text
-
-]
-''']
-
-Spaces, tabs and newlines are rendered as-is. Unlike all quickbook block level
-markup, pre (and Code) are the only ones that allow multiple newlines. The
-markup above will generate:
-
-[pre
-
-Some *preformatted* text                    Some *preformatted* text
-
-    Some *preformatted* text            Some *preformatted* text
-
-        Some *preformatted* text    Some *preformatted* text
-
-]
-
-Notice that unlike Code, phrase markup such as font style is still permitted
-inside =pre= blocks.
-
-[endsect]
-[section Blockquote]
-
-[pre
-'''[:sometext...]'''
-]
-
-[:Indents the paragraph. This applies to one paragraph only.]
-
-[endsect]
-[section Admonitions]
-
-[pre'''
-[note This is a note]
-[tip This is a tip]
-[important This is important]
-[caution This is a caution]
-[warning This is a warning]
-''']
-
-generates __docbook__ admonitions:
-
-[note This is a note]
-[tip This is a tip]
-[important This is important]
-[caution This is a caution]
-[warning This is a warning]
-
-These are the only admonitions supported by __docbook__. So,
-for example [^\[information This is some information\]] is unlikely
-to produce the desired effect.
-
-[endsect]
-[section Headings]
-
-[pre'''
-[h1 Heading 1]
-[h2 Heading 2]
-[h3 Heading 3]
-[h4 Heading 4]
-[h5 Heading 5]
-[h6 Heading 6]
-''']
-
-[h1 Heading 1]
-[h2 Heading 2]
-[h3 Heading 3]
-[h4 Heading 4]
-[h5 Heading 5]
-[h6 Heading 6]
-
-Headings 1-3 \[h1 h2 and h3\] will automatically have anchors with normalized
-names with [^name="section_id.normalized_header_text"] (i.e. valid characters are
-=a-z=, =A-Z=, =0-9= and =_=. All non-valid characters are converted to underscore
-and all upper-case are converted to lower-case. For example: Heading
-1 in section Section 2 will be normalized to [^section_2.heading_1]). You can use:
-
-[pre'''
-[link section_id.normalized_header_text The link text]
-''']
-
-to link to them. See __anchor_links__ and __section__ for more info.
-
-[endsect]
-[section Generic Heading]
-
-In cases when you don't want to care about the heading level (1 to 6), you
-can use the /Generic Heading/:
-
-[pre'''
-[heading Heading]
-''']
-
-The /Generic Heading/ assumes the level, plus one, of the innermost section
-where it is placed. For example, if it is placed in the outermost section,
-then, it assumes /h2/.
-
-Headings are often used as an alternative to sections. It is used
-particularly if you do not want to start a new section. In many cases,
-however, headings in a particular section is just flat. Example:
-
-[pre'''
-[section A]
-[h2 X]
-[h2 Y]
-[h2 Z]
-[endsect]
-''']
-
-Here we use h2 assuming that section A is the outermost level. If it is
-placed in an inner level, you'll have to use h3, h4, etc. depending on
-where the section is. In general, it is the section level plus one. It is
-rather tedious, however, to scan the section level everytime. If you
-rewrite the example above as shown below, this will be automatic:
-
-[pre'''
-[section A]
-[heading X]
-[heading Y]
-[heading Z]
-[endsect]
-''']
-
-They work well regardless where you place them. You can rearrange sections
-at will without any extra work to ensure correct heading levels. In fact,
-with /section/ and /heading/, you have all you need. /h1/../h6/ becomes
-redundant. /h1/../h6/ might be deprecated in the future.
-
-[endsect]
-[section Macros]
-
-[pre'''
-[def macro_identifier some text]
-''']
-
-When a macro is defined, the identifier replaces the text anywhere in the
-file, in paragraphs, in markups, etc. macro_identifier is a string of non-
-white space characters except '\]'. A macro may not follow an alphabetic
-character or the underscore. The replacement text can be any phrase (even
-marked up). Example:
-
-[pre'''
-[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]]
-sf_logo
-''']
-
-Now everywhere the sf_logo is placed, the picture will be inlined.
-
-[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]]
-sf_logo
-
-[tip It's a good idea to use macro identifiers that are distinguishable.
-For instance, in this document, macro identifiers have two leading and
-trailing underscores (e.g. [^'''__spirit__''']). The reason is to avoid
-unwanted macro replacement.]
-
-Links (URLS) and images are good candidates for macros. *1*) They tend to
-change a lot. It is a good idea to place all links and images in one place near the top
-to make it easy to make changes. *2*) The syntax is not pretty. It's easier to read and
-write, e.g. [^'''__spirit__'''] than [^'''[@http://spirit.sourceforge.net Spirit]'''].
-
-Some more examples:
-
-[pre'''
-[def :-)            [$theme/smiley.png]]
-[def __spirit__     [@http://spirit.sourceforge.net Spirit]]
-''']
-
-(See __images__ and __links__)
-
-Invoking these macros:
-
-[pre'''
-Hi __spirit__  :-)
-''']
-
-will generate this:
-
-Hi __spirit__ :-)
-
-[endsect]
-[section Predefined Macros]
-
-Quickbook has some predefined macros that you can already use.
-
-[table Predefined Macros
-    [[Macro]                [Meaning]                       [Example]]
-    [['''__DATE__''']       [Today's date]                  [__DATE__]]
-    [['''__TIME__''']       [The current time]              [__TIME__]]
-    [['''__FILENAME__''']   [Quickbook source filename]     [__FILENAME__]]
-]
-
-[endsect]
-[section Templates]
-
-Templates provide a more versatile text substitution mechanism. Templates
-come in handy when you need to create parameterizable, multi-line,
-boilerplate text that you specify once and expand many times. Templates
-accept one or more arguments. These arguments act like place-holders for
-text replacement. Unlike simple macros, which are limited to phrase level
-markup, templates can contain block level markup (e.g. paragraphs, code
-blocks and tables).
-
-Example template:
-
-[pre'''
-[template person[name age what]
-
-Hi, my name is [name]. I am [age] years old. I am a [what].
-
-]
-''']
-
-[template person[name age what]
-
-Hi, my name is [name]. I am [age] years old. I am a [what].
-
-]
-
-[heading Template Identifier]
-
-Template identifiers can either consist of:
-
-* An initial alphabetic character or the underscore, followed by
-  zero or more alphanumeric characters or the underscore. This is
-  similar to your typical C/C++ identifier.
-* A single character punctuation (a non-alphanumeric printable character)
-
-[heading Formal Template Arguments]
-
-Template formal arguments are identifiers consisting of an initial
-alphabetic character or the underscore, followed by zero or more
-alphanumeric characters or the underscore. This is similar to your typical
-C/C++ identifier.
-
-A template formal argument temporarily hides a template of the same name at
-the point where the [link quickbook.syntax.block.templates.template_expansion
-template is expanded]. Note that the body of the [^person] template above
-refers to [^name] [^age] and [^what] as [^\[name\]] [^\[age\]] and
-[^\[what\]]. [^name] [^age] and [^what] are actually templates that exist
-in the duration of the template call.
-
-[heading Template Body]
-
-The template body can be just about any QuickBook block or phrase. There
-are actually two forms. Templates may be phrase or block level. Phrase
-templates are of the form:
-
-[pre'''
-[template sample[arg1 arg2...argN] replacement text... ]
-''']
-
-Block templates are of the form:
-
-[pre'''
-[template sample[arg1 arg2...argN]
-replacement text...
-]
-''']
-
-The basic rule is as follows: if a newline immediately follows the argument
-list, then it is a block template, otherwise, it is a phrase template.
-Phrase templates are typically expanded as part of phrases. Like macros,
-block level elements are not allowed in phrase templates.
-
-[heading Template Expansion]
-
-You expand a template this way:
-
-[pre'''
-[template_identifier arg1..arg2..arg3]
-''']
-
-At template expansion, you supply the actual arguments. The template will
-be expanded with your supplied arguments. Example:
-
-[pre'''
-[person James Bond..39..Spy]
-[person Santa Clause..87..Big Red Fatso]
-''']
-
-Which will expand to:
-
-[person James Bond..39..Spy]
-[person Santa Clause..87..Big Red Fatso]
-
-[caution A word of caution: Templates are recursive. A template can call
-another template or even itself, directly or indirectly. There are no
-control structures in QuickBook (yet) so this will always mean infinite
-recursion. QuickBook can detect this situation and report an error if
-recursion exceeds a certain limit.]
-
-Each actual argument can be a word, a text fragment or just about any [link
-quickbook.syntax.phrase QuickBook phrase]. Arguments are separated by the
-double dot [^".."] and terminated by the close parenthesis.
-
-[heading Nullary Templates]
-
-Nullary templates look and act like simple macros. Example:
-
-[pre'''
-[template alpha[]'''&#945;''']
-[template beta[]'''&#946;''']
-''']
-
-[template alpha[]'''α''']
-[template beta[]'''β''']
-
-Expanding:
-
-[pre'''Some squigles...[*[alpha][beta]]''']
-
-We have:
-
-Some squiggles...[*[alpha][beta]]
-
-The difference with macros are
-
-* The explicit [link quickbook.syntax.block.templates.template_expansion
-  template expansion syntax]. This is an advantage because, now, we don't
-  have to use obscure naming conventions like double underscores (e.g.
-  \_\_alpha\_\_) to avoid unwanted
-  macro replacement.
-* The template is expanded at the point where it is invoked. A macro is
-  expanded immediately at its point of declaration. This is subtle and
-  can cause a slight difference in behavior especially if you refer to
-  other macros and templates in the body.
-
-The empty brackets after the template identifier ([^alpha\[\]]) indicates no
-arguments. If the template body does not look like a template argument list, we
-can elide the empty brackets. Example:
-
-[pre'''
-[template aristotle_quote Aristotle: [*['Education is the best provision
-for the journey to old age.]]]
-''']
-
-[template aristotle_quote\ Aristotle: [*['Education is the best provision
-for the journey to old age.]]]
-
-Expanding:
-
-[pre'''
-Here's a quote from [aristotle_quote].
-''']
-
-We have:
-
-Here's a quote from [aristotle_quote].
-
-The disadvantage is that you can't avoid the space between the template
-identifier, `aristotle_quote`, and the template body "Aristotle...". This space
-will be part of the template body. If that space is unwanted, use empty
-brackets or use the space escape: "`\ `". Example:
-
-[pre'''
-[template tag\ _tag]
-''']
-
-[template tag\ _tag]
-
-Then expanding:
-
-[pre'''
-`struct` x[tag];
-''']
-
-We have:
-
-`struct` x[tag];
-
-You have a couple of ways to do it. I personally prefer the explicit empty
-brackets, though.
-
-[heading Simple Arguments]
-
-As mentioned, arguments are separated by the double dot [^".."]. If there
-are less arguments passed than expected, QuickBook attempts to break the
-last argument into two or more arguments following this logic:
-
-* Break the last argument into two, at the first space found ([^'', '\\n',
-  \\t' or '\\r']).
-* Repeat until there are enough arguments or if there are no more spaces
-  found (in which case, an error is reported).
-
-For example:
-
-[pre'''
-[template simple[a b c d] [a][b][c][d]]
-[simple w x y z]
-''']
-
-will produce:
-
-[template simple[a b c d] [a][b][c][d]]
-[simple w x y z]
-
-"w x y z" is initially treated as a single argument because we didn't
-supply any [^".."] separators. However, since [^simple] expects 4
-arguments, "w x y z" is broken down iteratively (applying the logic above)
-until we have "w", "x", "y" and "z".
-
-QuickBook only tries to get the arguments it needs. For example:
-
-[pre'''
-[simple w x y z trail]
-''']
-
-will produce:
-
-[simple w x y z trail]
-
-The arguments being: "w", "x", "y" and "z trail".
-
-It should be obvious now that for simple arguments with no spaces, we can
-get by without separating the arguments with [^".."] separators. It is
-possible to combine [^".."] separators with the argument passing
-simplification presented above. Example:
-
-[pre'''
-[simple what do you think ..m a n?]
-''']
-
-will produce:
-
-[simple what do you think ..m a n?]
-
-[heading Punctuation Templates]
-
-With templates, one of our objectives is to allow us to rewrite QuickBook
-in QuickBook (as a qbk library). For that to happen, we need to accommodate
-single character punctuation templates which are fairly common in
-QuickBook. You might have noticed that single character punctuations are
-allowed as [link quickbook.syntax.block.templates.template_identifier
-template identifiers]. Example:
-
-[pre'''
-[template ![bar] '''<hey>'''[bar]'''</hey>''']
-''']
-
-Now, expanding this:
-
-[pre'''
-[!baz]
-''']
-
-We will have:
-
-[pre
-<hey>baz</hey>
-]
-
-[endsect]
-[section Blurbs]
-
-[pre'''
-[blurb :-) [*An eye catching advertisement or note...]
-
-    __spirit__ is an object-oriented recursive-descent parser generator framework
-    implemented using template meta-programming techniques. Expression templates
-    allow us to approximate the syntax of Extended Backus-Normal Form (EBNF)
-    completely in C++.
-]
-''']
-
-will generate this:
-
-[blurb :-) [*An eye catching advertisement or note...]
-
-    __spirit__ is an object-oriented recursive-descent parser generator
-    framework implemented using template meta-programming techniques. Expression
-    templates allow us to approximate the syntax of Extended Backus-Normal Form
-    (EBNF) completely in C++.
-]
-
-[note Prefer [link quickbook.syntax.block.admonitions admonitions] wherever
-appropriate.]
-
-[endsect]
-[section Tables]
-
-[pre'''
-[table A Simple Table
-    [[Heading 1] [Heading 2] [Heading 3]]
-    [[R0-C0]     [R0-C1]     [R0-C2]]
-    [[R1-C0]     [R1-C1]     [R1-C2]]
-    [[R2-C0]     [R2-C1]     [R2-C2]]
-]
-''']
-
-will generate:
-
-[table A Simple Table
-    [[Heading 1] [Heading 2] [Heading 3]]
-    [[R0-C0]     [R0-C1]     [R0-C2]]
-    [[R2-C0]     [R2-C1]     [R2-C2]]
-    [[R3-C0]     [R3-C1]     [R3-C2]]
-]
-
-The table title is optional. The first row of the table is automatically
-treated as the table header; that is, it is wrapped in
-[^<thead>...</thead>] XML tags. Note that unlike the original QuickDoc, the
-columns are nested in [ cells... ]. The syntax is free-format and allows
-big cells to be formatted nicely. Example:
-
-[pre'''
-[table Table with fat cells
-    [[Heading 1] [Heading 2]]
-    [
-        [Row 0, Col 0: a small cell]
-        [
-            Row 0, Col 1: a big fat cell with paragraphs
-
-            Boost provides free peer-reviewed portable C++ source libraries.
-
-            We emphasize libraries that work well with the C++ Standard Library.
-            Boost libraries are intended to be widely useful, and usable across
-            a broad spectrum of applications. The Boost license encourages both
-            commercial and non-commercial use.
-        ]
-    ]
-    [
-        [Row 1, Col 0: a small cell]
-        [Row 1, Col 1: a small cell]
-    ]
-]
-''']
-
-and thus:
-
-[table Table with fat cells
-    [[Heading 1] [Heading 2]]
-    [
-        [Row 0, Col 0: a small cell]
-        [
-            Row 0, Col 1: a big fat cell with paragraphs
-
-            Boost provides free peer-reviewed portable C++ source libraries.
-
-            We emphasize libraries that work well with the C++ Standard Library.
-            Boost libraries are intended to be widely useful, and usable across
-            a broad spectrum of applications. The Boost license encourages both
-            commercial and non-commercial use.
-        ]
-    ]
-    [
-        [Row 1, Col 0: a small cell]
-        [Row 1, Col 1: a small cell]
-    ]
-]
-
-Here's how to have preformatted blocks of code in a table cell:
-
-[pre'''
-[table Table with code
-    [[Comment] [Code]]
-    [
-        [My first program]
-        ['''\`\`
-            #include <iostream>
-
-            int main()
-            {
-                std::cout << "Hello, World!" << std::endl;
-                return 0;
-            }
-        \`\`''']
-    ]
-]
-''']
-
-[table Table with code
-    [[Comment] [Code]]
-    [
-        [My first program]
-        [``
-            #include <iostream>
-
-            int main()
-            {
-                std::cout << "Hello, World!" << std::endl;
-                return 0;
-            }
-        ``]
-    ]
-]
-
-[endsect]
-[section Variable Lists]
-
-[pre'''
-[variablelist A Variable List
-    [[term 1] [The definition of term 1]]
-    [[term 2] [The definition of term 2]]
-    [[term 3] [The definition of term 3]]
-]
-''']
-
-will generate:
-
-[variablelist A Variable List
-    [[term 1] [The definition of term 1]]
-    [[term 2] [The definition of term 2]]
-    [[term 3] [The definition of term 3]]
-]
-
-The rules for variable lists are the same as for tables, except that
-only 2 "columns" are allowed. The first column contains the terms, and
-the second column contains the definitions. Those familiar with HTML
-will recognize this as a "definition list".
-
-[endsect]
-[section Include]
-
-You can include one QuickBook file from another. The syntax is simply:
-
-[pre'''
-[include someother.qbk]
-''']
-
-The included file will be processed as if it had been cut and pasted
-into the current document, with the following exceptions:
-
-* The '''__FILENAME__''' predefined macro will reflect the name of the
-  file currently being processed.
-* Any macros defined in the included file are scoped to that file.
-
-The [^\[include\]] directive lets you specify a document id to use for the
-included file. When this id is not explicitly specified, the id defaults to
-the filename ("someother", in the example above). You can specify the id
-like this:
-
-[pre'''
-[include:someid someother.qbk]
-''']
-
-All auto-generated anchors will use the document id as a unique prefix. So
-for instance, if there is a top section in someother.qbk named "Intro", the
-named anchor for that section will be "someid.intro", and you can link to
-it with [^\[link someid.intro The Intro\]].
-
-[endsect]
-
-[section Import]
-
-When documenting code, you'd surely need to present code from actual source
-files. While it is possible to copy some code and paste them in your QuickBook
-file, doing so is error prone and the extracted code in the documentation tends
-to get out of sync with the actual code as the code evolves. The problem, as
-always, is that once documentation is written, the tendency is for the docs to
-languish in the archives without maintenance.
-
-QuickBook's import facility provides a nice solution.
-
-[heading Example]
-
-You can effortlessly import code snippets from source code into your QuickBook.
-The following illustrates how this is done:
-
-[pre'''
-[import ../test/stub.cpp]
-[foo]
-[bar]
-''']
-
-The first line:
-
-[pre'''
-[import ../test/stub.cpp]
-''']
-
-collects specially marked-up code snippets from [@../../test/stub.cpp stub.cpp]
-and places them in your QuickBook file as virtual templates. Each of the
-specially marked-up code snippets has a name (e.g. `foo` and `bar` in the
-example above). This shall be the template identifier for that particular code
-snippet. The second and third line above does the actual template expansion:
-
-[pre'''
-[foo]
-[bar]
-''']
-
-And the result is:
-
-[import ../test/stub.cpp]
-[foo]
-[bar]
-
-[heading Code Snippet Markup]
-
-Note how the code snippets in [@../../test/stub.cpp stub.cpp] get marked up. We
-use distinguishable comments following the form:
-
-    //[id
-    some code here
-    //]
-
-The first comment line above initiates a named code-snippet. This prefix will
-not be visible in quickbook. The entire code-snippet in between `//[id` and
-`//]` will be inserted as a template in quickbook with name ['/id/]. The comment
-`//]` ends a code-snippet This too will not be visible in quickbook.
-
-[heading Special Comments]
-
-Special comments of the form:
-
-    //` some [*quickbook] markup here
-
-and:
-
-    /*` some [*quickbook] markup here */
-
-will be parsed by QuickBook. This can contain quickbook /blocks/ (e.g. sections,
-paragraphs, tables, etc). In the first case, the initial slash-slash, tick and
-white-space shall be ignored. In the second, the initial slash-star-tick and the
-final star-slash shall be ignored.
-
-[heading Callouts]
-
-Special comments of the form:
-
-    /*< some [*quickbook] markup here >*/
-
-will be regarded as callouts. These will be collected, numbered and
-rendered as a "callout bug" (a small icon with a number). After the
-whole snippet is parsed, the callout list is generated. See
-[@http://www.docbook.org/tdg/en/html/callout.html Callouts] for details.
-Example:
-
-[foo_bar]
-
-Checkout [@../../test/stub.cpp stub.cpp] to see the actual code.
-
-[endsect]
-
-[endsect]
-[endsect]
-
-[section:install Installation and configuration]
-
-This section provides some guidelines on how to install and configure
-BoostBook and Quickbook under several operating systems.
-
-Before continuing, it is very important that you keep this in mind: if you
-try to build some documents and the process breaks due to misconfiguration,
-be absolutely sure to delete any `bin` and `bin.v2` directories generated
-by the build before trying again.  Otherwise your configuration fixes will
-not take any effect.
-
-[section:windows Windows 2000, XP, 2003, Vista]
-
-[python]
-
-[:['Section contributed by Julio M. Merino Vidal]]
-
-The following instructions apply to any Windows system based on Windows
-2000, including Windows XP, Windows 2003 Server and Windows Vista. The
-paths shown below are taken from a Windows Vista machine; you will need to
-adjust them to match your system in case you are running an older version.
-
-# First of all you need to have a copy of `xsltproc` for Windows.  There
-  are many ways to get this tool, but to keep things simple, use the
-  [@http://www.zlatkovic.com/pub/libxml/ binary packages] made by Igor
-  Zlatkovic.  At the very least, you need to download the following
-  packages: `iconv`, `zlib`, `libxml2` and `libxslt`.
-
-# Unpack all these packages in the same directory so that you get unique
-  `bin`, `include` and `lib` directories within the hierarchy.  These
-  instructions use `C:\Users\example\Documents\boost\xml` as the root for
-  all files.
-
-# From the command line, go to the `bin` directory and launch
-  `xsltproc.exe` to ensure it works.  You should get usage information on
-  screen.
-
-# Download [@http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip Docbook XML
-  4.2] and unpack it in the same directory used above.  That is:
-  `C:\Users\example\Documents\boost\xml\docbook-xml`.
-
-# Download the latest
-  [@http://sourceforge.net/project/showfiles.php?group_id=21935&package_id=16608
-  Docbook XSL] version and unpack it, again in the same directory
-  used before.  To make things easier, rename the directory created
-  during the extraction to `docbook-xsl` (bypassing the version name):
-  `C:\Users\example\Documents\boost\xml\docbook-xsl`.
-
-# Add the following to your `user-config.jam` file, which should live in
-  your home directory (`%HOMEDRIVE%%HOMEPATH%`).  You must already have it
-  somewhere or otherwise you could not be building Boost (i.e. missing
-  tools configuration).
-
- using xsltproc
-     : "C:/Users/example/Documents/boost/xml/bin/xsltproc.exe"
-     ;
-
- using boostbook
-     : "C:/Users/example/Documents/boost/xml/docbook-xsl"
-     : "C:/Users/example/Documents/boost/xml/docbook-xml"
-     ;
-
-The above steps are enough to get a functional BoostBook setup.  Quickbook
-will be automatically built when needed.  If you want to avoid these
-rebuilds:
-
-# Go to Quickbook's source directory (`BOOST_ROOT\tools\quickbook`).
-
-# Build the utility by issuing `bjam --v2`.
-
-# Copy the resulting `quickbook.exe` binary (located under the
-  `BOOST_ROOT\bin.v2` hierarchy) to a safe place.  Following our previous
-  example, you can install it into:
-  `C:\Users\example\Documents\boost\xml\bin`.
-
-# Add the following to your `user-config.jam` file:
-
- using quickbook
-     : "C:/Users/example/Documents/boost/xml/bin/quickbook.exe"
-     ;
-
-[endsect]
-
-[section:linux Debian, Ubuntu]
-
-The following instructions apply to Debian and its derivatives. They are based
-on a Ubuntu Edgy install but should work on other Debian based systems.
-
-First install the `bjam`, `xsltproc`, `docbook-xsl` and `docbook-xml` packages.
-For example, using `apt-get`:
-
-    sudo apt-get install xsltprc docbook-xsl docbook-xml
-
-If you're planning on building boost's documentation, you'll also need to
-install the `doxygen` package as well.
-
-Next, we need to configure Boost Build to compile BoostBook files. Add the
-following to your `user-config.jam` file, which should be in your home
-directory. If you don't have one, create a file containing this text. For more
-information on setting up `user-config.jam`, see the
-[@http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html Boost
-Build documentation].
-
-    using xsltproc ;
-
-    using boostbook
-        : /usr/share/xml/docbook/stylesheet/nwalsh
-        : /usr/share/xml/docbook/schema/dtd/4.2
-        ;
-
-    # Remove this line if you're not using doxygen
-    using doxygen ;
-
-The above steps are enough to get a functional BoostBook setup.  Quickbook
-will be automatically built when needed.  If you want to avoid these
-rebuilds:
-
-# Go to Quickbook's source directory (`BOOST_ROOT/tools/quickbook`).
-
-# Build the utility by issuing `bjam --v2`.
-
-# Copy the resulting `quickbook` binary (located under the
-  `BOOST_ROOT/bin.v2` hierarchy) to a safe place.  The traditional location is
-  `/usr/local/bin`.
-
-# Add the following to your `user-config.jam` file, using the full path of the
-  quickbook executable:
-
- using quickbook
-     : /usr/local/bin/quickbook
-     ;
-
-[endsect]
-[endsect] [/Installation and configuration]
-
-[section:editors Editor Support]
-
-Editing quickbook files is usually done with text editors both simple and
-powerful. The following sections list the settings for some editors which can
-help make editing quickbook files a bit easier.
-
-[blurb __note__ You may submit your settings, tips, and suggestions to the
-authors, or through the [@https://lists.sourceforge.net/lists/listinfo/boost-
-docs Boost Docs mailing list].]
-
-[section:scite Scintilla Text Editor]
-
-[:['Section contributed by Dean Michael Berris]]
-
-The Scintilla Text Editor (SciTE) is a free source code editor for Win32 and X.
-It uses the SCIntilla source code editing component.
-
-[blurb __tip__ SciTE can be downloaded from [@http://www.scintilla.org/SciTE.html]]
-
-You can use the following settings to highlight quickbook tags when
-editing quickbook files.
-
-[pre'''
-qbk=*.qbk
-lexer.*.qbk=props
-use.tabs.$(qbk)=0
-tab.size.$(qbk)=4
-indent.size.$(qbk)=4
-style.props.32=$(font.base)
-comment.stream.start.props=[/
-comment.stream.end.props=]
-comment.box.start.props=[/
-comment.box.middle.props=
-comment.box.end.props=]
-''']
-
-[blurb __note__ Thanks to Rene Rivera for the above SciTE settings.]
-
-[endsect] [/scite]
-[endsect] [/editors]
-
-[section:faq Frequently Asked Questions]
-
-[heading Can I use QuickBook for non-Boost documentation?]
-
-QuickBook can be used for non-Boost documentation with a little extra work.
-
-[:['Faq contributed by Michael Marcin]]
-
-When building HTML documentation with BoostBook a Boost C++ Libraries header
-is added to the files. When using QuickBook to document projects outside of
-Boost this is not desirable. This behavior can be overridden at the BoostBook
-level by specifying some XSLT options. When using Boost Build version 2 (BBv2)
-this can be achieved by adding parameters to the BoostBook target declaration.
-
-For example:
-[pre
-using quickbook ;
-
-xml my_doc : my_doc.qbk ;
-
-boostbook standalone
-    :
-        my_doc
-    :
-        <xsl:param>boost.image.src=images/my_project_logo.png
-        <xsl:param>boost.image.alt="\\"My Project\\""
-        <xsl:param>boost.image.w=100
-        <xsl:param>boost.image.h=50
-        <xsl:param>nav.layout=none
-    ;
-]
-
-[endsect] [/faq]
-
-[section:ref Quick Reference]
-
-[cpp]
-
-[template ordered_list_sample[]
-[pre'''
-# one
-# two
-# three
-''']
-]
-
-[template unordered_list_sample[]
-[pre'''
-* one
-* two
-* three
-''']
-]
-
-[template table_sample[]
-[pre'''
-[table Title
-[[a][b][c]]
-[[a][b][c]]
-]
-''']
-]
-
-[template var_list_sample[]
-[pre'''
-[variablelist Title
-[[a][b]]
-[[a][b]]
-]
-''']
-]
-
-
-[table Syntax Compendium
-    [[To do this...]        [Use this...]                                   [See this...]]
-    [[comment]              [[^'''[/ some comment]''']]                     [__comments__]]
-    [[['italics]]           [[^'''['italics] or /italics/''']]              [__font_styles__ and __simple_formatting__]]
-    [[[*bold]]              [[^'''[*bold] or *bold*''']]                    [__font_styles__ and __simple_formatting__]]
-    [[[_underline]]         [[^'''[_underline] or _underline_''']]          [__font_styles__ and __simple_formatting__]]
-    [[[^teletype]]          [[^'''[^teletype] or =teletype=''']]            [__font_styles__ and __simple_formatting__]]
-    [[[-strikethrough]]     [[^'''[-strikethrough]''']]                     [__font_styles__ and __simple_formatting__]]
-    [[[~replaceable]]       [[^'''[~replaceable]''']]                       [__replaceable__]]
-    [[source mode]          [[^\[c++\]] or [^\[python\]]]                   [__source_mode__]]
-    [[inline code]          [[^'''`int main();`''']]                        [__inline_code__]]
-    [[code block]           [[^'''``int main();``''']]                      [__code__]]
-    [[code escape]          [[^'''``from c++ to QuickBook``''']]            [__escape_back__]]
-    [[line break]           [[^'''[br] or \n''']]                           [__line_break__ *DEPRECATED*]]
-    [[anchor]               [[^'''[#anchor]''']]                            [__anchors__]]
-    [[link]                 [[^'''[@http://www.boost.org Boost]''']]        [__links__]]
-    [[anchor link]          [[^'''[link section.anchor Link text]''']]      [__anchor_links__]]
-    [[refentry link]        [[^'''[link xml.refentry Link text]''']]        [__refentry_links__]]
-    [[function link]        [[^'''[funcref fully::qualified::function_name Link text]''']]      [__code_links__]]
-    [[class link]           [[^'''[classref fully::qualified::class_name Link text]''']]        [__code_links__]]
-    [[member link]          [[^'''[memberref fully::qualified::member_name Link text]''']]      [__code_links__]]
-    [[enum link]            [[^'''[enumref fully::qualified::enum_name Link text]''']]          [__code_links__]]
-    [[macro link]           [[^'''[macroref MACRO_NAME Link text]''']]                          [__code_links__]]
-    [[concept link]         [[^'''[conceptref ConceptName Link text]''']]                       [__code_links__]]
-    [[header link]          [[^'''[headerref path/to/header.hpp Link text]''']]                 [__code_links__]]
-    [[escape]               [[^\'\'\'escaped text (no processing/formatting)\'\'\']]            [__escape__]]
-    [[single char escape]   [[^\\c]]                                        [__single_char_escape__]]
-    [[images]               [[^'''[$image.jpg]''']]                         [__images__]]
-    [[begin section]        [[^'''[section The Section Title]''']]          [__section__]]
-    [[end section]          [[^'''[endsect]''']]                            [__section__]]
-    [[paragraph]            [No markup. Paragraphs start left-flushed and are terminated by two or more newlines.]  [__paragraphs__]]
-    [[ordered list]         [[ordered_list_sample]]                         [__ordered_lists__]]
-    [[unordered list]       [[unordered_list_sample]]                       [__unordered_lists__]]
-    [[code]                 [No markup. Preformatted code starts with a space or a tab.]        [__code__]]
-    [[preformatted]         [[^'''[pre preformatted]''']]                   [__preformatted__]]
-    [[block quote]          [[^'''[:sometext...]''']]                       [__blockquote__]]
-    [[heading 1]            [[^'''[h1 Heading 1]''']]                       [__heading__]]
-    [[heading 2]            [[^'''[h2 Heading 2]''']]                       [__heading__]]
-    [[heading 3]            [[^'''[h3 Heading 3]''']]                       [__heading__]]
-    [[heading 4]            [[^'''[h4 Heading 4]''']]                       [__heading__]]
-    [[heading 5]            [[^'''[h5 Heading 5]''']]                       [__heading__]]
-    [[heading 6]            [[^'''[h6 Heading 6]''']]                       [__heading__]]
-    [[macro]                [[^'''[def macro_identifier some text]''']]     [__macros__]]
-    [[template]             [[^'''[template[a b] [a] body [b]]''']]         [__templates__]]
-    [[blurb]                [[^'''[blurb advertisement or note...]''']]     [__blurbs__]]
-    [[admonition]           [[^'''[warning Warning text...]''']]            [__admonitions__]]
-    [[table]                [[table_sample]]                                [__tables__]]
-    [[variablelist]         [[var_list_sample]]                             [__variable_lists__]]
-    [[include]              [[^'''[include someother.qbk]''']]              [__include__]]
-]
-
-[endsect]
Copied: branches/release/tools/quickbook/test/quickbook_manual-1_4.gold (from r75700, /trunk/tools/quickbook/test/quickbook_manual-1_4.gold)
 Deleted: branches/release/tools/quickbook/test/section_1_4.gold
 Deleted: branches/release/tools/quickbook/test/section_1_4.quickbook
 Deleted: branches/release/tools/quickbook/test/section_1_5-unclosed.gold
 Deleted: branches/release/tools/quickbook/test/section_1_5-unclosed.quickbook
 Deleted: branches/release/tools/quickbook/test/section_1_5.gold
 Deleted: branches/release/tools/quickbook/test/section_1_5.quickbook
 Deleted: branches/release/tools/quickbook/test/simple_markup.gold
 Deleted: branches/release/tools/quickbook/test/simple_markup.quickbook
 Modified: branches/release/tools/quickbook/test/snippets/Jamfile.v2
 Modified: branches/release/tools/quickbook/test/snippets/pass_thru.gold
 Copied: branches/release/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold (from r75700, /trunk/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold)
 Modified: branches/release/tools/quickbook/test/stub.c
 Modified: branches/release/tools/quickbook/test/stub.cpp
 Modified: branches/release/tools/quickbook/test/stub.py
 Copied: branches/release/tools/quickbook/test/svg-1_1.gold (from r75700, /trunk/tools/quickbook/test/svg-1_1.gold)
 Deleted: branches/release/tools/quickbook/test/table_1_3.gold
 Deleted: branches/release/tools/quickbook/test/table_1_3.quickbook
 Deleted: branches/release/tools/quickbook/test/table_1_5.gold
 Deleted: branches/release/tools/quickbook/test/table_1_5.quickbook
 Deleted: branches/release/tools/quickbook/test/template-section.gold
 Deleted: branches/release/tools/quickbook/test/template-section.quickbook
 Copied: branches/release/tools/quickbook/test/templates-1_5.gold (from r75700, /trunk/tools/quickbook/test/templates-1_5.gold)
 Copied: branches/release/tools/quickbook/test/templates-1_5.quickbook (from r75700, /trunk/tools/quickbook/test/templates-1_5.quickbook)
 Deleted: branches/release/tools/quickbook/test/templates.gold
 Deleted: branches/release/tools/quickbook/test/templates.quickbook
 Deleted: branches/release/tools/quickbook/test/templates_1_4.gold
 Deleted: branches/release/tools/quickbook/test/templates_1_4.quickbook
 Deleted: branches/release/tools/quickbook/test/templates_1_5.gold
 Deleted: branches/release/tools/quickbook/test/templates_1_5.quickbook
 Deleted: branches/release/tools/quickbook/test/unicode-escape.gold
 Deleted: branches/release/tools/quickbook/test/unicode-escape.quickbook
 Modified: branches/release/tools/quickbook/test/unit/Jamfile.v2
 Deleted: branches/release/tools/quickbook/test/unit/iterator_tests.cpp
 Modified: branches/release/tools/quickbook/test/unit/values_test.cpp
 Deleted: branches/release/tools/quickbook/test/utf-16be-bom.quickbook
 Deleted: branches/release/tools/quickbook/test/utf-16le-bom.quickbook
 Deleted: branches/release/tools/quickbook/test/utf-8-bom.gold
 Deleted: branches/release/tools/quickbook/test/utf-8-bom.quickbook
 Deleted: branches/release/tools/quickbook/test/utf-8.gold
 Deleted: branches/release/tools/quickbook/test/utf-8.quickbook
 Deleted: branches/release/tools/quickbook/test/variablelist.gold
 Deleted: branches/release/tools/quickbook/test/variablelist.quickbook
 Copied: branches/release/tools/quickbook/test/version-0_1-fail.quickbook (from r75700, /trunk/tools/quickbook/test/version-0_1-fail.quickbook)
 Deleted: branches/release/tools/quickbook/test/xinclude.gold
 Deleted: branches/release/tools/quickbook/test/xinclude.quickbook
 Modified: branches/release/tools/quickbook/test/xinclude/Jamfile.v2
 Copied: branches/release/tools/quickbook/test/xinclude/xmlbase-1_6-fail.quickbook (from r75769, /trunk/tools/quickbook/test/xinclude/xmlbase-1_6-fail.quickbook)
 Deleted: branches/release/tools/quickbook/test/xml-escape_1_2.gold
 Deleted: branches/release/tools/quickbook/test/xml-escape_1_2.quickbook
 Deleted: branches/release/tools/quickbook/test/xml-escape_1_5.gold
 Deleted: branches/release/tools/quickbook/test/xml-escape_1_5.quickbook
==============================================================================
--- /trunk/tools/quickbook/test/quickbook_manual-1_4.gold	(original)
+++ branches/release/tools/quickbook/test/quickbook_manual-1_4.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -733,7 +733,8 @@
 <phrase role="special">{</phrase>
     <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special"><<</phrase> <phrase role="string">"Hello, World!"</phrase> <phrase role="special"><<</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
     <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
         </para>
       </section>
       <section id="quickbook.syntax.phrase.source_mode">
@@ -1762,7 +1763,11 @@
           Now everywhere the sf_logo is placed, the picture will be inlined.
         </para>
         <para>
-          <inlinemediaobject><imageobject><imagedata fileref="http://sourceforge.net/sflogo.php?group_id=28447&type=1"></imagedata></imageobject></inlinemediaobject>
+          <inlinemediaobject><imageobject><imagedata fileref="http://sourceforge.net/sflogo.php?group_id=28447&type=1"></imagedata></imageobject>
+          <textobject>
+            <phrase>sflogo</phrase>
+          </textobject>
+          </inlinemediaobject>
         </para>
         <tip>
           <para>
@@ -1799,7 +1804,11 @@
         </para>
         <para>
           Hi <ulink url="http://spirit.sourceforge.net">Spirit</ulink> <inlinemediaobject><imageobject><imagedata
-          fileref="images/smiley.png"></imagedata></imageobject></inlinemediaobject>
+          fileref="images/smiley.png"></imagedata></imageobject>
+          <textobject>
+            <phrase>smiley</phrase>
+          </textobject>
+          </inlinemediaobject>
         </para>
       </section>
       <section id="quickbook.syntax.block.predefined_macros">
@@ -2210,8 +2219,12 @@
         </para>
         <sidebar role="blurb">
         <para>
-          <inlinemediaobject><imageobject><imagedata fileref="images/smiley.png"></imagedata></imageobject></inlinemediaobject>
-          <emphasis role="bold">An eye catching advertisement or note...</emphasis>
+          <inlinemediaobject><imageobject><imagedata fileref="images/smiley.png"></imagedata></imageobject>
+          <textobject>
+            <phrase>smiley</phrase>
+          </textobject>
+          </inlinemediaobject> <emphasis role="bold">An eye catching advertisement
+          or note...</emphasis>
         </para>
         <para>
           <ulink url="http://spirit.sourceforge.net">Spirit</ulink> is an object-oriented
@@ -2452,7 +2465,8 @@
 <phrase role="special">{</phrase>
     <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special"><<</phrase> <phrase role="string">"Hello, World!"</phrase> <phrase role="special"><<</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
     <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
                   </para>
                 </entry>
               </row>
@@ -2613,7 +2627,8 @@
 <phrase role="special">{</phrase>
     <phrase role="comment">// return 'em, foo man!</phrase>
     <phrase role="keyword">return</phrase> <phrase role="string">"foo"</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
         </para>
         <para>
           This is the <emphasis role="bold"><emphasis>bar</emphasis></emphasis> function
@@ -2623,7 +2638,8 @@
 <phrase role="special">{</phrase>
     <phrase role="comment">// return 'em, bar man!</phrase>
     <phrase role="keyword">return</phrase> <phrase role="string">"bar"</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
         </para>
         <para>
           Some trailing text here
@@ -2686,7 +2702,8 @@
 <programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">foo_bar</phrase><phrase role="special">()</phrase> <co id="quickbook.syntax.block.import.c0" linkends="quickbook.syntax.block.import.c1" />
 <phrase role="special">{</phrase>
     <phrase role="keyword">return</phrase> <phrase role="string">"foo-bar"</phrase><phrase role="special">;</phrase> <co id="quickbook.syntax.block.import.c2" linkends="quickbook.syntax.block.import.c3" />
-<phrase role="special">}</phrase></programlisting>
+<phrase role="special">}</phrase>
+</programlisting>
         </para>
         <calloutlist>
           <callout arearefs="quickbook.syntax.block.import.c0" id="quickbook.syntax.block.import.c1">
@@ -2968,10 +2985,13 @@
     </para>
     <sidebar role="blurb">
     <para>
-      <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject></inlinemediaobject>
-      You may submit your settings, tips, and suggestions to the authors, or through
-      the <ulink url="https://lists.sourceforge.net/lists/listinfo/boost-">docs Boost
-      Docs mailing list</ulink>.
+      <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
+      <textobject>
+        <phrase>note</phrase>
+      </textobject>
+      </inlinemediaobject> You may submit your settings, tips, and suggestions to
+      the authors, or through the <ulink url="https://lists.sourceforge.net/lists/listinfo/boost-">docs
+      Boost Docs mailing list</ulink>.
     </para>
     </sidebar>
     <section id="quickbook.editors.scite">
@@ -2987,8 +3007,11 @@
       </para>
       <sidebar role="blurb">
       <para>
-        <inlinemediaobject><imageobject><imagedata fileref="images/tip.png"></imagedata></imageobject></inlinemediaobject>
-        SciTE can be downloaded from <ulink url="http://www.scintilla.org/SciTE.html">http://www.scintilla.org/SciTE.html>
+        <inlinemediaobject><imageobject><imagedata fileref="images/tip.png"></imagedata></imageobject>
+        <textobject>
+          <phrase>tip</phrase>
+        </textobject>
+        </inlinemediaobject> SciTE can be downloaded from <ulink url="http://www.scintilla.org/SciTE.html">http://www.scintilla.org/SciTE.html>
       </para>
       </sidebar>
       <para>
@@ -3009,8 +3032,11 @@
 <!--quickbook-escape-postfix--></programlisting>
       <sidebar role="blurb">
       <para>
-        <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject></inlinemediaobject>
-        Thanks to Rene Rivera for the above SciTE settings.
+        <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
+        <textobject>
+          <phrase>note</phrase>
+        </textobject>
+        </inlinemediaobject> Thanks to Rene Rivera for the above SciTE settings.
       </para>
       </sidebar>
     </section>
==============================================================================
--- branches/release/tools/quickbook/test/section_1_4.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="section_id_1_4" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Section Id 1.4</title>
-  <section id="section_id_1_4.id_test1">
-    <title><link linkend="section_id_1_4.id_test1">Quickbook section id test</link></title>
-  </section>
-  <section id="section_id_1_4.id_test2">
-    <title><link linkend="section_id_1_4.id_test2">Quickbook section id test</link></title>
-  </section>
-  <section id="section_id_1_4.quickbook_section_no_id_test_1">
-    <title><link linkend="section_id_1_4.quickbook_section_no_id_test_1">Quickbook
-    section no id test 1</link></title>
-  </section>
-  <section id="section_id_1_4.___quickbook_section_no_id_test_2">
-    <title><link linkend="section_id_1_4.___quickbook_section_no_id_test_2">++ Quickbook
-    section no id test 2</link></title>
-  </section>
-</article>
==============================================================================
--- branches/release/tools/quickbook/test/section_1_4.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,12 +0,0 @@
-[article Section Id 1.4
-    [quickbook 1.4]
-]
-
-[section:id_test1 Quickbook section id test]
-[endsect]
-[section :id_test2 Quickbook section id test]
-[endsect]
-[section: Quickbook section no id test 1]
-[endsect]
-[section:++ Quickbook section no id test 2]
-[endsect]
\ No newline at end of file
==============================================================================
--- branches/release/tools/quickbook/test/section_1_5-unclosed.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="unclosed_section" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Unclosed section</title>
-  <section id="unclosed_section.unclosed">
-    <title><link linkend="unclosed_section.unclosed">Unclosed Section should be closed
-    with a warning</link></title>
-  </section>
-</article>
==============================================================================
--- branches/release/tools/quickbook/test/section_1_5-unclosed.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,5 +0,0 @@
-[article Unclosed section
-[quickbook 1.5]
-]
-
-[section:unclosed Unclosed Section should be closed with a warning]
\ No newline at end of file
==============================================================================
--- branches/release/tools/quickbook/test/section_1_5.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="section_id_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Section Id 1.5</title>
-  <section id="section_id_1_5.id_test1">
-    <title><link linkend="section_id_1_5.id_test1">Quickbook section id test</link></title>
-  </section>
-  <section id="section_id_1_5.id_test2">
-    <title><link linkend="section_id_1_5.id_test2">Quickbook section id test</link></title>
-  </section>
-  <section id="section_id_1_5.id_test3">
-    <title><link linkend="section_id_1_5.id_test3">Quickbook section id test</link></title>
-  </section>
-  <section id="section_id_1_5.___quickbook_section_no_id_test">
-    <title><link linkend="section_id_1_5.___quickbook_section_no_id_test">++ Quickbook
-    section no id test</link></title>
-  </section>
-</article>
==============================================================================
--- branches/release/tools/quickbook/test/section_1_5.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,12 +0,0 @@
-[article Section Id 1.5
-    [quickbook 1.5]
-]
-
-[section:id_test1 Quickbook section id test]
-[endsect]
-[section :id_test2 Quickbook section id test]
-[endsect]
-[section:  id_test3 Quickbook section id test]
-[endsect]
-[section:++ Quickbook section no id test]
-[endsect]
\ No newline at end of file
==============================================================================
--- branches/release/tools/quickbook/test/simple_markup.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="simple_markup_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Simple Markup Test</title>
-  <section id="simple_markup_test.simple_markup">
-    <title><link linkend="simple_markup_test.simple_markup">Simple Markup</link></title>
-    <para>
-      <emphasis>italic</emphasis> <emphasis role="bold">bold</emphasis> <emphasis
-      role="underline">underline</emphasis> <literal>teletype</literal>
-    </para>
-    <para>
-      //not italic// **not bold** __not underline__ ==not teletype==
-    </para>
-    <para>
-      <emphasis role="underline">odd__ edge case</emphasis>
-    </para>
-    <para>
-      not__underlined__hopefully
-    </para>
-    <para>
-      (<emphasis role="bold">bold</emphasis>) <emphasis role="underline">und/er/lined</emphasis>
-    </para>
-    <para>
-      <emphasis>all/italic</emphasis> * not bold*
-    </para>
-    <para>
-      /not italic <ulink url="http://www.boost.org/"><emphasis role="bold">bold</emphasis></ulink>
-    </para>
-    <para>
-      not_underlined_
-    </para>
-    <para>
-      _Should not underline escaped markup_. _or this escaped_ markup form.
-    </para>
-    <para>
-      <literal>Matti Meik\u00E4l\u00E4inen</literal>
-    </para>
-    <para>
-      <literal>replaced</literal>
-    </para>
-    <para>
-      <emphasis role="underline">replaced</emphasis>
-    </para>
-    <para>
-      <literal>_mac\ ro_</literal>
-    </para>
-    <para>
-      <emphasis>italic\</emphasis>
-    </para>
-    <para>
-      These shouldn't be interepted as markup: == // **
-    </para>
-    <para>
-      <literal><</literal> <literal>\<</literal> <literal>\\<</literal>
-    </para>
-  </section>
-</article>
==============================================================================
--- branches/release/tools/quickbook/test/simple_markup.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,42 +0,0 @@
-[article Simple Markup Test
-[quickbook 1.5]
-]
-
-[def _macro_ replaced]
-
-[section Simple Markup]
-
-/italic/ *bold* _underline_ =teletype=
-
-//not italic// **not bold** __not underline__ ==not teletype==
-
-_odd__ edge case_
-
-not__underlined__hopefully
-
-(*bold*) _und/er/lined_
-
-/all/italic/ * not bold*
-
-/not italic [@http://www.boost.org/ *bold*]
-
-not_underlined_
-
-_Should not underline '''escaped''' markup_.
-_or this '''escaped_ markup''' form.
-
-=Matti  Meik\u00E4l\u00E4inen=
-
-=_macro_=
-
-__macro__
-
-=_mac\ ro_=
-
-/italic\/
-
-These shouldn't be interepted as markup: == // **
-
-=<= =\<= =\\<=
-
-[endsect]
==============================================================================
--- branches/release/tools/quickbook/test/snippets/Jamfile.v2	(original)
+++ branches/release/tools/quickbook/test/snippets/Jamfile.v2	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -12,4 +12,7 @@
 
 test-suite quickbook.test :
     [ quickbook-test pass_thru ]
+    [ quickbook-test unbalanced_snippet1-1_5 ]
+    [ quickbook-error-test unbalanced_snippet1-1_6-fail ]
+    [ quickbook-error-test unbalanced_snippet2-1_6-fail ]
     ;
==============================================================================
--- branches/release/tools/quickbook/test/snippets/pass_thru.gold	(original)
+++ branches/release/tools/quickbook/test/snippets/pass_thru.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -25,7 +25,6 @@
 <phrase role="special">{</phrase>
     <phrase role="identifier">Foo</phrase> <phrase role="identifier">x</phrase><phrase role="special">;</phrase>
 <phrase role="special">}</phrase>
-
 </programlisting>
   </para>
   <para>
==============================================================================
--- /trunk/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold	(original)
+++ branches/release/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -4,6 +4,7 @@
  xmlns:xi="http://www.w3.org/2001/XInclude">
   <title>Unbalanced snippet fail test 1</title>
   <para>
-<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase>
+</programlisting>
   </para>
 </article>
==============================================================================
--- branches/release/tools/quickbook/test/stub.c	(original)
+++ branches/release/tools/quickbook/test/stub.c	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -7,6 +7,12 @@
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 
+/*`
+This should appear when =stub.c= is included.
+
+[foo_c]
+*/
+
 /*[foo_c */
     /*`
     This is the C [*['foo]] function.
==============================================================================
--- branches/release/tools/quickbook/test/stub.cpp	(original)
+++ branches/release/tools/quickbook/test/stub.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -6,6 +6,9 @@
     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
+
+/*` This should appear when =stub.cpp= is included. */
+
 #include <string>
 
 //[ bar
==============================================================================
--- branches/release/tools/quickbook/test/stub.py	(original)
+++ branches/release/tools/quickbook/test/stub.py	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -4,6 +4,8 @@
 # License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 # http://www.boost.org/LICENSE_1_0.txt)
 
+#` This should appear when =stub.py= is included.
+
 #[foo_py
 """`
     This is the Python [*['foo]] function.
==============================================================================
--- /trunk/tools/quickbook/test/svg-1_1.gold	(original)
+++ branches/release/tools/quickbook/test/svg-1_1.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -4,8 +4,15 @@
   <title>SVG test</title>
   <para>
     <inlinemediaobject><imageobject><imagedata contentdepth="513.25690" contentwidth="745.60706"
-    fileref="images/open_clipart_library_logo.svg" format="SVG"></imagedata></imageobject></inlinemediaobject>
-    <inlinemediaobject><imageobject><imagedata fileref="images/missing_image.svg"
-    format="SVG"></imagedata></imageobject></inlinemediaobject>
+    fileref="images/open_clipart_library_logo.svg" format="SVG"></imagedata></imageobject>
+    <textobject>
+      <phrase>open_clipart_library_logo</phrase>
+    </textobject>
+    </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="images/missing_image.svg"
+    format="SVG"></imagedata></imageobject>
+    <textobject>
+      <phrase>missing_image</phrase>
+    </textobject>
+    </inlinemediaobject>
   </para>
 </article>
==============================================================================
--- branches/release/tools/quickbook/test/table_1_3.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,350 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="table_1_3" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Table 1.3</title>
-  <table frame="all" id="table_1_3.t0">
-    <title>Table 2</title>
-    <tgroup cols="1">
-      <thead>
-        <row>
-          <entry>
-            <para>
-              Heading
-            </para>
-          </entry>
-        </row>
-      </thead>
-      <tbody>
-        <row>
-          <entry>
-            <para>
-              cell
-            </para>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </table>
-  <informaltable frame="all">
-    <tgroup cols="1">
-      <thead>
-        <row>
-          <entry>
-            <para>
-              Heading
-            </para>
-          </entry>
-        </row>
-      </thead>
-      <tbody>
-        <row>
-          <entry>
-            <para>
-              cell
-            </para>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </informaltable>
-  <table frame="all" id="table_1_3.t1">
-    <title>Title</title>
-    <tgroup cols="1">
-      <thead>
-        <row>
-          <entry>
-            <para>
-              Heading
-            </para>
-          </entry>
-        </row>
-      </thead>
-      <tbody>
-        <row>
-          <entry>
-            <para>
-              cell
-            </para>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </table>
-  <table frame="all" id="table_1_3.t2">
-    <title>Title</title>
-    <tgroup cols="1">
-      <thead>
-        <row>
-          <entry>
-            <para>
-              Heading
-            </para>
-          </entry>
-        </row>
-      </thead>
-      <tbody>
-        <row>
-          <entry>
-            <para>
-              cell
-            </para>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </table>
-  <table frame="all" id="table_1_3.t3">
-    <title>Title [/ ] containing a comment</title>
-    <tgroup cols="1">
-      <thead>
-        <row>
-          <entry>
-            <para>
-              Heading
-            </para>
-          </entry>
-        </row>
-      </thead>
-      <tbody>
-        <row>
-          <entry>
-            <para>
-              cell
-            </para>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </table>
-  <table frame="all" id="table_1_3.t4">
-    <title>Title</title>
-    <tgroup cols="1">
-      <thead>
-        <row>
-          <entry>
-            <para>
-              Heading
-            </para>
-          </entry>
-        </row>
-      </thead>
-      <tbody>
-        <row>
-          <entry>
-            <para>
-              cell
-            </para>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </table>
-  <table frame="all" id="table_1_3.t5">
-    <title>[[Title]]</title>
-    <tgroup cols="1">
-      <thead>
-        <row>
-          <entry>
-            <para>
-              Heading
-            </para>
-          </entry>
-        </row>
-      </thead>
-      <tbody>
-        <row>
-          <entry>
-            <para>
-              cell
-            </para>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </table>
-  <section id="table_1_3.section1">
-    <title><link linkend="table_1_3.section1">Section 1</link></title>
-    <table frame="all" id="table_1_3.section1.t0">
-      <title>A & B</title>
-      <tgroup cols="2">
-        <thead>
-          <row>
-            <entry>
-              <para>
-                A
-              </para>
-            </entry>
-            <entry>
-              <para>
-                B
-              </para>
-            </entry>
-          </row>
-        </thead>
-        <tbody>
-          <row>
-            <entry>
-              <para>
-                a
-              </para>
-            </entry>
-            <entry>
-              <para>
-                b
-              </para>
-            </entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-    <table frame="all" id="table_1_3.section1.t1">
-      <title>Empty Table</title>
-      <tgroup cols="0">
-        <tbody>
-        </tbody>
-      </tgroup>
-    </table>
-    <table frame="all" id="table_1_3.section1.t2">
-      <title>Table with an empty cell</title>
-      <tgroup cols="1">
-        <tbody>
-          <row>
-            <entry>
-              <para>
-                x
-              </para>
-            </entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-    <table frame="all" id="table_1_3.section1.t3">
-      <title>Indentation</title>
-      <tgroup cols="2">
-        <thead>
-          <row>
-            <entry>
-              <para>
-                Header 1. Paragraph 1
-              </para>
-              <para>
-                Header 1. Paragraph 2
-              </para>
-            </entry>
-            <entry>
-              <para>
-                Header 2
-              </para>
-            </entry>
-          </row>
-        </thead>
-        <tbody>
-          <row>
-            <entry>
-              <para>
-                Row 1. Cell 1.
-              </para>
-            </entry>
-            <entry>
-              <para>
-                Row 1. Cell 2.
-              </para>
-              <para>
-                Row 1. Cell 2. Paragraph 2.
-              </para>
-            </entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-    <table frame="all" id="table_1_3.section1.t4">
-      <title>Nested Tables</title>
-      <tgroup cols="1">
-        <thead>
-          <row>
-            <entry>
-              <para>
-                Header 1
-              </para>
-            </entry>
-            <entry>
-              <para>
-                Header 2
-              </para>
-            </entry>
-          </row>
-        </thead>
-        <tbody>
-          <row>
-            <entry>
-              <table frame="all" id="table_1_3.section1.t5">
-                <title>Inner Table</title>
-                <tgroup cols="2">
-                  <thead>
-                    <row>
-                      <entry>
-                        <para>
-                          1.1
-                        </para>
-                      </entry>
-                      <entry>
-                        <para>
-                          1.2
-                        </para>
-                      </entry>
-                    </row>
-                  </thead>
-                  <tbody>
-                    <row>
-                      <entry>
-                        <para>
-                          2.1
-                        </para>
-                      </entry>
-                      <entry>
-                        <para>
-                          2.2
-                        </para>
-                      </entry>
-                    </row>
-                  </tbody>
-                </tgroup>
-              </table>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                Something.
-              </para>
-            </entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-    <anchor id="id1"/>
-    <table frame="all" id="table_1_3.section1.t6">
-      <title>Table with anchors</title>
-      <tgroup cols="1">
-        <thead>
-          <row>
-            <entry>
-              <para>
-                <anchor id="id2"/>a<anchor id="id3"/>
-              </para>
-            </entry>
-          </row>
-        </thead>
-        <tbody>
-          <row>
-            <entry>
-              <para>
-                b
-              </para>
-            </entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-  </section>
-</article>
==============================================================================
--- branches/release/tools/quickbook/test/table_1_3.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,113 +0,0 @@
-[article Table 1.3
-    [quickbook 1.3]
-    [id table_1_3]
-]
-
-[table Table 2
-    [[Heading]]
-    [[cell]]
-]
-
-[table
-    [[Heading]]
-    [[cell]]
-]
-
-[table [/ Comment?] Title
-    [[Heading]]
-    [[cell]]
-]
-
-[table [/ Multi line
-comment] Title
-    [[Heading]]
-    [[cell]]
-]
-
-[table Title [/  ] containing a comment
-    [[Heading]]
-    [[cell]]
-]
-
-[/ These two might be considered to be a bug. ]
-
-[table [/ Multi line
-comment]
-    Title
-    [[Heading]]
-    [[cell]]
-]
-
-[table [/ Multi line
-comment]
-    [[Title]]
-    [[Heading]]
-    [[cell]]
-]
-
-[section:section1 Section 1]
-
-[table A & B
-    [[A][B]]
-    [[a][b]]
-]
-
-[table Empty Table
-]
-
-[table Table with an empty cell
-[[x]]]
-
-[table Indentation
-  [
-    [
-      Header 1. Paragraph 1
-      
-      Header 1. Paragraph 2
-    ]
-    [
-      Header 2
-    ]
-  ]
-  [
-    [
-      Row 1. Cell 1.
-    ]
-    [
-      Row 1. Cell 2.
-      
-      Row 1. Cell 2. Paragraph 2.
-    ]
-  ]
-]
-
-[table Nested Tables
-  [
-    [
-      Header 1
-    ]
-    [
-      Header 2
-    ]
-  ]
-  [
-    [
-      [table Inner Table
-        [[1.1][1.2]]
-        [[2.1][2.2]]
-      ]
-    ]
-  ]
-  [
-    [
-      Something.
-    ]
-  ]
-]
-
-[#id1]
-[table Table with anchors
-[[[#id2]a[#id3]]][[b]]
-]
-
-[endsect]
==============================================================================
--- branches/release/tools/quickbook/test/table_1_5.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,441 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="table_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Table 1.5</title>
-  <table frame="all" id="table_1_5.table1">
-    <title>Table 1</title>
-    <tgroup cols="1">
-      <thead>
-        <row>
-          <entry>
-            <para>
-              Heading
-            </para>
-          </entry>
-        </row>
-      </thead>
-      <tbody>
-        <row>
-          <entry>
-            <para>
-              cell
-            </para>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </table>
-  <table frame="all" id="table_1_5.table_2">
-    <title>Table 2</title>
-    <tgroup cols="1">
-      <thead>
-        <row>
-          <entry>
-            <para>
-              Heading
-            </para>
-          </entry>
-        </row>
-      </thead>
-      <tbody>
-        <row>
-          <entry>
-            <para>
-              cell
-            </para>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </table>
-  <informaltable frame="all">
-    <tgroup cols="1">
-      <thead>
-        <row>
-          <entry>
-            <para>
-              Heading
-            </para>
-          </entry>
-        </row>
-      </thead>
-      <tbody>
-        <row>
-          <entry>
-            <para>
-              cell
-            </para>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </informaltable>
-  <informaltable frame="all" id="table_1_5.table4">
-    <tgroup cols="1">
-      <thead>
-        <row>
-          <entry>
-            <para>
-              Heading
-            </para>
-          </entry>
-        </row>
-      </thead>
-      <tbody>
-        <row>
-          <entry>
-            <para>
-              cell
-            </para>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </informaltable>
-  <table frame="all" id="table_1_5._table5_">
-    <title>-table5-</title>
-    <tgroup cols="1">
-      <thead>
-        <row>
-          <entry>
-            <para>
-              Heading
-            </para>
-          </entry>
-        </row>
-      </thead>
-      <tbody>
-        <row>
-          <entry>
-            <para>
-              cell
-            </para>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </table>
-  <table frame="all" id="table_1_5.title">
-    <title>Title</title>
-    <tgroup cols="1">
-      <thead>
-        <row>
-          <entry>
-            <para>
-              Heading
-            </para>
-          </entry>
-        </row>
-      </thead>
-      <tbody>
-        <row>
-          <entry>
-            <para>
-              cell
-            </para>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </table>
-  <table frame="all" id="table_1_5.title0">
-    <title>Title</title>
-    <tgroup cols="1">
-      <thead>
-        <row>
-          <entry>
-            <para>
-              Heading
-            </para>
-          </entry>
-        </row>
-      </thead>
-      <tbody>
-        <row>
-          <entry>
-            <para>
-              cell
-            </para>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </table>
-  <table frame="all" id="table_1_5.title_______containing_a_comment">
-    <title>Title [/ ] containing a comment</title>
-    <tgroup cols="1">
-      <thead>
-        <row>
-          <entry>
-            <para>
-              Heading
-            </para>
-          </entry>
-        </row>
-      </thead>
-      <tbody>
-        <row>
-          <entry>
-            <para>
-              cell
-            </para>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </table>
-  <table frame="all" id="table_1_5.title1">
-    <title>Title</title>
-    <tgroup cols="1">
-      <thead>
-        <row>
-          <entry>
-            <para>
-              Heading
-            </para>
-          </entry>
-        </row>
-      </thead>
-      <tbody>
-        <row>
-          <entry>
-            <para>
-              cell
-            </para>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </table>
-  <table frame="all" id="table_1_5.__title__">
-    <title>[[Title]]</title>
-    <tgroup cols="1">
-      <thead>
-        <row>
-          <entry>
-            <para>
-              Heading
-            </para>
-          </entry>
-        </row>
-      </thead>
-      <tbody>
-        <row>
-          <entry>
-            <para>
-              cell
-            </para>
-          </entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </table>
-  <section id="table_1_5.section1">
-    <title><link linkend="table_1_5.section1">Section 1</link></title>
-    <table frame="all" id="table_1_5.section1.table1">
-      <title>Table 1</title>
-      <tgroup cols="1">
-        <thead>
-          <row>
-            <entry>
-              <para>
-                Heading
-              </para>
-            </entry>
-          </row>
-        </thead>
-        <tbody>
-          <row>
-            <entry>
-              <para>
-                cell
-              </para>
-            </entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-    <table frame="all" id="table_1_5.section1.a___b">
-      <title>A & B</title>
-      <tgroup cols="2">
-        <thead>
-          <row>
-            <entry>
-              <para>
-                A
-              </para>
-            </entry>
-            <entry>
-              <para>
-                B
-              </para>
-            </entry>
-          </row>
-        </thead>
-        <tbody>
-          <row>
-            <entry>
-              <para>
-                a
-              </para>
-            </entry>
-            <entry>
-              <para>
-                b
-              </para>
-            </entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-    <table frame="all" id="table_1_5.section1.empty_table">
-      <title>Empty Table</title>
-      <tgroup cols="0">
-        <tbody>
-        </tbody>
-      </tgroup>
-    </table>
-    <table frame="all" id="table_1_5.section1.table_with_an_empty_cell">
-      <title>Table with an empty cell</title>
-      <tgroup cols="1">
-        <tbody>
-          <row>
-            <entry>
-              <para>
-                x
-              </para>
-            </entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-    <table frame="all" id="table_1_5.section1.indentation">
-      <title>Indentation</title>
-      <tgroup cols="2">
-        <thead>
-          <row>
-            <entry>
-              <para>
-                Header 1. Paragraph 1
-              </para>
-              <para>
-                Header 1. Paragraph 2
-              </para>
-            </entry>
-            <entry>
-              <para>
-                Header 2
-              </para>
-            </entry>
-          </row>
-        </thead>
-        <tbody>
-          <row>
-            <entry>
-              <para>
-                Row 1. Cell 1.
-              </para>
-            </entry>
-            <entry>
-              <para>
-                Row 1. Cell 2.
-              </para>
-              <para>
-                Row 1. Cell 2. Paragraph 2.
-              </para>
-            </entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-    <table frame="all" id="table_1_5.section1.nested_tables">
-      <title>Nested Tables</title>
-      <tgroup cols="1">
-        <thead>
-          <row>
-            <entry>
-              <para>
-                Header 1
-              </para>
-            </entry>
-            <entry>
-              <para>
-                Header 2
-              </para>
-            </entry>
-          </row>
-        </thead>
-        <tbody>
-          <row>
-            <entry>
-              <table frame="all" id="table_1_5.section1.inner_table">
-                <title>Inner Table</title>
-                <tgroup cols="2">
-                  <thead>
-                    <row>
-                      <entry>
-                        <para>
-                          1.1
-                        </para>
-                      </entry>
-                      <entry>
-                        <para>
-                          1.2
-                        </para>
-                      </entry>
-                    </row>
-                  </thead>
-                  <tbody>
-                    <row>
-                      <entry>
-                        <para>
-                          2.1
-                        </para>
-                      </entry>
-                      <entry>
-                        <para>
-                          2.2
-                        </para>
-                      </entry>
-                    </row>
-                  </tbody>
-                </tgroup>
-              </table>
-            </entry>
-          </row>
-          <row>
-            <entry>
-              <para>
-                Something.
-              </para>
-            </entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-    <anchor id="id1"/>
-    <table frame="all" id="table_1_5.section1.table_with_anchors">
-      <title>Table with anchors</title>
-      <tgroup cols="1">
-        <thead>
-          <row>
-            <entry>
-              <para>
-                <anchor id="id2"/>a<anchor id="id3"/>
-              </para>
-            </entry>
-          </row>
-        </thead>
-        <tbody>
-          <row>
-            <entry>
-              <para>
-                b
-              </para>
-            </entry>
-          </row>
-        </tbody>
-      </tgroup>
-    </table>
-  </section>
-</article>
==============================================================================
--- branches/release/tools/quickbook/test/table_1_5.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,133 +0,0 @@
-[article Table 1.5
-    [quickbook 1.5]
-    [id table_1_5]
-]
-
-[table:table1 Table 1
-    [[Heading]]
-    [[cell]]
-]
-
-[table Table 2
-    [[Heading]]
-    [[cell]]
-]
-
-[table
-    [[Heading]]
-    [[cell]]
-]
-
-[table:table4
-    [[Heading]]
-    [[cell]]
-]
-
-[table:-table5-
-    [[Heading]]
-    [[cell]]
-]
-
-[table [/ Comment?] Title
-    [[Heading]]
-    [[cell]]
-]
-
-[table [/ Multi line
-comment] Title
-    [[Heading]]
-    [[cell]]
-]
-
-[table Title [/  ] containing a comment
-    [[Heading]]
-    [[cell]]
-]
-
-[/ These two might be considered to be a bug. ]
-
-[table [/ Multi line
-comment]
-    Title
-    [[Heading]]
-    [[cell]]
-]
-
-[table [/ Multi line
-comment]
-    [[Title]]
-    [[Heading]]
-    [[cell]]
-]
-
-[section:section1 Section 1]
-
-[table:table1 Table 1
-    [[Heading]]
-    [[cell]]
-]
-
-[table A & B
-    [[A][B]]
-    [[a][b]]
-]
-
-[table Empty Table
-]
-
-[table Table with an empty cell
-[[x]]]
-
-[table Indentation
-  [
-    [
-      Header 1. Paragraph 1
-      
-      Header 1. Paragraph 2
-    ]
-    [
-      Header 2
-    ]
-  ]
-  [
-    [
-      Row 1. Cell 1.
-    ]
-    [
-      Row 1. Cell 2.
-      
-      Row 1. Cell 2. Paragraph 2.
-    ]
-  ]
-]
-
-[table Nested Tables
-  [
-    [
-      Header 1
-    ]
-    [
-      Header 2
-    ]
-  ]
-  [
-    [
-      [table Inner Table
-        [[1.1][1.2]]
-        [[2.1][2.2]]
-      ]
-    ]
-  ]
-  [
-    [
-      Something.
-    ]
-  ]
-]
-
-[#id1]
-[table Table with anchors
-[[[#id2]a[#id3]]][[b]]
-]
-
-[endsect]
==============================================================================
--- branches/release/tools/quickbook/test/template-section.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="section_in_a_template" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Section in a template</title>
-  <para>
-    Some text before the section.
-  </para>
-  <section id="section_in_a_template.test">
-    <title><link linkend="section_in_a_template.test">Test</link></title>
-    <para>
-      Hello.
-    </para>
-    <bridgehead renderas="sect3" id="section_in_a_template.test.h0">
-      <phrase id="section_in_a_template.test.just_to_test_id_generation"/><link linkend="section_in_a_template.test.just_to_test_id_generation">Just
-      to test id generation</link>
-    </bridgehead>
-    <para>
-      Goodbye.
-    </para>
-  </section>
-</article>
==============================================================================
--- branches/release/tools/quickbook/test/template-section.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,20 +0,0 @@
-[article Section in a template
-    [quickbook 1.5]
-]
-
-[template nestedsection[]
-
-Some text before the section.
-
-[section Test]
-
-Hello.
-
-[heading Just to test id generation]
-
-Goodbye.
-
-[endsect]
-]
-
-[nestedsection]
\ No newline at end of file
==============================================================================
--- /trunk/tools/quickbook/test/templates-1_5.gold	(original)
+++ branches/release/tools/quickbook/test/templates-1_5.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -36,4 +36,7 @@
   <para>
     Some *text* A <emphasis>paragraph</emphasis>.
   </para>
+  <para>
+    <index type="things"><title>Things</title></index>
+  </para>
 </article>
==============================================================================
--- /trunk/tools/quickbook/test/templates-1_5.quickbook	(original)
+++ branches/release/tools/quickbook/test/templates-1_5.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -62,3 +62,11 @@
 [block]
 [`phrase]
 [`block]
+
+[/ Trailing newline shouldn't be included]
+
+[template named_index[type title]
+'''<index type="'''[type]'''"><title>'''[title]'''</title></index>'''
+]
+
+[named_index things Things]
\ No newline at end of file
==============================================================================
--- branches/release/tools/quickbook/test/templates.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,193 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="templates" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Templates</title>
-  <section id="templates.templates">
-    <title><link linkend="templates.templates">Templates</link></title>
-    <para>
-      nullary_arg
-    </para>
-    <para>
-      foo baz
-    </para>
-    <para>
-      foo baz
-    </para>
-    <para>
-      This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
-      kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
-    </para>
-    <para>
-      <hey>baz</hey>
-    </para>
-    <para>
-      This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar
-      madagascar madagascar madagascar madagascar.... blah blah blah......
-    </para>
-    <para>
-      zoom peanut zoom
-    </para>
-    <para>
-      exactly xanadu
-    </para>
-    <para>
-      wx
-    </para>
-    <para>
-      wxyz wxyz trail
-    </para>
-<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
-<phrase role="special">{</phrase>
-    <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special"><<</phrase> "Hello, World" <phrase role="special"><<</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
-    <para>
-      x<superscript>2</superscript>
-    </para>
-    <para>
-      α<superscript>2</superscript>
-    </para>
-    <para>
-      x<superscript>2</superscript>
-    </para>
-    <para>
-      got a banana?
-    </para>
-    <para>
-      .0 00
-    </para>
-    <para>
-      [fool]
-    </para>
-  </section>
-  <section id="templates.empty_templates">
-    <title><link linkend="templates.empty_templates">Empty Templates</link></title>
-  </section>
-  <section id="templates.nested_templates">
-    <title><link linkend="templates.nested_templates">Nested Templates</link></title>
-    <para>
-      Pre
-    </para>
-    <para>
-      Start block template.
-    </para>
-    <para>
-      Start block template.
-    </para>
-    <para>
-      Hello!
-    </para>
-    <para>
-      End block template.
-    </para>
-    <para>
-      End block template.
-    </para>
-    <para>
-      Post
-    </para>
-    <para>
-      Pre
-    </para>
-    <para>
-      Start block template.
-    </para>
-    <para>
-      Start phrase template. Hello! End phrase template.
-    </para>
-    <para>
-      End block template.
-    </para>
-    <para>
-      Post
-    </para>
-    <para>
-      Pre
-    </para>
-    <para>
-      Start phrase template.
-    </para>
-    <para>
-      Start block template.
-    </para>
-    <para>
-      Hello!
-    </para>
-    <para>
-      End block template.
-    </para>
-    <para>
-      End phrase template.
-    </para>
-    <para>
-      Post
-    </para>
-    <para>
-      Pre Start phrase template. Start phrase template. Hello! End phrase template.
-      End phrase template. Post
-    </para>
-  </section>
-  <section id="templates.block_markup">
-    <title><link linkend="templates.block_markup">Block Markup</link></title>
-    <itemizedlist>
-      <listitem>
-        <simpara>
-          a
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          b
-        </simpara>
-      </listitem>
-    </itemizedlist>
-    <para/>
-<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase>
-</programlisting>
-    <para>
-      Paragraphs 1
-    </para>
-    <para>
-      Paragraphs 2
-    </para>
-    <itemizedlist>
-      <listitem>
-        <simpara>
-          <itemizedlist>
-            <listitem>
-              <simpara>
-                a
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-                b
-              </simpara>
-            </listitem>
-          </itemizedlist>
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          <para/>
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase>
-</programlisting>
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          <para>
-            Paragraphs 1
-          </para>
-          <para>
-            Paragraphs 2
-          </para>
-        </simpara>
-      </listitem>
-    </itemizedlist>
-  </section>
-</article>
==============================================================================
--- branches/release/tools/quickbook/test/templates.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,200 +0,0 @@
-[article Templates
-    [quickbook 1.3]
-]
-
-[section Templates]
-
-[/-------------------------------- nullary arg ]
-
-[template foo0 nullary_arg]
-
-[foo0]
-
-[/-------------------------------- unary arg, phrase syle ]
-
-[template foo1[bar] foo [bar]]
-
-[foo1 baz]
-
-[/-------------------------------- unary arg, block syle ]
-
-[template foo2[bar]
-foo [bar]
-]
-
-[foo2 baz]
-
-[template foo3[bar]
-This is a complete paragraph. [bar] [bar] [bar] [bar] [bar]
-[bar] [bar] [bar] [bar].... blah blah blah......
-]
-
-[foo3 kalamazoo]
-
-[/-------------------------------- unary arg, using punctuation ]
-
-[template ![bar] '''<hey>'''[bar]'''</hey>''']
-
-[!baz]
-
-[/-------------------------------- recursive templates ]
-
-[template foo4[bar]
-[foo3 [bar]]
-]
-
-[foo3 madagascar]
-
-[template foo5[x] zoom [x]]
-[template foo6[x] [x] zoom]
-
-[foo6[foo5 peanut]]
-
-[template kinda_weird[x y] [x] [y]]
-
-[kinda_weird exactly..xanadu]
-
-
-[/-------------------------------- space delimitted args ]
-
-[template simple1[a b] [a][b]]
-
-[simple1 w x]
-
-[template simple2[a b c d] [a][b][c][d]]
-
-[simple2 w x y z][simple2 w x y z trail]
-
-[/-------------------------------- John's templates ]
-
-[template code[x]
-    int main()
-    {
-        std::cout << ``[x]`` << std::endl;
-    }
-]
-
-[code "Hello\, World"]
-
-[template alpha '''α''']
-[template pow[a b] [a]'''<superscript>'''[b]'''</superscript>''' ]
-[template super[text]'''<superscript>'''[text]'''</superscript>''' ]
-
-[pow x 2]
-
-[pow [alpha] 2]
-
-x[super 2]
-
-[/-------------------------------- Some more ]
-
-[template banana got a banana?]
-[template plantation[bananarama] [bananarama]]
-
-[plantation [banana]]
-
-[/-------------------------------- Not a bug (there was a syntax error here) ]
-
-[template join1[a b] [b][a]]
-[template join2[a b] [a][b]]
-[template test[x] [join1 [join2 0 [x]]...0]]
-[test 0]
-
-[/-------------------------------- Mismatched template ]
-
-[template foo 1]
-[fool]
-
-[template blah 10]
-
-[endsect]
-
-[section Empty Templates]
-
-[template empty1]
-[template empty2 ]
-[template empty3 [/comment]]
-[template empty4 [/comment]
-
-]
-[template empty5
-]
-[template empty6
-
-]
-[template empty7
-[/comment]
-]
-[template empty8
-
-[/comment]
-]
-[template empty_arg1[x]]
-[template empty_arg2[x y]]
-
-[empty1]
-[empty2]
-[empty3]
-[empty4]
-[empty5]
-[empty6]
-[empty7]
-[empty8]
-[empty_arg1 1]
-[empty_arg2 1 2]
-
-[endsect]
-
-[/----------------------------------- Nested templates ]
-
-[section Nested Templates]
-
-[template block[content]
-
-Start block template.
-
-[content]
-
-End block template.
-]
-
-[template phrase[content] Start phrase template. [content] End phrase template.]
-
-Pre [block [block Hello!]] Post
-
-Pre [block [phrase Hello!]] Post
-
-Pre [phrase [block Hello!]] Post
-
-Pre [phrase [phrase Hello!]] Post
-
-[endsect]
-
-[/----------------------------------- Block Markup ]
-
-[section Block Markup]
-
-[template list
-* a
-* b]
-
-[template horizontal
-----]
-
-[template codeblock
-    int main() {}]
-
-[template paragraphs
-Paragraphs 1
-
-Paragraphs 2
-]
-
-[list][horizontal][codeblock][paragraphs]
-
-* [list]
-* [horizontal]
-* [codeblock]
-* [paragraphs]
-
-[endsect]
==============================================================================
--- branches/release/tools/quickbook/test/templates_1_4.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="template_1_4" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Template 1.4</title>
-  <para>
-    dynamic scoping
-  </para>
-  <para>
-    old
-  </para>
-  <para>
-    {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {[1-2} {1..2-3} {1..2-3}
-  </para>
-  <para>
-    {[binary 1 2-3} 4]
-  </para>
-  <para>
-    {1-2-3} {1-2-3} {1-2-3 4} {1 2-3-4} {[1-2-3}
-  </para>
-</article>
==============================================================================
--- branches/release/tools/quickbook/test/templates_1_4.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,37 +0,0 @@
-[article Template 1.4
-    [quickbook 1.4]
-]
-
-[/ 1.4 uses dynamic scoping ]
-
-[template x static scoping]
-[template foo1[] [x]]
-[template foo2[x] [foo1]]
-[foo2 dynamic scoping]
-
-[/ In 1.4 template arguments are scoped at the point they are used]
-
-[template y new]
-[template foo3[a y] [a]]
-[foo3 [y] old]
-
-[/ 1.4 template arguments]
-
-[template binary[x y] {[x]-[y]}]
-[binary 1..2]     [/ {1-2} ]
-[binary 1 2]      [/ {1-2} ]
-[binary 1..2 3 4] [/ {1-2 3 4} ]
-[binary 1 2..3 4] [/ {1 2-3 4} ]
-[binary 1 2 3..4] [/ {1 2 3-4} ]
-[binary [1..2]    [/ {(1-2} but with a square bracket ]
-[binary 1.\.2..3] [/ {1..2-3} ]
-[binary 1.\.2 3]  [/ {1..2-3} ]
-
-[binary [binary 1 2..3] 4] [/ {[binary 1 2-3} 4] ]
-
-[template ternary[x y z] {[x]-[y]-[z]}]
-[ternary 1..2..3]  [/ {1-2-3} ]
-[ternary 1 2 3]    [/ {1-2-3} ]
-[ternary 1..2 3 4] [/ {1-2-3 4} ]
-[ternary 1 2..3 4] [/ {1 2-3-4} ]
-[ternary [1..2..3] [/ {(1-2-3} (but with a square bracket) ]
\ No newline at end of file
==============================================================================
--- branches/release/tools/quickbook/test/templates_1_5.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="template_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Template 1.5</title>
-  <para>
-    static scoping
-  </para>
-  <para>
-    new
-  </para>
-  <para>
-    foo foo
-  </para>
-  <para>
-    {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
-  </para>
-  <para>
-    { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
-  </para>
-  <para>
-    {[1-2] 3} {[1-2] 3} {[1-2}
-  </para>
-  <para>
-    {1-2-3} {1-2-3}
-  </para>
-</article>
==============================================================================
--- branches/release/tools/quickbook/test/templates_1_5.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,46 +0,0 @@
-[article Template 1.5
-    [quickbook 1.5]
-]
-
-[/ 1.5 uses static scoping ]
-
-[template x static scoping]
-[template foo1[] [x]]
-[template foo2[x] [foo1]]
-[foo2 dynamic scoping]
-
-[/ In 1.5 template arguments are scoped at the point they are defined]
-
-[template y new]
-[template foo3[a y] [a]]
-[foo3 [y] old]
-
-[/ From https://svn.boost.org/trac/boost/ticket/2034 ]
-
-[template same[x] [x]]
-[template echo[a b] [a] [b]]
-[template echo_twice[x] [echo [same [x]]..[same [x]]]]
-[echo_twice foo]
-
-[/ 1.5 template arguments]
-
-[template binary[x y] {[x]-[y]}]
-[binary 1..2]     [/ {1-2} ]
-[binary 1 2]      [/ {1-2} ]
-[binary 1..2 3 4] [/ {1-2 3 4} ]
-[binary 1 2..3 4] [/ {1 2-3 4} ]
-[binary 1 2 3..4] [/ {1 2 3-4} ]
-[binary 1.\.2..3] [/ {1..2-3} ]
-[binary 1.\.2 3]  [/ {1..2-3} ]
-
-[binary [binary 1 2..3]..4] [/ { {1 2-3}-4} ]
-[binary [binary 1 2..3] 4] [/ { {1 2-3}-4} ]
-[binary [binary 1 2 3]..4] [/ { {1-2 3}-4} ]
-
-[binary \[1 2\] 3] [/ {[1-2] 3} ]
-[binary \[1..2\] 3] [/ {[1-2] 3} ]
-[binary \[1 2] [/ {(1-2} ]
-
-[template ternary[x y z] {[x]-[y]-[z]}]
-[ternary 1..2..3]  [/ {1-2-3} ]
-[ternary 1 2 3]    [/ {1-2-3} ]
==============================================================================
--- branches/release/tools/quickbook/test/unicode-escape.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,156 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="utf_8_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>UTF-8 test</title>
-  <bridgehead renderas="sect2" id="utf_8_test.h0">
-    <phrase id="utf_8_test.i__xf1_t__xeb_rn__xe2_ti__xf4_n__xe0_liz__xe6_ti__xf8_n"/><link
-    linkend="utf_8_test.i__xf1_t__xeb_rn__xe2_ti__xf4_n__xe0_liz__xe6_ti__xf8_n">Iñtërnâtiônàlizætiøn</link>
-  </bridgehead>
-  <itemizedlist>
-    <listitem>
-      <simpara>
-        Αα Alpha
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Ββ Beta
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Γγ Gamma
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Δδ Delta
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Εε Epsilon
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Ζζ Zeta
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Ηη Eta
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Θθ Theta
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Ιι Iota
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Κκ Kappa
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Λλ Lambda
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Μμ Mu
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Νν Nu
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Ξξ Xi
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Οο Omicron
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Ππ Pi
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Ρρ Rho
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Σσς Sigma
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Ττ Tau
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Υυ Upsilon
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Φφ Phi
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Χχ Chi
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Ψψ Psi
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Ωω Omega
-      </simpara>
-    </listitem>
-  </itemizedlist>
-  <para>
-    In the unlikely event that you've got a Mahjong font:
-  </para>
-  <itemizedlist>
-    <listitem>
-      <simpara>
-        🀀 East Wind
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        🀁 South Wind
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        🀂 West Wind
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        🀃 North Wind
-      </simpara>
-    </listitem>
-  </itemizedlist>
-</article>
==============================================================================
--- branches/release/tools/quickbook/test/unicode-escape.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,37 +0,0 @@
-[article UTF-8 test
-    [quickbook 1.5]
-]
-
-[heading I\u00F1t\u00EBrn\u00E2ti\u00F4n\u00E0liz\u00E6ti\u00F8n]
-
-* \u0391\u03B1 Alpha
-* \u0392\u03B2 Beta
-* \u0393\u03B3 Gamma
-* \u0394\u03B4 Delta
-* \u0395\u03B5 Epsilon
-* \u0396\u03B6 Zeta
-* \u0397\u03B7 Eta
-* \u0398\u03B8 Theta
-* \u0399\u03B9 Iota
-* \u039A\u03BA Kappa
-* \u039B\u03BB Lambda
-* \u039C\u03BC Mu
-* \u039D\u03BD Nu
-* \u039E\u03BE Xi
-* \u039F\u03BF Omicron
-* \u03A0\u03C0 Pi
-* \u03A1\u03C1 Rho
-* \u03A3\u03C3\u03C2 Sigma
-* \u03A4\u03C4 Tau
-* \u03A5\u03C5 Upsilon
-* \u03A6\u03C6 Phi
-* \u03A7\u03C7 Chi
-* \u03A8\u03C8 Psi
-* \u03A9\u03C9 Omega
-
-In the unlikely event that you've got a Mahjong font:
-
-* \U0001F000 East Wind
-* \U0001F001 South Wind
-* \U0001F002 West Wind
-* \U0001F003 North Wind
\ No newline at end of file
==============================================================================
--- branches/release/tools/quickbook/test/unit/Jamfile.v2	(original)
+++ branches/release/tools/quickbook/test/unit/Jamfile.v2	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -9,9 +9,15 @@
 import testing ;
 
 project quickbook-unit-tests
-    : requirements <include>../../src <warnings>all
+    : requirements
+        <include>../../src
+        <warnings>all
+        <library>/boost//filesystem
     ;
 
-run values_test.cpp ../../src/values.cpp ;
-run post_process_test.cpp ../../src/post_process.cpp ../../src/id_generator.cpp ;
-run iterator_tests.cpp ../../src/values.cpp ;
+run values_test.cpp ../../src/values.cpp ../../src/files.cpp ../../src/string_ref.cpp ;
+run post_process_test.cpp ../../src/post_process.cpp ;
+
+# Copied from spirit
+run symbols_tests.cpp ;
+run symbols_find_null.cpp ;
\ No newline at end of file
==============================================================================
--- branches/release/tools/quickbook/test/unit/iterator_tests.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,71 +0,0 @@
-/*=============================================================================
-    Copyright (c) 2011 Daniel James
-
-    Use, modification and distribution is subject to the Boost Software
-    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-    http://www.boost.org/LICENSE_1_0.txt)
-=============================================================================*/
-
-// Use boost's iterator concept tests for our iterators.
-
-#include "fwd.hpp"
-#include "values.hpp"
-#include <boost/iterator/new_iterator_tests.hpp>
-#include <boost/iterator/iterator_concepts.hpp>
-#include <boost/concept_check.hpp>
-
-void iterator_concept_checks()
-{
-    typedef quickbook::iterator Iter;
-    boost::function_requires< boost::ForwardIterator<Iter> >();
-    boost::function_requires< boost_concepts::ReadableIteratorConcept<Iter> >();
-    boost::function_requires< boost_concepts::LvalueIteratorConcept<Iter> >();
-    boost::function_requires< boost_concepts::ForwardTraversalConcept<Iter> >();
-}
-
-void value_iterator_concept_checks()
-{
-    typedef quickbook::value::iterator Iter;
-    boost::function_requires< boost::ForwardIterator<Iter> >();
-    boost::function_requires< boost_concepts::ReadableIteratorConcept<Iter> >();
-    boost::function_requires< boost_concepts::ForwardTraversalConcept<Iter> >();
-}
-
-void iterator_runtime_checks()
-{
-    std::string x = "Hello World";
-
-    quickbook::iterator i1(x.begin(), quickbook::file_position(10, 5));
-    quickbook::iterator i2(++x.begin(), quickbook::file_position(10, 6));
-    
-    boost::forward_readable_iterator_test(i1, i2, 'H', 'e');
-    boost::constant_lvalue_iterator_test(i1, 'H');
-}
-
-void value_iterator_runtime_checks()
-{
-    quickbook::value v1 = quickbook::bbk_value("a", 10);
-    quickbook::value v2 = quickbook::int_value(25, 32);
-
-    quickbook::value_builder b;
-    b.insert(v1);
-    b.insert(v2);
-    quickbook::value x = b.release();    
-
-    quickbook::value::iterator i1 = x.begin();
-    quickbook::value::iterator i2 = ++x.begin();
-
-    boost::forward_readable_iterator_test(i1, i2, v1, v2);
-}
-
-int main()
-{
-    // I know I don't have to run the concept checks.
-    // I'm a bit irrational like that.
-    iterator_concept_checks();
-    value_iterator_concept_checks();
-    iterator_runtime_checks();
-    value_iterator_runtime_checks();
-
-    return boost::report_errors();
-}
==============================================================================
--- branches/release/tools/quickbook/test/unit/values_test.cpp	(original)
+++ branches/release/tools/quickbook/test/unit/values_test.cpp	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -13,35 +13,42 @@
 #include <boost/range/algorithm/equal.hpp>
 #include <vector>
 #include "values.hpp"
+#include "files.hpp"
 
 void empty_tests()
 {
     quickbook::value q;
     BOOST_TEST(q.empty());
     BOOST_TEST(!q.is_list());
-    BOOST_TEST(!q.is_string());
+    BOOST_TEST(!q.is_encoded());
 }
 
 void qbk_tests()
 {
-    std::string src = "Source";
-    quickbook::value q = quickbook::qbk_value(
-        quickbook::iterator(src.begin()),
-        quickbook::iterator(src.end()));
-    BOOST_TEST_EQ(q.get_quickbook(), src);
+    std::string source = "Source";
+    quickbook::value q;
+    {
+        quickbook::file_ptr fake_file = new quickbook::file(
+            "(fake file)", source, 105u);
+        q = quickbook::qbk_value(
+            fake_file,
+            fake_file->source.begin(),
+            fake_file->source.end());
+    }
+    BOOST_TEST_EQ(q.get_quickbook(), source);
 }
 
 void sort_test()
 {
     quickbook::value_builder b;
-    b.insert(quickbook::bbk_value("a", 10));
-    b.insert(quickbook::bbk_value("b", 2));
-    b.insert(quickbook::bbk_value("c", 5));
-    b.insert(quickbook::bbk_value("d", 8));
+    b.insert(quickbook::encoded_value("a", 10));
+    b.insert(quickbook::encoded_value("b", 2));
+    b.insert(quickbook::encoded_value("c", 5));
+    b.insert(quickbook::encoded_value("d", 8));
     b.sort_list();
     
     quickbook::value_consumer c = b.release();
-    BOOST_TEST(c.check(2)); BOOST_TEST_EQ(c.consume(2).get_boostbook(), "b");
+    BOOST_TEST(c.check(2)); BOOST_TEST_EQ(c.consume(2).get_encoded(), "b");
     BOOST_TEST(c.check(5)); c.consume(5);
     BOOST_TEST(c.check(8)); c.consume(8);
     BOOST_TEST(c.check(10)); c.consume(10);
@@ -53,85 +60,32 @@
     quickbook::value_builder list1;
     quickbook::value_builder list2;
 
-    list1.insert(quickbook::bbk_value("b", 10));
+    list1.insert(quickbook::encoded_value("b", 10));
 
     {
-        quickbook::value p1 = quickbook::bbk_value("a", 5);
+        quickbook::value p1 = quickbook::encoded_value("a", 5);
         list1.insert(p1);
         list2.insert(p1);
     }
 
-    list2.insert(quickbook::bbk_value("c", 3));
+    list2.insert(quickbook::encoded_value("c", 3));
 
     quickbook::value_consumer l1 = list1.release();
     quickbook::value_consumer l2 = list2.release();
 
     BOOST_TEST(l1.check(10));
-    BOOST_TEST_EQ(l1.consume(10).get_boostbook(), "b");
+    BOOST_TEST_EQ(l1.consume(10).get_encoded(), "b");
     BOOST_TEST(l1.check(5));
-    BOOST_TEST_EQ(l1.consume(5).get_boostbook(), "a");
+    BOOST_TEST_EQ(l1.consume(5).get_encoded(), "a");
     BOOST_TEST(!l1.check());
 
     BOOST_TEST(l2.check(5));
-    BOOST_TEST_EQ(l2.consume(5).get_boostbook(), "a");
+    BOOST_TEST_EQ(l2.consume(5).get_encoded(), "a");
     BOOST_TEST(l2.check(3));
-    BOOST_TEST_EQ(l2.consume(3).get_boostbook(), "c");
+    BOOST_TEST_EQ(l2.consume(3).get_encoded(), "c");
     BOOST_TEST(!l2.check());
 }
 
-void store_test1()
-{
-    quickbook::stored_value q;
-    
-    {
-        std::string src = "Hello";
-        quickbook::value q1 = quickbook::qbk_value(
-            quickbook::iterator(src.begin()),
-            quickbook::iterator(src.end()),
-            5);
-
-        BOOST_TEST_EQ(q1.get_quickbook(), "Hello");
-        q = q1;
-        BOOST_TEST_EQ(q.get_quickbook(), "Hello");
-        BOOST_TEST_EQ(q1.get_quickbook(), "Hello");
-    }
-
-    BOOST_TEST_EQ(q.get_quickbook(), "Hello");
-}
-
-void store_test2_check(quickbook::value const& q)
-{
-    quickbook::value_consumer l1 = q;
-    BOOST_TEST(l1.check(5));
-    BOOST_TEST_EQ(l1.consume(5).get_quickbook(), "Hello");
-    BOOST_TEST(l1.check(10));
-    BOOST_TEST_EQ(l1.consume(10).get_boostbook(), "World");
-    BOOST_TEST(!l1.check());
-}
-
-void store_test2()
-{
-    quickbook::stored_value q;
-    
-    {
-        quickbook::value_builder list1;
-        std::string src = "Hello";
-        list1.insert(quickbook::qbk_value(
-            quickbook::iterator(src.begin()),
-            quickbook::iterator(src.end()),
-            5));
-        list1.insert(quickbook::bbk_value("World", 10));
-        
-        quickbook::value q2 = list1.release();
-
-        store_test2_check(q2);
-        q = q2;
-        store_test2_check(q);
-        store_test2_check(q2);
-    }
-    store_test2_check(q);
-}
-
 void equality_tests()
 {
     std::vector<quickbook::value> distinct_values;
@@ -165,8 +119,6 @@
     qbk_tests();
     sort_test();
     multiple_list_test();
-    store_test1();
-    store_test2();
     equality_tests();
 
     return boost::report_errors();
==============================================================================
Binary files branches/release/tools/quickbook/test/utf-16be-bom.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012) and (empty file) differ
==============================================================================
Binary files branches/release/tools/quickbook/test/utf-16le-bom.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012) and (empty file) differ
==============================================================================
--- branches/release/tools/quickbook/test/utf-8-bom.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="utf_8_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>UTF-8 test</title>
-  <bridgehead renderas="sect2" id="utf_8_test.h0">
-    <phrase id="utf_8_test.i__t__rn__ti__n__liz__ti__n"/><link linkend="utf_8_test.i__t__rn__ti__n__liz__ti__n">Iñtërnâtiônàlizætiøn</link>
-  </bridgehead>
-  <itemizedlist>
-    <listitem>
-      <simpara>
-        Îα Alpha
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îβ Beta
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îγ Gamma
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îδ Delta
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îε Epsilon
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îζ Zeta
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îη Eta
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îθ Theta
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îι Iota
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îκ Kappa
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îλ Lambda
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îμ Mu
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îν Nu
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îξ Xi
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îο Omicron
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Î Ï Pi
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Î¡Ï Rho
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        ΣÏÏ Sigma
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Î¤Ï Tau
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Î¥Ï
 Upsilon
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Î¦Ï Phi
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Î§Ï Chi
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Î¨Ï Psi
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Î©Ï Omega
-      </simpara>
-    </listitem>
-  </itemizedlist>
-</article>
==============================================================================
--- branches/release/tools/quickbook/test/utf-8-bom.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,30 +0,0 @@
-[article UTF-8 test
-    [quickbook 1.5]
-]
-
-[heading Iñtërnâtiônàlizætiøn]
-
-* Îα Alpha
-* Îβ Beta
-* Îγ Gamma
-* Îδ Delta
-* Îε Epsilon
-* Îζ Zeta
-* Îη Eta
-* Îθ Theta
-* Îι Iota
-* Îκ Kappa
-* Îλ Lambda
-* Îμ Mu
-* Îν Nu
-* Îξ Xi
-* Îο Omicron
-* Î Ï Pi
-* Î¡Ï Rho
-* ΣÏÏ Sigma
-* Î¤Ï Tau
-* Î¥Ï
 Upsilon
-* Î¦Ï Phi
-* Î§Ï Chi
-* Î¨Ï Psi
-* Î©Ï Omega
\ No newline at end of file
==============================================================================
--- branches/release/tools/quickbook/test/utf-8.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="utf_8_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>UTF-8 test</title>
-  <bridgehead renderas="sect2" id="utf_8_test.h0">
-    <phrase id="utf_8_test.i__t__rn__ti__n__liz__ti__n"/><link linkend="utf_8_test.i__t__rn__ti__n__liz__ti__n">Iñtërnâtiônàlizætiøn</link>
-  </bridgehead>
-  <itemizedlist>
-    <listitem>
-      <simpara>
-        Îα Alpha
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îβ Beta
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îγ Gamma
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îδ Delta
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îε Epsilon
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îζ Zeta
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îη Eta
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îθ Theta
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îι Iota
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îκ Kappa
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îλ Lambda
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îμ Mu
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îν Nu
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îξ Xi
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Îο Omicron
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Î Ï Pi
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Î¡Ï Rho
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        ΣÏÏ Sigma
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Î¤Ï Tau
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Î¥Ï
 Upsilon
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Î¦Ï Phi
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Î§Ï Chi
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Î¨Ï Psi
-      </simpara>
-    </listitem>
-    <listitem>
-      <simpara>
-        Î©Ï Omega
-      </simpara>
-    </listitem>
-  </itemizedlist>
-</article>
==============================================================================
--- branches/release/tools/quickbook/test/utf-8.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,30 +0,0 @@
-[article UTF-8 test
-    [quickbook 1.5]
-]
-
-[heading Iñtërnâtiônàlizætiøn]
-
-* Îα Alpha
-* Îβ Beta
-* Îγ Gamma
-* Îδ Delta
-* Îε Epsilon
-* Îζ Zeta
-* Îη Eta
-* Îθ Theta
-* Îι Iota
-* Îκ Kappa
-* Îλ Lambda
-* Îμ Mu
-* Îν Nu
-* Îξ Xi
-* Îο Omicron
-* Î Ï Pi
-* Î¡Ï Rho
-* ΣÏÏ Sigma
-* Î¤Ï Tau
-* Î¥Ï
 Upsilon
-* Î¦Ï Phi
-* Î§Ï Chi
-* Î¨Ï Psi
-* Î©Ï Omega
\ No newline at end of file
==============================================================================
--- branches/release/tools/quickbook/test/variablelist.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="variable_list_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Variable List Tests</title>
-  <variablelist>
-    <title>Empty</title>
-  </variablelist>
-  <variablelist>
-    <title>One entry</title>
-    <varlistentry>
-      <term>a</term>
-      <listitem>
-        <para>
-          b
-        </para>
-      </listitem>
-    </varlistentry>
-  </variablelist>
-  <variablelist>
-    <title>One entry, multiple items</title>
-    <varlistentry>
-      <term>a</term>
-      <listitem>
-        <para>
-          b
-        </para>
-        <para>
-          c
-        </para>
-      </listitem>
-    </varlistentry>
-  </variablelist>
-  <variablelist>
-    <title>Several entries</title>
-    <varlistentry>
-      <term>a</term>
-      <listitem>
-        <para>
-          b
-        </para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term>a</term>
-      <listitem>
-        <para>
-          b
-        </para>
-        <para>
-          c
-        </para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term>a</term>
-      <listitem>
-        <para>
-          b
-        </para>
-        <para>
-          c
-        </para>
-        <para>
-          d
-        </para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term>a</term>
-      <listitem>
-        <para>
-          b
-        </para>
-        <para>
-          c
-        </para>
-        <para>
-          d
-        </para>
-        <para>
-          e
-        </para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term>a</term>
-      <listitem>
-        <para>
-          b
-        </para>
-      </listitem>
-    </varlistentry>
-  </variablelist>
-  <anchor id="id1"/>
-  <variablelist>
-    <title>Variable List with anchors</title>
-    <varlistentry>
-      <term><anchor id="id2"/>a<anchor id="id3"/></term>
-      <listitem>
-        <para>
-          <anchor id="id4"/>b<anchor id="id5"/>
-        </para>
-      </listitem>
-    </varlistentry>
-  </variablelist>
-</article>
==============================================================================
--- branches/release/tools/quickbook/test/variablelist.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,31 +0,0 @@
-[article Variable List Tests
-[quickbook 1.5]
-]
-
-[variablelist Empty
-] 
-
-[variablelist One entry
-    [[a][b]]
-]
-
-[variablelist One entry, multiple items
-    [[a][b][c]]
-]
-
-[variablelist Several entries
-    [[a][b]]
-    [[a][b][c]]
-    [[a][b][c][d]]
-    [[a][b][c][d][e]]
-    [[a][b]]
-]
-
-[#id1]
-[variablelist Variable List with anchors
-    [
-    [[#id2]a[#id3]]
-    [[#id4]b[#id5]]
-    ]
-]
-    
==============================================================================
--- /trunk/tools/quickbook/test/version-0_1-fail.quickbook	(original)
+++ branches/release/tools/quickbook/test/version-0_1-fail.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -1,4 +1,4 @@
-[article Non-existant version of quickbook
+[article Non-existent version of quickbook
     [quickbook 0.1]
 ]
 
==============================================================================
--- branches/release/tools/quickbook/test/xinclude.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
-  <title>Include</title>
-  <xi:include href="../test/stub.xml" />
-</article>
==============================================================================
--- branches/release/tools/quickbook/test/xinclude.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,4 +0,0 @@
-[article Include]
-
-[xinclude stub.xml]
-
==============================================================================
--- /trunk/tools/quickbook/test/xinclude/Jamfile.v2	(original)
+++ branches/release/tools/quickbook/test/xinclude/Jamfile.v2	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -23,4 +23,5 @@
     [ quickbook-test xinclude-1_1-alt : xinclude-1_1.quickbook : xinclude-1_1-alt.gold : <quickbook-xinclude-base>$(xinclude_base2) ]
     [ quickbook-test xmlbase1-1_6-alt : xmlbase1-1_6.quickbook : xmlbase1-1_6-alt.gold : <quickbook-xinclude-base>$(xinclude_base2) ]
     [ quickbook-test xmlbase2-1_6-alt : xmlbase2-1_6.quickbook : xmlbase2-1_6-alt.gold : <quickbook-xinclude-base>$(xinclude_base2) ]
+    [ quickbook-error-test xmlbase-1_6-fail ]
     ;
==============================================================================
--- /trunk/tools/quickbook/test/xinclude/xmlbase-1_6-fail.quickbook	(original)
+++ branches/release/tools/quickbook/test/xinclude/xmlbase-1_6-fail.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
@@ -1,4 +1,4 @@
 [article Xmlbase fail
 [quickbook 1.5]
-[xmlbase non-existant]
+[xmlbase non-existent]
 ]
==============================================================================
--- branches/release/tools/quickbook/test/xml-escape_1_2.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,42 +0,0 @@
-<?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__amp____lt__are_being_escaped_" name="Test that &, < 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 id="test_that__amp____lt__are_being_escaped_.legal">
-      <para>
-        & should be &amp;, < should &lt;
-      </para>
-    </legalnotice>
-    <librarypurpose>
-      & should be &amp;, < should &lt;
-    </librarypurpose>
-  </libraryinfo>
-  <title>Test that &, < are being escaped.</title>
-  <section id="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">
-    <title>Escapes & explicitly written markup</title>
-    <itemizedlist>
-      <listitem>
-        <simpara>
-          & -> &amp;
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          < -> &lt;
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          > -> &gt;
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          " -> &quot;
-        </simpara>
-      </listitem>
-    </itemizedlist>
-  </section>
-</library>
==============================================================================
--- branches/release/tools/quickbook/test/xml-escape_1_2.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,14 +0,0 @@
-[library Test that &, < are being escaped.
-    [quickbook 1.2]
-    [purpose & should be &amp;, < should &lt;]
-    [license & should be &amp;, < should &lt;]
-]
-
-[section Escapes & explicitly written markup]
-
-* & -> &
-* < -> <
-* > -> >
-* " -> "
-
-[endsect]
\ No newline at end of file
==============================================================================
--- branches/release/tools/quickbook/test/xml-escape_1_5.gold	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,43 +0,0 @@
-<?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__amp____lt__are_being_escaped_" name="Test that &, < 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 id="test_that__amp____lt__are_being_escaped_.legal">
-      <para>
-        & should be &amp;, < should &lt;
-      </para>
-    </legalnotice>
-    <librarypurpose>
-      & should be &amp;, < should &lt;
-    </librarypurpose>
-  </libraryinfo>
-  <title>Test that &, < are being escaped.</title>
-  <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
-    & explicitly written markup</link></title>
-    <itemizedlist>
-      <listitem>
-        <simpara>
-          & -> &amp;
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          < -> &lt;
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          > -> &gt;
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          " -> &quot;
-        </simpara>
-      </listitem>
-    </itemizedlist>
-  </section>
-</library>
==============================================================================
--- branches/release/tools/quickbook/test/xml-escape_1_5.quickbook	2012-01-08 05:33:52 EST (Sun, 08 Jan 2012)
+++ (empty file)
@@ -1,14 +0,0 @@
-[library Test that &, < are being escaped.
-    [quickbook 1.5]
-    [purpose & should be &, < should <]
-    [license & should be &, < should <]
-]
-
-[section Escapes & explicitly written markup]
-
-* & -> &
-* < -> <
-* > -> >
-* " -> "
-
-[endsect]
\ No newline at end of file
 
$include_dir="/home/hyper-archives/boost-commit/include";
include("$include_dir/msg-footer.inc");
?>