[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Order of processing templates
Karl, When you say the second template is processed first, do you mean that: <xsl:apply-templates select="xml/s:Schema/s:ElementType/s:AttributeType[check='true']"/> is matching on: <xsl:template match="xml/s:Schema/s:ElementType/s:AttributeType[where!='']"> ??? If this is the case, make certain that the predicates in your XPaths are not evaluating to the same value. Regardless, have you tried assigning a mode to your templates? An example of mode could be: <xsl:template match="/"> select <xsl:apply-templates select="xml/s:Schema/s:ElementType/s:AttributeType[check='true']" mode="first"/> from <xsl:value-of select="$table"/> <xsl:apply-templates select="xml/s:Schema/s:ElementType/s:AttributeType[where!='']" mode="second"/> </xsl:template> <xsl:template match="xml/s:Schema/s:ElementType/s:AttributeType[check='true']" mode="first"> <xsl:value-of select="@name"/> <xsl:if test="position()!=last()">,</xsl:if> </xsl:template> <xsl:template match="xml/s:Schema/s:ElementType/s:AttributeType[where!='']" mode="second"> <xsl:if test="position()=1"> where </xsl:if> <xsl:value-of select="@name"/>= <xsl:value-of select="where"/> </xsl:template> Jim XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|