From: Norman W. <nw...@us...> - 2001-11-28 13:46:49
|
Update of /cvsroot/docbook/xsl/html In directory usw-pr-cvs1:/tmp/cvs-serv8923/html Modified Files: pi.xsl Log Message: Use common pi-attribute template Index: pi.xsl =================================================================== RCS file: /cvsroot/docbook/xsl/html/pi.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pi.xsl 2001/07/10 16:59:43 1.2 --- pi.xsl 2001/11/28 13:46:47 1.3 *************** *** 29,58 **** <xsl:param name="pis" select="processing-instruction('dbhtml')"/> <xsl:param name="attribute">filename</xsl:param> - <xsl:param name="count">1</xsl:param> ! <xsl:choose> ! <xsl:when test="$count > count($pis)"> ! <!-- not found --> ! </xsl:when> ! <xsl:otherwise> ! <xsl:variable name="pi"> ! <xsl:value-of select="$pis[$count]"/> ! </xsl:variable> ! <xsl:choose> ! <xsl:when test="contains($pi,concat($attribute, '='))"> ! <xsl:variable name="rest" select="substring-after($pi,concat($attribute,'='))"/> ! <xsl:variable name="quote" select="substring($rest,1,1)"/> ! <xsl:value-of select="substring-before(substring($rest,2),$quote)"/> ! </xsl:when> ! <xsl:otherwise> ! <xsl:call-template name="dbhtml-attribute"> ! <xsl:with-param name="pis" select="$pis"/> ! <xsl:with-param name="attribute" select="$attribute"/> ! <xsl:with-param name="count" select="$count + 1"/> ! </xsl:call-template> ! </xsl:otherwise> ! </xsl:choose> ! </xsl:otherwise> ! </xsl:choose> </xsl:template> --- 29,37 ---- <xsl:param name="pis" select="processing-instruction('dbhtml')"/> <xsl:param name="attribute">filename</xsl:param> ! <xsl:call-template name="pi-attribute"> ! <xsl:with-param name="pis" select="$pis"/> ! <xsl:with-param name="attribute" select="$attribute"/> ! </xsl:call-template> </xsl:template> |