There are basically two ways of doing a multiphase transformation: the single stylesheet approach and the multiple stylesheet approach. For big applications, writing one stylesheet per phase has many benefits - it keeps the code simpler, and makes it more reusable; the downside is that you need some extra machinery (e.g. a pipeline processor such as Orbeon) to manage the pipeline.
The single stylesheet approach, which you are attempting, takes the general form:
<xsl:apply-templates select="xx:node-set($phase-1-output)" mode="phase-2"/>
<xsl:apply-templates select="xx:node-set($phase-2-output)" mode="phase-3"/>
With an XSLT 2.0 processor the call on xx:node-set() is no longer needed.
Without seeing your code I can't see where you are getting stuck but hope this coding pattern will help you.
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference