Project

Profile

Help

Support #4321

closed

PI output bug in @method="html"

Added by Toshihiko Makita over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2019-09-26
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

Hi,

I'm working with DITA to HTML5 project and generating HTML with PHP instructions. As you know PHP instruction is written in processing-instruction like this:

<?php includeInnerHtml('C_19.php')?>

However when I generate processing-instruction in HTML output, Saxon does not close the processing-instruction by "?>".

Here is sample XSLT file and the result:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:math="http://www.w3.org/2005/xpath-functions/math"
    exclude-result-prefixes="xs math"
    version="3.0">
    
    <xsl:output method="html" encoding="UTF-8" html-version="5.0"/>
    
    <xsl:template name="xsl:initial-template">
        <!-- XSLT processor information -->
        <xsl:variable name="vendor" as="xs:string" select="system-property('xsl:vendor')"/>
        <xsl:variable name="vendorUrl" as="xs:string" select="system-property('xsl:vendor-url')"/>
        <xsl:variable name="productName" as="xs:string" select="system-property('xsl:product-name')"/>
        <xsl:variable name="productVersion" as="xs:string" select="system-property('xsl:product-version')"/>
        <html>
            <head>
                <title>Saxon PI Output Test</title>
            </head>
            <body>
                <main>
                    <xsl:comment select="'Running on: ' || $productName || ' (' || $vendorUrl || ') Version: ' || $productVersion"/>
                    <p>Here is PI output:</p>
                    <xsl:processing-instruction name="php">includeInnerHtml('C_19.php')</xsl:processing-instruction>
                </main>
            </body>
        </html>
    </xsl:template>
    
</xsl:stylesheet>
<!DOCTYPE HTML>
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>Saxon PI Output Test</title>
   </head>
   <body>
      <main><!--Running on: SAXON (http://www.saxonica.com/) Version: PE 9.9.1.5-->
         <p>Here is PI output:</p>
         <?php includeInnerHtml('C_19.php')></main>
   </body>
</html>

This occurs only HTML output. If I change @method="xml", this phenomenon does not occur.

Please fix this problem.

Regards,

Toshihiko Makita

Please register to edit this issue

Also available in: Atom PDF