From: Daniel Veillard Date: Mon, 25 Mar 2002 16:16:25 +0000 (+0000) Subject: Fix bug #76043 about cascading attribute sets added a specific example for X-Git-Tag: v1.1.28~973 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d4bbb5c8d53c277d63eb14b00462ec0e5614683;p=platform%2Fupstream%2Flibxslt.git Fix bug #76043 about cascading attribute sets added a specific example for * libxslt/attributes.c libxslt/attributes.h libxslt/pattern.c libxslt/xslt.c: Fix bug #76043 about cascading attribute sets * tests/docs/Makefile.am tests/docs/bug-80.xml tests/general/Makefile.am tests/general/bug-80.*: added a specific example for bug #76043 in the regression tests Daniel --- diff --git a/ChangeLog b/ChangeLog index d9238d7..081eeb1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Mon Mar 25 17:11:42 CET 2002 Daniel Veillard + + * libxslt/attributes.c libxslt/attributes.h libxslt/pattern.c + libxslt/xslt.c: Fix bug #76043 about cascading attribute sets + * tests/docs/Makefile.am tests/docs/bug-80.xml + tests/general/Makefile.am tests/general/bug-80.*: added a + specific example for bug #76043 in the regression tests + Fri Mar 22 19:26:47 CET 2002 Daniel Veillard * libxslt/pattern.c: Fixing bug #75902 error with @foo[..] diff --git a/libxslt/attributes.c b/libxslt/attributes.c index d19e848..ce295d5 100644 --- a/libxslt/attributes.c +++ b/libxslt/attributes.c @@ -75,11 +75,14 @@ * an attribute set */ + typedef struct _xsltAttrElem xsltAttrElem; typedef xsltAttrElem *xsltAttrElemPtr; struct _xsltAttrElem { struct _xsltAttrElem *next;/* chained list */ xmlNodePtr attr; /* the xsl:attribute definition */ + const xmlChar *set; /* or the attribute set */ + const xmlChar *ns; /* and its namespace */ }; /************************************************************************ @@ -119,7 +122,10 @@ xsltNewAttrElem(xmlNodePtr attr) { */ static void xsltFreeAttrElem(xsltAttrElemPtr attr) { - memset(attr, -1, sizeof(xsltAttrElem)); + if (attr->set != NULL) + xmlFree((char *)attr->set); + if (attr->ns != NULL) + xmlFree((char *)attr->ns); xmlFree(attr); } @@ -186,38 +192,64 @@ xsltMergeAttrElemList(xsltAttrElemPtr list, xsltAttrElemPtr old) { int add; while (old != NULL) { - + if ((old->attr == NULL) && (old->set == NULL)) { + old = old->next; + continue; + } /* * Check that the attribute is not yet in the list */ cur = list; add = 1; while (cur != NULL) { + if ((cur->attr == NULL) && (cur->set == NULL)) { + if (cur->next == NULL) + break; + cur = cur->next; + continue; + } + if ((cur->set != NULL) && (cur->set == old->set)) { + add = 0; + break; + } + if (cur->set != NULL) { + if (cur->next == NULL) + break; + cur = cur->next; + continue; + } + if (old->set != NULL) { + if (cur->next == NULL) + break; + cur = cur->next; + continue; + } if (cur->attr == old->attr) { xsltGenericError(xsltGenericErrorContext, "xsl:attribute-set : use-attribute-sets recursion detected\n"); return(list); } - if (xmlStrEqual(cur->attr->name, old->attr->name)) { - if (cur->attr->ns == old->attr->ns) { - add = 0; - break; - } - if ((cur->attr->ns != NULL) && (old->attr->ns != NULL) && - (xmlStrEqual(cur->attr->ns->href, old->attr->ns->href))) { - add = 0; - break; - } - } if (cur->next == NULL) break; cur = cur->next; } - if (cur == NULL) { - list = xsltNewAttrElem(old->attr); - } else if (add) { - cur->next = xsltNewAttrElem(old->attr); + if (add == 1) { + if (cur == NULL) { + list = xsltNewAttrElem(old->attr); + if (old->set != NULL) { + list->set = xmlStrdup(old->set); + if (old->ns != NULL) + list->ns = xmlStrdup(old->ns); + } + } else if (add) { + cur->next = xsltNewAttrElem(old->attr); + if (old->set != NULL) { + cur->next->set = xmlStrdup(old->set); + if (old->ns != NULL) + cur->next->ns = xmlStrdup(old->ns); + } + } } old = old->next; @@ -336,8 +368,12 @@ xsltParseStylesheetAttributeSet(xsltStylesheetPtr style, xmlNodePtr cur) { attrib = NULL; prefix = NULL; } - values2 = xmlHashLookup2(style->attributeSets, ncname2, prefix2); - values = xsltMergeAttrElemList(values, values2); + values2 = xsltNewAttrElem(NULL); + if (values2 != NULL) { + values2->set = ncname2; + values2->ns = prefix2; + values = xsltMergeAttrElemList(values, values2); + } if (attrib != NULL) xmlFree(attrib); @@ -354,6 +390,8 @@ done: /* * Update the value */ + if (values == NULL) + values = xsltNewAttrElem(NULL); xmlHashUpdateEntry2(style->attributeSets, ncname, prefix, values, NULL); #ifdef WITH_XSLT_DEBUG_ATTRIBUTES xsltGenericDebug(xsltGenericDebugContext, @@ -370,6 +408,105 @@ error: } /** + * xsltGetSAS: + * @style: the XSLT stylesheet + * @name: the attribute list name + * @ns: the attribute list namespace + * + * lookup an attribute set based on the style cascade + * + * Returns the attribute set or NULL + */ +static xsltAttrElemPtr +xsltGetSAS(xsltStylesheetPtr style, const xmlChar *name, const xmlChar *ns) { + xsltAttrElemPtr values; + + while (style != NULL) { + values = xmlHashLookup2(style->attributeSets, name, ns); + if (values != NULL) + return(values); + style = xsltNextImport(style); + } + return(NULL); +} + +/** + * xsltResolveSASCallback,: + * @style: the XSLT stylesheet + * + * resolve the references in an attribute set. + */ +static void +xsltResolveSASCallback(xsltAttrElemPtr values, xsltStylesheetPtr style, + const xmlChar *name, const xmlChar *ns, + const xmlChar *ignored) { + xsltAttrElemPtr tmp; + xsltAttrElemPtr refs; + + tmp = values; + while (tmp != NULL) { + if (tmp->set != NULL) { + /* + * Check against cycles ! + */ + if ((xmlStrEqual(name, tmp->set)) && (xmlStrEqual(ns, tmp->ns))) { + xsltGenericError(xsltGenericErrorContext, + "xsl:attribute-set : use-attribute-sets recursion detected on %s\n", + name); + } else { +#ifdef WITH_XSLT_DEBUG_ATTRIBUTES + xsltGenericDebug(xsltGenericDebugContext, + "Importing attribute list %s\n", tmp->set); +#endif + + refs = xsltGetSAS(style, tmp->set, tmp->ns); + if (refs == NULL) { + xsltGenericError(xsltGenericErrorContext, + "xsl:attribute-set : use-attribute-sets %s reference missing %s\n", + name, tmp->set); + } else { + /* + * recurse first for cleanup + */ + xsltResolveSASCallback(refs, style, name, ns, NULL); + /* + * Then merge + */ + xsltMergeAttrElemList(values, refs); + /* + * Then suppress the reference + */ + xmlFree((char *)tmp->set); + tmp->set = NULL; + if (tmp->ns != NULL) { + xmlFree((char *)tmp->ns); + } + } + } + } + tmp = tmp->next; + } +} + +/** + * xsltResolveStylesheetAttributeSet: + * @style: the XSLT stylesheet + * + * resolve the references between attribute sets. + */ +void +xsltResolveStylesheetAttributeSet(xsltStylesheetPtr style) { +#ifdef WITH_XSLT_DEBUG_ATTRIBUTES + xsltGenericDebug(xsltGenericDebugContext, + "Resolving attribute sets references\n"); +#endif + if (style->attributeSets != NULL) { + xmlHashScanFull(style->attributeSets, + (xmlHashScannerFull) xsltResolveSASCallback, style); + } +} + +/** * xsltAttributeInternal: * @ctxt: a XSLT process context * @node: the node in the source tree. diff --git a/libxslt/attributes.h b/libxslt/attributes.h index c112a2e..f4d3133 100644 --- a/libxslt/attributes.h +++ b/libxslt/attributes.h @@ -22,6 +22,7 @@ void xsltApplyAttributeSet (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xmlChar *attributes); +void xsltResolveStylesheetAttributeSet(xsltStylesheetPtr style); #ifdef __cplusplus } #endif diff --git a/libxslt/pattern.c b/libxslt/pattern.c index 47a86af..52a4d30 100644 --- a/libxslt/pattern.c +++ b/libxslt/pattern.c @@ -596,18 +596,23 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp, * if the node is in the result list. */ if (comp->steps[i + 1].op == XSLT_OP_PREDICATE) { - xmlNodePtr previous; + xmlDocPtr prevdoc, doc; xmlXPathObjectPtr list; int index, j; + int nocache = 0; - previous = (xmlNodePtr) + prevdoc = (xmlDocPtr) XSLT_RUNTIME_EXTRA(ctxt, select->previousExtra); index = (int) XSLT_RUNTIME_EXTRA(ctxt, select->indexExtra); list = (xmlXPathObjectPtr) XSLT_RUNTIME_EXTRA(ctxt, select->lenExtra); - if (list == NULL) { + + doc = node->doc; + if ((list == NULL) || (prevdoc != doc)) { xmlChar *query; + xmlXPathObjectPtr newlist; + xmlNodePtr parent = node->parent; if (comp->pattern[0] == '/') query = xmlStrdup(comp->pattern); @@ -615,30 +620,54 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp, query = xmlStrdup((const xmlChar *)"//"); query = xmlStrcat(query, comp->pattern); } - list = xmlXPathEval(query, ctxt->xpathCtxt); + newlist = xmlXPathEval(query, ctxt->xpathCtxt); xmlFree(query); - if (list == NULL) + if (newlist == NULL) return(-1); - if (list->type != XPATH_NODESET) { - xmlXPathFreeObject(list); + if (newlist->type != XPATH_NODESET) { + xmlXPathFreeObject(newlist); return(-1); } - XSLT_RUNTIME_EXTRA(ctxt, select->lenExtra) = - (void *) list; - XSLT_RUNTIME_EXTRA_FREE(ctxt, select->lenExtra) = - (xmlFreeFunc) xmlXPathFreeObject; + + if ((parent == NULL) || (node->doc == NULL)) + nocache = 1; + else { + while (parent->parent != NULL) + parent = parent->parent; + if (((parent->type != XML_DOCUMENT_NODE) && + (parent->type != XML_HTML_DOCUMENT_NODE)) || + (parent != (xmlNodePtr) node->doc)) + nocache = 1; + } + if (nocache == 0) { + if (list != NULL) + xmlXPathFreeObject(list); + list = newlist; + + XSLT_RUNTIME_EXTRA(ctxt, select->lenExtra) = + (void *) list; + XSLT_RUNTIME_EXTRA(ctxt, select->previousExtra) = + (void *) doc; + XSLT_RUNTIME_EXTRA_FREE(ctxt, select->lenExtra) = + (xmlFreeFunc) xmlXPathFreeObject; + } } if ((list->nodesetval == NULL) || (list->nodesetval->nodeNr <= 0)) return(0); + /* TODO: store the index and use it for the scan */ if (index == 0) { for (j = 0;j < list->nodesetval->nodeNr;j++) { if (list->nodesetval->nodeTab[j] == node) { + if (nocache == 1) + xmlXPathFreeObject(list); return(1); } } } else { } + if (nocache == 1) + xmlXPathFreeObject(list); return(0); } /* diff --git a/libxslt/xslt.c b/libxslt/xslt.c index e053c4c..375d4de 100644 --- a/libxslt/xslt.c +++ b/libxslt/xslt.c @@ -1937,6 +1937,7 @@ xsltParseStylesheetProcess(xsltStylesheetPtr ret, xmlDocPtr doc) { template->content = doc->children; xsltAddTemplate(ret, template, NULL, NULL); } + xsltResolveStylesheetAttributeSet(ret); return(ret); } diff --git a/tests/docbook/result/fo/gdp-handbook.fo b/tests/docbook/result/fo/gdp-handbook.fo index f989140..4744bab 100644 --- a/tests/docbook/result/fo/gdp-handbook.fo +++ b/tests/docbook/result/fo/gdp-handbook.fo @@ -382,7 +382,7 @@ people to make announcements and suggestions and to discuss issues in the comments section. - + Note Note that the information in the @@ -409,7 +409,7 @@ source nature of SGML. To contribute to the GDP you should learn to use DocBook. - + NOTE To get started writing for the GDP you do not need to rush @@ -490,8 +490,8 @@ DTD's. To install the GDP custom DTD with PNG image support by hand: - - + + @@ -506,7 +506,7 @@ - + @@ -517,11 +517,11 @@ distribution. (On Red Hat it is usually in /usr/lib/sgml/CATALOG.) Add the following line to this file: - + PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.0//EN" "png-support-3.0.dtd" If you are using the 3.1 DTD, use: - + PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN" "png-support-3.1.dtd" @@ -540,14 +540,14 @@ PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN" "png-support- Articles: - + <!DOCTYPE Article PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"[]> Books: - + <!DOCTYPE Book PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"[]> @@ -620,7 +620,7 @@ V1.1//EN"[]> mydocument.sgml, after which you can print out or view the resulting .ps file. - + NOTE The html files you get will not look quite the same as the @@ -656,7 +656,7 @@ V1.1//EN"[]> include the extension of the image file, since DocBook Tools will automatically insert it for you. For example: - + <figure> <title>My Image</title> @@ -700,8 +700,8 @@ V1.1//EN"[]> The following resources on the web are useful for learning DocBook: - - + + @@ -715,7 +715,7 @@ V1.1//EN"[]> - + @@ -728,7 +728,7 @@ V1.1//EN"[]> - + @@ -742,7 +742,7 @@ V1.1//EN"[]> - + @@ -766,8 +766,8 @@ V1.1//EN"[]> The following sections of this document are designed to help documentation authors write correct and consistent DocBook: - - + + @@ -1373,8 +1373,8 @@ V1.1//EN"[]> advised that the documentation writers conform to XML syntax rules. Here are most important differences: - - + + Minimization @@ -1395,7 +1395,7 @@ V1.1//EN"[]> - + Self-closing tags @@ -1415,7 +1415,7 @@ V1.1//EN"[]> - + Case sensitive tags @@ -1487,7 +1487,7 @@ V1.1//EN"[]> <note>, <tip>, <warning>, <important> respectively. For example: - + <tip> <title>TIP</title> @@ -1521,7 +1521,7 @@ V1.1//EN"[]> To include screenshots and other figures, use the following tags: - + <figure id="shot1"> <title>Screenshot</title> @@ -1535,9 +1535,9 @@ V1.1//EN"[]> replacing example_screenshot with the actual file name (without extension). The result will look like this: - Screenshot + Screenshot - + NOTE Notice in this example that the screenshot file name does @@ -1557,7 +1557,7 @@ V1.1//EN"[]> To show a file fragment--for example, program listing--use <programlisting> tag: - + <programlisting> [Desktop Entry] @@ -1569,7 +1569,7 @@ Type=Application </programlisting> which produces - + [Desktop Entry] Name=Gnumeric spreadsheet Exec=gnumeric @@ -1584,7 +1584,7 @@ Type=Application To show a record of terminal session--i.e., sequence of commands entered at the command line--use <screen> tag: - + <screen> <prompt>bash$</prompt><userinput>make love</userinput> @@ -1592,14 +1592,14 @@ make: *** No rule to make target `love'. Stop. </screen> which produces - + bash$make love make: *** No rule to make target `love'. Stop. Note the use of tags <prompt> and <userinput> for marking system prompt and commands entered by user. - NOTE + NOTE Note that both <programlisting> and <screen> preserve linebreaks, but interpret SGML tags (unlike LaTeX @@ -1623,8 +1623,8 @@ make: *** No rule to make target `love'. Stop. <orderedlist>, and <variablelist>. - - + + <itemizedlist> @@ -1634,7 +1634,7 @@ make: *** No rule to make target `love'. Stop. This is the simplest unnumbered list, parallel to <ul> in HTML. Here is an example: - + <itemizedlist> <listitem> @@ -1663,8 +1663,8 @@ make: *** No rule to make target `love'. Stop. and output: - - + + @@ -1676,7 +1676,7 @@ make: *** No rule to make target `love'. Stop. - + @@ -1689,7 +1689,7 @@ make: *** No rule to make target `love'. Stop. - + @@ -1718,7 +1718,7 @@ make: *** No rule to make target `love'. Stop. - + <orderedlist> @@ -1741,7 +1741,7 @@ make: *** No rule to make target `love'. Stop. - + <variablelist> @@ -1758,7 +1758,7 @@ make: *** No rule to make target `love'. Stop. computer to search. The lines you are reading now were produced by <variablelist>. The source looked liked this: - + <variablelist> <varlistentry> @@ -1812,8 +1812,8 @@ make: *** No rule to make target `love'. Stop. - - + + @@ -1824,7 +1824,7 @@ make: *** No rule to make target `love'. Stop. - + @@ -1839,7 +1839,7 @@ make: *** No rule to make target `love'. Stop. - + @@ -1850,7 +1850,7 @@ make: *** No rule to make target `love'. Stop. - + @@ -1860,7 +1860,7 @@ make: *** No rule to make target `love'. Stop. - + @@ -1871,7 +1871,7 @@ make: *** No rule to make target `love'. Stop. - + @@ -1888,7 +1888,7 @@ make: *** No rule to make target `love'. Stop. Main Menu->Utilities->GNOME terminal there is a special construction for this, too: - + <menuchoice> <guimenu>Main Menu</guimenu> <guisubmenu>Utilities</guisubmenu> @@ -1911,7 +1911,7 @@ make: *** No rule to make target `love'. Stop. automatically inserts the full name of the element you refer to (section, figure, etc.), while the second just creates a link (in HTML output). Here is an example: - + An example of a <link linkend="extip">tip</link> was given in <xref linkend="notes" />. @@ -1925,7 +1925,7 @@ An example of a <link linkend="extip">tip</link> was given To produce a link to an external source, such as a Web page or a local file, use <ulink> tag, for example: - + To find more about GNOME, please visit <ulink type="http" url="http://www.gnome.org">GNOME Web page</ulink> @@ -1951,8 +1951,8 @@ url="http://www.gnome.org">GNOME Web page</ulink> Here are some tags used to describe operating system-related things: - - + + @@ -1966,7 +1966,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> - + @@ -1980,7 +1980,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> - + @@ -1994,7 +1994,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> - + @@ -2006,7 +2006,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> - + @@ -2020,7 +2020,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> - + @@ -2066,7 +2066,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> To mark up a combination of keystrokes, use the <keycombo> wrapper: - + <keycombo> <keycap>Ctrl</keycap> @@ -2078,7 +2078,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> Finally, if you want to show a shortcut for some menu command, here are the appropriate tags (rather long): - + <menuchoice> <shortcut> @@ -2101,7 +2101,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> To mark up e-mail address, use <email>: - + The easiest way to get in touch with me is by e-mail (<email>me@mydomain.com</email>) @@ -2131,8 +2131,8 @@ url="http://www.gnome.org">GNOME Web page</ulink> here is partial list of most commonly used enitites: - - + + @@ -2142,7 +2142,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> - + @@ -2152,7 +2152,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> - + @@ -2162,7 +2162,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> - + @@ -2172,7 +2172,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> - + @@ -2260,7 +2260,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> Application documentation should identify the version of the application for which the documentation is written: - + <sect1 id="intro"> <title>Introduction</title> @@ -2336,7 +2336,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> PNG format only) when appropriate. They should also describe each feature and preference option available. - + Documentation Availability Applications and applets should not rely on documentation @@ -2352,7 +2352,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> versions 1.x and the templates in the section called “Template 2: Applet Manual For GNOME 2.x” for GNOME versions 2.x. - + Manuals For Large Applications Manuals for very large applications, such as GNOME Workshop @@ -2363,7 +2363,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> <sect1>). - + Applet Manuals in GNOME 2.0 Note that applet manuals in GNOME 2.0 are treated in a special @@ -2393,7 +2393,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> - + Developer Information This section is for developers. Documentation authors @@ -2406,7 +2406,7 @@ url="http://www.gnome.org">GNOME Web page</ulink> Help menu at the top right of the application. To do this, you must first write a topic.dat file. The format for this file is: - + One line for each 'topic'. Two columns, as defined by perl -e 'split(/\s+/,$aline,2)' @@ -2418,7 +2418,7 @@ Second column is the user-visible topic name. For example, Gnumeric's topic.dat file is: - + gnumeric.html Gnumeric manual function-reference.html Gnumeric function reference @@ -2430,7 +2430,7 @@ function-reference.html Gnumeric function reference from SGML into HTML with db2html) should be placed in this directory too. - + Note If the help files are not present in the correct directory, the @@ -2441,7 +2441,7 @@ function-reference.html Gnumeric function reference The topic.dat file is used by the GNOME menu building code to generate the Help menu. When you define your menu: - + GnomeUIInfo helpmenu[] = { {GNOME_APP_UI_ITEM, N_("About"), N_("Info about this program"), @@ -2470,7 +2470,7 @@ GnomeUIInfo helpmenu[] = { - + Developer Information This section is for developers. Documentation authors @@ -2494,7 +2494,7 @@ GnomeUIInfo helpmenu[] = { To make the Help buttons call the correct document in the GNOME Help Browser the developer should add code based on the following example: - + gchar *tmp; tmp = gnome_help_file_find_file ("module", "page.html"); if (tmp) { @@ -2502,7 +2502,7 @@ if (tmp) { g_free(tmp); } - + NOTE The example above is in the C language, please refer to other @@ -2572,7 +2572,7 @@ if (tmp) { - + Developer Information This section is for developers. Documentation authors @@ -2588,7 +2588,7 @@ if (tmp) { To add an applet's manual to its applet menu, use: - + /* add an item to the applet menu */ applet_widget_register_callback(APPLET_WIDGET(applet), "manual", _("Manual"), &open_manual, NULL); @@ -2608,7 +2608,7 @@ _("Manual"), &open_manual, NULL); You will also want to add an About menu item to the applet's menu. This is a stock menu item and is done: - + applet_widget_register_stock_callback (APPLET_WIDGET(applet), "about", GNOME_STOCK_MENU_ABOUT, _("About"), &my_applet_cb_about, NULL); @@ -2740,7 +2740,7 @@ applet_widget_register_stock_callback (APPLET_WIDGET(applet), "about", Just as you need to juggle expert and novice readers, you'll have to juggle a number of other extremes as you write: - + Documents should be complete, yet concise. You should describe every feature, but you'll have decide how much detail is really necessary. It's not, for example, @@ -2750,7 +2750,7 @@ applet_widget_register_stock_callback (APPLET_WIDGET(applet), "about", you spend fewer words on the obvious, you can spend more time clarifying the ambiguous labels and explaining items that are more complex. - + Be engaging and friendly, yet professional. Games documents may be less formal than productivity application documents (people don't @@ -2759,14 +2759,14 @@ applet_widget_register_stock_callback (APPLET_WIDGET(applet), "about", maintain a standard of style which holds the reader's interest without resorting to jokes and untranslatable allusions or puns. - + Examples, tips, notes, and screenshots are useful to break up long stretches of text, but too many can get in the way, and make your documents too choppy to read. It's good to provide a screenshot of any dialog windows a user might run into, but if a dialog box has several tabs, it's not usually necessary to have one for each. - + The GDP strives to have all of its documentation conform to certain standards of style and content, but every document (and every writer) is different. You will need @@ -3055,7 +3055,7 @@ applet_widget_register_stock_callback (APPLET_WIDGET(applet), "about", manuals. You can always get the latest copy of this template from GDP Documentation Templates [http://developer.gnome.org/projects/gdp/templates.html]. - + <!DOCTYPE Article PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"[ @@ -3809,7 +3809,7 @@ applet_widget_register_stock_callback (APPLET_WIDGET(applet), "about", where appletname is the name of the applet. - + <!DOCTYPE Article PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"[ @@ -3889,7 +3889,7 @@ applet_widget_register_stock_callback (APPLET_WIDGET(applet), "about", - + <!-- Template Version: 1.0.1 (do not remove this line) --> @@ -4148,7 +4148,7 @@ applet_widget_register_stock_callback (APPLET_WIDGET(applet), "about", the applet document. - + <!DOCTYPE book PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"[ <!ENTITY TEMPLATE-APPLET SYSTEM "gnome-applet-template.sgml.part"> @@ -4603,7 +4603,7 @@ applet_widget_register_stock_callback (APPLET_WIDGET(applet), "about", - + <!-- Please replace everywhere below GNOMEAPPLET with the name of --> diff --git a/tests/docs/Makefile.am b/tests/docs/Makefile.am index 7585bf7..cf18217 100644 --- a/tests/docs/Makefile.am +++ b/tests/docs/Makefile.am @@ -80,6 +80,7 @@ EXTRA_DIST = \ bug-77.xml \ bug-78.xml \ bug-79.xml \ + bug-80.xml \ character.xml \ array.xml \ items.xml diff --git a/tests/docs/bug-80.xml b/tests/docs/bug-80.xml new file mode 100644 index 0000000..4acc582 --- /dev/null +++ b/tests/docs/bug-80.xml @@ -0,0 +1,6 @@ + + + + + a + diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am index 23be6bc..ff00770 100644 --- a/tests/general/Makefile.am +++ b/tests/general/Makefile.am @@ -83,6 +83,7 @@ EXTRA_DIST = \ bug-77.out bug-77.xsl \ bug-78.out bug-78.xsl \ bug-79.out bug-79.xsl \ + bug-80.out bug-80.xsl \ character.out character.xsl \ character2.out character2.xsl \ itemschoose.out itemschoose.xsl \ diff --git a/tests/general/bug-77.out b/tests/general/bug-77.out index a6392e5..c1a02a3 100644 --- a/tests/general/bug-77.out +++ b/tests/general/bug-77.out @@ -1,5 +1,5 @@ -Hi -bonjour +Hi +bonjour diff --git a/tests/general/bug-80.out b/tests/general/bug-80.out new file mode 100644 index 0000000..25f4382 --- /dev/null +++ b/tests/general/bug-80.out @@ -0,0 +1,2 @@ + + diff --git a/tests/general/bug-80.xsl b/tests/general/bug-80.xsl new file mode 100644 index 0000000..c9f9eaf --- /dev/null +++ b/tests/general/bug-80.xsl @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + underline + + + + black + + + + 14pt + + +