You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Jason Foster <ja...@uwaterloo.ca> on 2001/05/22 00:13:11 UTC
Suppressing self-terminating elements
This might not be the appropriate locale to ask this question, so
apologies in advance.
I am trying to insert an HTML TEXTAREA element into a document as
follows:
<TEXTAREA><xsl:value-of select="$contents"/></TEXTAREA>
In some cases "$contents" is empty. In the resulting document I get:
<TEXTAREA/>
This makes sense but poses a problem. Most browsers can't handle a
self-terminating TEXTAREA element and end up butchering the rendering of
the page.
Is there some way for me to turn off collapsing an empty element into a
self-terminating element? I would ideally like to be able to preserve
this behavious elsewhere in the document.
Thanks for your help!
Jason Foster
Re: Suppressing self-terminating elements
Posted by Jason Foster <ja...@uwaterloo.ca>.
> <TEXTAREA><xsl:value-of select="$contents"/><xsl:text>
> </xsl:text></TEXTAREA>
Unless I miss my guess, this will result in a TEXTAREA containing a single
hard return. We were hoping for something completely empty.
Thanks for the suggestion.
Jason Foster
Re: Suppressing self-terminating elements
Posted by Frank Chen <fr...@ms5.hinet.net>.
Hi:
One way to this is:
<TEXTAREA><xsl:value-of select="$contents"/><xsl:text>
</xsl:text></TEXTAREA>
Frank