[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
makeinfo PATCH to support @anchor in docbook
From: |
Per Bothner |
Subject: |
makeinfo PATCH to support @anchor in docbook |
Date: |
Sun, 03 Jun 2007 22:20:18 -0700 |
User-agent: |
Thunderbird 2.0.0.0 (X11/20070419) |
It might be reasonable to use an 'id' attribute rather than a 'name'
for xml output as well as docbook - 'id' seems more standard than
'name'. ('name' is actually deprecated for HTML.)
(I'm not subscribed to this list, so please cc me any comments.)
--
--Per Bothner
address@hidden http://per.bothner.com/
2007-06-03 Per Bothner <address@hidden>
* xml.c (docbook_element_list): Map ANCHOR to "anchor".
* node.c (cm_anchor): Handle docbook.
Index: xml.c
===================================================================
RCS file: /sources/texinfo/texinfo/makeinfo/xml.c,v
retrieving revision 1.66
diff -u -p -r1.66 xml.c
--- xml.c 3 Jan 2007 23:05:35 -0000 1.66
+++ xml.c 4 Jun 2007 05:16:17 -0000
@@ -415,7 +415,7 @@ element docbook_element_list [] = {
{ "index", 0, 0, 0 }, /* PRINTINDEX */
{ "", 0, 1, 0 }, /* LISTOFFLOATS */
- { "", 0, 1, 0 }, /* ANCHOR */
+ { "anchor", 0, 1, 0 }, /* ANCHOR */
{ "", 0, 0, 0 }, /* IMAGE */
{ "inlinemediaobject", 0, 1, 0 }, /* INLINEIMAGE */
Index: node.c
===================================================================
RCS file: /sources/texinfo/texinfo/makeinfo/node.c,v
retrieving revision 1.32
diff -u -p -r1.32 node.c
--- node.c 4 May 2007 21:59:53 -0000 1.32
+++ node.c 4 Jun 2007 05:16:18 -0000
@@ -1230,9 +1230,11 @@ cm_anchor (int arg)
}
}
}
- else if (xml)
+ else if (xml || docbook)
{
- xml_insert_element_with_attribute (ANCHOR, START, "name=\"%s\"", anchor);
+ xml_insert_element_with_attribute (ANCHOR, START,
+ docbook ? "id=\"%s\"" : "name=\"%s\"",
+ anchor);
xml_insert_element (ANCHOR, END);
}
- makeinfo PATCH to support @anchor in docbook,
Per Bothner <=