XSLT Code for complex XML document
XSLT Code for complex XML document
(OP)
I have an xml document and I want to transform it to add an extra node element depending on some condition. Example given in the attachment. I want to write an .xsl program for the requirement "If a does not have , use the of the immediate one level up". Basically I want to add node if does not have one, and that value should be of the person one above it in my case. The values for
Tommy Trojans - Engineering
Ronald Jackson - Engineering
Justin Jones - Marketing
Can anyone please advice on how to do this??
Thanks,
Ace
Tommy Trojans - Engineering
Ronald Jackson - Engineering
Justin Jones - Marketing
Can anyone please advice on how to do this??
Thanks,
Ace
RE: XSLT Code for complex XML document
The code is below
<?xml version="1.0" encoding="UTF-8"?>
-<Data> -<People> -<Person id="1"> <name>John Taylor</name> <title>Manager</title> <department>Engineering</department> -<reports> -<report id="2"> <name>Tommy Trojans</name> <title>Engineer</title> </report> -<report id="3"> <name>Mike Lee</name> <title>Designer</title> <department>UI/UX</department> </report> -<report id="4"> <name>Ronald Jackson</name> <title>Engineer</title> </report> </reports> </Person> -<Person id="16"> <name>Maria Sanchez</name> <title>CEO</title> </Person> -<Person id="10"> <name>Matt Jones</name> <title>Director</title> <department>Marketing</department> -<reports> -<report id="9"> <name>Justin Jones</name> <title>Manager</title> </report> </reports> </Person> </People> -<Departments> -<Department> <name>Engineering</name> <rate max="100" min="10" type="hourly"/> <rate max="12000" min="1000" type="monthly"/> </Department> -<Department> <name>UI/UX</name> <rate max="50" min="12" type="hourly"/> <rate max="9000" min="1500" type="monthly"/> <rate max="2000" min="300" type="weekly"/> <rate max="100000" min="25000" type="yearly"/> </Department> -<Department> <name>Marketing</name> <rate max="90000" min="30000" type="yearly"/> <rate max="5000" min="500" type="weekly"/> </Department> </Departments> </Data>
Sorry for the in convenience.
RE: XSLT Code for complex XML document
CODE --> XML
Tom Morrison
Hill Country Software