473,721 Members | 2,182 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

firefox doesn't like 'disable-output-escaping' setting... looking for alternatives

I know 'disable-output-escaping' has been discussed in the past, but I can't
put my finger on any of the threads to see if my current problem is
addressed. Sorry for re-asking the question if it has already been
answered...

I have an XML doc that I am transforming via XSLT and JavaScript in the
browser. This allows me to return unsorted data to the browser and allow
the user to sort it with a mouseclick and not hit the server just to perform
the same query with a new sortby clause. My XSLT works fine in Internet
Explorer, but FireFox doesn't seem to respect the 'disable-output-escaping'
attribute like I'd expect. The result is that the output HTML includes <
and " instead of valid HTML.

Here's a fragment of the XML:

<Book isbn="054501022 5" author="Rowling , J. K.;" pubDate="21 July 2007">
Harry Potter and the Deathly Hallows
</Book>

Here's the XSLT fragment that transforms it to HTML:

<xsl:template match="Book">

<tr>

<td class="link">

<xsl:text disable-output-escaping="yes"> &lt;a
href=&quot;http ://localhost/cgi-bin/book_details?is bn=</xsl:text>

<xsl:value-of select="@isbn"/>

<xsl:text disable-output-escaping="yes"> &quot; target=&quot;_b lank&quot;
&gt;</xsl:text>

<center><xsl:va lue-of select="@defect id"/></center>

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

</td>

<td><xsl:valu e-of select="@author "/></td>

<td><xsl:valu e-of select="@pubDat e"/></td>

<td><xsl:valu e-of select="."/></td>

</tr>

</xsl:template>

The result HTML should look something like this:

<tr>

<td><a href="http://localhost/cgi-bin/book_details?is bn=0545010225" target="_blank"
>0545010225</a></td>
<td>Rowling, J. K.;</td>

<td21 July 2007</td>
<td>Harry Potter and the Deathly Hallows</td>

</tr>

In FireFox, the 'disable-output-escaping="yes"' is being ignored, so I end
up with:

<tr>

<td class="link">&l t;a
href=&quot;http://localhost/cgi-bin/book_detail...45010225&quot;
target=&quot;_b lank&quot; &gt;0545010225& lt;/a&gt</td>

<td>Rowling, J. K.;</td>

<td21 July 2007</td>
<td>Harry Potter and the Deathly Hallows</td>

</tr>

.. not quite what I was going for. Anyone have a suggestion?

-David.

Jul 27 '07 #1
1 5482
David Henderson wrote:
I have an XML doc that I am transforming via XSLT and JavaScript in the
browser. This allows me to return unsorted data to the browser and allow
the user to sort it with a mouseclick and not hit the server just to perform
the same query with a new sortby clause. My XSLT works fine in Internet
Explorer, but FireFox doesn't seem to respect the 'disable-output-escaping'
attribute like I'd expect. The result is that the output HTML includes &lt;
and &quot; instead of valid HTML.
disable-output-escaping is an optional feature only supported when the
XSLT processor serializes the result tree. Firefox does not serialize at
all so it does not support disable-output-escaping.

Instead of

<xsl:text disable-output-escaping="yes"> &lt;a
href=&quot;http ://localhost/cgi-bin/book_details?is bn=</xsl:text>

<xsl:value-of select="@isbn"/>

<xsl:text disable-output-escaping="yes"> &quot; target=&quot;_b lank&quot;
&gt;</xsl:text>

<center><xsl:va lue-of select="@defect id"/></center>

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

you should simply use literal result elements with attribute value
templates e.g.

<a href="http://localhost/cgi-bin/book_details?is bn={@isbn}"
target="_blank" ><center><xsl:v alue-of select="@defect id"/></a>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 27 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3950
by: Els | last post by:
Hi, I would like an opinion on the following: I have a page which is made up of background-images with transparent linked images in front of it, which on hover show text in CSS popups. Due to appropriate alt text, anyone viewing the page with images turned off, will see the alt text instead, and on hover will see the popups.
10
2434
by: Frances Del Rio | last post by:
on pop-up, which I have scripted to not show status bar, status bar still shows up in Firefox. Any way to get Firefox to open pop-ups w/o status bar at the bottom? thank you.. Frances
10
17575
by: wayne | last post by:
I found the following script to copy text to the client clipboard but it is not working in Firefox (works fine in IE 6). Can anyone suggest what I need to change? ================================================= function copy_clip(mytext){ if (window.clipboardData) { // IE window.clipboardData.setData("Text", mytext);
5
4020
by: David Freeman | last post by:
Hi There! I'm using ASP.NET 1.1 and VB. Below is my DataGrid declaration... <asp:DataGrid id="myDataGrid" runat="server" AutoGenerateColumns="false"
7
9351
by: VK | last post by:
Is it possible to include SVG object right onto HTML page in Firefox 1.5? (I mean native SVG, not SVG plugin) .... <svg> .... </svg> All samples on mozilla.org are either stay-alone .svg files or XML files. When trying to insert them in HTML page it just doesn't display.
10
3051
by: Paul Gorodyansky | last post by:
Hi, Ran into the problem today - in INPUT field Firefox executes clean-yp of the content if a user presses Esc, _before_ control goes to the code via onkeydown - and search showed that it's a known issue: https://bugzilla.mozilla.org/show_bug.cgi?id=236628 The bug is closed due to the inactivity (I've just written to the Submiter because apparently I don't have rights to re-Open)
7
3808
by: Paul Neave | last post by:
Hi group, My website http://www.neave.com/ does not seem to work (no text appears) when viewed in Firefox 1.5 on a Mac but it works absolutely fine in every other browser I've tested on a PC, including Windows' Firefox. I'm not on a Mac so can't test why this is happening... any ideas? Thanks loads, Paul.
1
3669
by: dev08820 | last post by:
I have a javascript function that disables the hrefs on a page by assigning "#" to each href. Th eneed to do so is to disable links in a print preview window. The print preview window contains only page content and not navigation, etc. This works fine in IE6 but not in FireFox 2.0.0.2. In Firefox, the link always contains the current context or location. If a "#" is assigned the href becomes http://www.foo.com/context/currentpage.htm# instead...
1
4357
by: newbie009 | last post by:
How can I disable horizontal scroll in textbox for FireFox? Right now 1 textbox has vertical scroll and other textbox has horizontal scroll. It only looks like this on FireFox but it looks ugly. http://jumbofiles.com/example.gif I used this code but it only worked for IE not FireFox: style="overflow: scroll; overflow-y: scroll; overflow-x: hidden; overflow:-moz-scrollbars-vertical;" Basically I want only vertical scroll.
0
8860
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8738
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9086
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8028
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6678
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5994
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4762
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3207
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2146
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.