This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Re[2]: Producing custom HTML code


/ Dmitry Tkatchenko <dim@lavtech.ru> was heard to say:
| I.e. I want html file to start in the following manner:
| 
| <?
|         $page=25;$page_name="Win";
|         $title="mnoGoSearch: Windows search engine software";
|         include("include/top.php");
| ?>
| <H3><u>mnoGoSearch for Windows</u></H3>

Yuck. That's not going to be easy. Try this template:

<xsl:template match="*" mode="process.root">
  <xsl:variable name="doc" select="self::*"/>
  <html>
<!-- the stuff you use to generate the PHP gobbledy-gook goes here -->
  <xsl:call-template name="user.header.content">
    <xsl:with-param name="node" select="$doc"/>
  </xsl:call-template>
  <xsl:apply-templates select="."/>
  <xsl:call-template name="user.footer.content">
    <xsl:with-param name="node" select="$doc"/>
  </xsl:call-template>
<!-- more PHP gook here if you want -->
  </html>
</xsl:template>

If you're chunking, you'll have to modify this template instead:

<xsl:template name="chunk-element-content">
  <xsl:param name="prev"></xsl:param>
  <xsl:param name="next"></xsl:param>

  <html>
<!-- the stuff you use to generate the PHP gobbledy-gook goes here -->

    <xsl:call-template name="user.header.navigation"/>

    <xsl:call-template name="header.navigation">
      <xsl:with-param name="prev" select="$prev"/>
      <xsl:with-param name="next" select="$next"/>
    </xsl:call-template>

    <xsl:call-template name="user.header.content"/>

    <xsl:apply-imports/>

    <xsl:call-template name="user.footer.content"/>

    <xsl:call-template name="footer.navigation">
      <xsl:with-param name="prev" select="$prev"/>
      <xsl:with-param name="next" select="$next"/>
    </xsl:call-template>

    <xsl:call-template name="user.footer.navigation"/>
<!-- more PHP gook here if you want -->
  </html>
</xsl:template>

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com>      | A life, admirable at first sight,
http://www.oasis-open.org/docbook/ | may have cost so much in imposed
Chair, DocBook Technical Committee | liabilities, chores and
                                   | self-abasement, that, brilliant
                                   | though it appears, it cannot be
                                   | considered other than a failure.
                                   | Another, which seems to have
                                   | misfired, is in reality a
                                   | triumphant success, because it has
                                   | cost so little.--Henry De
                                   | Montherlant

------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-apps-request@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]