BizTalk Utilities CV ,   Jobs ,   Code library  
 
 
Page 23 of 28

 

Previous Page Table Of Contents Next Page

XSLT Tutorial

Worksheet 8: XSLT: Putting it all together

For this worksheet, open the default.htm in Notepad (or double-click on the file and then view source in the browser).

In the function, transformFiles() :

Load the XML and XSLT files, making sure you go through all the basics of loading XML files, for excample your async property, checking for load errors, etc.:

set xslDoc=createObject("MSXML2.DOMDocument.3.0")
set xmlDoc= createObject("MSXML2.DOMDocument.3.0")

We need to have a container in which to output the transformation HTML.  For this we use a <div> element to output the transformation, by getting a reference to the <div> found in the HTML body.

set objDiv = document.all("divHeadlines")

We then call the transformNode method on the DomDocument to output the transformed HTML into the DIV's InnerHTML property:

strHTML = xmlDoc.transformNode(xslDoc)
objDiv.innerHTML = strHTML

Note:  The reason that I say this is the basics, is because one the latest version of the msxml DOM, there are methods and objects for allowing one to cache the XSLT files, called templates. 

When we spoke about the xsl:param element, there are also methods and objects for allowing one to pass a parameter to the XSLT file.

Page 23 of 28

 

Previous Page Table Of Contents Next Page
 

Recent Jobs

Sr. Software Engineer - Analytics
Immediate Mainframe openings for Ch
Immediate TANDEM-TAL openings for C
Immediate ASP.NET/C# Openings for C
Sr. Software Engineer

View all Jobs (Add yours)
View all CV (Add yours)



spfxmasks
water softener
Teleconference
Host Department NOLIMIT Web Hosting
MSN
sunglasses
Domain Names UK
conference calling


    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP