Page 1 of 1

problem in transfering XSLT on <textarea> tag.

Posted: Wed Sep 06, 2006 6:49 am
by nadavvin
PHP convert the <textarea></textarea> to <textarea /> which is not good since the following code is place inside the <textarea> content.


What should I do that it's convert to <textarea></textarea>?


I use in this PHP code to convert:

Code: Select all

<?php
$xml = new DOMDocument;
$xml->load('try.xml');

$xsl = new DOMDocument;
$xsl->load('try.xsl');
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl); // attach the xsl rules
echo $proc->transformToXML($xml);
?>

Posted: Wed Sep 06, 2006 6:53 am
by volka
The php script is quite irrelevant here. try.xml and try.xsl are more interesting.

Posted: Wed Sep 06, 2006 7:54 am
by nadavvin

Posted: Wed Sep 06, 2006 8:09 am
by volka
There's only one textarea in Happy_Blog.xsl
<textarea name="Description" cols="35" rows="20"/>
What do you expect it to do? What do you want the template to do?

Posted: Wed Sep 06, 2006 8:26 am
by nadavvin
volka wrote:There's only one textarea in Happy_Blog.xsl
<textarea name="Description" cols="35" rows="20"/>
What do you expect it to do? What do you want the template to do?

sorry I didn't update the xsl from my comuter, now there is closing tag </textarea> and it still don't work.

Posted: Wed Sep 06, 2006 9:45 am
by volka
ok, now it's
http://wiki.555mb.com/example/Happy_Blog.xsl wrote:<textarea name="Description" cols="35" rows="20"></textarea>
Mozilla and IE both reduce it to <textarea name="Description" cols="35" rows="20" /> since it has no contents.
As soon as you put something in there they will expand the element as expected.