cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <>
Subject Re: including scripting in output files
Date Mon, 04 Nov 2002 20:59:21 GMT
Steven Noels wrote:
> Template is there, PI-template there, but apparently the HTMLSerializer 
> happily chops the second question mark away from the output:
>     <?php phpinfo() >
>                    ^^
> Let's complain loudly :-)

That's the way PIs are serialized in HTML. Take the XML serializer...oh
well, need special tinkering for <br> and such...
Maybe the serializer can be tricked with
  <?php phpinfo() ??>
but I think it will output
  <?php phpinfo() ? >
Last resort: Run something like
  <xsl:template match="*">
    <xsl:value-of select="name()">
    <xsl:for-each select="@*">
      <xsl:text> </xsl:text>
      <xsl:value-of select="name()">
      <xsl:value-of select=".">
    <xsl:apply-templates select="node()"/>
    <xsl:value-of select="name()">
  <xsl:template match="processing-instruction()">
    <xsl:value-of select=".">
and use the text serializer (be carful with encodings, UTF-8 for best
Actually PHP source *is* text, stuff like
  <div class=<?php echo "$class"?>>
is *not valid HTML or XML or whatever.


To unsubscribe, e-mail:
For additional commands, email:

View raw message