Re: Re: XSLTProcessor help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx
  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@xxxxxxxxxxxxxx>
To: php-general@xxxxxxxxxxxxx
Sent: Monday, 16 February, 2009 9:41:46 PM
Subject:   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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux