11.12.2012 Views

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

You can reference the style sheet from the original XML document, adding this line in the<br />

original staff.xml file,<br />

<br />

just below the initial declaration. <strong>The</strong> output of this preceding example together<br />

with the generated markup created by the browser client-side is shown in Figure 20-5. If you<br />

are worried about browser compatibility, given that not all browsers are aware of XSL, you can<br />

just as easily transform this into HTML or, even better, XHTML on the server-side. This is<br />

probably a safer way to go for any publicly accessible Web page.<br />

Figure 20-5: XML document transformed to HTML tables using XSL<br />

Note XSL transformation can create all sorts of more complex documents complete with<br />

embedded <strong>JavaScript</strong> or style sheets.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!