<xsl:variable name="thissection" >
<xsl:choose>
<xsl:when test="../myns:section">
<xsl:sequence select="../myns:section"/>
</xsl:when>
<xsl:when test="../../myns:section">
<xsl:sequence select="../../myns:section"/>
</xsl:when>
</xsl:choose>
</xsl:variable>
It looks like you want the nearest myns:section ancestor, so:
<xsl:template match="myns:content" mode="content">
<mysection origSectionId="{ancestor::myns:section[1]/myns:id}"/>
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--