Testxml. xml
< XSL: stylesheet Version = "1.0" Xmlns: XSL = "Http://www.w3.org/1999/XSL/Transform" >
< XSL: Template Match = "/" >
< Html >
< Body >
< XSL: For-each Select = "Personnel/person" >
< XSL: value- Select = "Name" />
< XSL: Choose >
< XSL: When Test = "./Fg = 'boys '" >
< Input Type = "Text" >
< XSL: attribute Name = "Value" >
< XSL: value- Select = "Name" />
</ XSL: attribute >
</ Input >
< BR />
</ XSL: When >
< XSL: When Test = "./Fg = 'girl '" >
< Font Color = "Red" > < Li > < XSL: value- Select = "Name" /> </ Li > </ Font >
< BR />
</ XSL: When >
< XSL: otherwise >
< Font Color = "Blue" > < XSL: value- Select = "Name" /> </ Font >
</ XSL: otherwise >
</ XSL: Choose >
</ XSL: For-each >
</ Body >
</ Html >
</ XSL: Template >
</ XSL: stylesheet >
Testxml. XSL
< Personnel >
< Person >
< Name > Male </ Name >
< FG > Boy </ FG >
</ Person >
< Person >
< Name > Female </ Name >
< FG > Girl </ FG >
</ Person >
< Person >
< Name > Do not know </ Name >
< FG > Donot know </ FG >
</ Person >
</ Personnel >
Testxml. asp
< %
Set XML = Server. Createobject ( " Microsoft. xmldom " )
XML. async = False
XML. Load server. mappath ( " Testxml. xml " )
Set XSL = Server. Createobject ( " Microsoft. xmldom " )
XSL. async = False
XSL. Load (server. mappath ( " Testxml. XSL " ))
XML. transformnodetoobject XSL, response ' Response. write XML. transformnode (XSL)
% >