problem in transfering XSLT on <textarea> tag.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nadavvin
Forum Commoner
Posts: 68
Joined: Wed Sep 06, 2006 6:05 am

problem in transfering XSLT on <textarea> tag.

Post 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);
?>
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

The php script is quite irrelevant here. try.xml and try.xsl are more interesting.
nadavvin
Forum Commoner
Posts: 68
Joined: Wed Sep 06, 2006 6:05 am

Post by nadavvin »

User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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?
nadavvin
Forum Commoner
Posts: 68
Joined: Wed Sep 06, 2006 6:05 am

Post 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.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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.
Post Reply