cvs: livedocs / build.sh toc_peardoc.xsl

From: Date: Wed, 06 Jul 2005 16:30:55 +0000
Subject: cvs: livedocs / build.sh toc_peardoc.xsl
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969368960@lists.php.net to get a copy of this message
iliaa Wed Jul 6 12:30:55 2005 EDT Added files: /livedocs toc_peardoc.xsl Modified files: /livedocs build.sh Log: Added PEAR's xsl file and added configure flags to handle it. # Once again thanks to Alan for doing all the hard work. http://cvs.php.net/diff.php/livedocs/build.sh?r1=1.28&r2=1.29&ty=u Index: livedocs/build.sh diff -u livedocs/build.sh:1.28 livedocs/build.sh:1.29 --- livedocs/build.sh:1.28 Wed Feb 9 17:15:59 2005 +++ livedocs/build.sh Wed Jul 6 12:30:54 2005 @@ -36,7 +36,14 @@ if test "$i" = "en"; then echo -n "Making TOC: " date - if ! ${XSLTPROC} ${LIVEDOCS}/toc.xsl ${PHPDOC}/manual.xml > ${GENDIR}/toc-ugly.xml ; then + + if test -e "${LIVEDOCS}/toc_${BUILDTYPE}.xsl"; then + XSLTFILE="toc${BUILDTYPE}.xsl" + else + XSLTFILE=toc.xsl + fi + + if ! ${XSLTPROC} ${LIVEDOCS}/${XSLTFILE} ${PHPDOC}/manual.xml > ${GENDIR}/toc-ugly.xml ; then continue fi http://cvs.php.net/co.php/livedocs/toc_peardoc.xsl?r=1.1&p=1 Index: livedocs/toc_peardoc.xsl +++ livedocs/toc_peardoc.xsl <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="book"> <toc> <xsl:attribute name="title"><xsl:value-of select="title"/></xsl:attribute> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> <xsl:apply-templates select="bookinfo"/> <xsl:apply-templates select="preface"/> <xsl:apply-templates select="part"/> </toc> </xsl:template> <xsl:template match="bookinfo|preface"> <dir> <xsl:attribute name="title"><xsl:value-of select="title"/></xsl:attribute> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> </dir> </xsl:template> <xsl:template match="part"> <part> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="title"><xsl:value-of select="title"/></xsl:attribute> <xsl:apply-templates select="chapter"/> <xsl:apply-templates select="reference"/> <xsl:apply-templates select="appendix"/> </part> </xsl:template> <xsl:template match="chapter"> <chapter> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="title"><xsl:value-of select="title"/></xsl:attribute> <xsl:apply-templates select="sect1|section"/> </chapter> </xsl:template> <xsl:template match="appendix"> <appendix> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="title"><xsl:value-of select="title"/></xsl:attribute> <xsl:apply-templates select="sect1"/> </appendix> </xsl:template> <xsl:template match="reference"> <reference> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="title"><xsl:value-of select="title"/></xsl:attribute> <xsl:apply-templates select="section|refentry"/> </reference> </xsl:template> <xsl:template match="section"> <sect1> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="title"><xsl:value-of select="title"/></xsl:attribute> <xsl:apply-templates select="section"/> </sect1> </xsl:template> <xsl:template match="sect1"> <sect1> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="title"><xsl:value-of select="title"/></xsl:attribute> <xsl:apply-templates select="sect2|refentry"/> </sect1> </xsl:template> <xsl:template match="sect2"> <sect2> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="title"><xsl:value-of select="title"/></xsl:attribute> <xsl:apply-templates select="sect3"/> </sect2> </xsl:template> <xsl:template match="sect3"> <sect3> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="title"><xsl:value-of select="title"/></xsl:attribute> <xsl:apply-templates select="sect4"/> </sect3> </xsl:template> <xsl:template match="sect4"> <sect4> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="title"><xsl:value-of select="title"/></xsl:attribute> </sect4> </xsl:template> <xsl:template match="refentry"> <sect2> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="title"><xsl:value-of select="refnamediv/refname/function|refnamediv/refname"/></xsl:attribute> </sect2> </xsl:template> </xsl:stylesheet>

« previous php.doc (#969368960) next »