Re: Re: XSLTProcessor help
| From: | Tom Sparks | Date: | Tue, 17 Feb 2009 02:19:11 +0000 |
| Subject: | Re: Re: XSLTProcessor help | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-288401@lists.php.net to get a copy of this message | ||
same result????
------------cut here-----------
<html><head><meta http-equiv="Content-Type" content="text/html;
charset=UTF-8"></head><body><pre>
Hyalearl, 100-ton Sulieman-Class Scout/Courier
2008
03
10
All rights reserved 2008
Onno Meyer
none@none.com
10
Traveller
1.0
</pre></body></html>
-----------------cut here---------------
---------cut here---------------------------
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="html" indent="no" encoding="UTF-8"
omit-xml-declaration="yes"/>
<xsl:template match="/">
<html>
<head>
</head>
<body>
<pre>
<xsl:apply-templates/>
</pre>
</body>
</html>
</xsl:template>
<xsl:template match="meta">
<!-- head -->
</xsl:template>
</xsl:stylesheet>
-----cut here---------------
tom_a_sparks
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
----- Original Message ----
From: Colin Guthrie <gmane@colin.guthr.ie>
To: php-general@lists.php.net
Sent: Monday, 16 February, 2009 9:41:46 PM
Subject: [PHP] Re: XSLTProcessor help
'Twas brillig, and Tom Sparks at 16/02/09 10:49 did gyre and gimble:
> help, when I include <xsl:apply-templates/>
> the XSLTProcessor only strips the XML tags and outputs the text see result
>
> --------------cut here vehicle.xsl---------
> <?xml version="1.0" ?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>
> <xsl:template match="/">
> <html>
> <head>
XSL needs to know that you are outputting XML-derived data...
eg. try putting this before your <xsl:template....>:
<xsl:output method="html" indent="no" encoding="UTF-8"
omit-xml-declaration="yes"/>
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
-- PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Make Yahoo!7 your homepage and win a trip to the Quiksilver Pro. Find out more