Page 1 of 1

[SOLVED] problem with xsl(t)

Posted: Wed Jan 19, 2005 9:45 pm
by timvw
ok, i'm playing around with xsl(t) and everything works....

however, if i have something like

Code: Select all

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method='xml'
            indent="yes"
            omit-xml-declaration="yes"
            doctype-public = "-//W3C//DTD XHTML 1.0 Strict//EN"
            doctype-system = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
/>

<xsl:template match="/">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Tim Van Wassenhove :: Contact</title>
<link rel="stylesheet" href="/styles/style.css" type="text/css"/>
</head>

<body>

<form action="" method="post">
                <div class="row">
                    <span class="label">Message:</span>
                    <span class="input"><textarea name="message" rows="10" cols="40"></textarea></span>
                </div>
</form>
it will be transformed to <textarea name="message" rows="10" cols="40"/>. This is really unwanted... Anybody knows how to avoid this? (using php4.3.10 and sablotron)

The current workaround is to put <xsl:text> </xsl:text> in the textarea, but i don't like this.

Posted: Wed Jan 19, 2005 9:49 pm
by feyd
seems like a bug in the translation to me.. :?

Posted: Wed Jan 19, 2005 10:41 pm
by timvw
found the solution :)

choose html instead of xml for output method and problem was solved :)

Code: Select all

<xsl:output method='html'
             indent="yes"
             omit-xml-declaration="yes"
             doctype-public = "-//W3C//DTD XHTML 1.0 Strict//EN"
             doctype-system ="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
/>