Hi, sincerest thanks to Russell Jones for his help. His suggestion does a
fantastic job of promoting the "Sub-Shot" nodes replacing the parent node
as necessary. I'm trying to get the template to work alongside another (mutually
exclusive) template which looks after the functionality for the "EXACT COPY"
of the other nodes from the original xml document. I cannot get the code
to apply Russell's template when necessary. Any suggestions as to what I'm
doing wrong, or an elegant solution?

<xsl:template match="/">
<xsl:choose>
<xsl:when test="name()='Shot'">
<xsl:apply-templates select="node()" mode="process_shots"/>
</xsl:when>
<xsltherwise>
<xsl:copy-of select="."/>
</xsltherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="Shot" mode="process_shots">
<xsl:choose>
<xsl:when test="count(child::Shot) &gt; 0">
<xsl:copy-of select="child::Shot"/>
</xsl:when>
<xsltherwise>
<xsl:copy-of select="."/>
</xsltherwise>
</xsl:choose>
</xsl:template>

Best regards,

ADK.

>> Hi. I have an XML document that I want to perform an XSL transformation

on
>> and I'm not sure how to get the results I want. Let me give an example

of
>> the original and desired documents.
>>
>> Original XML:
>> <Material_Description Material_ID="MyVideo">
>> <Volume Material_ID="MyVideo">
>> <Label>MyVideoFootage</Label>
>> <Shot Material_ID="Shot1">
>> <In_Frame />
>> <Out_Frame />
>>
>> <Shot Material_ID="SubShot1a">
>> <In_Frame />
>> <Out_Frame />
>> </Shot>
>>
>> <Shot Material_ID="SubShot1b">
>> <In_Frame />
>> <Out_Frame />
>> </Shot>
>> </Shot>
>> <Shot Material_ID="Shot2">
>> <In_Frame />
>> <Out_Frame />
>> </Shot>
>> <Volume>
>> </Material_Description>
>>
>> I'd like to use an XSL transformation to create an EXACT COPY of the

>original
>> XML document plus a modification in the XML node hierarchy so that if

a
>"SubShot"
>> exists, it replaces its "Shot" parent node.
>>
>> Desired XML:
>> <Material_Description Material_ID="MyVideo">
>> <Volume Material_ID="MyVideo">
>> <Label>MyVideoFootage</Label>
>> <Shot Material_ID="SubShot1a">
>> <In_Frame />
>> <Out_Frame />
>> </Shot>
>> <Shot Material_ID="SubShot1b">
>> <In_Frame />
>> <Out_Frame />
>> </Shot>
>> <Shot Material_ID="Shot2">
>> <In_Frame />
>> <Out_Frame />
>> </Shot>
>> <Volume>
>> </Material_Description>
>>
>> Everything I read about XSL transformations indicates that this should

be
>> possible, but I can't work out the syntax to achieve the desired result.
>> I believe I could solve this using a DOM, but I'm very new to XSL and

I
>> suspect the XSL solution would be more elegant and extensible. Humble

>cries
>> for help from an XSL rookie.
>>
>> Best regards,
>>
>> ADK.