XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Keesjan Van BunningenSubject: Special character '&' in xsl:attribute
Author: Keesjan Van Bunningen
Date: 01 Mar 2000 12:08 PM
I need to insert an URL in the 'action' attribute of a (form) tag that includes a & sign to delimit several parameters.

The HTML output should look like this:

(FORM ACTION=somepage.asp?par1=value1&par2=value2)


The various parameter values need to be inserted by (xsl:value-of/) and therefore require the use of (xsl:attribute).

Whatever I tried, I can't get Stylus to produce a regular & sign, but instead get &.

I already tried (![CDATA[&]]) as well as the following:

(xsl:text disable-output-escaping="yes")&(/xsl:text)


(which doesn't work within (xsl:attribute) ).

There should be a simple solution to this problem. Can anyone help me out?

Postnext
(Deleted User) Subject: Special character '&' in xsl:attribute
Author: (Deleted User)
Date: 01 Mar 2000 01:26 PM
You've got a few alternatives.

1) Internet Explorer (and Netscape?) will expand & to an ampersand in URLs; you could just rely on this functionality.

2) You could use <input type='hidden'...> inside your form

3) There is a bug in Stylus that disable-output-escaping does not work inside <xsl:attribute>. This will be fixed in a future version of Stylus.

--Alex Lloyd
eXcelon corp.

Posttop
Omri TraubSubject: Special character '&' in xsl:attribute
Author: Omri Traub
Date: 01 Mar 2000 01:42 PM
Hi,

All of the solutions Alex mentioned work. This is not actually a bug in Stylus. &, < and > are supposed to be escaped in attribute values. The Stylus behavior is consistent with what other processors are doing.

- Omri.

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.