This is my input.xml file. input.xml

This is my output.xml

This is xsl transformer file.

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.

11 Years
Discussion Span
Last Post by MattEvans

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.