Bostonasian wrote:
Quote:
The reason I posted this is because I am having trouble with
explicitly manifesting detail solution(XSLT code to be exact).
Well, I gave you an algorithm, but since you're still lost I'll rephrase
it into a completely untested sketch.
<xsl:stylesheet ... and so on ... >
<xsl:template match="/">
<xsl:apply-templates select="/Root/Survey[@ID=1]"/>
</xsl:template>
<xsl:template match="Survey">
<xsl:copy>
<xsl:apply-template select="@*"/>
<xsl:apply-template select="/Root/Survey[@ParentID=current()/@ID]"/>
</xsl:copy>
</xsl:template>
<xsl:template match="@*|node">
<xsl:copy>
<xsl:apply-template select="@*|node"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
If you don't immediately understand how this works, I strongly recommend
going back and doing a few basic XSLT tutorials. This really is a
third-homework-assignment level of complexity; maybe earlier depending
on what the prereqs were.
--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden