[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: symbols < and > in attribute

Subject: Re: symbols < and > in attribute
From: Mike Brown <mike@xxxxxxxx>
Date: Tue, 11 Dec 2001 10:17:40 -0700 (MST)
re symbols
Ernesto Reinaldo wrote:
> 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%>"/>.
>
> [...]
>
> 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?

That's correct, there is no way to do this in XSLT when using the HTML
or XML output methods, not even by using disable-output-escaping, since 
disable-output-escaping is only allowed to affect text nodes, if it is
supported at all.

You have 2 practical options:

1. Non-portable vendor extensions. Saxon, for example, has an extension
attribute for this purpose. See
http://saxon.sourceforge.net/saxon6.5/extensions.html

2. Instead of using the short <% %> syntax for JSP, use the longer,
more elegant XML syntax. See the JSP spec for this.

There is a third option that is not very practical, which is to use the
text output method and manually write out all your tags :)

   - Mike
____________________________________________________________________________
  mike j. brown, fourthought.com  |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  personal: http://hyperreal.org/~mike/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.