[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: double document merge using keys
Terry Ofner wrote:
I have a set of standards that need to be aligned with each lesson. The standards are coded to the page, not the lesson. Here is a snippet of the current xml of standardDoc.xml: <xsl:template match="Chapterlesson"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:apply-templates/> <xsl:variable name="localStart" select="startNum"/> <xsl:variable name="localEnd" select="endNum"/> <xsl:for-each select="$stand2page"> <stand><xsl:copy-of select="key('standPage', $localStart)"/></stand> </xsl:for-each> I am not sure the a key helps with a less than/greater than condition but you could certainly use e.g. <xsl:copy-of select="$stand2page/standards/stand[@startNum >= $localStart and @endNum <= $localEnd]"/> to simply formulate the condition with XPath. -- Martin Honnen http://msmvps.com/blogs/martin_honnen/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|