Open
      
        Bug 315799
      
      
        Opened 19 years ago
          Updated 3 years ago
      
        
    
  
Viewing an XML document which produces JavaScript via XSLT produces blank page 
    Categories
(Core :: XSLT, defect)
Tracking
()
        NEW
        
        
    
  
People
(Reporter: ekolis, Unassigned)
Details
(Keywords: testcase)
Attachments
(4 files)
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051025 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051025 Firefox/1.5
If I try to view an XML document in Firefox which has an XSLT stylesheet attached which produces HTML output containing Javascript, I get a blank page and a wait cursor; selecting "view source" produces an empty window.
Reproducible: Always
Steps to Reproduce:
1. Create an XSLT transform which produces HTML/Javascript output.
2. Create an XML file to view using that transform.
3. View the XML file in Firefox.
Actual Results:  
The browser window is blank.
Expected Results:  
The Javascript should have executed and the HTML displayed.
| Updated•19 years ago
           | 
Assignee: nobody → xslt
Component: General → XSLT
Product: Firefox → Core
QA Contact: general → keith
Version: unspecified → 1.8 Branch
|   | ||
| Comment 2•17 years ago
           | ||
|   | ||
| Comment 3•17 years ago
           | ||
|   | ||
| Comment 4•17 years ago
           | ||
|   | ||
| Comment 6•17 years ago
           | ||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3pre) Gecko/2008012404 Minefield/3.0b3pre
STR:
1. Open "comparison html testcase" - note expected results
2. Open "xml launcher for testcase" - note observed results
Expected Results:
document.write(var) works as expected
Observed Results:
document.write(var) causes browse to get stuck in reload, and original html source seems to be completely overwritten
|   | ||
| Updated•17 years ago
           | 
Status: UNCONFIRMED → NEW
Ever confirmed: true
|   | ||
| Comment 7•17 years ago
           | ||
Upon closer inspection this bug may be invalid based on bug 336746 comment #3.  The comment from ondra zara indicates this has to do solely with different implementations of document.write in FF and IE.  With FF, calling document.write after the document has loaded rewrites the entire document, this is not the case when document.write is used in the source html.
Sorry if this is a stupid question, but does it make sense for the behavior to be different for identical sections of javascript depending on whether it came from an xslt transformation or the original html.
Well, we're certainly not handling this in an ideal way.
However it does make sense that .write works differently in XSLT and normal HTML pages. .write() is usually intended to add into the markup stream being fed into the parser.
However for XSLT there is no markup stream, and there is no parser. XSLT produces a DOM directly.
So this won't do what you intend. Though I guess it can be argued that we should be disabling .write entirely while XSLT is in progress.
| Updated•16 years ago
           | 
Assignee: xslt → nobody
QA Contact: keith → xslt
| Updated•3 years ago
           | 
Severity: normal → S3
          You need to log in
          before you can comment on or make changes to this bug.
        
Description
•