mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 17:08:54 +00:00
More fixes to the xslt_process() example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@43737 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
fcec6774dc
commit
e8ddbaab1b
1 changed files with 27 additions and 27 deletions
|
@ -337,39 +337,39 @@ xslt_output_endtransform();
|
|||
|
||||
$xslData = '<xsl:stylesheet
|
||||
version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:template match="article">
|
||||
<table border="1" cellpadding="2" cellspacing="1">
|
||||
<tr>
|
||||
<td width="20%">
|
||||
<xsl:template match="article">
|
||||
<table border="1" cellpadding="2" cellspacing="1">
|
||||
<tr>
|
||||
<td width="20%">
|
||||
&#160;
|
||||
</td>
|
||||
<td width="80%">
|
||||
<h2><xsl:value-of select="title"/></h2>
|
||||
<h3><xsl:value-of select="author"/></h3>
|
||||
<br/>
|
||||
</td>
|
||||
<td width="80%">
|
||||
<h2><xsl:value-of select="title"/></h2>
|
||||
<h3><xsl:value-of select="author"/></h3>
|
||||
<br/>
|
||||
|
||||
<xsl:value-of select="body"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</xsl:template>
|
||||
<xsl:copy-of select="p"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>';
|
||||
</xsl:stylesheet>';
|
||||
|
||||
$xmlData = '<?xml version="1.0"?>
|
||||
<article>
|
||||
<title>Learning German</title>
|
||||
<author>Sterling Hughes</author>
|
||||
<body>
|
||||
$xmlData = '<?xml version="1.0"?>
|
||||
<article>
|
||||
<title>Learning German</title>
|
||||
<author>Sterling Hughes</author>
|
||||
<p>
|
||||
Essential phrases:
|
||||
<br/>
|
||||
K&#246;nnen Sie mir sagen, wo die Toilette ist?<br/>
|
||||
Ein grosses Bier, bitte!<br/>
|
||||
Noch eins, bitte.<br/>
|
||||
</body>
|
||||
</article>';
|
||||
<br/>
|
||||
K&#246;nnen Sie mir sagen, wo die Toilette ist?<br/>
|
||||
Ein grosses Bier, bitte!<br/>
|
||||
Noch eins, bitte.<br/>
|
||||
</p>
|
||||
</article>';
|
||||
|
||||
if (xslt_process($xslData, $xmlData, $result)) {
|
||||
echo "Here is the brilliant in-depth article on learning";
|
||||
|
|
Loading…
Reference in a new issue