D
delgados129
I've seen a few XSL examples to flatten a specific node, but none that
address this specific scenario:
Given the following generic XML:
<DocElement>
<A attr="attribForA">TextForA</A>
<B>TextForB</B>
<C>
<D>TextForD1</D>
<E>TextForE1</E>
</C>
<C>
<D>TextForD2</D>
<E>
<F>TextForF</F>
</E>
</C>
</DocElement>
XSL should transform it at a designated node (example <C>) and flatten
any all all (all is important) children to the following:
<DocElement>
<A attr="attribForA">TextForA</A>
<B>TextForB</B>
<C_D>TextForD1</C_D>
<C_E>TextForE1</C_E>
<C_E_F>TextForF</C_E_F>
<!-- Continue on in this fashion as deep as the tree goes -->
</DocElement>
I've struggled with dynamically creating the new elements as a "_"
delimitted concatenation of all the child elements. Any and all help
would be appreciated.
Mario
address this specific scenario:
Given the following generic XML:
<DocElement>
<A attr="attribForA">TextForA</A>
<B>TextForB</B>
<C>
<D>TextForD1</D>
<E>TextForE1</E>
</C>
<C>
<D>TextForD2</D>
<E>
<F>TextForF</F>
</E>
</C>
</DocElement>
XSL should transform it at a designated node (example <C>) and flatten
any all all (all is important) children to the following:
<DocElement>
<A attr="attribForA">TextForA</A>
<B>TextForB</B>
<C_D>TextForD1</C_D>
<C_E>TextForE1</C_E>
<C_E_F>TextForF</C_E_F>
<!-- Continue on in this fashion as deep as the tree goes -->
</DocElement>
I've struggled with dynamically creating the new elements as a "_"
delimitted concatenation of all the child elements. Any and all help
would be appreciated.
Mario