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

 

Previous Page Table Of Contents Next Page

XSLT Tutorial

Worksheet 6: xsl:choose, xsl:when

Following on from our Workshop 5 example, let's rather implement this example with the xsl:choose and xsl:when instructions:

Once again from the Worksheet_6 directory open the Headline XML:

<headlines>
   <article>Rescued penguins swim home
       <summary>Some 150 penguins unaffected ...</summary>
       <category>Science &amp; Nature</category>
    </article>

   <article>Bug mops up sewage
    <summary>A bug found in sewage water has...</summary> 
   <category>Science &amp; Nature</category>
</article>

<article>In the land of the colour-blind
   <summary>A hunt to find the cause of widespread ...</summary>
   <category>Health</category>
</article>
</headlines>

Here's what to do:  

Open the todaysnews.xsl file, and change it so that every odd article is in blue and every even article is in red.

The HTML result should be:


Today's Headlines

Rescued penguins swim home
Bug mops up sewage
In the land of the colour-blind

A: Solution

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



swimming pool contractor
help desk
water softener
Teleconference
Host Department NOLIMIT Web Hosting
MSN
sunglasses
help desk services


    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