[gtk-doc] mkdb: add an idea for rewriting path of system entities in the doctype_header
- From: Stefan Kost <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] mkdb: add an idea for rewriting path of system entities in the doctype_header
- Date: Fri, 25 Jun 2010 19:59:27 +0000 (UTC)
commit 3371616807bbaf35a8e1a81ac13d35f8a8fccc6d
Author: Stefan Kost <ensonic users sf net>
Date: Fri Jun 25 22:49:24 2010 +0300
mkdb: add an idea for rewriting path of system entities in the doctype_header
Also do a small cleanup to only rewrite the doctype_heqader if we read it from the main file.
gtkdoc-mkdb.in | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index c761c85..f822ad9 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -163,16 +163,19 @@ if ($OUTPUT_FORMAT eq "xml") {
$doctype_header .= $_;
}
close(INPUT);
+ $doctype_header =~ s/<!DOCTYPE \w+/<!DOCTYPE refentry/;
+ # if there are SYSTEM ENTITIES here, we should prepend "../" to the path
+ # FIXME: not sure if we can do this now, as people already work-around the problem
+ # $doctype_header =~ s#<!ENTITY % ([a-zA-Z-]+) SYSTEM \"([^/][a-zA-Z./]+)\">#<!ENTITY % $1 SYSTEM \"../$2\">#g;
} else {
$doctype_header =
"<?xml version=\"1.0\"?>\n" .
-"<!DOCTYPE book PUBLIC \"-//OASIS//DTD DocBook XML V4.3//EN\"\n" .
+"<!DOCTYPE refentry PUBLIC \"-//OASIS//DTD DocBook XML V4.3//EN\"\n" .
" \"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd\"\n" .
"[\n" .
" <!ENTITY % local.common.attrib \"xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'\">\n" .
"]>\n";
}
- $doctype_header =~ s/<!DOCTYPE \w+/<!DOCTYPE refentry/;
} else {
if (!$MAIN_SGML_FILE) {
$MAIN_SGML_FILE = "${MODULE}-docs.sgml";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]