Re: Fw: HTML output and entities

Peter Nabbefeld <[email protected]>
Newsgroups gmane.text.xml.xalan.java.user
Message-ID <[email protected]>
Thank You everybody for help!

P.


[email protected] wrote:
>> <xsl:text disable-output-escaping="yes">&lt;input
>> value=&#34;</xsl:text><xsl:value-of
>> select="$some-var-containing-the-quot"/><xsl:text
>> disable-output-escaping="yes">&#34;&gt;</xsl:text>
>
> Well, there's your problem. NEVER try to construct markup as text; it
> simply doesn't work as you would expect it to and may not work at all in
> some situations. If you want a literal element in the output, use a
> literal result element in the stylesheet, and either use an attribute
> value template to construct the value of that attribute, or use
> xsl:attribute to create it. For example:
>
>          <input>
>                  <xsl:attribute name="value"><xsl:value-of
> select="$some-var-containing-the-quot"/></xsl:attribute>
>          </input>
>
> or
>          <input value="{$some-var-containing-the-quot}"></input>
>
> Disable-output-escaping should be used only when producing text output. If
> you think you need it for XML or HTML output, you are almost certainly
> doing something wrong.
>
> ______________________________________
> "... Three things see no end: A loop with exit code done wrong,
> A semaphore untested, And the change that comes along. ..."
>    -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish (
> http://www.ovff.org/pegasus/songs/threes-rev-11.html)
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.