[xslt] libxslt 1.0.14 fails attribset40 test from Oasis XSLT conformancesuite

This is reproducible with libxxslt 1.1.4/libxml2 2.6.4. Sorry I didn't 
test this with 1.1.5/2.6.5 but it didn't appear to be in the ftp 
archives yet. This is a very tricky test case. Start with this XML file:

<?xml version="1.0"?>

Then use this XSLT stylesheet:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 

  <!-- FileName: attribset40 -->
  <!-- Document: http://www.w3.org/TR/xslt -->
  <!-- DocVersion: 19991116 -->
  <!-- Section: 7.1.3 Creating Attributes -->
  <!-- Creator: David Marston -->
  <!-- Purpose: The attribute must be in the designated namespace, even 
if the prefix has
    to be reset or ignored. -->

<xsl:template match="/">
      <xsl:attribute name="{docs/b}" 


The output should be something like:

<?xml version="1.0"?>
<out xmlns:bdd="http://bdd.test.com";><bdd:jam xmlns:pre="http://xyz.com"; 

That is libxslt should *remap the attribute prefix to avoid the 
namespace conflict*. Yes, I know that's weird but it is what the spec 
and the test case say. Instead what we get is this, which is clearly 
wrong because it changes the jam element's namespace:

<?xml version="1.0"?>
<out xmlns:bdd="http://bdd.test.com";><bdd:jam xmlns:bdd="http://xyz.com"; 

Elliotte Rusty Harold

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]