<?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>10462</bug_id>
          
          <creation_ts>2006-08-17 10:54:53 -0700</creation_ts>
          <short_desc>XMLHttpRequest does not respect xml-stylesheet</short_desc>
          <delta_ts>2006-11-12 02:57:25 -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>Mac (PowerPC)</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jake Devine">jake.devine</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>52840</commentid>
    <comment_count>0</comment_count>
    <who name="Jake Devine">jake.devine</who>
    <bug_when>2006-08-17 10:54:53 -0700</bug_when>
    <thetext>The XML Document returned is original, untransformed, document at the location specified by the URL.

It doesn&apos;t look like I can attach files to this bug, but I&apos;ll give you a quick example:

xmldoc.xml:
--------------
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
&lt;?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;xsldoc.xsl&quot;?&gt;
&lt;page&gt;
  &lt;paragraph&gt;
    &lt;line&gt;This is line one.&lt;/line&gt;
    &lt;line&gt;This is line two.&lt;/line&gt;
  &lt;/paragraph&gt;
&lt;/page&gt;

xsldoc.xsl:
--------------
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;xsl:stylesheet xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
  &lt;xsl:output method=&quot;text&quot; omit-xml-declaration=&quot;yes&quot; /&gt;
  
  &lt;xsl:template match=&quot;//page&quot;&gt;
    &lt;xsl:for-each select=&quot;paragraph&quot;&gt;
      &lt;p&gt;      
        &lt;xsl:apply-templates /&gt;
      &lt;/p&gt;
  &lt;/xsl:template&gt;
  
  &lt;xsl:template match=&quot;line&quot;&gt;
    &lt;br&gt;
      &lt;xsl:value-of select=&quot;.&quot;/&gt;
    &lt;/br&gt;
  &lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;
-------

When I enter the url for xmldoc.xml into the browser, i get the result of the transformation, however requesting it in an XMLHttpRequest just returns xmldoc.xml as an xml document.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52843</commentid>
    <comment_count>1</comment_count>
      <attachid>10096</attachid>
    <who name="Jake Devine">jake.devine</who>
    <bug_when>2006-08-17 11:35:05 -0700</bug_when>
    <thetext>Created attachment 10096
The XML document listed in the description.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52845</commentid>
    <comment_count>2</comment_count>
      <attachid>10098</attachid>
    <who name="Jake Devine">jake.devine</who>
    <bug_when>2006-08-17 11:35:56 -0700</bug_when>
    <thetext>Created attachment 10098
The XSL document listed in the description (There were typos in the listing that are corrected here)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52883</commentid>
    <comment_count>3</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2006-08-17 16:13:30 -0700</bug_when>
    <thetext>I didn&apos;t think transforms would be auto-applied to XMLHttpRequests.  Does Firefox respect this?
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52884</commentid>
    <comment_count>4</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2006-08-17 16:14:47 -0700</bug_when>
    <thetext>It&apos;s not clear to me that we should respect this.... since I would think you&apos;d want the source doc rather than the result doc (XSL can transform you to plain text or HTML as well, and that seems really strange to me if you could get that kind of transformed result from XMLHttpRequest).
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52885</commentid>
    <comment_count>5</comment_count>
    <who name="Jake Devine">jake.devine</who>
    <bug_when>2006-08-17 16:33:01 -0700</bug_when>
    <thetext>Firefox doesn&apos;t support this, unfortunately.  Your recent addition of the XSLT processor makes this sort of moot (and hooray!), but I was just trying to work around the absence of browser-side transformations.

I don&apos;t think that it would be totally unexpected behaviour, however.  XMLHttpRequest already handles both text and XML data in response*, so either of those output methods could be interpreted.

In any case, I can certainly appreciate not breaking compatibility with Mozilla in this regard, and since browser side XSL is in the nightlies, it&apos;s certainly nothing important.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45958</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2006-11-12 02:57:25 -0800</bug_when>
    <thetext>Closing as invalid per comments 4 and 5.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>10096</attachid>
            <date>2006-08-17 11:35:05 -0700</date>
            <delta_ts>2006-08-17 16:01:16 -0700</delta_ts>
            <desc>The XML document listed in the description.</desc>
            <filename>xmldoc.xml</filename>
            <type>application/xml</type>
            <size>207</size>
            <attacher name="Jake Devine">jake.devine</attacher>
            
              <data encoding="base64">PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiID8+DQo8P3htbC1zdHlsZXNoZWV0
IHR5cGU9InRleHQveHNsIiBocmVmPSJ4c2xkb2MueHNsIj8+DQo8cGFnZT4NCgk8cGFyYWdyYXBo
Pg0KCQk8bGluZT5UaGlzIGlzIGxpbmUgb25lLjwvbGluZT4NCgkJPGxpbmU+VGhpcyBpcyBsaW5l
IHR3by48L2xpbmU+DQoJPC9wYXJhZ3JhcGg+DQo8L3BhZ2U+
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>10098</attachid>
            <date>2006-08-17 11:35:56 -0700</date>
            <delta_ts>2006-08-17 16:01:42 -0700</delta_ts>
            <desc>The XSL document listed in the description (There were typos in the listing that are corrected here)</desc>
            <filename>xsldoc.xsl</filename>
            <type>application/xml</type>
            <size>456</size>
            <attacher name="Jake Devine">jake.devine</attacher>
            
              <data encoding="base64">PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjx4c2w6c3R5bGVzaGVldCB2
ZXJzaW9uPSIxLjAiIHhtbG5zOnhzbD0iaHR0cDovL3d3dy53My5vcmcvMTk5OS9YU0wvVHJhbnNm
b3JtIj4NCgk8eHNsOm91dHB1dCBtZXRob2Q9InRleHQiIG9taXQteG1sLWRlY2xhcmF0aW9uPSJ5
ZXMiIC8+DQoJDQoJPHhzbDp0ZW1wbGF0ZSBtYXRjaD0iLy9wYWdlIj4NCgkJPHhzbDpmb3ItZWFj
aCBzZWxlY3Q9InBhcmFncmFwaCI+DQoJCQk8cD4gICAgICANCgkJCQk8eHNsOmFwcGx5LXRlbXBs
YXRlcyAvPg0KCQkJPC9wPg0KCQk8L3hzbDpmb3ItZWFjaD4NCgk8L3hzbDp0ZW1wbGF0ZT4NCgkN
Cgk8eHNsOnRlbXBsYXRlIG1hdGNoPSJsaW5lIj4NCgkJPGJyPg0KCQkJPHhzbDp2YWx1ZS1vZiBz
ZWxlY3Q9Ii4iLz4NCgkJPC9icj4NCgk8L3hzbDp0ZW1wbGF0ZT4NCjwveHNsOnN0eWxlc2hlZXQ+
</data>

          </attachment>
      

    </bug>

</bugzilla>