docbook-apps

  • 1.  PHP processing instructions

    Posted 06-18-2016 17:06
    Hi,

    I'm using the 1.79.1 onechunk.xsl transformation style sheets with PHP
    processing instructions. If I use the HTML onechunk.xsl file in my
    customization level, a "?" is required immediately before the closing
    processing instruction tag. For example:

    <xsl:processing-instruction name="php">
    //PHP code here
    ?</xsl:processing-instruction>

    This produces the correct opening and closing PHP tags. ()

    If I use the _XHTML_ onechunk.xsl file and a terminating "?" the
    output is as follows:

    //PHP code
    ??>

    Note the duplicate "?". Is this expected?

    Thanks.

    --

    Peter Lavin
    Telephone: 1 416 461 4991
    Mobile: 1 416 882 9194
    Skype: peter.lavin
    (GMT -05:00 Canada/US Eastern)



  • 2.  Re: [docbook-apps] PHP processing instructions

    Posted 06-18-2016 20:47
    Hi Peter,
    Yes, that's expected. HTML was based on SGML, and the syntax for a
    processing instruction in SGML is (note there is no closing
    question mark), and that is what the HTML stylesheet produces. But that
    forced you to manually insert the closing "?" for PHP. With XHTML, you
    no longer have to manually add the closing mark because the syntax for a
    processing instruction in XML is .

    Bob Stayton
    Sagehill Enterprises
    bobs@sagehill.net

    On 6/18/2016 10:05 AM, Peter Lavin wrote:
    > Hi,
    >
    > I'm using the 1.79.1 onechunk.xsl transformation style sheets with PHP
    > processing instructions. If I use the HTML onechunk.xsl file in my
    > customization level, a "?" is required immediately before the closing
    > processing instruction tag. For example:
    >
    > <xsl:processing-instruction name="php">
    > //PHP code here
    > ?</xsl:processing-instruction>
    >
    > This produces the correct opening and closing PHP tags. ()
    >
    > If I use the _XHTML_ onechunk.xsl file and a terminating "?" the
    > output is as follows:
    >
    > > //PHP code
    > ??>
    >
    > Note the duplicate "?". Is this expected?
    >
    > Thanks.
    >