1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-11-02 13:33:20 +03:00

fixes bug #97969 for @*[...] patterns added the example in the regression

* libxslt/pattern.c: fixes bug #97969 for @*[...] patterns
* tests/docs/Makefile.am tests/docs/bug-97.xml
  tests/general/Makefile.am tests/general/bug-97.*: added the
  example in the regression tests for this case
Daniel
This commit is contained in:
Daniel Veillard
2002-11-13 09:38:48 +00:00
parent bd8fc8ab50
commit 89d4d86894
7 changed files with 67 additions and 1 deletions

View File

@@ -1,3 +1,10 @@
Wed Nov 13 10:35:46 CET 2002 Daniel Veillard <daniel@veillard.com>
* libxslt/pattern.c: fixes bug #97969 for @*[...] patterns
* tests/docs/Makefile.am tests/docs/bug-97.xml
tests/general/Makefile.am tests/general/bug-97.*: added the
example in the regression tests for this case
Tue Nov 12 22:35:47 CET 2002 Daniel Veillard <daniel@veillard.com>
* libxslt/transform.c: fixes bug #97950 for cdata-section-elements

View File

@@ -1342,7 +1342,7 @@ xsltCompileStepPattern(xsltParserContextPtr ctxt, xmlChar *token) {
if (CUR == '*') {
NEXT;
PUSH(XSLT_OP_ATTR, NULL, NULL);
return;
goto parse_predicate;
}
token = xsltScanQName(ctxt, &prefix);
if (prefix != NULL) {

View File

@@ -96,6 +96,7 @@ EXTRA_DIST = \
bug-94.xml \
bug-95.xml \
bug-96.xml \
bug-97.xml \
character.xml \
array.xml \
items.xml

16
tests/docs/bug-97.xml Normal file
View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<car:cars xmlns:car="http://www.example.com/xmlns/car"
xmlns:m="http://www.example.com/xmlns/manufacturer">
<car:models>
<car:model car:name="Rabbit" m:id="VW" car:year="1984" />
<car:model car:name="Tundra" m:id="TY" car:year="2000" />
<car:model car:name="Mini" m:id="BM" car:year="2003" />
</car:models>
<m:manufacturers>
<m:manufacturer m:id="VW" m:name="Volkswagen" m:country="Germany" />
<m:manufacturer m:id="TY" m:name="Toyota" m:country="Japan" />
<m:manufacturer m:id="BM" m:name="Bavarian Motor Works"
m:country="Germany"/>
</m:manufacturers>
</car:cars>

View File

@@ -100,6 +100,7 @@ EXTRA_DIST = \
bug-94.out bug-94.xsl \
bug-95.out bug-95.xsl \
bug-96.out bug-96.xsl \
bug-97.out bug-97.xsl \
character.out character.xsl \
character2.out character2.xsl \
itemschoose.out itemschoose.xsl \

9
tests/general/bug-97.out Normal file
View File

@@ -0,0 +1,9 @@
My Car Models:
Rabbit
Tundra
Mini
The Manufacturers:
Volkswagen
Toyota
Bavarian Motor Works

32
tests/general/bug-97.xsl Normal file
View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:car="http://www.example.com/xmlns/car"
xmlns:manu="http://www.example.com/xmlns/manufacturer">
<xsl:output method="text" encoding="UTF-8" />
<xsl:strip-space elements="*" />
<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="car:models">
<xsl:text>My Car Models:&#xA;</xsl:text>
<xsl:apply-templates select="car:model/@car:name"></xsl:apply-templates>
<xsl:text>&#xA;</xsl:text>
</xsl:template>
<xsl:template match="manu:manufacturers">
<xsl:text>The Manufacturers:&#xA;</xsl:text>
<xsl:apply-templates select="manu:manufacturer/@manu:name"></xsl:apply-templates>
</xsl:template>
<xsl:template match="@*[local-name()='name']">
<xsl:value-of select="." />
<xsl:text>&#xA;</xsl:text>
</xsl:template>
</xsl:stylesheet>