|
Subject: Re: [xsl] Streamline xslt From: Bill Humphries <bill@xxxxxxxxx> Date: Wed, 25 Sep 2002 19:24:21 -0700 |
The first thought I had was use includes. Php includes won't work
because the first thing the Sablotron processor sees is <?php //php code
?>. I assume the same problem occurs with Apache includes.
XSL includes must be well formed xml documents so that wouldn't work
either.
$header = /* PHP code which generates well-formed XML */ $footer = /* PHP code which generates well-formed XML */
/* Now place these items in an array we'll pass to xslt_process */ $args = array( "/header" => $header, "/footer" => $footer );
/* And any parameters your defining in your XSLT */ $params = array( "foo" => $untaintedFoo, "bar" => $untaintedBar );
if ($result)
{
echo $result;
}
else
{
/* error handling */
}<xsl:template match="/">
<xsl:apply-templates select="document('arg:/header')" />
<xsl:apply-templates />
<xsl:apply-templates select="document('arg:/footer')" />
</xsl:template>---- Bill Humphries <bill@xxxxxxxxx> http://www.whump.com/moreLikeThis/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Streamline xslt, Michael Kay | Thread | [xsl] Copying XML tags into XSL var, Vignesh Balan R |
| [xsl] Problems rendering nbsp entit, John Aschenbrenner | Date | [xsl] Before & after, Kim |
| Month |