File: Data.xml
Alfa Romeo
Bentley
Chevrolet
Dodge
GMC
Honda
Isuzu
Quantum
File: Transform.xslt
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
Car:
-
select="if (@geography = 'North America') then
'Domestic car'
else if (@geography = 'Europe') then
'Import from Europe'
else if (@geography = 'Asia') then
"It's from Asia"
(: If it's anything else :)
else
'We don''t know!'"/>
Output:
Car: Alfa Romeo - Import from Europe
Car: Bentley - Import from Europe
Car: Chevrolet - Domestic car
Car: Dodge - Domestic car
Car: GMC - Domestic car
Car: Honda - It's from Asia
Car: Isuzu - It's from Asia
Car: Quantum - We don't know!