Problems outputting '<' and '>'

Problems outputting '<' and '>'

Post by 8 of » Sun, 06 May 2001 02:34:25



I'm trying to output the following from a transformation

class="<%=editClassType%>"

Since class is an attribute, i thought the following code should do it.

<xsl:attribute name="class"><xsl:text
disable-output-escaping="yes">&lt;%=editClassType%">&gt;</xsl:text></xsl:att
ribute>

No joy. I would really appreciate some help on this. Thanxs all.

8 of 9

 
 
 

Problems outputting '<' and '>'

Post by Dunca » Tue, 08 May 2001 22:13:47


I'm not to sure if this will work but instead of using &lt; and &gt; try
using &#60; and &#62;



Quote:> I'm trying to output the following from a transformation

> class="<%=editClassType%>"

> Since class is an attribute, i thought the following code should do it.

> <xsl:attribute name="class"><xsl:text

disable-output-escaping="yes">&lt;%=editClassType%">&gt;</xsl:text></xsl:att
Quote:> ribute>

> No joy. I would really appreciate some help on this. Thanxs all.

> 8 of 9


 
 
 

Problems outputting '<' and '>'

Post by Julian F. Reschk » Tue, 08 May 2001 22:34:11


&#60; is the same thing as &lt; -- the XSLT processor won't be able to tell
the difference.

You can't have "<" as is in (the serialization of) an attribute value -- it
needs to be escaped as "&lt;". If you really need to produce this output,
you can't use xsl:element and xsl:attribute at all.



> I'm not to sure if this will work but instead of using &lt; and &gt; try
> using &#60; and &#62;



> > I'm trying to output the following from a transformation

> > class="<%=editClassType%>"

> > Since class is an attribute, i thought the following code should do it.

> > <xsl:attribute name="class"><xsl:text

disable-output-escaping="yes">&lt;%=editClassType%">&gt;</xsl:text></xsl:att

- Show quoted text -

Quote:> > ribute>

> > No joy. I would really appreciate some help on this. Thanxs all.

> > 8 of 9

 
 
 

1. Create '<' and '>' by <xsl:eval>

Hi,
I wants to create '<TD>' by an <xsl:eval>, but the parser changes it
into '&lt;TD&gt;'. What could I do ?

Thanks for your help

Frank

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

2. How to find out ..

3. outputting '<' and '>'

4. Falcon IDE 2.5->3.5

5. output of '<', '>'

6. Tab order

7. Problem with 'Or' operator in '<xsl:if>' statement

8. Fatal exception in ProxiWeb when url in clipboard

9. Redefining Tag Delimiter ('<' --> '[')??

10. XML and the '<' , '>', single quote chararacters

11. PRB: xsl changing '<' in cdata into '&lt;'

12. Entity declaration for '<' and '&' in a DTD