This is my input.xml file. input.xml

This is my output.xml
output.xml

This is xsl transformer file.
tranformer.xsl

Hi guys, looks at the commented sections in all the three files.

Thanks for any help.. Basically i need help in modifying the transformer file.
So that the <extendedattributes> tag in the input file can be read as and outputted as a sibling to the <ntask> tag in the output file.

Thanks for any hints and idears.

Hm. You should be able to do something like this in your 'Activity' template in the XSL file.

<xsl:variable name="get_from"><xsl:value-of select="@Id"/></xsl:variable>
<xsl:copy-of select="/Package/Transitions/Transition[@From = $get_from]/ExtendedAttributes"/>

(I haven't tested that, I have no useable XSLT processor on this PC at this moment)

Your input XML file is a bit confusing.. But it does highlight one of the inherant difficulties in XML; showing relationships between sibling nodes (other than order-based relationships)...

I'm not quite sure if I get exactly what you're trying to do though; do you want the ExtendedAttributes in the Transition node with the same "From" attribute as the currently processed Activity node's "Id" attribute, to be placed in the <ntask> output node that's currently being processed?

Post back if that isn't the case.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.