first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

Default XSLT File for PHP REST Framework

<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >

&lt;xsl:output
    encoding=&quot;utf-8&quot;
    indent=&quot;yes&quot;
    media-type=&quot;text/xml&quot;
    omit-xml-declaration=&quot;yes&quot;
    standalone=&quot;no&quot; /&gt;

&lt;xsl:param name=&quot;cmd&quot; /&gt;

&lt;xsl:template match=&quot;/&quot;&gt;
    &lt;div&gt;
    &lt;xsl:choose&gt;
        &lt;xsl:when test=&quot;/InternalMessage&quot;&gt;&lt;xsl:call-template name=&quot;app_message&quot; /&gt;&lt;/xsl:when&gt;

        &lt;xsl:otherwise&gt;
            &lt;h1&gt;Unknown Input&lt;/h1&gt;
            &lt;p&gt;Command: &lt;xsl:value-of select=&quot;$cmd&quot;/&gt;&lt;/p&gt;
            &lt;p&gt;Server Response:&lt;/p&gt;
            &lt;p&gt;&lt;textarea id=&quot;RawServerResponse&quot;&gt;&lt;xsl:copy-of select=&quot;/&quot; /&gt;&lt;/textarea&gt;&lt;/p&gt;
        &lt;/xsl:otherwise&gt;
    &lt;/xsl:choose&gt;
    &lt;/div&gt;
&lt;/xsl:template&gt;

&lt;xsl:template name=&quot;app_message&quot;&gt;
    &lt;h1&gt;&lt;xsl:value-of select=&quot;//Header&quot;/&gt;&lt;/h1&gt;
    &lt;xsl:for-each select=&quot;//Line&quot;&gt;
        &lt;p&gt;&lt;xsl:value-of select=&quot;node()&quot;/&gt;&lt;/p&gt;
    &lt;/xsl:for-each&gt;
&lt;/xsl:template&gt;

</xsl:stylesheet>

mod date: 2006-09-14T22:34:32.000Z