Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I determine the document dimensions?

Status
Not open for further replies.

spiel2001

Programmer
Nov 1, 2001
39
US
I am writing an intensive set of XSL transformations for a dynamic web site linking SQL databases to XML output and formatting the output using XSL style sheets.

OK... that's pretty run-of-the-mill.

One of the problems I am facing is coding the XSL output to the least common denominator. It's already been determined that users will have to have a minimum of 800x600 resolution to use the site and I can live with that. However, for those like myself who use 1600x1200 or some other gastly number like that, I end up with layouts that look like postage stamps in the display area.

I am creating the XSL pages by first using DreamWeaver to layout an HTML document using formatted layers and divisions for an 800x600 page and then converting that HTML to XSL by hand (still haven't found an XSL layout tool I like)

What I would like to do, now, is to determine within the XSL stylesheet what the dimensions of the display area the user has and modify the layers/divisions accordingly to provide users with larger screen dimensions with more information on a single page dynamically. Effectively, just modifying the height and width values of the layers as applicable based on the determined height and width of the page when the document is being rendered.

Ok... that was long winded, but hopefully explains clearly what I want to do. So here's the one line question -- how can I determine the dimensions of the window I am rendering in from within the XSL stylesheet?

TIA to anyone who can help me.
 
Hi,

From within the stylesheet it's going to be .... impossible??

The xsl function "system-property()" might allready have a namespace in which this property is defined, but I don't know of any.

What you can do is determine the users resolution in javascript and pass a parameter to the stylesheet representing that resolution. In your stylesheet you can now make your output based on the users screen-resolution.

Good luck!

Jordi Reineman
Cap Gemini Ernst & Young
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top