Subject: [xsl] symbols < and > in attribute From: Ernesto Reinaldo <erbxslt@xxxxxxxxx> Date: Tue, 11 Dec 2001 03:39:35 -0800 (PST) |
Hi All, I'm generating JSP pages from an XML document and in these pages I need to have tags of the following form <mytag ttr1="<%= value%>"/>. In the XML sources I have something like <mytag attr1="= value"/> I was trying to generate this using something like (sometimes the mytag may have a content to be "evaluated", so I cant not just copy the tag and insert < and > ). <xsl:template match="mytag"> <mytag> <xsl:attribute name="attr1"/> <xsl:text disable-output-escaping="yes"> <% </xsl:text> <xsl:value-of select="@attr1"/> <xsl:text disable-output-escaping="yes"> %> </xsl:text> </xsl:attribute> ... do something with the body if any </mytag> </xsl:template> but &tl; and >. Somewhere I read (maybe in the specification) that is not possible to use dissable-out-escaping to generate attributes... So my my question is if there is a "clean" way to go around that? How can one get the charactes < and > printed in the attribute? I'm able to generate the XSLT code to "solve" the previous problem, just using <xsl:text .../> everywhere, but my "solution" is far from being "clean". Thanks in advance, Ernesto Reinaldo __________________________________________________ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] namespace issue, DPawson | Thread | Re: [xsl] symbols < and > in attrib, Mike Brown |
Re: [xsl] namespace issue, David Carlisle | Date | RE: [xsl] namespace issue, DPawson |
Month |