File: Data.xml
Java Programmer
Joe
Brian
Smith
1 Drive
Vancouver
BC
80210
111-1111111
222-222222
303-4667357
a@a.com
2008-10-29
File: Transform.xslt
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
Employee Data
Name
Hire Date
Address
Phone
Fax
Email
select="contact/name/name" />
select="contact/name/middleName" />
select="contact/name/lastName" />
select="contact/address/street" />
select="contact/address/city" />
,
select="contact/address/state" />
select="contact/address/zip" />
WK:
select="contact/phone/tel[@type=wk]" />
HM:
select="contact/phone/tel[@type=hm]" />
select="contact/phone/fax" />
Output:
Employee Data
Name
Hire Date
Address
Phone
Fax
Email
BrianSmith
2008-10-29
1 Drive
Vancouver
,
BC
WK:
HM:
303-4667357
a@a.com