Re: [docbook->html] support for MathML
Steven Watanabe <[email protected]>
| Newsgroups | gmane.comp.lib.boost.documentation |
|---|---|
| Organization | Providere Consulting, Inc. |
| Message-ID | <[email protected]> |
AMDG On 10/21/2011 07:36 AM, Daniel James wrote: > On 21 October 2011 15:06, Steven Watanabe <[email protected]> wrote: >> >> What I did locally is to set >> xml:base, so <xi:include> can >> use the original path. > > Will that break other xincludes? > The attached patch seems to work, although it needs some clean-up. I ran the full doc build with it. In Christ, Steven Watanabe _______________________________________________ Boost-docs mailing list [email protected] http://lists.boost.org/mailman/listinfo.cgi/boost-docs
quickbook.patch
(text/x-patch, 1.9 KB)
Index: tools/quickbook/src/doc_info_actions.cpp
===================================================================
--- tools/quickbook/src/doc_info_actions.cpp (revision 74966)
+++ tools/quickbook/src/doc_info_actions.cpp (working copy)
@@ -69,6 +69,8 @@
return values;
}
+ fs::path path_difference(fs::path const& base, fs::path const& path);
+
void pre(collector& out, quickbook::actions& actions, bool ignore_docinfo)
{
// The doc_info in the file has been parsed. Here's what we'll do
@@ -92,6 +94,10 @@
std::vector<std::string> duplicates;
+ fs::path xml_base = path_difference(
+ actions.xinclude_base,
+ actions.filename);
+
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);
@@ -248,6 +254,13 @@
<< doc_info_output(lang, 106)
<< "\"\n";
}
+
+ if(!xml_base.empty())
+ {
+ out << " xml:base=\""
+ << detail::escape_uri(xml_base.generic_string())
+ << "\"\n";
+ }
if(actions.doc_type == "library")
{
Index: tools/quickbook/src/actions.cpp
===================================================================
--- tools/quickbook/src/actions.cpp (revision 74966)
+++ tools/quickbook/src/actions.cpp (working copy)
@@ -1763,8 +1763,7 @@
write_anchors(actions, actions.out);
value_consumer values = xinclude;
- fs::path path = calculate_relative_path(
- check_path(values.consume(), actions), actions);
+ fs::path path = detail::generic_to_path(check_path(values.consume(), actions));
values.finish();
actions.out << "\n<xi:include href=\"";