79759426

Date: 2025-09-09 01:32:45
Score: 0.5
Natty:
Report link

You all have gotten me oh so close...... My data was even a bit more complex than I realized, so I'm trying to adjust. I feel like I'm almost there, but. . .

I do have XSLT 3.0 to work with on this.

Here's what I have so far. My last remaining problem is that the "except" doesn't like "wantedNode2/replacingSubNode3" so it is outputting both original and new SubNode3.

    <xsl:mode on-no-match="shallow-skip"/>

    <xsl:template match="headerNode2">
        <xsl:copy>
            <xsl:copy-of select="* except (wantedNode2/replacingSubNode3, unwantedNode4)"/>
            
            <ReplacementSubNode3>
                <stuff>
            </ReplacementSubNode3>          
        
        </xsl:copy>
    </xsl:template>

Everything else is coming out great.

Now if I could just stop hitting enter an posting before I'm done!

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Maggie