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

Re: double escaping problem [resolved]

Subject: Re: double escaping problem [resolved]
From: pkeane <pkeane@xxxxxxxxxxxxxxx>
Date: Mon, 12 Nov 2007 14:44:26 -0600 (CST)
Re:  double escaping problem [resolved]
My apologies -- it seems when I add disable-output-escaping="yes" on the <xsl:value-of/> element, my problem goes away. So unless that's an egregiously improper use of DOE, I think my problem is solved.

-peter keane

On Mon, 12 Nov 2007, pkeane wrote:

My apologies is this is repeat material, but I was unable to find the answer by searching the archives.

I am building a web application based on REST-based web services. It is digital asset repository/management tool and all of the "data" in the system lives in a relational database but is exposed to the rest of the application by way of XML documents accessed over http. The entire user interface is constructed using xslt which consumes and "mashes up" these services to present html pages to the user. There is a site-wide XSLT stylesheet and a sitewide "layout" xml file. Each request is mapped to a small script which invokes an XSLT processor, and specifies the page-specific stylesheet to use (this page-specific stylesheet will "include" the site-wide stylesheet). The "source" is the site-wide layout.xml and all of the rest of the data comes from service documents which are grabbed by way of the xslt document() function. The controller (the small script that the request was mapped to) passes parameters to the processor specifying URLs for the data documents.

So...a request for "http://example.com/collections" will use the collections.xsl stylesheet which will in turn invokes document(http://example.com/xml/collections) which returns an xml document listing the collections.

Unfortunately, I have a double escaping problem I cannot seem to get rid of, short of using translate(@my_text,'amp;','') when an ampersand appears in any of the text from the service document. The service documents, of course, have already had ampersands escaped and my process escapes them again, so I get "Art &amp; Art History Collection" being presented to the user (view source of the html shows "Art &amp;amp; Art History).

Disable-output-escaping makes no difference (I believe because output is set to be xml -- I am using xhtml strict doctype).

Any help would be greatly appreciated.

-Peter Keane
daseproject.org

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.