this might be a simple question but I just started with xslt and i cant get it to work.
Basically I got an xml with this format coming in:
<?xml version="1.0" encoding="UTF-8"?>
<FileXML xmlns:vi="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/XSL/Transform">
<vi:Name>Union Square Limited</vi:Name>
This means it should read the amount of employees (=3) in the source xml and therefore create three Branch elements with all the original data but assign a unique Identifier. I think I can manage to change all the <vi:Employees> to have the value 1 afterwards but the rest is totally above my current skills.
Any thoughts or ideas are more than welcome!
I think I can manage to change all the <vi:Employees> to have the value 1 afterwards but the rest is totally above my current skills.
You mean you can change it to 1 and reproduce the original xml document as such with only that value changed? That seems already not that obvious for someone who just starts xslt. Could you show how you do it, the xslt document ? and from thereon I might help you to complete the task.
If you don't want to show the xslt that does that part, I can only say you make out a named template mainly based on that with a parameter initialized to 1. That named template would then call itself each time with the parameter increaded by 1 until the 3 is surpassed to stop. That is the big picture of the construction.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: XSLT: reading value of field and creating elements in a loop