After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 59757 - overriding attribute-sets doesn't work
overriding attribute-sets doesn't work
Status: VERIFIED FIXED
Product: libxslt
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
Daniel Veillard
: 59991 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2001-08-29 21:49 UTC by lodewijk
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description lodewijk 2001-08-29 21:49:48 UTC
I previously mailed to the mailinglist about this, but got no answer. I still think it's 
a bug, so I'm submitting it:

take foo.xml:

<foo/>

and foo1.xsl:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"x 
mlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html"/>
 
  <xsl:attribute-set name="foo-attribs">
    <xsl:attribute name="size">+1</xsl:attribute>
  </xsl:attribute-set>
 
  <xsl:template match="foo">
    <font xsl:use-attribute-sets="foo-attribs">
    foo
    </font>
  </xsl:template>
 
</xsl:stylesheet>

and foo2.xsl, overriding the size attribute:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
  <xsl:import href="foo1.xsl"/>
 
  <xsl:attribute-set name="foo-attribs">
    <xsl:attribute name="size">+2</xsl:attribute>
  </xsl:attribute-set>
 
</xsl:stylesheet>

okay, xsltproc on foo1.xsl gives:

$ xsltproc foo1.xsl foo.xml
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" 
"http://www.w3.org/TR/REC-html40/loose.dtd">
<font size="+1">
    foo
    </font>

good. but, xsltproc on foo2.xsl gives:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" 
"http://www.w3.org/TR/REC-html40/loose.dtd">
<font size="+1">
    foo
    </font>

not good, I'd expect +2 because I've overridden the attribute set. xt and Xalan do 
give +2 as expected.

this is with libxslt 1.0.2
Comment 1 Daniel Veillard 2001-09-10 17:46:14 UTC
Okay, I fixed this in CVS:

http://cvs.gnome.org/bonsai/cvsquery.cgi?module=libxslt&branch=HEAD&branchtype=match&dir=libxslt&file=&filetype=match&who=veillard&whotype=match&sortby=Date&hours=&date=explicit&mindate=09%2F10%2F01+13%3A42&maxdate=09%2F10%2F01+13%3A44&cvsroot=%2Fcvs%2Fgnome


orchis:~/XSLT/tests/tmp -> xsltproc foo1.xsl foo.xml
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<font size="+1">
foo
    </font>
orchis:~/XSLT/tests/tmp -> xsltproc foo2.xsl foo.xml
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<font size="+2">
foo
    </font>
orchis:~/XSLT/tests/tmp -> 

  thanks for the report !

Daniel
Comment 2 Daniel Veillard 2001-09-10 19:58:55 UTC
*** Bug 59991 has been marked as a duplicate of this bug. ***
Comment 3 Daniel Veillard 2001-09-15 17:41:16 UTC
this should be fixed in release 1.0.4,

 thanks,

Daniel