<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>5492</bug_id>
          
          <creation_ts>2005-10-24 21:53:49 -0700</creation_ts>
          <short_desc>XSLTProcessor ignores namespaces</short_desc>
          <delta_ts>2021-01-15 08:27:34 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>XML</component>
          <version>420+</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>3275</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>ian</cc>
    
    <cc>kings14x</cc>
    
    <cc>korisu</cc>
    
    <cc>lamargoddard</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>22872</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2005-10-24 21:53:49 -0700</bug_when>
    <thetext>At least getParameter, setParameter and removeParameter ignore namespaces.  There are currently test 
cases to show this.  The reason why I left these failing as they are, is that I&apos;m not sure libxml2 supports 
namespaces... infact, I&apos;m not even sure what &quot;namespace&quot; support would mean for parameters.  &quot;prefix&quot; 
suport makes some sense.  But does that mean that we are expected to translate from namespace URIs to 
prefixes when used?  It&apos;s not clear at all what mozilla does in this case, or what they indended when they 
wrote their documentation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52848</commentid>
    <comment_count>1</comment_count>
      <attachid>10100</attachid>
    <who name="Lamar Goddard">lamargoddard</who>
    <bug_when>2006-08-17 12:23:06 -0700</bug_when>
    <thetext>Created attachment 10100
Zip archive of 1 xsl and 1 xhtml test files

It looks like it&apos;s not just the parameters that ignore namespaces.  Elements don&apos;t have their namespace set properly for the transform.

The attached identity_new_class.xsl file is the identity transform but it also adds a class to each node if a class isn&apos;t already present.  If you load the attached xsltprocessor_namespace.xhtml file in WebKit it does the transform, but because the namespace isn&apos;t properly passed to the transform, the resulting nodes have no namespace and are treated like plain xml.  Also because the parameters don&apos;t pass in their namespace, the xsl:param doesn&apos;t match and it gets set to the empty string.

It behaves as expected when loading the xsltprocessor_namespace.xhtml file in FireFox showing an unordered list with two blue list items &quot;Does&quot; and &quot;Work&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>211609</commentid>
    <comment_count>2</comment_count>
      <attachid>53164</attachid>
    <who name="Scott Trenda">korisu</who>
    <bug_when>2010-04-12 08:21:09 -0700</bug_when>
    <thetext>Created attachment 53164
Another file showing the incorrect behavior of WebKit&apos;s setParameter method.

+1 for this, although it looks like no one&apos;s seen this bug in at least two years. It&apos;s appearing in Chrome as well. It looks like these lines in the source note this bug and are ultimately to blame:


void XSLTProcessorImpl::setParameter(DOMStringImpl *namespaceURI, DOMStringImpl *localName, DOMStringImpl *value)
{
	// FIXME: namespace support?
	m_parameters.replace(DOMString(localName).qstring(), new DOMString(value));
}

SharedPtr&lt;DOMStringImpl&gt; XSLTProcessorImpl::getParameter(DOMStringImpl *namespaceURI, DOMStringImpl *localName) const
{
	// FIXME: namespace support?
	if (DOMString *value = m_parameters.find(DOMString(localName).qstring()))
		return value-&gt;impl();
	return 0;
}

void XSLTProcessorImpl::removeParameter(DOMStringImpl *namespaceURI, DOMStringImpl *localName)
{
	// FIXME: namespace support?
	m_parameters.remove(DOMString(localName).qstring());
}


Please get this taken care of with all appropriate speed. For the record, Firefox and Opera return the correct result from the transformation. These are the outputs from the most current versions of the following browsers as of 4/12/2010:

Firefox/Opera:
XSLTProcessor param namespace test
$param = non-namespaced param
$ns1:param = namespace-1 param
$ns2:param = namespace-2 param
XSLTProcessor param namespace test
$param = non-namespaced param
$ns1:param = not set
$ns2:param = not set

Chrome/Safari:
XSLTProcessor param namespace test
$param = namespace-2 param
$ns1:param = not set
$ns2:param = not set
XSLTProcessor param namespace test
$param = non-namespaced param
$ns1:param = namespace-1 param
$ns2:param = namespace-2 param</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>211613</commentid>
    <comment_count>3</comment_count>
    <who name="Scott Trenda">korisu</who>
    <bug_when>2010-04-12 08:25:15 -0700</bug_when>
    <thetext>Also worth noting that this happens on Chrome and Safari in Windows as well, not just OSX.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1719881</commentid>
    <comment_count>4</comment_count>
    <who name="jared">kings14x</who>
    <bug_when>2021-01-15 08:27:34 -0800</bug_when>
    <thetext>hey im new at filling bugs but i have quite a few issues i need to discuss</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>10100</attachid>
            <date>2006-08-17 12:23:06 -0700</date>
            <delta_ts>2006-08-17 12:23:06 -0700</delta_ts>
            <desc>Zip archive of 1 xsl and 1 xhtml test files</desc>
            <filename>xslt_ns.tgz</filename>
            <type>application/octet-stream</type>
            <size>1043</size>
            <attacher name="Lamar Goddard">lamargoddard</attacher>
            
              <data encoding="base64">H4sIAF+75EQAA+1W62/bNhA3BgxF8gfsM6sNsFMkounn4sru0NhYCyRpkGio9ylgRdpWR4mqSMUx
uv7vO0pW7LyaPZIt7fgDBFG8J493unPxuRL6NKYRVwkNOK7cP+qAbrsNb0JIu1l8dzr5e4kKqbe6
hDTbrS7wkXYDyKj9AL5cQ6Y0TRGqTCVjNGW38t1FLw9Svr8QuFfv3z0NGY91qBenMZ+fBoIq5QL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RceRgWxXfJUrjhDA6lXqMO3sr0t+W3hzNhrBVmwCrc4gMOkRYWFhYWFhYWFhYWFhYW
FhYWFhaPEn8Aeg3xZwAoAAA=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>53164</attachid>
            <date>2010-04-12 08:21:09 -0700</date>
            <delta_ts>2010-04-12 08:21:09 -0700</delta_ts>
            <desc>Another file showing the incorrect behavior of WebKit&apos;s setParameter method.</desc>
            <filename>XSLTProcessor-namespace-param-test.html</filename>
            <type>text/html</type>
            <size>1875</size>
            <attacher name="Scott Trenda">korisu</attacher>
            
              <data encoding="base64">PGh0bWw+DQoJPGhlYWQ+DQoJCTx0aXRsZT5YU0xUUHJvY2Vzc29yIHBhcmFtIG5hbWVzcGFjZSB0
ZXh0PC90aXRsZT4NCgkJPHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiPg0KCQkJd2luZG93
Lm9ubG9hZCA9IGZ1bmN0aW9uICgpIHsNCgkJCQl2YXIgeG1sRG9jID0gKG5ldyBET01QYXJzZXIp
LnBhcnNlRnJvbVN0cmluZygiPHgvPiIsICJ0ZXh0L3htbCIpOw0KCQkJCXZhciB4c2xEb2MgPSAo
bmV3IERPTVBhcnNlcikucGFyc2VGcm9tU3RyaW5nKCI8eHNsOnN0eWxlc2hlZXQgdmVyc2lvbj0n
MS4wJyB4bWxuczp4c2w9J2h0dHA6Ly93d3cudzMub3JnLzE5OTkvWFNML1RyYW5zZm9ybScgeG1s
bnM6bnMxPSduYW1lc3BhY2UtMScgeG1sbnM6bnMyPSduYW1lc3BhY2UtMic+IiArDQoJCQkJCQki
PHhzbDpvdXRwdXQgbWV0aG9kPSdodG1sJyBlbmNvZGluZz0ndXRmLTgnIC8+IiArDQoJCQkJCQki
PHhzbDpwYXJhbSBuYW1lPSdwYXJhbSc+bm90IHNldDwveHNsOnBhcmFtPiIgKw0KCQkJCQkJIjx4
c2w6cGFyYW0gbmFtZT0nbnM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