# HG changeset patch # User Daniel Veillard <veillard@src.gnome.org> # Date 1081171579 0 # Mon Apr 05 13:26:19 2004 +0000 # Node ID 3caadf3b7bdbe7f0922f7f6e0486987ba7ee93e6 # Parent b06ccc8df094a5d89379c19da3f7e6bf5273c4de fixed a stupid cut'npaste bug #139132 added test to the regression for bug * libxslt/keys.c: fixed a stupid cut'npaste bug #139132 * tests/docs/Makefile.am tests/docs/bug-146.xml tests/general/Makefile.am tests/docs/bug-146*: added test to the regression for bug #139132 Daniel diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Mon Apr 5 15:23:53 CEST 2004 Daniel Veillard <daniel@veillard.com> + + * libxslt/keys.c: fixed a stupid cut'npaste bug #139132 + * tests/docs/Makefile.am tests/docs/bug-146.xml + tests/general/Makefile.am tests/docs/bug-146*: added test + to the regression for bug #139132 + 2004-04-02 10:17:23 HKT 2004 William Brack <wbrack@mmm.com.hk> * libxslt/keys.c: applied patch from Mark Vakoc to fix problem diff --git a/NEWS b/NEWS --- a/NEWS +++ b/NEWS @@ -4,12 +4,7 @@ Note that this is automatically generated from the news webpage at: http://xmlsoft.org/XSLT/news.html - -CVS only : check the Changelog at -http://cvs.gnome.org/lxr/source/libxslt/ChangeLog - file -for a really accurate description: - +Those are the public releases made: 1.1.5: Mar 23 2004: - performance: use dictionnary lookup for variables - remove use of _private from source documents diff --git a/tests/docs/Makefile.am b/tests/docs/Makefile.am --- a/tests/docs/Makefile.am +++ b/tests/docs/Makefile.am @@ -145,6 +145,7 @@ bug-143.xml \ bug-144.xml \ bug-145.xml \ + bug-146.xml \ character.xml \ array.xml \ items.xml diff --git a/tests/docs/bug-146.xml b/tests/docs/bug-146.xml new file mode 100644 --- /dev/null +++ b/tests/docs/bug-146.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="windows-1251"?> +<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Victor +Prylipko (Linia) --> +<root> + <colls COL_COD="PT" COL_NAME="����" CURR_ID_0="" CURR_ID_1="" CURR_ID_2="" +CURR_ID_3=""> + <goodcoll CODE="2655" ART="PA310ST" NAME="�������� ������ ��� �310 ���" +WEIGHT="10" VOLUME="0.09" GABS_W="72" GABS_H="112" GABS_D="0.4" SH_DESC="" +SUPP_ART="PA310ST" NUM="0" COL_COD="PT" +IMAGE_="/images/goods/image/PA310ST.gif" +SCHEMA_="/images/goods/schema/PA310ST.gif"> + <currency CURRENCY_="RUR" OPT="1" ROZN="2" ZAKUP="3" IN="4"/> + <currency CURRENCY_="USD" OPT="2" ROZN="3" ZAKUP="4" IN="5"/> + <goodcomb GOOD_ID="63647" NUM_COLOR="0" COL_ID="24007" +TITLE="������" COEF="0" ABS_COEF="0" RU_CODE="" EN_CODE="" PROPNAME_="C" +MODEL_=""> + <ost NUM_TIP="0" TIP="0"/> + <ost NUM_TIP="2" TIP="-3"/> + <ost NUM_TIP="4" TIP="-4"/> + <ost NUM_TIP="5" TIP="-4"/> + <ost NUM_TIP="6" TIP="-4"/> + <ost NUM_TIP="7" TIP="-3"/> + <ost NUM_TIP="8" TIP="-3"/> + <ost NUM_TIP="9" TIP="-3"/> + </goodcomb> + </goodcoll> + </colls> +</root> diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am --- a/tests/general/Makefile.am +++ b/tests/general/Makefile.am @@ -151,6 +151,7 @@ bug-143.out bug-143.xsl \ bug-144.out bug-144.xsl \ bug-145.out bug-145.xsl bug-145.err \ + bug-146.out bug-146.xsl \ character.out character.xsl \ character2.out character2.xsl \ itemschoose.out itemschoose.xsl \ diff --git a/tests/general/bug-146.out b/tests/general/bug-146.out new file mode 100644 --- /dev/null +++ b/tests/general/bug-146.out @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="windows-1251"?> +<root> + <colls COL_COD="PT" COL_NAME="����" CURR_ID_0="" CURR_ID_1="" CURR_ID_2="" CURR_ID_3=""> + <color COL_ID="24007" TITLE="������" RU_CODE=""/> + </colls> +</root> diff --git a/tests/general/bug-146.xsl b/tests/general/bug-146.xsl new file mode 100644 --- /dev/null +++ b/tests/general/bug-146.xsl @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="windows-1251"?> +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:output method="xml" encoding="windows-1251" indent="yes"/> +<xsl:strip-space elements="*"/> +<xsl:key name="EMPTY_EN_CODE_COLLS" match="/root/colls/goodcoll/goodcomb/@COL_ID +[../@EN_CODE = '']" use="../../../@COL_COD"/> +<xsl:key name="EMPTY_EN_CODE_COLRS" match="/root/colls/goodcoll/goodcomb/@COL_ID +[../@EN_CODE = '']" use="concat(.,':',../../../@COL_COD)"/> +<xsl:template match="/"> +<root> + <xsl:for-each select="/root/colls[key('EMPTY_EN_CODE_COLLS',@COL_COD)]"> + <xsl:copy> + <xsl:copy-of select="@*"/> + <xsl:for-each select="key('EMPTY_EN_CODE_COLLS',@COL_COD)[generate-id(.) = +generate-id(key('EMPTY_EN_CODE_COLRS',concat(.,':',../../../@COL_COD)))]"> + <color> + <xsl:copy-of select="../@TITLE | ../@RU_CODE | ."/> + </color> + </xsl:for-each> + </xsl:copy> + </xsl:for-each> +</root> +</xsl:template> +</xsl:stylesheet>