2
0
mirror of https://github.com/boostorg/website.git synced 2026-02-24 04:22:15 +00:00

Improving boost docs project repository

[SVN r7144]
This commit is contained in:
Matias Capeletto
2007-06-25 18:35:23 +00:00
commit a96fdffe39
145 changed files with 10663 additions and 0 deletions

35
doc/javascript/common.js Normal file
View File

@@ -0,0 +1,35 @@
/*===========================================================================
Copyright (c) 2007 Matias Capeletto
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)
===========================================================================*/
/* Common Functions and configuration */
(function() {
// Add the base url if it is relative
function format_url(sUrl,sBaseUrl)
{
return ( sUrl.substring(0,7) == 'http://' ) ? sUrl : ( sBaseUrl + sUrl );
}
// Add '/' to the end if necesary
function format_base_url(sBaseUrl)
{
return ( sBaseUrl!='' && sBaseUrl.charAt(sBaseUrl.length-1)!='/' ) ?
( sBaseUrl + '/' ) : sBaseUrl;
}
// Public Interface
boostscript.common.format_url = format_url;
boostscript.common.format_base_url = format_base_url;
boostscript.common.loaded = true;
})();

53
doc/javascript/cookies.js Normal file
View File

@@ -0,0 +1,53 @@
/*===========================================================================
Copyright (c) 2007 Matias Capeletto
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)
===========================================================================*/
(function() {
/* Based on http://www.quirksmode.org/js/cookies.html */
function create_cookie( sName, sValue, nDays )
{
var sExpires;
if( nDays )
{
var dDate = new Date();
dDate.setTime( dDate.getTime() + ( nDays * 24*60*60*1000 ) );
sExpires = "; expires=" + dDate.toGMTString();
}
else
{
sExpires = "";
}
document.cookie = sName + "=" + sValue + sExpires + "; path=/";
}
function read_cookie(sName)
{
var sNameEq = sName + "=";
var aCookies = document.cookie.split(';');
for(var i=0, len = aCookies.length ; i < len ; i++ )
{
var oCookie = aCookies[i].replace(/^\s+/g, "");
if( oCookie.indexOf(sNameEq) == 0 )
{
return oCookie.substring( sNameEq.length, oCookie.length );
}
}
return null;
}
// Public Interface
boostscript.cookies.create = create_cookie;
boostscript.cookies.read = read_cookie;
boostscript.cookies.loaded = true;
})();

88
doc/javascript/load_file.js Executable file
View File

@@ -0,0 +1,88 @@
/*===========================================================================
Copyright (c) 2007 Matias Capeletto
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)
===========================================================================*/
(function() {
// File Cache
var file_cache = new Array();
// Load an xml file, and pass it to the callback function when it is ready
function load_xml(sUrl, oCallback, bCached )
{
if( bCached )
{
var oXml = file_cache[sUrl];
if( oXml )
{
oCallback(oXml);
return;
}
}
function add_to_cache( oXml )
{
if( bCached )
{
file_cache[sUrl] = oXml;
}
}
if (document.implementation && document.implementation.createDocument)
{
oXml = document.implementation.createDocument("", "", null);
oXml.onload = function() {
add_to_cache(oXml);
oCallback(oXml);
};
oXml.load(sUrl);
}
else if (window.ActiveXObject)
{
oXml = new ActiveXObject("Microsoft.XMLDOM");
oXml.onreadystatechange = function ()
{
if (oXml.readyState == 4)
{
add_to_cache(oXml);
oCallback(oXml);
}
};
oXml.load(sUrl);
}
else if( window.XMLHttpRequest )
{
var XMLHttpRequestObject = new XMLHttpRequest();
XMLHttpRequestObject.open("GET", sUrl);
XMLHttpRequestObject.onreadystatechange = function()
{
if (XMLHttpRequestObject.readyState == 4)
{
var oXml = XMLHttpRequestObject.responseXML;
add_to_cache(oXml);
oCallback(oXml);
delete XMLHttpRequestObject;
}
}
XMLHttpRequestObject.send(null);
}
else
{
// unsupported browser
}
}
// Public Interface
boostscript.load_file.load_xml = load_xml;
boostscript.load_file.loaded = true;
})();

147
doc/javascript/main.js Normal file
View File

@@ -0,0 +1,147 @@
/*===========================================================================
Copyright (c) 2007 Matias Capeletto
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)
===========================================================================*/
var boostscript;
(function() {
function Namespace(oLibrary,nId,sFilePath,aInclude)
{
this.id = nId; this.path = sFilePath;
this.used = false; this.loaded = false;
this.include = aInclude ? aInclude : new Array();
oLibrary.namespace[nId] = this;
}
function boostscript_library()
{
this.namespace = new Array();
var id = 0;
/************************************************************************/
/* Modify this section to add new components to the library */
/* Do not forget to add an 'add_component' call in the listing */
/* below including the file dependencies */
/* */
/* */
this.common = new Namespace(this,id++,
'common.js'
);
this.load_file = new Namespace(this,id++,
'load_file.js'
);
this.cookies = new Namespace(this,id++,
'cookies.js'
);
this.nested_links = new Namespace(this,id++,
'nested_links.js',
new Array( // Requires
this.common,
this.load_file
)
);
this.style_switcher = new Namespace(this,id++,
'style_switcher.js',
new Array( // Requires
this.common,
this.cookies,
this.load_file
)
);
/* */
/* */
/************************************************************************/
}
function include_components( aUsedComponents, sUserBaseUrl )
{
insert_needed_includes( boostscript.namespace, aUsedComponents,
format_base_url(sUserBaseUrl) );
}
function insert_needed_includes( aComponents, aUsedComponents, sBaseUrl )
{
for(var i = 0, len = aUsedComponents.length; i < len; i++)
{
find_needed_includes( aUsedComponents[i] );
}
dom_insertion_included_scripts( sBaseUrl );
}
function find_needed_includes( oComp )
{
if( oComp.used ) return;
oComp.used = true;
var aInclude = oComp.include;
for(var i = 0, len = aInclude.length; i < len; i++ )
{
find_needed_includes( aInclude[i] );
}
}
function dom_insertion_included_scripts( sBaseUrl )
{
var namespace = boostscript.namespace;
var oHead = document.getElementsByTagName("head")[0];
for(var i = 0, len = namespace.length; i < len ; i++ )
{
if( namespace[i].used )
{
var newScript = document.createElement('script');
newScript.type = 'text/javascript';
newScript.src = format_url( namespace[i].path, sBaseUrl );
oHead.appendChild( newScript );
}
}
}
function format_base_url(sBaseUrl)
{
return ( sBaseUrl != '' && sBaseUrl.charAt(sBaseUrl.length-1)!='/' ) ?
( sBaseUrl + '/' ) : sBaseUrl;
}
function format_url(sUrl,sBaseUrl)
{
return ( sUrl.substring(0,7) == 'http://' ) ? sUrl : ( sBaseUrl + sUrl );
}
function async_call( oNamespace, oFunc )
{
if( ! oNamespace.loaded )
{
setTimeout( function() { async_call( oNamespace, oFunc ); }, 200 );
}
else
{
oFunc();
}
}
boostscript = new boostscript_library();
boostscript.init = include_components;
boostscript.async_call = async_call;
boostscript.call = function(n,f,p1,p2,p3,p4,p5)
{
async_call( n,
function()
{
n[f](p1,p2,p3,p4,p5);
}
);
};
})();

153
doc/javascript/nested_links.js Executable file
View File

@@ -0,0 +1,153 @@
/*===========================================================================
Copyright (c) 2007 Matias Capeletto
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)
===========================================================================*/
/*********************** NestedLinks API **********************************
In your html body use it like:
----------------------------------------------------------------------------
<!-- Include the grouped links java script api
Remember to change this line with the path of your nested_links.js -->
<script type="text/javascript" src="nested_links.js"></script>
<!-- Add a form with an "id" attribute -->
<form id="boost_libs_list">
<!-- Call the NestedLinks "select box" with the following parameters
(1) id of the element where the select box will be inserted
(2) NestedLinks xml definition url
(3) user base url [optional]
(4) selected item [optional] -->
<script type="text/javascript">
nested_links_select_box('boost_libs_list',
'boost_libs_grouped_links.xml');
</script>
</form>
---------------------------------------------------------------------------
Read the html docs for more information.
**************************************************************************/
/* Requires: common.js */
/* Requires: load_file.js */
(function() {
// Options for drop down list
function construct_select_option(oXmlElement,sClass,
sBaseUrl,sDefaultUrl,sSelected)
{
var sTag = oXmlElement.getAttribute('tag' );
var sUrl = oXmlElement.getAttribute('href');
return '<option ' +
((sSelected == sTag) ? 'selected ' : '') +
'class="' + sClass + '"' + ' value="' +
( sUrl ? boostscript.common.format_url(sUrl,sBaseUrl) : sDefaultUrl ) +
'" >' + sTag + '</option>\n';
}
// Populate a select block from an xml and insert the result in sId div
function select_box(sId,sXmlUrl,sUserBaseUrl,sSelected)
{
boostscript.load_file.load_xml(sXmlUrl, function(oEntireXml) {
var oXml = oEntireXml.getElementsByTagName('nestedLinks')[0];
// manage parameters
var sBaseUrl = sUserBaseUrl ? boostscript.common.format_base_url( sUserBaseUrl ) : './';
var oBaseUrlNode = oXml.getElementsByTagName('base')[0];
if( oBaseUrlNode )
{
sBaseUrl += boost_format_base_url( oBaseUrlNode.getAttribute('href') );
}
var sDefaultUrl = sBaseUrl + 'index';
var oTitle = oXml.getElementsByTagName('title')[0];
if( sSelected == null && oTitle != null )
{
sSelected = oTitle.getAttribute('tag');
var sUrl = oTitle.getAttribute('href');
if( sUrl )
{
sDefaultUrl = sUrl;
}
}
// Construct the select box
var sSelectHtml =
'<select id="'+sId+'_internal"' +
' class="nested-links"' +
' size="1"' +
' OnChange="' +
'boostscript.nested_links.internal_go_to_url' +
'(\'' + sId + '_internal\')">\n' ;
sSelectHtml += construct_select_option(
oTitle, 'nested-links-title', sBaseUrl, sDefaultUrl, sSelected
);
var aGroups = oXml.childNodes;
for(var ig = 0, glen = aGroups.length; ig < glen; ig++)
{
var oGroup = aGroups[ig];
if( oGroup.nodeName == 'link' )
{
sSelectHtml += construct_select_option(
oGroup,
'nested-links-first', sBaseUrl, sDefaultUrl, sSelected
);
var aItems = oGroup.childNodes;
for(var ii = 0, ilen = aItems.length; ii < ilen; ii++)
{
var oItem = aItems[ii];
if( oItem.nodeName == 'link' )
{
sSelectHtml += construct_select_option(
oItem,
'nested-links-second', sBaseUrl, sDefaultUrl, sSelected
);
}
}
}
}
document.getElementById(sId).innerHTML = sSelectHtml + '</select>\n';
} );
}
// Action function used when the user selects an option from the drop down list
function go_to_url(sId)
{
var oe = document.getElementById(sId);
parent.self.location = oe.options[oe.selectedIndex].value;
}
// Public Interface
boostscript.nested_links.internal_go_to_url = go_to_url;
boostscript.nested_links.select_box = select_box;
boostscript.nested_links.loaded = true;
})();

View File

@@ -0,0 +1,53 @@
/*=============================================================================
Copyright (c) 2007 Matias Capeletto
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)
=============================================================================*/
/******************************************************************************
Grouped Links
******************************************************************************/
select.grouped_links
{
background-color: #BEDEBA;
font-weight: bold;
font-size: 12px;
color: #006D00;
border: 1px solid #DCDCDC;
border-bottom: 1px solid #9D9D9D;
border-right: 1px solid #9D9D9D;
padding-bottom: 1px;
padding-right: 1px;
}
option.grouped_links_title
{
background-color: #BEDEBA;
font-weight: bold;
font-size: 12px;
color: #006D00;
}
option.grouped_links_group
{
background-color: #008000;
font-weight: bold;
font-size: 12px;
color: white;
}
option.grouped_links_item
{
background-color: #FAFFFB;
padding: 0px 0px 0px 12px;
color: #006D00;
font-weight: normal;
}
/*****************************************************************************/

View File

@@ -0,0 +1,26 @@
# Boost.GroupedLinks
#
# Copyright (c) 2007 Matias Capeletto
#
# 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)
import quickbook ;
xml grouped_links
:
grouped_links.qbk
;
boostbook standalone
:
grouped_links
:
<xsl:param>toc.max.depth=2
<xsl:param>toc.section.depth=0
<xsl:param>chunk.section.depth=0
;

View File

@@ -0,0 +1,229 @@
[library Boost.GroupedLinks
[quickbook 1.4]
[authors [Capeletto, Matias]]
[copyright 2007 Matias Capeletto]
[category javascript]
[id grouped_links]
[dirname grouped_links]
[purpose
Construct a grouped links select box from a XML definition file
]
[source-mode c++]
[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.4 ]
[def __GROUPED_LINKS_IMAGE__ [$images/grouped_links.png]]
[section Introduction]
GroupedLinks is a simple javascript API for building links select boxes.
Features
* Released under Boost Software License.
* Cross-browser.
* Items are populated from a simple XML definition file.
* css based look & feel.
* Support for relative URLs.
* Integration with Boostbook.
* Only standard javascript used.
__GROUPED_LINKS_IMAGE__
[endsect]
[section Tutorial]
[section GroupedLinks XML definition]
A GroupedLinks select box is populated from a ['GroupedLinks XML definition]
file. This is an important feature, because it means that the items are not
harcoded in the HTML saving us space using global definitions and allowing
us to change the definition with out touching the HTML files.
['GroupedLinks XML definition] start with a tag named `groupedLinks`.
There are only three elements:
[table Elements
[[Name][Purpose]]
[[`title`][
Add a title to the GroupedLinks select box. This is useful when
you do not want to select any of the internals items. The select
box will show the title instead.
]]
[[`group`][
Starts a group list.
]]
[[`item`][
Links items. They must reside inside a group list.
]]
]
All the elements have two attributes:
* [*tag: ] Name of the element, it will be showed in the HTML.
* [*url: ] URL of the link. It can be relative or absolute. (It is optional)
A ['GroupedLinks XML definition] will look like:
``
<?xml version="1.0" encoding="UTF-8" ?>
<groupedLinks version="1.0">
<title tag="Title" url="group_1.html"/>
<group tag="Group 1" url="group_1.html">
<item tag="Item A" url="group_1/item_A.html"/>
<item tag="Item B" url="group_1/item_A.html"/>
<item tag="Item C" url="http://www.item_C.com"/>
</group>
<group tag="Group 2" url="group_2.html">
<item tag="Item A" url="group_2/item_A.html"/>
<item tag="Item B" url="group_2/item_A.html"/>
</group>
<group tag="Group 3" url="group_3.html"/>
</groupedLinks>
``
[endsect]
[section Including a GroupedLinks select box in your HTML]
To include a ['GroupedLinks select box] in the body of your HTML you have
to create a form with an unique id and call the javascript function
`grouped_links_select_box` inside of it.
[table grouped_links_select_box function
[[][Parameter Name][Purpose]]
[[1][GroupedLinks XML URL][
['GroupedLinks XML definition] URL.
]]
[[2][Form id][
id of the form where you want to place the ['GroupedLinks select box].
]]
[[3][Base URL][
A base URL that will be concatenated to all the relatives URLs.
]]
[[5][Selected item][
The item that is selected by default. This parameter is optional, if
you call the function with only three parameters the tag of the title
element is used if there is one in the ['GroupedLinks XML definition].
]]
]
It is simple enough to be understood from an example:
``
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Boost.GroupedLinks Example</title>
<link rel="stylesheet" href="../../css/grouped_links.css" type="text/css">
</head>
<body>
<!-- /* Include the grouped links java script api */ -->
<script type="text/javascript" src="../../js/grouped_links.js"></script>
<!-- /* Add a form with an "id" attribute */ -->
<form id="boost_libs_list">
<!--/* Call the GroupedLinks "select box" */-->
<script type="text/javascript">
grouped_links_select_box('boost_libs.xml',
'boost_libs_list',
'../../',
'Boost Libraries');
</script>
</form>
``
[note
Remember to change the `src` of the javascript include line to point
to the URL of `grouped_links.js` in your system. Try to work with
relatives paths so the HTML can be easily moved.
]
[endsect]
[section Boostbook integration]
Add the following lines to your jamfile.v2
<xsl:param>grouped.links.chapters.show="'true'"
<xsl:param>grouped.links.sections.show="'true'"
<xsl:param>grouped.links.sections.xml="'sections.XML'" # your XML sections
GroupedLinks select boxes for boost libraries and internal sections can be
requested to boostbook using the following options:
[table Boostbook GroupedLinks Parameters
[[Name][Purpose]]
[[`show`][Include select box]]
[[`xml`][Path to the XML definition]]
[[`url`][Base URL to use with relative paths]]
]
You can configure all the parameters used by boostbook:
<xsl:param>grouped.links.js="'grouped_links.js'"
<xsl:param>grouped.links.chapters.show="'true'"
<xsl:param>grouped.links.chapters.xml="'boost_libs_grouped_links.XML'"
<xsl:param>grouped.links.chapters.url="''"
<xsl:param>grouped.links.sections.show="'true'"
<xsl:param>grouped.links.sections.xml="'sections_grouped_links.XML'"
<xsl:param>grouped.links.sections.url="''"
[endsect]
[endsect]
[section Examples]
In the folder `example` you can find two examples using GropedLinks API.
[variablelist
[[simple][
How to put a GropedLinks select box in your HTML body.
]]
[[boostbook][
How to integrate GroupedLinks with boostbook and quickbook docs.
]]
]
[endsect]
[section Acknowledgments]
Thanks Martin Capeletto (my brother) for teaching me the basics of javascript.
Thanks to the ones that participates in constructing the new boost docs
look & feel. Special thanks to John Maddock for his support during this period.
[endsect]

View File

@@ -0,0 +1 @@
index.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

View File

@@ -0,0 +1,670 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Chapter 1. Boost.GroupedLinks</title>
<link xmlns="" rel="stylesheet" href="boostbook.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1" />
<link rel="start" href="index.html" title="Chapter 1. Boost.GroupedLinks" />
</head>
<body>
<div id="heading">
<div id="heading-placard"></div>
<div class="heading_navigation_box"></div>
<div class="heading_search_box"></div>
</div>
<div class="spirit-nav"></div>
<div id="body">
<div id="body-inner">
<div id="content">
<div xmlns="http://www.w3.org/1999/xhtml" class="chapter" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a id="grouped_links"></a>Chapter 1. Boost.GroupedLinks</h2>
</div>
<div>
<div class="author">
<h3 class="author"><span class="firstname">Matias</span> <span class="surname">Capeletto</span></h3>
</div>
</div>
<div>
<p class="copyright">Copyright © 2007 Matias Capeletto</p>
</div>
<div>
<div class="legalnotice">
<a id="id2601623"></a>
<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a xmlns="" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div>
</div>
</div>
</div>
<div class="toc">
<p>
<b>Table of Contents</b>
</p>
<dl>
<dt>
<span class="section">
<a href="index.html#grouped_links.introduction">Introduction</a>
</span>
</dt>
<dt>
<span class="section">
<a href="index.html#grouped_links.tutorial">Tutorial</a>
</span>
</dt>
<dt>
<span class="section">
<a href="index.html#grouped_links.examples">Examples</a>
</span>
</dt>
<dt>
<span class="section">
<a href="index.html#grouped_links.acknowledgments">Acknowledgments</a>
</span>
</dt>
</dl>
</div>
<div class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">
<a id="grouped_links.introduction"></a>
<a href="index.html#grouped_links.introduction" title="Introduction">Introduction</a>
</h2>
</div>
</div>
</div>
<p>
GroupedLinks is a simple javascript API for building links select boxes.
</p>
<p>
Features
</p>
<div class="itemizedlist">
<ul type="disc">
<li>
Released under Boost Software License.
</li>
<li>
Cross-browser.
</li>
<li>
Items are populated from a simple XML definition file.
</li>
<li>
css based look &amp; feel.
</li>
<li>
Support for relative URLs.
</li>
<li>
Integration with Boostbook.
</li>
<li>
Only standard javascript used.
</li>
</ul>
</div>
<p>
<span class="inlinemediaobject"><img src="images/grouped_links.png" alt="grouped_links" /></span>
</p>
</div>
<div class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">
<a id="grouped_links.tutorial"></a>
<a href="index.html#grouped_links.tutorial" title="Tutorial">Tutorial</a>
</h2>
</div>
</div>
</div>
<div class="toc">
<dl>
<dt>
<span class="section">
<a href="index.html#grouped_links.tutorial.groupedlinks_xml_definition">GroupedLinks
XML definition</a>
</span>
</dt>
<dt>
<span class="section">
<a href="index.html#grouped_links.tutorial.including_a_groupedlinks_select_box_in_your_html">Including
a GroupedLinks select box in your HTML</a>
</span>
</dt>
<dt>
<span class="section">
<a href="index.html#grouped_links.tutorial.boostbook_integration">Boostbook
integration</a>
</span>
</dt>
</dl>
</div>
<div class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a id="grouped_links.tutorial.groupedlinks_xml_definition"></a>
<a href="index.html#grouped_links.tutorial.groupedlinks_xml_definition" title="GroupedLinks&#10; XML definition">GroupedLinks
XML definition</a>
</h3>
</div>
</div>
</div>
<p>
A GroupedLinks select box is populated from a <span class="emphasis"><em>GroupedLinks XML
definition</em></span> file. This is an important feature, because it means
that the items are not harcoded in the HTML saving us space using global
definitions and allowing us to change the definition with out touching the
HTML files.
</p>
<p>
<span class="emphasis"><em>GroupedLinks XML definition</em></span> start with a tag named
<code class="computeroutput"><span class="identifier">groupedLinks</span></code>. There are only
three elements:
</p>
<div class="table">
<a id="id2565416"></a>
<p class="title">
<b>Table 1.1. Elements</b>
</p>
<div class="table-contents">
<table xmlns="" class="table" summary="Elements">
<colgroup>
<col xmlns="http://www.w3.org/1999/xhtml" />
<col xmlns="http://www.w3.org/1999/xhtml" />
</colgroup>
<thead xmlns="http://www.w3.org/1999/xhtml">
<tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Purpose
</p>
</th>
</tr>
</thead>
<tbody xmlns="http://www.w3.org/1999/xhtml">
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">title</span></code>
</p>
</td>
<td>
<p>
Add a title to the GroupedLinks select box. This is useful when you
do not want to select any of the internals items. The select box will
show the title instead.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">group</span></code>
</p>
</td>
<td>
<p>
Starts a group list.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">item</span></code>
</p>
</td>
<td>
<p>
Links items. They must reside inside a group list.
</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break" />
<p>
All the elements have two attributes:
</p>
<div class="itemizedlist">
<ul type="disc">
<li><span class="bold"><strong>tag: </strong></span> Name of the element, it will be
showed in the HTML.
</li>
<li><span class="bold"><strong>url: </strong></span> URL of the link. It can be relative
or absolute. (It is optional)
</li>
</ul>
</div>
<p>
A <span class="emphasis"><em>GroupedLinks XML definition</em></span> will look like:
</p>
<p>
</p>
<pre class="programlisting">
<span class="special">&lt;?</span><span class="identifier">xml</span> <span class="identifier">version</span><span class="special">=</span><span class="string">"1.0"</span> <span class="identifier">encoding</span><span class="special">=</span><span class="string">"UTF-8"</span> <span class="special">?&gt;</span>
<span class="special">&lt;</span><span class="identifier">groupedLinks</span> <span class="identifier">version</span><span class="special">=</span><span class="string">"1.0"</span><span class="special">&gt;</span>
<span class="special">&lt;</span><span class="identifier">title</span> <span class="identifier">tag</span><span class="special">=</span><span class="string">"Title"</span> <span class="identifier">url</span><span class="special">=</span><span class="string">"group_1.html"</span><span class="special">/&gt;</span>
<span class="special">&lt;</span><span class="identifier">group</span> <span class="identifier">tag</span><span class="special">=</span><span class="string">"Group 1"</span> <span class="identifier">url</span><span class="special">=</span><span class="string">"group_1.html"</span><span class="special">&gt;</span>
<span class="special">&lt;</span><span class="identifier">item</span> <span class="identifier">tag</span><span class="special">=</span><span class="string">"Item A"</span> <span class="identifier">url</span><span class="special">=</span><span class="string">"group_1/item_A.html"</span><span class="special">/&gt;</span>
<span class="special">&lt;</span><span class="identifier">item</span> <span class="identifier">tag</span><span class="special">=</span><span class="string">"Item B"</span> <span class="identifier">url</span><span class="special">=</span><span class="string">"group_1/item_A.html"</span><span class="special">/&gt;</span>
<span class="special">&lt;</span><span class="identifier">item</span> <span class="identifier">tag</span><span class="special">=</span><span class="string">"Item C"</span> <span class="identifier">url</span><span class="special">=</span><span class="string">"http://www.item_C.com"</span><span class="special">/&gt;</span>
<span class="special">&lt;/</span><span class="identifier">group</span><span class="special">&gt;</span>
<span class="special">&lt;</span><span class="identifier">group</span> <span class="identifier">tag</span><span class="special">=</span><span class="string">"Group 2"</span> <span class="identifier">url</span><span class="special">=</span><span class="string">"group_2.html"</span><span class="special">&gt;</span>
<span class="special">&lt;</span><span class="identifier">item</span> <span class="identifier">tag</span><span class="special">=</span><span class="string">"Item A"</span> <span class="identifier">url</span><span class="special">=</span><span class="string">"group_2/item_A.html"</span><span class="special">/&gt;</span>
<span class="special">&lt;</span><span class="identifier">item</span> <span class="identifier">tag</span><span class="special">=</span><span class="string">"Item B"</span> <span class="identifier">url</span><span class="special">=</span><span class="string">"group_2/item_A.html"</span><span class="special">/&gt;</span>
<span class="special">&lt;/</span><span class="identifier">group</span><span class="special">&gt;</span>
<span class="special">&lt;</span><span class="identifier">group</span> <span class="identifier">tag</span><span class="special">=</span><span class="string">"Group 3"</span> <span class="identifier">url</span><span class="special">=</span><span class="string">"group_3.html"</span><span class="special">/&gt;</span>
<span class="special">&lt;/</span><span class="identifier">groupedLinks</span><span class="special">&gt;</span>
</pre>
<p>
</p>
</div>
<div class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a id="grouped_links.tutorial.including_a_groupedlinks_select_box_in_your_html"></a>
<a href="index.html#grouped_links.tutorial.including_a_groupedlinks_select_box_in_your_html" title="Including&#10; a GroupedLinks select box in your HTML">Including
a GroupedLinks select box in your HTML</a>
</h3>
</div>
</div>
</div>
<p>
To include a <span class="emphasis"><em>GroupedLinks select box</em></span> in the body of
your HTML you have to create a form with an unique id and call the javascript
function <code class="computeroutput"><span class="identifier">grouped_links_select_box</span></code>
inside of it.
</p>
<div class="table">
<a id="id2611051"></a>
<p class="title">
<b>Table 1.2. grouped_links_select_box function</b>
</p>
<div class="table-contents">
<table xmlns="" class="table" summary="grouped_links_select_box function">
<colgroup>
<col xmlns="http://www.w3.org/1999/xhtml" />
<col xmlns="http://www.w3.org/1999/xhtml" />
<col xmlns="http://www.w3.org/1999/xhtml" />
</colgroup>
<thead xmlns="http://www.w3.org/1999/xhtml">
<tr>
<th>
<p>
</p>
</th>
<th>
<p>
Parameter Name
</p>
</th>
<th>
<p>
Purpose
</p>
</th>
</tr>
</thead>
<tbody xmlns="http://www.w3.org/1999/xhtml">
<tr>
<td>
<p>
1
</p>
</td>
<td>
<p>
GroupedLinks XML URL
</p>
</td>
<td>
<p>
<span class="emphasis"><em>GroupedLinks XML definition</em></span> URL.
</p>
</td>
</tr>
<tr>
<td>
<p>
2
</p>
</td>
<td>
<p>
Form id
</p>
</td>
<td>
<p>
id of the form where you want to place the <span class="emphasis"><em>GroupedLinks select
box</em></span>.
</p>
</td>
</tr>
<tr>
<td>
<p>
3
</p>
</td>
<td>
<p>
Base URL
</p>
</td>
<td>
<p>
A base URL that will be concatenated to all the relatives URLs.
</p>
</td>
</tr>
<tr>
<td>
<p>
5
</p>
</td>
<td>
<p>
Selected item
</p>
</td>
<td>
<p>
The item that is selected by default. This parameter is optional, if
you call the function with only three parameters the tag of the title
element is used if there is one in the <span class="emphasis"><em>GroupedLinks XML definition</em></span>.
</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break" />
<p>
It is simple enough to be understood from an example:
</p>
<p>
</p>
<pre class="programlisting">
<span class="special">&lt;</span><span class="identifier">head</span><span class="special">&gt;</span>
<span class="special">&lt;</span><span class="identifier">meta</span> <span class="identifier">http</span><span class="special">-</span><span class="identifier">equiv</span><span class="special">=</span><span class="string">"Content-Type"</span> <span class="identifier">content</span><span class="special">=</span><span class="string">"text/html; charset=ISO-8859-1"</span><span class="special">&gt;</span>
<span class="special">&lt;</span><span class="identifier">title</span><span class="special">&gt;</span><span class="identifier">Boost</span><span class="special">.</span><span class="identifier">GroupedLinks</span> <span class="identifier">Example</span><span class="special">&lt;/</span><span class="identifier">title</span><span class="special">&gt;</span>
<span class="special">&lt;</span><span class="identifier">link</span> <span class="identifier">rel</span><span class="special">=</span><span class="string">"stylesheet"</span> <span class="identifier">href</span><span class="special">=</span><span class="string">"../../css/grouped_links.css"</span> <span class="identifier">type</span><span class="special">=</span><span class="string">"text/css"</span><span class="special">&gt;</span>
<span class="special">&lt;/</span><span class="identifier">head</span><span class="special">&gt;</span>
<span class="special">&lt;</span><span class="identifier">body</span><span class="special">&gt;</span>
<span class="special">&lt;!--</span> <span class="comment">/* Include the grouped links java script api */</span> <span class="special">--&gt;</span>
<span class="special">&lt;</span><span class="identifier">script</span> <span class="identifier">type</span><span class="special">=</span><span class="string">"text/javascript"</span> <span class="identifier">src</span><span class="special">=</span><span class="string">"../../js/grouped_links.js"</span><span class="special">&gt;&lt;/</span><span class="identifier">script</span><span class="special">&gt;</span>
<span class="special">&lt;!--</span> <span class="comment">/* Add a form with an "id" attribute */</span> <span class="special">--&gt;</span>
<span class="special">&lt;</span><span class="identifier">form</span> <span class="identifier">id</span><span class="special">=</span><span class="string">"boost_libs_list"</span><span class="special">&gt;</span>
<span class="special">&lt;!--/*</span> <span class="identifier">Call</span> <span class="identifier">the</span> <span class="identifier">GroupedLinks</span> <span class="string">"select box"</span> <span class="special">*/--&gt;</span>
<span class="special">&lt;</span><span class="identifier">script</span> <span class="identifier">type</span><span class="special">=</span><span class="string">"text/javascript"</span><span class="special">&gt;</span>
<span class="identifier">grouped_links_select_box</span><span class="special">(</span><span class="char">'boost_libs.xml'</span><span class="special">,</span>
<span class="char">'boost_libs_list'</span><span class="special">,</span>
<span class="char">'../../'</span><span class="special">,</span>
<span class="char">'Boost Libraries'</span><span class="special">);</span>
<span class="special">&lt;/</span><span class="identifier">script</span><span class="special">&gt;</span>
<span class="special">&lt;/</span><span class="identifier">form</span><span class="special">&gt;</span>
</pre>
<p>
</p>
<div xmlns="" class="note">
<div class="admonition-graphic">
<img alt="[Note]" src="../../doc/html/images/note.png" />
</div>
<div class="admonition-body">
<div class="admonition-title">Note</div>
<div class="admonition-content">
<p xmlns="http://www.w3.org/1999/xhtml">
</p>
<p xmlns="http://www.w3.org/1999/xhtml">
Remember to change the <code class="computeroutput"><span class="identifier">src</span></code>
of the javascript include line to point to the URL of <code class="computeroutput"><span class="identifier">grouped_links</span><span class="special">.</span><span class="identifier">js</span></code>
in your system. Try to work with relatives paths so the HTML can be easily
moved.
</p>
<p xmlns="http://www.w3.org/1999/xhtml">
</p>
</div>
</div>
</div>
</div>
<div class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a id="grouped_links.tutorial.boostbook_integration"></a>
<a href="index.html#grouped_links.tutorial.boostbook_integration" title="Boostbook&#10; integration">Boostbook
integration</a>
</h3>
</div>
</div>
</div>
<p>
Add the following lines to your jamfile.v2
</p>
<pre class="programlisting">
<span class="special">&lt;</span><span class="identifier">xsl</span><span class="special">:</span><span class="identifier">param</span><span class="special">&gt;</span><span class="identifier">grouped</span><span class="special">.</span><span class="identifier">links</span><span class="special">.</span><span class="identifier">chapters</span><span class="special">.</span><span class="identifier">show</span><span class="special">=</span><span class="string">"'true'"</span>
<span class="special">&lt;</span><span class="identifier">xsl</span><span class="special">:</span><span class="identifier">param</span><span class="special">&gt;</span><span class="identifier">grouped</span><span class="special">.</span><span class="identifier">links</span><span class="special">.</span><span class="identifier">sections</span><span class="special">.</span><span class="identifier">show</span><span class="special">=</span><span class="string">"'true'"</span>
<span class="special">&lt;</span><span class="identifier">xsl</span><span class="special">:</span><span class="identifier">param</span><span class="special">&gt;</span><span class="identifier">grouped</span><span class="special">.</span><span class="identifier">links</span><span class="special">.</span><span class="identifier">sections</span><span class="special">.</span><span class="identifier">xml</span><span class="special">=</span><span class="string">"'sections.XML'"</span> <span class="preprocessor"># your</span> <span class="identifier">XML</span> <span class="identifier">sections</span>
</pre>
<p>
GroupedLinks select boxes for boost libraries and internal sections can be
requested to boostbook using the following options:
</p>
<div class="table">
<a id="id2611978"></a>
<p class="title">
<b>Table 1.3. Boostbook GroupedLinks Parameters</b>
</p>
<div class="table-contents">
<table xmlns="" class="table" summary="Boostbook GroupedLinks Parameters">
<colgroup>
<col xmlns="http://www.w3.org/1999/xhtml" />
<col xmlns="http://www.w3.org/1999/xhtml" />
</colgroup>
<thead xmlns="http://www.w3.org/1999/xhtml">
<tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Purpose
</p>
</th>
</tr>
</thead>
<tbody xmlns="http://www.w3.org/1999/xhtml">
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">show</span></code>
</p>
</td>
<td>
<p>
Include select box
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">xml</span></code>
</p>
</td>
<td>
<p>
Path to the XML definition
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">url</span></code>
</p>
</td>
<td>
<p>
Base URL to use with relative paths
</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break" />
<p>
You can configure all the parameters used by boostbook:
</p>
<pre class="programlisting">
<span class="special">&lt;</span><span class="identifier">xsl</span><span class="special">:</span><span class="identifier">param</span><span class="special">&gt;</span><span class="identifier">grouped</span><span class="special">.</span><span class="identifier">links</span><span class="special">.</span><span class="identifier">js</span><span class="special">=</span><span class="string">"'grouped_links.js'"</span>
<span class="special">&lt;</span><span class="identifier">xsl</span><span class="special">:</span><span class="identifier">param</span><span class="special">&gt;</span><span class="identifier">grouped</span><span class="special">.</span><span class="identifier">links</span><span class="special">.</span><span class="identifier">chapters</span><span class="special">.</span><span class="identifier">show</span><span class="special">=</span><span class="string">"'true'"</span>
<span class="special">&lt;</span><span class="identifier">xsl</span><span class="special">:</span><span class="identifier">param</span><span class="special">&gt;</span><span class="identifier">grouped</span><span class="special">.</span><span class="identifier">links</span><span class="special">.</span><span class="identifier">chapters</span><span class="special">.</span><span class="identifier">xml</span><span class="special">=</span><span class="string">"'boost_libs_grouped_links.XML'"</span>
<span class="special">&lt;</span><span class="identifier">xsl</span><span class="special">:</span><span class="identifier">param</span><span class="special">&gt;</span><span class="identifier">grouped</span><span class="special">.</span><span class="identifier">links</span><span class="special">.</span><span class="identifier">chapters</span><span class="special">.</span><span class="identifier">url</span><span class="special">=</span><span class="string">"''"</span>
<span class="special">&lt;</span><span class="identifier">xsl</span><span class="special">:</span><span class="identifier">param</span><span class="special">&gt;</span><span class="identifier">grouped</span><span class="special">.</span><span class="identifier">links</span><span class="special">.</span><span class="identifier">sections</span><span class="special">.</span><span class="identifier">show</span><span class="special">=</span><span class="string">"'true'"</span>
<span class="special">&lt;</span><span class="identifier">xsl</span><span class="special">:</span><span class="identifier">param</span><span class="special">&gt;</span><span class="identifier">grouped</span><span class="special">.</span><span class="identifier">links</span><span class="special">.</span><span class="identifier">sections</span><span class="special">.</span><span class="identifier">xml</span><span class="special">=</span><span class="string">"'sections_grouped_links.XML'"</span>
<span class="special">&lt;</span><span class="identifier">xsl</span><span class="special">:</span><span class="identifier">param</span><span class="special">&gt;</span><span class="identifier">grouped</span><span class="special">.</span><span class="identifier">links</span><span class="special">.</span><span class="identifier">sections</span><span class="special">.</span><span class="identifier">url</span><span class="special">=</span><span class="string">"''"</span>
</pre>
</div>
</div>
<div class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">
<a id="grouped_links.examples"></a>
<a href="index.html#grouped_links.examples" title="Examples">Examples</a>
</h2>
</div>
</div>
</div>
<p>
In the folder <code class="computeroutput"><span class="identifier">example</span></code> you can
find two examples using GropedLinks API.
</p>
<div class="variablelist">
<p class="title">
<b></b>
</p>
<dl>
<dt>
<span class="term">simple</span>
</dt>
<dd>
How to put a GropedLinks select box in your HTML body.
</dd>
<dt>
<span class="term">boostbook</span>
</dt>
<dd>
How to integrate GroupedLinks with boostbook and quickbook docs.
</dd>
</dl>
</div>
</div>
<div class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">
<a id="grouped_links.acknowledgments"></a>
<a href="index.html#grouped_links.acknowledgments" title="Acknowledgments">Acknowledgments</a>
</h2>
</div>
</div>
</div>
<p>
Thanks Martin Capeletto (my brother) for teaching me the basics of javascript.
</p>
<p>
Thanks to the ones that participates in constructing the new boost docs look
&amp; feel. Special thanks to John Maddock for his support during this period.
</p>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="spirit-nav"></div>
<div id="footer">
<div id="footer-left">
<div id="revised">Revised: June 13, 2007 at 00:31:24 GMT</div>
<div id="copyright"></div>
<div id="license">
<p>Distributed under the
<a href="/LICENSE_1_0.txt" class="internal">Boost Software License, Version 1.0</a>.
</p>
</div>
</div>
<div id="footer-right">
<div id="banners">
<p id="banner-xhtml">
<a href="http://validator.w3.org/check?uri=referer" class="external">XHTML 1.0</a>
</p>
<p id="banner-css">
<a href="http://jigsaw.w3.org/css-validator/check/referer" class="external">CSS</a>
</p>
<p id="banner-sourceforge">
<a href="http://sourceforge.net" class="external">SourceForge</a>
</p>
</div>
</div>
<div class="clear"></div>
</div>
</body>
</html>

View File

@@ -0,0 +1,76 @@
[library Boost.GroupedLinks example
[quickbook 1.4]
[authors [Capeletto, Matias]]
[copyright 2007 Matias Capeletto]
[category example]
[id boostbook_integration]
[dirname boostbook_integration]
[purpose
Boost.GroupedLinks Boostbook Integration example
]
[source-mode c++]
[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.4 ]
[section Preface]
Preface section
[endsect]
[section First]
First section
[section Sub A]
First section - subsection A
[endsect]
[section Sub B]
First section - subsection B
[endsect]
[section Sub C]
First section - subsection C
[endsect]
[endsect]
[section Second]
Second section
[section Sub A]
Second section - subsection A
[endsect]
[section Sub B]
Second section - subsection B
[endsect]
[endsect]
[section Final]
Final section
[endsect]

View File

@@ -0,0 +1,31 @@
# Boost.GroupedLinks
#
# Copyright (c) 2007 Matias Capeletto
#
# 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
# -----------------------------------------------------------------------------
import quickbook ;
xml example
:
example.qbk
;
boostbook standalone
:
example
:
# Show the sections select box, the chapters select box is showed by default
<xsl:param>grouped.links.sections.show="'true'"
<xsl:param>toc.max.depth=2
<xsl:param>toc.section.depth=4
<xsl:param>chunk.section.depth=3
;

View File

@@ -0,0 +1,7 @@
index.html
boostbook_integration/first.html
boostbook_integration/first/sub_b.html
boostbook_integration/first/sub_c.html
boostbook_integration/second.html
boostbook_integration/second/sub_b.html
boostbook_integration/final.html

View File

@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Final</title>
<link xmlns="" rel="stylesheet" href="../boostbook.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0" />
<link rel="start" href="../index.html" title="Chapter 1. Boost.GroupedLinks example" />
<link rel="up" href="../index.html" title="Chapter 1. Boost.GroupedLinks example" />
<link rel="prev" href="second/sub_b.html" title="Sub B" />
</head>
<body>
<script type="text/javascript" src="../grouped_links.js"></script>
<div id="heading">
<div id="heading-placard"></div>
<div class="heading_navigation_box">
<div class="grouped_links" id="chapters_select_box">
<script type="text/javascript">
grouped_links_select_box(
'../boost_libs_grouped_links.xml',
'chapters_select_box',
'http://www.boost.org/libs/');
</script>
</div>
<div class="grouped_links" id="sections_select_box">
<script type="text/javascript">
grouped_links_select_box(
'../sections_grouped_links.xml',
'sections_select_box',
'.././');
</script>
</div>
</div>
<div class="heading_search_box">
<form id="cref" action="http://google.com/cse">
<input type="hidden" name="cref" value="" />
<div> Search Boost </div>
<div>
<input class="search_box" type="text" name="q" id="q" size="40" maxlength="255" alt="Search Text" />
</div>
</form>
</div>
</div>
<div class="spirit-nav">
<a accesskey="p" href="second/sub_b.html">
<img src="../../../doc/html/images/prev.png" alt="Prev" />
</a>
<a accesskey="u" href="../index.html">
<img src="../../../doc/html/images/up.png" alt="Up" />
</a>
<a accesskey="h" href="../index.html">
<img src="../../../doc/html/images/home.png" alt="Home" />
</a>
</div>
<div id="body">
<div id="body-inner">
<div id="content">
<div xmlns="http://www.w3.org/1999/xhtml" class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">
<a id="boostbook_integration.final"></a>
<a href="final.html" title="Final">Final</a>
</h2>
</div>
</div>
</div>
<p>
Final section
</p>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="spirit-nav">
<a accesskey="p" href="second/sub_b.html">
<img src="../../../doc/html/images/prev.png" alt="Prev" />
</a>
<a accesskey="u" href="../index.html">
<img src="../../../doc/html/images/up.png" alt="Up" />
</a>
<a accesskey="h" href="../index.html">
<img src="../../../doc/html/images/home.png" alt="Home" />
</a>
</div>
<div id="footer">
<div id="footer-left">
<div id="copyright">
<p xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision">Copyright © 2007 Matias Capeletto</p>
</div>
<div id="license">
<p>Distributed under the
<a href="/LICENSE_1_0.txt" class="internal">Boost Software License, Version 1.0</a>.
</p>
</div>
</div>
<div id="footer-right">
<div id="banners">
<p id="banner-xhtml">
<a href="http://validator.w3.org/check?uri=referer" class="external">XHTML 1.0</a>
</p>
<p id="banner-css">
<a href="http://jigsaw.w3.org/css-validator/check/referer" class="external">CSS</a>
</p>
<p id="banner-sourceforge">
<a href="http://sourceforge.net" class="external">SourceForge</a>
</p>
</div>
</div>
<div class="clear"></div>
</div>
</body>
</html>

View File

@@ -0,0 +1,167 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>First</title>
<link xmlns="" rel="stylesheet" href="../boostbook.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0" />
<link rel="start" href="../index.html" title="Chapter 1. Boost.GroupedLinks example" />
<link rel="up" href="../index.html" title="Chapter 1. Boost.GroupedLinks example" />
<link rel="prev" href="../index.html" title="Chapter 1. Boost.GroupedLinks example" />
<link rel="next" href="first/sub_b.html" title="Sub B" />
</head>
<body>
<script type="text/javascript" src="../grouped_links.js"></script>
<div id="heading">
<div id="heading-placard"></div>
<div class="heading_navigation_box">
<div class="grouped_links" id="chapters_select_box">
<script type="text/javascript">
grouped_links_select_box(
'../boost_libs_grouped_links.xml',
'chapters_select_box',
'http://www.boost.org/libs/');
</script>
</div>
<div class="grouped_links" id="sections_select_box">
<script type="text/javascript">
grouped_links_select_box(
'../sections_grouped_links.xml',
'sections_select_box',
'.././');
</script>
</div>
</div>
<div class="heading_search_box">
<form id="cref" action="http://google.com/cse">
<input type="hidden" name="cref" value="" />
<div> Search Boost </div>
<div>
<input class="search_box" type="text" name="q" id="q" size="40" maxlength="255" alt="Search Text" />
</div>
</form>
</div>
</div>
<div class="spirit-nav">
<a accesskey="p" href="../index.html">
<img src="../../../doc/html/images/prev.png" alt="Prev" />
</a>
<a accesskey="u" href="../index.html">
<img src="../../../doc/html/images/up.png" alt="Up" />
</a>
<a accesskey="h" href="../index.html">
<img src="../../../doc/html/images/home.png" alt="Home" />
</a>
<a accesskey="n" href="first/sub_b.html">
<img src="../../../doc/html/images/next.png" alt="Next" />
</a>
</div>
<div id="body">
<div id="body-inner">
<div id="content">
<div xmlns="http://www.w3.org/1999/xhtml" class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">
<a id="boostbook_integration.first"></a>
<a href="first.html" title="First">First</a>
</h2>
</div>
</div>
</div>
<div xmlns="" class="toc">
<div class="box-outer-wrapper">
<div class="box-top-left"></div>
<div class="box-top-right"></div>
<div class="box-top"></div>
<div class="box-inner-wrapper">
<dl xmlns="http://www.w3.org/1999/xhtml">
<dt>
<span class="section">
<a href="first.html#boostbook_integration.first.sub_a">Sub A</a>
</span>
</dt>
<dt>
<span class="section">
<a href="first/sub_b.html">Sub B</a>
</span>
</dt>
<dt>
<span class="section">
<a href="first/sub_c.html">Sub C</a>
</span>
</dt>
</dl>
</div>
<div class="box-bottom-left"></div>
<div class="box-bottom-right"></div>
<div class="box-bottom"></div>
</div>
</div>
<p>
First section
</p>
<div class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a id="boostbook_integration.first.sub_a"></a>
<a href="first.html#boostbook_integration.first.sub_a" title="Sub A">Sub A</a>
</h3>
</div>
</div>
</div>
<p>
First section - subsection A
</p>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="spirit-nav">
<a accesskey="p" href="../index.html">
<img src="../../../doc/html/images/prev.png" alt="Prev" />
</a>
<a accesskey="u" href="../index.html">
<img src="../../../doc/html/images/up.png" alt="Up" />
</a>
<a accesskey="h" href="../index.html">
<img src="../../../doc/html/images/home.png" alt="Home" />
</a>
<a accesskey="n" href="first/sub_b.html">
<img src="../../../doc/html/images/next.png" alt="Next" />
</a>
</div>
<div id="footer">
<div id="footer-left">
<div id="copyright">
<p xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision">Copyright © 2007 Matias Capeletto</p>
</div>
<div id="license">
<p>Distributed under the
<a href="/LICENSE_1_0.txt" class="internal">Boost Software License, Version 1.0</a>.
</p>
</div>
</div>
<div id="footer-right">
<div id="banners">
<p id="banner-xhtml">
<a href="http://validator.w3.org/check?uri=referer" class="external">XHTML 1.0</a>
</p>
<p id="banner-css">
<a href="http://jigsaw.w3.org/css-validator/check/referer" class="external">CSS</a>
</p>
<p id="banner-sourceforge">
<a href="http://sourceforge.net" class="external">SourceForge</a>
</p>
</div>
</div>
<div class="clear"></div>
</div>
</body>
</html>

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Sub B</title>
<link xmlns="" rel="stylesheet" href="../../boostbook.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0" />
<link rel="start" href="../../index.html" title="Chapter 1. Boost.GroupedLinks example" />
<link rel="up" href="../first.html" title="First" />
<link rel="prev" href="../first.html" title="First" />
<link rel="next" href="sub_c.html" title="Sub C" />
</head>
<body>
<script type="text/javascript" src="../../grouped_links.js"></script>
<div id="heading">
<div id="heading-placard"></div>
<div class="heading_navigation_box">
<div class="grouped_links" id="chapters_select_box">
<script type="text/javascript">
grouped_links_select_box(
'../../boost_libs_grouped_links.xml',
'chapters_select_box',
'http://www.boost.org/libs/');
</script>
</div>
<div class="grouped_links" id="sections_select_box">
<script type="text/javascript">
grouped_links_select_box(
'../../sections_grouped_links.xml',
'sections_select_box',
'../.././');
</script>
</div>
</div>
<div class="heading_search_box">
<form id="cref" action="http://google.com/cse">
<input type="hidden" name="cref" value="" />
<div> Search Boost </div>
<div>
<input class="search_box" type="text" name="q" id="q" size="40" maxlength="255" alt="Search Text" />
</div>
</form>
</div>
</div>
<div class="spirit-nav">
<a accesskey="p" href="../first.html">
<img src="../../../../doc/html/images/prev.png" alt="Prev" />
</a>
<a accesskey="u" href="../first.html">
<img src="../../../../doc/html/images/up.png" alt="Up" />
</a>
<a accesskey="h" href="../../index.html">
<img src="../../../../doc/html/images/home.png" alt="Home" />
</a>
<a accesskey="n" href="sub_c.html">
<img src="../../../../doc/html/images/next.png" alt="Next" />
</a>
</div>
<div id="body">
<div id="body-inner">
<div id="content">
<div xmlns="http://www.w3.org/1999/xhtml" class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a id="boostbook_integration.first.sub_b"></a>
<a href="sub_b.html" title="Sub B">Sub B</a>
</h3>
</div>
</div>
</div>
<p>
First section - subsection B
</p>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="spirit-nav">
<a accesskey="p" href="../first.html">
<img src="../../../../doc/html/images/prev.png" alt="Prev" />
</a>
<a accesskey="u" href="../first.html">
<img src="../../../../doc/html/images/up.png" alt="Up" />
</a>
<a accesskey="h" href="../../index.html">
<img src="../../../../doc/html/images/home.png" alt="Home" />
</a>
<a accesskey="n" href="sub_c.html">
<img src="../../../../doc/html/images/next.png" alt="Next" />
</a>
</div>
<div id="footer">
<div id="footer-left">
<div id="copyright">
<p xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision">Copyright © 2007 Matias Capeletto</p>
</div>
<div id="license">
<p>Distributed under the
<a href="/LICENSE_1_0.txt" class="internal">Boost Software License, Version 1.0</a>.
</p>
</div>
</div>
<div id="footer-right">
<div id="banners">
<p id="banner-xhtml">
<a href="http://validator.w3.org/check?uri=referer" class="external">XHTML 1.0</a>
</p>
<p id="banner-css">
<a href="http://jigsaw.w3.org/css-validator/check/referer" class="external">CSS</a>
</p>
<p id="banner-sourceforge">
<a href="http://sourceforge.net" class="external">SourceForge</a>
</p>
</div>
</div>
<div class="clear"></div>
</div>
</body>
</html>

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Sub C</title>
<link xmlns="" rel="stylesheet" href="../../boostbook.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0" />
<link rel="start" href="../../index.html" title="Chapter 1. Boost.GroupedLinks example" />
<link rel="up" href="../first.html" title="First" />
<link rel="prev" href="sub_b.html" title="Sub B" />
<link rel="next" href="../second.html" title="Second" />
</head>
<body>
<script type="text/javascript" src="../../grouped_links.js"></script>
<div id="heading">
<div id="heading-placard"></div>
<div class="heading_navigation_box">
<div class="grouped_links" id="chapters_select_box">
<script type="text/javascript">
grouped_links_select_box(
'../../boost_libs_grouped_links.xml',
'chapters_select_box',
'http://www.boost.org/libs/');
</script>
</div>
<div class="grouped_links" id="sections_select_box">
<script type="text/javascript">
grouped_links_select_box(
'../../sections_grouped_links.xml',
'sections_select_box',
'../.././');
</script>
</div>
</div>
<div class="heading_search_box">
<form id="cref" action="http://google.com/cse">
<input type="hidden" name="cref" value="" />
<div> Search Boost </div>
<div>
<input class="search_box" type="text" name="q" id="q" size="40" maxlength="255" alt="Search Text" />
</div>
</form>
</div>
</div>
<div class="spirit-nav">
<a accesskey="p" href="sub_b.html">
<img src="../../../../doc/html/images/prev.png" alt="Prev" />
</a>
<a accesskey="u" href="../first.html">
<img src="../../../../doc/html/images/up.png" alt="Up" />
</a>
<a accesskey="h" href="../../index.html">
<img src="../../../../doc/html/images/home.png" alt="Home" />
</a>
<a accesskey="n" href="../second.html">
<img src="../../../../doc/html/images/next.png" alt="Next" />
</a>
</div>
<div id="body">
<div id="body-inner">
<div id="content">
<div xmlns="http://www.w3.org/1999/xhtml" class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a id="boostbook_integration.first.sub_c"></a>
<a href="sub_c.html" title="Sub C">Sub C</a>
</h3>
</div>
</div>
</div>
<p>
First section - subsection C
</p>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="spirit-nav">
<a accesskey="p" href="sub_b.html">
<img src="../../../../doc/html/images/prev.png" alt="Prev" />
</a>
<a accesskey="u" href="../first.html">
<img src="../../../../doc/html/images/up.png" alt="Up" />
</a>
<a accesskey="h" href="../../index.html">
<img src="../../../../doc/html/images/home.png" alt="Home" />
</a>
<a accesskey="n" href="../second.html">
<img src="../../../../doc/html/images/next.png" alt="Next" />
</a>
</div>
<div id="footer">
<div id="footer-left">
<div id="copyright">
<p xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision">Copyright © 2007 Matias Capeletto</p>
</div>
<div id="license">
<p>Distributed under the
<a href="/LICENSE_1_0.txt" class="internal">Boost Software License, Version 1.0</a>.
</p>
</div>
</div>
<div id="footer-right">
<div id="banners">
<p id="banner-xhtml">
<a href="http://validator.w3.org/check?uri=referer" class="external">XHTML 1.0</a>
</p>
<p id="banner-css">
<a href="http://jigsaw.w3.org/css-validator/check/referer" class="external">CSS</a>
</p>
<p id="banner-sourceforge">
<a href="http://sourceforge.net" class="external">SourceForge</a>
</p>
</div>
</div>
<div class="clear"></div>
</div>
</body>
</html>

View File

@@ -0,0 +1,162 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Second</title>
<link xmlns="" rel="stylesheet" href="../boostbook.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0" />
<link rel="start" href="../index.html" title="Chapter 1. Boost.GroupedLinks example" />
<link rel="up" href="../index.html" title="Chapter 1. Boost.GroupedLinks example" />
<link rel="prev" href="first/sub_c.html" title="Sub C" />
<link rel="next" href="second/sub_b.html" title="Sub B" />
</head>
<body>
<script type="text/javascript" src="../grouped_links.js"></script>
<div id="heading">
<div id="heading-placard"></div>
<div class="heading_navigation_box">
<div class="grouped_links" id="chapters_select_box">
<script type="text/javascript">
grouped_links_select_box(
'../boost_libs_grouped_links.xml',
'chapters_select_box',
'http://www.boost.org/libs/');
</script>
</div>
<div class="grouped_links" id="sections_select_box">
<script type="text/javascript">
grouped_links_select_box(
'../sections_grouped_links.xml',
'sections_select_box',
'.././');
</script>
</div>
</div>
<div class="heading_search_box">
<form id="cref" action="http://google.com/cse">
<input type="hidden" name="cref" value="" />
<div> Search Boost </div>
<div>
<input class="search_box" type="text" name="q" id="q" size="40" maxlength="255" alt="Search Text" />
</div>
</form>
</div>
</div>
<div class="spirit-nav">
<a accesskey="p" href="first/sub_c.html">
<img src="../../../doc/html/images/prev.png" alt="Prev" />
</a>
<a accesskey="u" href="../index.html">
<img src="../../../doc/html/images/up.png" alt="Up" />
</a>
<a accesskey="h" href="../index.html">
<img src="../../../doc/html/images/home.png" alt="Home" />
</a>
<a accesskey="n" href="second/sub_b.html">
<img src="../../../doc/html/images/next.png" alt="Next" />
</a>
</div>
<div id="body">
<div id="body-inner">
<div id="content">
<div xmlns="http://www.w3.org/1999/xhtml" class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">
<a id="boostbook_integration.second"></a>
<a href="second.html" title="Second">Second</a>
</h2>
</div>
</div>
</div>
<div xmlns="" class="toc">
<div class="box-outer-wrapper">
<div class="box-top-left"></div>
<div class="box-top-right"></div>
<div class="box-top"></div>
<div class="box-inner-wrapper">
<dl xmlns="http://www.w3.org/1999/xhtml">
<dt>
<span class="section">
<a href="second.html#boostbook_integration.second.sub_a">Sub A</a>
</span>
</dt>
<dt>
<span class="section">
<a href="second/sub_b.html">Sub B</a>
</span>
</dt>
</dl>
</div>
<div class="box-bottom-left"></div>
<div class="box-bottom-right"></div>
<div class="box-bottom"></div>
</div>
</div>
<p>
Second section
</p>
<div class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a id="boostbook_integration.second.sub_a"></a>
<a href="second.html#boostbook_integration.second.sub_a" title="Sub A">Sub A</a>
</h3>
</div>
</div>
</div>
<p>
Second section - subsection A
</p>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="spirit-nav">
<a accesskey="p" href="first/sub_c.html">
<img src="../../../doc/html/images/prev.png" alt="Prev" />
</a>
<a accesskey="u" href="../index.html">
<img src="../../../doc/html/images/up.png" alt="Up" />
</a>
<a accesskey="h" href="../index.html">
<img src="../../../doc/html/images/home.png" alt="Home" />
</a>
<a accesskey="n" href="second/sub_b.html">
<img src="../../../doc/html/images/next.png" alt="Next" />
</a>
</div>
<div id="footer">
<div id="footer-left">
<div id="copyright">
<p xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision">Copyright © 2007 Matias Capeletto</p>
</div>
<div id="license">
<p>Distributed under the
<a href="/LICENSE_1_0.txt" class="internal">Boost Software License, Version 1.0</a>.
</p>
</div>
</div>
<div id="footer-right">
<div id="banners">
<p id="banner-xhtml">
<a href="http://validator.w3.org/check?uri=referer" class="external">XHTML 1.0</a>
</p>
<p id="banner-css">
<a href="http://jigsaw.w3.org/css-validator/check/referer" class="external">CSS</a>
</p>
<p id="banner-sourceforge">
<a href="http://sourceforge.net" class="external">SourceForge</a>
</p>
</div>
</div>
<div class="clear"></div>
</div>
</body>
</html>

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Sub B</title>
<link xmlns="" rel="stylesheet" href="../../boostbook.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0" />
<link rel="start" href="../../index.html" title="Chapter 1. Boost.GroupedLinks example" />
<link rel="up" href="../second.html" title="Second" />
<link rel="prev" href="../second.html" title="Second" />
<link rel="next" href="../final.html" title="Final" />
</head>
<body>
<script type="text/javascript" src="../../grouped_links.js"></script>
<div id="heading">
<div id="heading-placard"></div>
<div class="heading_navigation_box">
<div class="grouped_links" id="chapters_select_box">
<script type="text/javascript">
grouped_links_select_box(
'../../boost_libs_grouped_links.xml',
'chapters_select_box',
'http://www.boost.org/libs/');
</script>
</div>
<div class="grouped_links" id="sections_select_box">
<script type="text/javascript">
grouped_links_select_box(
'../../sections_grouped_links.xml',
'sections_select_box',
'../.././');
</script>
</div>
</div>
<div class="heading_search_box">
<form id="cref" action="http://google.com/cse">
<input type="hidden" name="cref" value="" />
<div> Search Boost </div>
<div>
<input class="search_box" type="text" name="q" id="q" size="40" maxlength="255" alt="Search Text" />
</div>
</form>
</div>
</div>
<div class="spirit-nav">
<a accesskey="p" href="../second.html">
<img src="../../../../doc/html/images/prev.png" alt="Prev" />
</a>
<a accesskey="u" href="../second.html">
<img src="../../../../doc/html/images/up.png" alt="Up" />
</a>
<a accesskey="h" href="../../index.html">
<img src="../../../../doc/html/images/home.png" alt="Home" />
</a>
<a accesskey="n" href="../final.html">
<img src="../../../../doc/html/images/next.png" alt="Next" />
</a>
</div>
<div id="body">
<div id="body-inner">
<div id="content">
<div xmlns="http://www.w3.org/1999/xhtml" class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a id="boostbook_integration.second.sub_b"></a>
<a href="sub_b.html" title="Sub B">Sub B</a>
</h3>
</div>
</div>
</div>
<p>
Second section - subsection B
</p>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="spirit-nav">
<a accesskey="p" href="../second.html">
<img src="../../../../doc/html/images/prev.png" alt="Prev" />
</a>
<a accesskey="u" href="../second.html">
<img src="../../../../doc/html/images/up.png" alt="Up" />
</a>
<a accesskey="h" href="../../index.html">
<img src="../../../../doc/html/images/home.png" alt="Home" />
</a>
<a accesskey="n" href="../final.html">
<img src="../../../../doc/html/images/next.png" alt="Next" />
</a>
</div>
<div id="footer">
<div id="footer-left">
<div id="copyright">
<p xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision">Copyright © 2007 Matias Capeletto</p>
</div>
<div id="license">
<p>Distributed under the
<a href="/LICENSE_1_0.txt" class="internal">Boost Software License, Version 1.0</a>.
</p>
</div>
</div>
<div id="footer-right">
<div id="banners">
<p id="banner-xhtml">
<a href="http://validator.w3.org/check?uri=referer" class="external">XHTML 1.0</a>
</p>
<p id="banner-css">
<a href="http://jigsaw.w3.org/css-validator/check/referer" class="external">CSS</a>
</p>
<p id="banner-sourceforge">
<a href="http://sourceforge.net" class="external">SourceForge</a>
</p>
</div>
</div>
<div class="clear"></div>
</div>
</body>
</html>

View File

@@ -0,0 +1,63 @@
#include <iostream>
#include <fstream>
#include <string>
#include <functional>
#include <algorithm>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
#include <boost/optional.hpp>
#include <boost/none.hpp>
using namespace boost::property_tree;
using namespace boost;
using namespace std;
optional<ptree&> find_toc( ptree& html )
{
ptree& pbody = html.get_child("html.body");
for( ptree::iterator i = pbody.begin(), ie = pbody.end();
i != ie ; ++i )
{
std::cout << i->second.get<string>("<xmlattr>","") << std::endl;
if( i->second.get<string>("<xmlattr>","") == "body" )
{
ptree& pc = i->second.get_child("div.div.div");
for( ptree::iterator ic = pc.begin(), iec = pc.end();
ic != iec ; ++ic )
{
if( i->second.get<string>("<xmlattr>","") == "toc" )
{
return i->second.get_child("dl");
}
}
}
}
return none;
}
int main()
{
ptree html;
std::string in_name = "index.html";
/*
ifstream inhtml( in_name.c_str(), ios_base::in );
if( !inhtml )
{
std::cout << std::endl << "dow!" << std::endl;
}
*/
read_xml(in_name,html);
optional<ptree&> toc = find_toc(html);
if( toc )
{
std::cout << std::endl << "great!" << std::endl;
}
return 0;
}

View File

@@ -0,0 +1,198 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Chapter 1. Boost.GroupedLinks example</title>
<link xmlns="" rel="stylesheet" href="boostbook.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0" />
<link rel="start" href="index.html" title="Chapter 1. Boost.GroupedLinks example" />
<link rel="next" href="boostbook_integration/first.html" title="First" />
</head>
<body>
<script type="text/javascript" src="grouped_links.js"></script>
<div id="heading">
<div id="heading-placard"></div>
<div class="heading_navigation_box">
<div class="grouped_links" id="chapters_select_box">
<script type="text/javascript">
grouped_links_select_box(
'boost_libs_grouped_links.xml',
'chapters_select_box',
'http://www.boost.org/libs/');
</script>
</div>
<div class="grouped_links" id="sections_select_box">
<script type="text/javascript">
grouped_links_select_box(
'sections_grouped_links.xml',
'sections_select_box',
'./');
</script>
</div>
</div>
<div class="heading_search_box">
<form id="cref" action="http://google.com/cse">
<input type="hidden" name="cref" value="" />
<div> Search Boost </div>
<div>
<input class="search_box" type="text" name="q" id="q" size="40" maxlength="255" alt="Search Text" />
</div>
</form>
</div>
</div>
<div class="spirit-nav">
<a accesskey="n" href="boostbook_integration/first.html">
<img src="../../doc/html/images/next.png" alt="Next" />
</a>
</div>
<div id="body">
<div id="body-inner">
<div id="content">
<div xmlns="http://www.w3.org/1999/xhtml" class="chapter" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a id="boostbook_integration"></a>Chapter 1. Boost.GroupedLinks example</h2>
</div>
<div>
<div class="author">
<h3 class="author"><span class="firstname">Matias</span> <span class="surname">Capeletto</span></h3>
</div>
</div>
<div>
<p class="copyright">Copyright © 2007 Matias Capeletto</p>
</div>
<div>
<div class="legalnotice">
<a id="id2597309"></a>
<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a xmlns="" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div>
</div>
</div>
</div>
<div xmlns="" class="toc">
<div class="box-outer-wrapper">
<div class="box-top-left"></div>
<div class="box-top-right"></div>
<div class="box-top"></div>
<div class="box-inner-wrapper">
<p>
<b>Table of Contents</b>
</p>
<dl xmlns="http://www.w3.org/1999/xhtml">
<dt>
<span class="section">
<a href="index.html#boostbook_integration.preface">Preface</a>
</span>
</dt>
<dt>
<span class="section">
<a href="boostbook_integration/first.html">First</a>
</span>
</dt>
<dd>
<dl>
<dt>
<span class="section">
<a href="boostbook_integration/first.html#boostbook_integration.first.sub_a">Sub A</a>
</span>
</dt>
<dt>
<span class="section">
<a href="boostbook_integration/first/sub_b.html">Sub B</a>
</span>
</dt>
<dt>
<span class="section">
<a href="boostbook_integration/first/sub_c.html">Sub C</a>
</span>
</dt>
</dl>
</dd>
<dt>
<span class="section">
<a href="boostbook_integration/second.html">Second</a>
</span>
</dt>
<dd>
<dl>
<dt>
<span class="section">
<a href="boostbook_integration/second.html#boostbook_integration.second.sub_a">Sub A</a>
</span>
</dt>
<dt>
<span class="section">
<a href="boostbook_integration/second/sub_b.html">Sub B</a>
</span>
</dt>
</dl>
</dd>
<dt>
<span class="section">
<a href="boostbook_integration/final.html">Final</a>
</span>
</dt>
</dl>
</div>
<div class="box-bottom-left"></div>
<div class="box-bottom-right"></div>
<div class="box-bottom"></div>
</div>
</div>
<div class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">
<a id="boostbook_integration.preface"></a>
<a href="index.html#boostbook_integration.preface" title="Preface">Preface</a>
</h2>
</div>
</div>
</div>
<p>
Preface section
</p>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="spirit-nav">
<a accesskey="n" href="boostbook_integration/first.html">
<img src="../../doc/html/images/next.png" alt="Next" />
</a>
</div>
<div id="footer">
<div id="footer-left">
<div id="revised">Revised: June 15, 2007 at 15:06:18 GMT</div>
<div id="copyright"></div>
<div id="license">
<p>Distributed under the
<a href="/LICENSE_1_0.txt" class="internal">Boost Software License, Version 1.0</a>.
</p>
</div>
</div>
<div id="footer-right">
<div id="banners">
<p id="banner-xhtml">
<a href="http://validator.w3.org/check?uri=referer" class="external">XHTML 1.0</a>
</p>
<p id="banner-css">
<a href="http://jigsaw.w3.org/css-validator/check/referer" class="external">CSS</a>
</p>
<p id="banner-sourceforge">
<a href="http://sourceforge.net" class="external">SourceForge</a>
</p>
</div>
</div>
<div class="clear"></div>
</div>
</body>
</html>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--=========================================================================
Grouped links for Boost.GroupedLinks boostbook integration example
Copyright (c) 2007 Matias Capeletto
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)
===========================================================================-->
<groupedLinks version="1.0">
<title tag="Sections" url="index.html"/>
<group tag="Preface" url="index.html"/>
<group tag="First" url="boostbook_integration/first.html">
<item tag="Sub A" url="boostbook_integration/first.html"/>
<item tag="Sub B" url="boostbook_integration/first/sub_b.html"/>
<item tag="Sub C" url="boostbook_integration/first/sub_c.html"/>
</group>
<group tag="Second" url="boostbook_integration/second.html">
<item tag="Sub A" url="boostbook_integration/second.html"/>
<item tag="Sub B" url="boostbook_integration/second/sub_b.html"/>
</group>
<group tag="Final" url="boostbook_integration/final.html"/>
</groupedLinks>

View File

@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--=========================================================================
Grouped links for Boost Libraries documentation
Copyright (c) 2007 Matias Capeletto
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)
===========================================================================-->
<groupedLinks version="1.0">
<title tag="Boost Libraries" url="index.html" />
<group tag="Text processing" url="index.html" >
<!--=======================================================================-->
<item tag="lexical_cast" url="conversion/lexical_cast.htm" />
<item tag="format" url="format/index.html" />
<item tag="iostreams" url="iostreams/doc/index.html" />
<item tag="regex" url="regex/index.html" />
<item tag="spirit" url="spirit/index.html" />
<item tag="string_algo" url="algorithm/string/index.html" />
<item tag="tokenizer" url="tokenizer/index.html" />
<item tag="wave" url="wave/index.html" />
<item tag="xpressive" url="xpressive/index.html" />
</group>
<group tag="Data structures" url="index.html" >
<!--=======================================================================-->
<item tag="any" url="any/index.html" />
<item tag="array" url="array/index.html" />
<item tag="bimap" url="http://tinyurl.com/22sja5" />
<item tag="compressed_pair" url="utility/compressed_pair.htm" />
<item tag="dynamic_bitset" url="dynamic_bitset/dynamic_bitset.html" />
<item tag="graph" url="graph/doc/table_of_contents.html" />
<item tag="multi_array" url="multi_array/doc/index.html" />
<item tag="multi_index" url="multi_index/doc/index.html" />
<item tag="optional" url="libs/optional/doc/optional.html" />
<item tag="ptr_container" url="ptr_container/index.html" />
<item tag="property_map" url="property_map/property_map.html" />
<item tag="tribool" url="doc/html/tribool.html" />
<item tag="tuple" url="tuple/doc/tuple_users_guide.html" />
<item tag="variant" url="variant/index.html" />
</group>
<group tag="Algorithms" url="index.html" >
<!--=======================================================================-->
<item tag="foreach" url="foreach/index.html" />
<item tag="minmax" url="algorithm/minmax/index.html" />
<item tag="range" url="range/index.html" />
</group>
<group tag="Functional" url="index.html" >
<!--=======================================================================-->
<item tag="bind" url="bind/bind.html" />
<item tag="function" url="function/index.html" />
<item tag="functional" url="functional/index.htm" />
<item tag="hash" url="functional/hash/index.html" />
<item tag="lambda" url="lambda/index.html" />
<item tag="bind" url="bind/ref.html" />
<item tag="signals" url="signals/index.html" />
<item tag="result_of" url="utility/utility.htm#result_of" />
</group>
<group tag="Generic Programming" url="index.html" >
<!--=======================================================================-->
<item tag="call_traits" url="utility/call_traits.htm" />
<item tag="concept_check" url="concept_check/concept_check.htm" />
<item tag="enable_if" url="utility/enable_if.html" />
<item tag="in_place_factory" url="utility/in_place_factories.html" />
<item tag="iterators" url="iterator/doc/index.html" />
<item tag="operators" url="utility/operators.htm" />
<item tag="typeof" url="typeof/index.html" />
</group>
<group tag="Metaprogramming" url="index.html" >
<!--=======================================================================-->
<item tag="mpl" url="mpl/doc/index.html" />
<item tag="static_assert" url="static_assert/static_assert.htm" />
<item tag="type_traits" url="type_traits/index.html" />
</group>
<group tag="Concurrent" url="index.html" >
<!--=======================================================================-->
<item tag="thread" url="thread/doc/index.html" />
</group>
<group tag="Math and numerics" url="index.html" >
<!--=======================================================================-->
<item tag="math" url="math/doc/index.html" />
<item tag="conversion" url="numeric/conversion/index.html" />
<item tag="integer" url="integer/index.html" />
<item tag="interval" url="numeric/interval/doc/interval.htm" />
<item tag="random" url="random/index.html" />
<item tag="rational" url="rational/index.html" />
<item tag="ublas" url="numeric/ublas/doc/index.htm" />
</group>
<group tag="Input Output" url="index.html" >
<!--=======================================================================-->
<item tag="io state savers" url="io/doc/ios_state.html" />
<item tag="program_options" url="../doc/html/program_options.html" />
<item tag="serialization" url="serialization/doc/index.html" />
</group>
<group tag="Memory" url="index.html" >
<!--=======================================================================-->
<item tag="pool" url="pool/doc/index.html" />
<item tag="smart_ptr" url="smart_ptr/index.html" />
<item tag="utility" url="utility/utility.htm" />
</group>
<group tag="Miscellaneous" url="index.html" >
<!--=======================================================================-->
<item tag="assign" url="assign/index.html" />
<item tag="base from member" url="utility/base_from_member.html" />
<item tag="crc" url="crc/index.html" />
<item tag="date_time" url="date_time/doc/index.html" />
<item tag="filesystem" url="filesystem/doc/index.htm" />
<item tag="parameter" url="parameter/doc/html/index.html" />
<item tag="preprocesor" url="preprocessor/doc/index.html" />
<item tag="python" url="python/doc/index.html" />
<item tag="timer" url="timer/index.html" />
<item tag="tr1" url="tr1/index.html" />
<item tag="statechart" url="statechart/doc/index.html" />
<item tag="value_initialized" url="utility/value_init.htm" />
</group>
<group tag="Compiler workarounds" url="index.html" >
<!--=======================================================================-->
<item tag="compatibility" url="compatibility/index.html" />
<item tag="config" url="config/config.htm" />
</group>
</groupedLinks>

View File

@@ -0,0 +1,46 @@
<!--===========================================================================
Copyright (c) 2007 Matias Capeletto
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)
============================================================================-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Boost.GroupedLinks Example</title>
<link rel="stylesheet" href="../../css/grouped_links.css" type="text/css">
</head>
<body>
<!-- Include the grouped links java script api -->
<script type="text/javascript" src="../../../grouped_links.js"></script>
<!-- Add a div with an unique "id" attribute -->
<form id="boost_libs_list">
<!-- Call the GroupedLinks "select box" with the following parameters
(1) GroupedLinks xml definition url
(2) form id
(3) base url for the links
(4) selected item [optional] -->
<script type="text/javascript">
grouped_links_select_box('boost_libs.xml',
'boost_libs_list',
'http://www.boost.org/libs/');
</script>
</form>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="refresh" content="0; URL=doc/html/index.html">
</head>
<body>
Automatic redirection failed, click this
<a href="doc/html/index.html">link</a>
</body>
</html>

View File

@@ -0,0 +1 @@
/*===========================================================================

View File

@@ -0,0 +1 @@