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

 

Previous Page Table Of Contents Next Page

XSLT Tutorial

Worksheet 2: XPath - Simple Example 

 

The purpose of this worksheet is to get used to transforming your XML file using XSLT.   Is is also an introduction into using XPath, working with the count function.

Here's what to do: 

Open up your free 30 day evaluation MarrowSoft Xselerator XSLT Debugger

  1. In the XML section, open the books.xml file
  2. In the XSL section, open the count.xsl file
  3. Now run the example to produce the output (F5 or the click on the run button)
  4. The transformed html should now be in vew

This example shows how to use the count function, which has a predicate to only count books whose review = 4.5.

NOTE: If you are running the msxml3 parser (October release) and have not run the xmlinst.exe to instruct the parser to run in replace mode, this count example will not run.  For more information on the msxml parser see MSXML Parsers.

Q:  In your Xselerator, how could you change the code so that the context of this example changes, so that  instead of saying: 

<p>Review of 4.5 = <xsl:value-of select="count(books/book[review=4.5])"/></p>

You could rather say in your expression:

<p>Review of 4.5 = <xsl:value-of select="count(book[review=4.5])"/></p>

Hint: Look at your xsl:template

A: Solution

Page 9 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)



United Kingdom Conference Calling
water softener
Teleconference
Host Department NOLIMIT Web Hosting
MSN
sunglasses
UK Hosting
online fax


    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