|
@@ -12,48 +12,48 @@ class Route_Test_XslRecurse extends RouteBase {
|
|
|
Lib::loadXslFunction('testHtmlContent');
|
|
Lib::loadXslFunction('testHtmlContent');
|
|
|
$xml = "
|
|
$xml = "
|
|
|
<root>
|
|
<root>
|
|
|
- <item typeName=\"default_db:TEST_PERMS\">
|
|
|
|
|
- <featureId>TEST_PERMS.1</featureId>
|
|
|
|
|
- </item>
|
|
|
|
|
- <item typeName=\"default_db:TEST_PERMS\">
|
|
|
|
|
- <featureId>TEST_PERMS.99999</featureId>
|
|
|
|
|
- </item>
|
|
|
|
|
- <item typeName=\"default_db__x3A__TEST_PERMS:TestPermsAnt\">
|
|
|
|
|
- <featureId>TestPermsAnt.1</featureId>
|
|
|
|
|
- </item>
|
|
|
|
|
|
|
+ <item typeName=\"default_db:TEST_PERMS\">
|
|
|
|
|
+ <featureId>TEST_PERMS.1</featureId>
|
|
|
|
|
+ </item>
|
|
|
|
|
+ <item typeName=\"default_db:TEST_PERMS\">
|
|
|
|
|
+ <featureId>TEST_PERMS.99999</featureId>
|
|
|
|
|
+ </item>
|
|
|
|
|
+ <item typeName=\"default_db__x3A__TEST_PERMS:TestPermsAnt\">
|
|
|
|
|
+ <featureId>TestPermsAnt.1</featureId>
|
|
|
|
|
+ </item>
|
|
|
</root>
|
|
</root>
|
|
|
";
|
|
";
|
|
|
$xsl = '<?xml version="1.0" encoding="UTF-8"?>';
|
|
$xsl = '<?xml version="1.0" encoding="UTF-8"?>';
|
|
|
$xsl .= '
|
|
$xsl .= '
|
|
|
<xsl:stylesheet version="1.0"
|
|
<xsl:stylesheet version="1.0"
|
|
|
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
|
|
- xmlns:php="http://php.net/xsl">
|
|
|
|
|
|
|
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
|
|
+ xmlns:php="http://php.net/xsl">
|
|
|
<xsl:output method="html" encoding="utf-8" indent="yes"/>
|
|
<xsl:output method="html" encoding="utf-8" indent="yes"/>
|
|
|
- <xsl:template match="root">
|
|
|
|
|
- <html><body>
|
|
|
|
|
- <h2>Items</h2>
|
|
|
|
|
- <table class="table table-bordered">
|
|
|
|
|
|
|
+ <xsl:template match="root">
|
|
|
|
|
+ <html><body>
|
|
|
|
|
+ <h2>Items</h2>
|
|
|
|
|
+ <table class="table table-bordered">
|
|
|
<thead>
|
|
<thead>
|
|
|
<tr>
|
|
<tr>
|
|
|
<th>featureId</th>
|
|
<th>featureId</th>
|
|
|
<th>item</th>
|
|
<th>item</th>
|
|
|
</tr>
|
|
</tr>
|
|
|
</thead>
|
|
</thead>
|
|
|
- <xsl:for-each select="item">
|
|
|
|
|
- <tr>
|
|
|
|
|
|
|
+ <xsl:for-each select="item">
|
|
|
|
|
+ <tr>
|
|
|
<td><xsl:value-of select="featureId"/></td>
|
|
<td><xsl:value-of select="featureId"/></td>
|
|
|
<td><pre>
|
|
<td><pre>
|
|
|
- <xsl:copy-of select="php:function(\'testFetchWfs\', string(@typeName), string(featureId))/node()"/>
|
|
|
|
|
- </pre></td>
|
|
|
|
|
|
|
+ <xsl:copy-of select="php:function(\'testFetchWfs\', string(@typeName), string(featureId))/node()"/>
|
|
|
|
|
+ </pre></td>
|
|
|
</tr>
|
|
</tr>
|
|
|
- </xsl:for-each>
|
|
|
|
|
- </table>
|
|
|
|
|
|
|
+ </xsl:for-each>
|
|
|
|
|
+ </table>
|
|
|
|
|
|
|
|
<h3>Test function to get xml content from php function</h3>
|
|
<h3>Test function to get xml content from php function</h3>
|
|
|
<xsl:copy-of select="php:function(\'testHtmlContent\', \'test-arg-1-from-xsl\', \'test-arg-2-from-xsl\')/node()"/>
|
|
<xsl:copy-of select="php:function(\'testHtmlContent\', \'test-arg-1-from-xsl\', \'test-arg-2-from-xsl\')/node()"/>
|
|
|
|
|
|
|
|
- </body></html>
|
|
|
|
|
- </xsl:template>
|
|
|
|
|
|
|
+ </body></html>
|
|
|
|
|
+ </xsl:template>
|
|
|
</xsl:stylesheet>
|
|
</xsl:stylesheet>
|
|
|
';
|
|
';
|
|
|
$xmldoc = new DOMDocument;
|
|
$xmldoc = new DOMDocument;
|