[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Including raw HTML (highlighted code)
Hi, I use this process for function description. DocBook solves for mi documentation, "PHP Beautifier (http://www.beautifier.org)" examples in programlisting. 1. DocBook generate *.HTML output, where programlisting can contain PHP script for highlighted example. Page generated from DocBook have name of the function (FunctionNamePage.HTML). 2. All generated HTMLs are processed by PHP. Source of the examples are in their native form! They are converted to html, highlighted and names of the functions are changed to hyperlink pointing to FunctionNamePage.HTML!!! 3. Result I compile to HtmlHelp All is processed by batch and works well. ------------- Code DocBook XML <programlisting> <?hhlp_php name="MyFunction.FMG"?> </programlisting> ------------- In XSL customization layer <xsl:template match="processing-instruction('hhlp_php')"> <xsl:variable name="name"> <xsl:call-template name="pi-attribute"> <xsl:with-param name="pis" select="."/> <xsl:with-param name="attribute" select="'name'"/> </xsl:call-template> </xsl:variable> <xsl:processing-instruction name="php"> $BEAUT_PATH = "Z:/db/bin/php/Beautifier"; include_once "$BEAUT_PATH/Beautifier/Init.php"; include_once "$BEAUT_PATH/HFile/HFile_FMTFMG.php"; include_once "$BEAUT_PATH/Output/Output_css.php"; $highlighter = new Core(new HFile_FMTFMG(), new Output_css()); print $highlighter->highlight_text($highlighter->load_file("Z:/doc/_htmlE/<xsl:value-of select="$name"/>")); ?</xsl:processing-instruction> </xsl:template> -------------- Mila _________________________________________________________________ Chatujte bezpecne s lidmi, ktere si umistite na seznam svych pratel - stahujte MSN Messenger 6.1! http://www.msn.cz/procmessenger
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]