Cannot use JavaScript + style attribute to change positioning of elements generated by XSLT

RESOLVED INVALID

Status

()

Core
DOM: CSS Object Model
RESOLVED INVALID
15 years ago
15 years ago

People

(Reporter: Derek McCaw, Unassigned)

Tracking

({testcase})

Trunk
x86
Windows XP
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624

When an XML document is transformed via XSLT, a javascript that runs onload of
transformed document is unable to manipulate the coordinates, dimensions, or
font-size of generated DIV elements, but it is able to change the background
color. Saving the transformed source as HTML and viewing in Mozilla gives
correct behavior.

Reproducible: Always

Steps to Reproduce:
1. Create an XML doc with an XSL stylesheet
2. In the stylesheet, include a script (linked or inline, no matter) to change
coordinates of an element (position:absolute)
3. Preview the page in Mozilla

Actual Results:  
Background color of the DIVs changed, but all of the elements stayed at 0,0 with
* for width and height, and kept the default color and font-size.

Expected Results:  
Should have allowed for dynamic placement and sizing of block level elements

I am using the default theme w/ 1.4RC3, clean install. First time, so bear with
me if I filed this in the wrong component. Working on testcase. What I was
trying to do was take an XML file full of quotes I had created and transform it
to an HTML file for viewing, placing the DIVs in randomly selected coordinates
with random widths and colors, etc. Works if I take the transformed source and
view it.
(Reporter)

Comment 1

15 years ago
Created attachment 126509 [details]
[testcase] Simplification of HTML file mentioned in description
(Reporter)

Comment 2

15 years ago
Created attachment 126510 [details]
[testcase] simplification of XML file from description
(Reporter)

Comment 3

15 years ago
Created attachment 126511 [details]
[testcase] external js file from description

hope I got JS mime-type right...
(Reporter)

Comment 4

15 years ago
Created attachment 126512 [details]
[testcase] simplification of transformation used in bug

last one, sorry about all the spam
(Reporter)

Updated

15 years ago
Keywords: testcase

Comment 5

15 years ago
You need to add +"px" when you set left/top/width/fontSize
This is invalid.  XSLT-generated documents are always in standards mode, and in
standards mode CSS lengths require a unit.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.