Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: I want to have an empty textarea

From: "roy axenov" <r_axenov@----.-->
To: NULL
Date: 2/8/2007 2:12:00 PM

On Feb 8, 11:23 pm, Cecil Westerhof <d...@dummy.nl> wrote:
> This is a piece of code from a xslt-file:
>
>   <xsl:template match="SMS">
>     <xsl:for-each select='.'>

As a side note, this is one of the silliest things I've
ever seen and a textbook case of magical thinking in
coding. It's not that I've never invoked foo to do bar
without understanding either foo or bar--I did, but after
being painfully bitten on my backside by that a few times
I just said no.

>       <tr>
>         <td class = "inputDescription"><xsl:value-of
> select='.' />:</td>
>         <td><textarea class = "content" id = "{@id}"
> rows="5" cols="50">#</textarea></td>
>       </tr>
>     </xsl:for-each>
>   </xsl:template>
>
> When I remove the '#' to get an empty textare, the endtag
> is collapsed into the begintag and all the HTML code
> after the textarea is displayed into the textare. How can
> I get an empty textarea?

You do get an empty textarea element, it is just being
serialized as XML. There are a few possible causes for
this:

 - you might've forgotten to set <xsl:output method="html"
   ... /> in your transformation. If this is the case, the
   fix should be obvious.
 - your XSLT processor doesn't grok <xsl:output method=
   "html" ... /> and blissfully serializes the resulting
   tree as XML anyway. If this is the case, change your
   XSLT processor.
 - you're attempting to output XHTML1.0, but then serve it
   as text/html anyway. Basically, XSLT processors couldn't
   care less for workarounds described in W3C
   recommendation to ensure backwards compatibility, and
   without employing those workarounds you cannot serve
   XHTML as text/html (and you shouldn't anyway if you care
   for your sanity and general well-being one bit). If this
   is the case, just output HTML4.01 instead (there might
   be other solutions, but I won't go into that).

--
roy axenov



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent