makeinfo patch for @email to docbook
Per Bothner <[email protected]> Fri, 22 Apr 2005 10:09:06 -0700
| Newsgroups | gmane.comp.tex.texinfo.pretest |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --------------040709060009090407080302 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit This is a little more complicated than ideal, since it appears that Docbook's <email> tag doesn't handle a separate name operand, so we map it in two different ways. -- --Per Bothner [email protected] http://per.bothner.com/ --------------040709060009090407080302 Content-Type: text/x-patch; name="mi-email.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mi-email.patch" 2005-04-22 Per Bothner <[email protected]> * makeinfo/xml.c (docbook_element_list): Map EMAILADDARESS to "email". * makeinfo/xref.c (cm_email): For docbook, if there is no name, use <email> tag, rather than <ulink>. If there is a name, we must use <ulink>, but we need to explicitly escape expansion of addr. Index: makeinfo/xml.c =================================================================== RCS file: /cvsroot/texinfo/texinfo/makeinfo/xml.c,v retrieving revision 1.56 diff -u -r1.56 xml.c --- makeinfo/xml.c 1 Apr 2005 21:30:40 -0000 1.56 +++ makeinfo/xml.c 22 Apr 2005 16:43:26 -0000 @@ -398,7 +398,7 @@ element docbook_element_list [] = { { "", 0, 1, 0 }, /* UREFREPLACEMENT */ { "ulink", 0, 1, 0 }, /* EMAIL */ - { "", 0, 1, 0 }, /* EMAILADDRESS */ + { "email", 0, 1, 0 }, /* EMAILADDRESS */ { "", 0, 1, 0 }, /* EMAILNAME */ { "", 0, 0, 0 }, /* GROUP */ Index: makeinfo/xref.c =================================================================== RCS file: /cvsroot/texinfo/texinfo/makeinfo/xref.c,v retrieving revision 1.6 diff -u -p -r1.6 xref.c --- makeinfo/xref.c 5 Feb 2005 17:40:59 -0000 1.6 +++ makeinfo/xref.c 22 Apr 2005 16:48:19 -0000 @@ -574,10 +574,20 @@ cm_email (int arg) if (xml && docbook) { - xml_insert_element_with_attribute (EMAIL, START, "url=\"mailto:%s\"", addr); - if (*name) + if (*name) + { + xml_insert_element_with_attribute (EMAIL, START, + "url=\"mailto:%s\"", + maybe_escaped_expansion (addr, 0, 1)); execute_string ("%s", name); - xml_insert_element (EMAIL, END); + xml_insert_element (EMAIL, END); + } + else + { + xml_insert_element (EMAILADDRESS, START); + execute_string ("%s", addr); + xml_insert_element (EMAILADDRESS, END); + } } else if (xml) { --------------040709060009090407080302 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Texinfo home page: http://www.gnu.org/software/texinfo/ [email protected] http://ff0.org/mailman/listinfo/texinfo-pretest --------------040709060009090407080302--