Jump to content

External Javascript in XSL


jallen
 Share

Recommended Posts

I am new to XML, and XSL but seem to have everything working but am questioning myself.First off it all works and that is not the question.My external JavaScripts.This script will make the choice of the users resolution.1)Screen Resolution. (1024x768 and up), (800x600 in between), (640x480 and below).Depending on the choice of resolution from the script above only the layout use one of the following.2)1024x768 Layout CSS.3)800x600 Layout CSS.4)640x480 Layout CSS.Depending on the choice of resolution from the first script all backgrounds, fonts, colors, etc use one of the following. 5)1024x768 Default CSS.6)800x600 Default CSS.7)640x480 Default CSS.I also have a print CSS for PDF which is one standard for all.I can now tweek any given area for better viewing.First off my main objective in doing this is to eliminate left-right scroll bars, and it seems to work.W3Schools shows 1024x768 and above roughly 80%, 800x600 at 14%, and 640x480 and below at 8% for Display Resolution. View-It-Yourself! http://www.w3schools.com/browsers/browsers_display.aspHere is my situation:1) I am trying to get away from using tables and doing things using CSS.2) CSS has some issues when it comes to tableless layouts. (Note: fixed in <xhtml>)3) XML Strict Rules don't accept some of the hacks used for tableless layouts. (Three-pixel text jog).Questions:1) Is it common to use Javascript when selecting CSS?2) Is it common to use external CSS in XSL?3) I haven't seen any at this point <head> </head> in the html in XSL?4) Do you still put <meta data> Keywords, Description in the <head> section in XSL, and if you did wouldn't it be pointing to the XSL page instead of the XML page?I have not uploaded my site yet as it is still in development stage, but it seems to work and looks fine even with the hacks removed.Any constructive or positive feedback would be appreciated.

Link to comment
Share on other sites

I think you're missing a crucial piece of the puzzle. XSLT is not a new language to code pages in. It's a language that translates one markup into another, in your case - it translates your XML into (X)HTML. From then on, it's as if you have plain (X)HTML.So, having external CSS and JS files in an XSLT file is just as common as it would be if you have them in a plain (X)HTML document.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...