libxslt r1481 - in trunk: . libxslt tests/docs tests/general
- From: wbrack svn gnome org
- To: svn-commits-list gnome org
- Subject: libxslt r1481 - in trunk: . libxslt tests/docs tests/general
- Date: Wed, 25 Jun 2008 07:05:52 +0000 (UTC)
Author: wbrack
Date: Wed Jun 25 07:05:52 2008
New Revision: 1481
URL: http://svn.gnome.org/viewvc/libxslt?rev=1481&view=rev
Log:
* libxslt/attrvt.c: added code to handle literal within an
AVT #539741.
* tests/docs/Makefile.am tests/docs/bug-168.xsl
* tests/general/Makefile.am tests/general/bug-168.* add a
test for this bug to the regression suite.
Added:
trunk/tests/docs/bug-168.xml
trunk/tests/general/bug-168.out
trunk/tests/general/bug-168.xsl
Modified:
trunk/ChangeLog
trunk/libxslt/attrvt.c
trunk/tests/docs/Makefile.am
trunk/tests/general/Makefile.am
Modified: trunk/libxslt/attrvt.c
==============================================================================
--- trunk/libxslt/attrvt.c (original)
+++ trunk/libxslt/attrvt.c Wed Jun 25 07:05:52 2008
@@ -244,7 +244,17 @@
}
cur++;
- while ((*cur != 0) && (*cur != '}')) cur++;
+ while ((*cur != 0) && (*cur != '}')) {
+ /* Need to check for literal (bug539741) */
+ if ((*cur == '\'') || (*cur == '"')) {
+ char delim = *(cur++);
+ while ((*cur != 0) && (*cur != delim))
+ cur++;
+ if (*cur != 0)
+ cur++; /* skip the ending delimiter */
+ } else
+ cur++;
+ }
if (*cur == 0) {
xsltTransformError(NULL, style, attr->parent,
"Attribute '%s': The AVT has an unmatched '{'.\n",
Modified: trunk/tests/docs/Makefile.am
==============================================================================
--- trunk/tests/docs/Makefile.am (original)
+++ trunk/tests/docs/Makefile.am Wed Jun 25 07:05:52 2008
@@ -166,6 +166,7 @@
bug-165.xml \
bug-166.xml \
bug-167.xml \
+ bug-168.xml \
character.xml \
array.xml \
items.xml
Added: trunk/tests/docs/bug-168.xml
==============================================================================
--- (empty file)
+++ trunk/tests/docs/bug-168.xml Wed Jun 25 07:05:52 2008
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns="http://www.w3.org/1999/xhtml">
+
+<xsl:template match="*">
+<A a="{concat('{',namespace-uri(),'}',local-name())}"/>
+<B b='{concat("{",namespace-uri(),"}",local-name())}'/>
+</xsl:template>
+
+</xsl:stylesheet>
Modified: trunk/tests/general/Makefile.am
==============================================================================
--- trunk/tests/general/Makefile.am (original)
+++ trunk/tests/general/Makefile.am Wed Jun 25 07:05:52 2008
@@ -175,6 +175,7 @@
bug-165.out bug-165.xsl bug-145.err \
bug-166.out bug-166.xsl \
bug-167.out bug-167.xsl \
+ bug-168.out bug-168.xsl \
character.out character.xsl \
character2.out character2.xsl \
itemschoose.out itemschoose.xsl \
Added: trunk/tests/general/bug-168.out
==============================================================================
--- (empty file)
+++ trunk/tests/general/bug-168.out Wed Jun 25 07:05:52 2008
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<A xmlns="http://www.w3.org/1999/xhtml" a="{http://www.w3.org/1999/XSL/Transform}stylesheet"/><B xmlns="http://www.w3.org/1999/xhtml" b="{http://www.w3.org/1999/XSL/Transform}stylesheet"/>
Added: trunk/tests/general/bug-168.xsl
==============================================================================
--- (empty file)
+++ trunk/tests/general/bug-168.xsl Wed Jun 25 07:05:52 2008
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns="http://www.w3.org/1999/xhtml">
+
+<xsl:template match="*">
+<A a="{concat('{',namespace-uri(),'}',local-name())}"/>
+<B b='{concat("{",namespace-uri(),"}",local-name())}'/>
+</xsl:template>
+
+</xsl:stylesheet>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]