tom Sun Mar 9 09:56:58 2003 EDT Modified files: /phpdoc/xsl/docbook/lib ChangeLog lib.xml lib.xsl lib.xweb Log: update to docbook-xsl 1.60.1
Index: phpdoc/xsl/docbook/lib/ChangeLog diff -u phpdoc/xsl/docbook/lib/ChangeLog:1.1 phpdoc/xsl/docbook/lib/ChangeLog:1.2 --- phpdoc/xsl/docbook/lib/ChangeLog:1.1 Tue Aug 13 11:42:05 2002 +++ phpdoc/xsl/docbook/lib/ChangeLog Sun Mar 9 09:56:58 2003 @@ -1,3 +1,11 @@ +2002-09-15 Norman Walsh <[EMAIL PROTECTED]> + + * lib.xweb: Fix bug where PIs match the suffix of a name instead of the whole name + +2002-06-09 Norman Walsh <[EMAIL PROTECTED]> + + * lib.xweb: Fix bug #496453: make sure comments don't contain illegal chars + 2002-05-12 Norman Walsh <[EMAIL PROTECTED]> * lib.xweb: Changed default units to px; added length-in-points template Index: phpdoc/xsl/docbook/lib/lib.xml diff -u phpdoc/xsl/docbook/lib/lib.xml:1.1 phpdoc/xsl/docbook/lib/lib.xml:1.2 --- phpdoc/xsl/docbook/lib/lib.xml:1.1 Tue Aug 13 11:42:05 2002 +++ phpdoc/xsl/docbook/lib/lib.xml Sun Mar 9 09:56:58 2003 @@ -6,7 +6,7 @@ <book xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <bookinfo> <title>XSL Library Template Reference</title> -<releaseinfo role="cvs">$Id: lib.xml,v 1.1 2002/08/13 15:42:05 goba Exp $ +<releaseinfo role="cvs">$Id: lib.xml,v 1.2 2003/03/09 14:56:58 tom Exp $ </releaseinfo> <corpauthor>DocBook Open Repository Team</corpauthor> <copyright> @@ -554,6 +554,73 @@ </refsect1> </refentry> +<!-- ================================================================== --> + +<refentry id="comment-escape-string"> +<refnamediv> +<refname>comment-escape-string</refname> +<refpurpose>Prepare a string for inclusion in an XML comment</refpurpose> +</refnamediv> + +<refsect1><title>Description</title> + +<para>The <function moreinfo="none">comment-escape-string</function> template returns a string +that has been transformed so that it can safely be output as an XML comment. +Internal occurrences of "--" will be replaced with "- -" and a leading and/or +trailing space will be added to the string, if necessary.</para> + +<programlisting format="linespecific"><src:fragment id="comment-escape-string"><xsl:template name="comment-escape-string"> + <xsl:param name="string" + select="''"/> + + <xsl:if test="starts-with($string, '-')"> + <xsl:text> </xsl:text> + </xsl:if> + + <xsl:call-template name="comment-escape-string.recursive"> + <xsl:with-param name="string" + select="$string"/> + </xsl:call-template> + + <xsl:if test="substring($string, string-length($string), 1) = '-'"> + <xsl:text> </xsl:text> + </xsl:if> +</xsl:template></src:fragment></programlisting> + +</refsect1> +</refentry> + +<refentry id="comment-escape-string.recursive"> +<refnamediv> +<refname>comment-escape-string.recursive</refname> +<refpurpose>Internal function used by comment-escape-string</refpurpose> +</refnamediv> + +<refsect1><title>Description</title> + +<para>The <function moreinfo="none">comment-escape-string.recursive</function> template is used +by <function moreinfo="none">comment-escape-string</function>.</para> + +<programlisting format="linespecific"><src:fragment id="comment-escape-string.recursive"><xsl:template name="comment-escape-string.recursive"> + <xsl:param name="string" + select="''"/> + <xsl:choose> + <xsl:when test="contains($string, '--')"> + <xsl:value-of select="substring-before($string, '--')"/> + <xsl:value-of select="'- -'"/> + <xsl:call-template name="comment-escape-string.recursive"> + <xsl:with-param name="string" + select="substring-after($string, '--')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$string"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template></src:fragment></programlisting> +</refsect1> +</refentry> + </reference> <reference> @@ -667,7 +734,7 @@ <src:fragment id="top"> <!-- ******************************************************************** - $Id: lib.xml,v 1.1 2002/08/13 15:42:05 goba Exp $ + $Id: lib.xml,v 1.2 2003/03/09 14:56:58 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -693,6 +760,8 @@ <src:fragref linkend="pi-attribute.frag"/> <src:fragref linkend="lookup.key.frag"/> <src:fragref linkend="xpath.location.frag"/> +<src:fragref linkend="comment-escape-string"/> +<src:fragref linkend="comment-escape-string.recursive"/> <src:fragref linkend="count.uri.path.depth.frag"/> <src:fragref linkend="trim.common.uri.paths.frag"/> Index: phpdoc/xsl/docbook/lib/lib.xsl diff -u phpdoc/xsl/docbook/lib/lib.xsl:1.1 phpdoc/xsl/docbook/lib/lib.xsl:1.2 --- phpdoc/xsl/docbook/lib/lib.xsl:1.1 Tue Aug 13 11:42:05 2002 +++ phpdoc/xsl/docbook/lib/lib.xsl Sun Mar 9 09:56:58 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <!-- ******************************************************************** - $Id: lib.xsl,v 1.1 2002/08/13 15:42:05 goba Exp $ + $Id: lib.xsl,v 1.2 2003/03/09 14:56:58 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -296,6 +296,40 @@ <xsl:otherwise> <xsl:text>/</xsl:text> <xsl:value-of select="$next.path"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + + +<xsl:template name="comment-escape-string"> + <xsl:param name="string" select="''"/> + + <xsl:if test="starts-with($string, '-')"> + <xsl:text> </xsl:text> + </xsl:if> + + <xsl:call-template name="comment-escape-string.recursive"> + <xsl:with-param name="string" select="$string"/> + </xsl:call-template> + + <xsl:if test="substring($string, string-length($string), 1) = '-'"> + <xsl:text> </xsl:text> + </xsl:if> +</xsl:template> + + +<xsl:template name="comment-escape-string.recursive"> + <xsl:param name="string" select="''"/> + <xsl:choose> + <xsl:when test="contains($string, '--')"> + <xsl:value-of select="substring-before($string, '--')"/> + <xsl:value-of select="'- -'"/> + <xsl:call-template name="comment-escape-string.recursive"> + <xsl:with-param name="string" select="substring-after($string, '--')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$string"/> </xsl:otherwise> </xsl:choose> </xsl:template> Index: phpdoc/xsl/docbook/lib/lib.xweb diff -u phpdoc/xsl/docbook/lib/lib.xweb:1.1 phpdoc/xsl/docbook/lib/lib.xweb:1.2 --- phpdoc/xsl/docbook/lib/lib.xweb:1.1 Tue Aug 13 11:42:05 2002 +++ phpdoc/xsl/docbook/lib/lib.xweb Sun Mar 9 09:56:58 2003 @@ -2,7 +2,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <bookinfo> <title>XSL Library Template Reference</title> -<releaseinfo role="cvs">$Id: lib.xweb,v 1.1 2002/08/13 15:42:05 goba Exp $ +<releaseinfo role="cvs">$Id: lib.xweb,v 1.2 2003/03/09 14:56:58 tom Exp $ </releaseinfo> <corpauthor>DocBook Open Repository Team</corpauthor> <copyright> @@ -443,8 +443,8 @@ <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: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> @@ -554,6 +554,73 @@ </refsect1> </refentry> +<!-- ================================================================== --> + +<refentry id="comment-escape-string"> +<refnamediv> +<refname>comment-escape-string</refname> +<refpurpose>Prepare a string for inclusion in an XML comment</refpurpose> +</refnamediv> + +<refsect1><title>Description</title> + +<para>The <function>comment-escape-string</function> template returns a string +that has been transformed so that it can safely be output as an XML comment. +Internal occurrences of "--" will be replaced with "- -" and a leading and/or +trailing space will be added to the string, if necessary.</para> + +<programlisting><src:fragment id='comment-escape-string'> +<xsl:template name="comment-escape-string"> + <xsl:param name="string" select="''"/> + + <xsl:if test="starts-with($string, '-')"> + <xsl:text> </xsl:text> + </xsl:if> + + <xsl:call-template name="comment-escape-string.recursive"> + <xsl:with-param name="string" select="$string"/> + </xsl:call-template> + + <xsl:if test="substring($string, string-length($string), 1) = '-'"> + <xsl:text> </xsl:text> + </xsl:if> +</xsl:template> +</src:fragment></programlisting> + +</refsect1> +</refentry> + +<refentry id="comment-escape-string.recursive"> +<refnamediv> +<refname>comment-escape-string.recursive</refname> +<refpurpose>Internal function used by comment-escape-string</refpurpose> +</refnamediv> + +<refsect1><title>Description</title> + +<para>The <function>comment-escape-string.recursive</function> template is used +by <function>comment-escape-string</function>.</para> + +<programlisting><src:fragment id="comment-escape-string.recursive"> +<xsl:template name="comment-escape-string.recursive"> + <xsl:param name="string" select="''"/> + <xsl:choose> + <xsl:when test="contains($string, '--')"> + <xsl:value-of select="substring-before($string, '--')"/> + <xsl:value-of select="'- -'"/> + <xsl:call-template name="comment-escape-string.recursive"> + <xsl:with-param name="string" select="substring-after($string, '--')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$string"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> +</src:fragment></programlisting> +</refsect1> +</refentry> + </reference> <reference> @@ -663,7 +730,7 @@ <src:fragment id="top" mundane-result-prefixes="xsl"> <!-- ******************************************************************** - $Id: lib.xweb,v 1.1 2002/08/13 15:42:05 goba Exp $ + $Id: lib.xweb,v 1.2 2003/03/09 14:56:58 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -690,6 +757,8 @@ <src:fragref linkend="pi-attribute.frag"/> <src:fragref linkend="lookup.key.frag"/> <src:fragref linkend="xpath.location.frag"/> +<src:fragref linkend="comment-escape-string"/> +<src:fragref linkend="comment-escape-string.recursive"/> <src:fragref linkend="count.uri.path.depth.frag"/> <src:fragref linkend="trim.common.uri.paths.frag"/>
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php