473,797 Members | 3,187 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

disable-output-escaping="yes" not working in Netscape or Opera ??

Hi all

I've formatted one of my xml files for viewing through a web browser
using xsl.
It works fine in Internet Explorer, however when I use Netscape6 or
Opera to view the same page the disable-output-escaping function does
not work and it is displaying html tags as text rather than code.

Can anyone enlighten me as to why this is happening?
Am i using the wrong namespace? i'm currently using:
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform" version="1.0"

Can anyone explain to me a bit more about namespaces? why is there
different ones?

Many thanks for your input!
Jul 20 '05 #1
6 4570
Joe Price wrote:
I've formatted one of my xml files for viewing through a web browser
using xsl.
It works fine in Internet Explorer, however when I use Netscape6 or
Opera to view the same page the disable-output-escaping function does
not work and it is displaying html tags as text rather than code.
From the XSLT 1.0 spec (16.4):
An XSLT processor is not required to support disabling output escaping.
Can anyone enlighten me as to why this is happening?
Am i using the wrong namespace? i'm currently using:
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform" version="1.0"

Can anyone explain to me a bit more about namespaces? why is there
different ones?


Currently, there's only XSLT 1.0 with the namespace you are using. Well,
some old msxml versions use another namespace.

A better alternative would be, not to have HTML code inside CDATA
sections, but use XHTML embedded in your XML.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)

Jul 20 '05 #2
"Joe Price" <jo*****@hotmai l.com> wrote in message
news:e0******** *************** ***@posting.goo gle.com
I've formatted one of my xml files for viewing through a web browser
using xsl.
It works fine in Internet Explorer, however when I use Netscape6 or
Opera to view the same page the disable-output-escaping function does
not work and it is displaying html tags as text rather than code.

Can anyone enlighten me as to why this is happening?
Not every XSL processor implements this feature, because it (obviously)
has the potential to produce malformed output. XSLT is meant to be a
side-effects-free programming language, so disable-output-escaping is
not a required part of an XSLT processor.

The favoured alternative for your case is to use well-formed XHTML as
part of the XML tree, so that you can avoid putting your code in CDATA
sections.
Am i using the wrong namespace?
No.
i'm currently using:
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform" version="1.0"
Correct.
Can anyone explain to me a bit more about namespaces? why is there
different ones?


Namespaces in XML are just what they are everywhere else - a method to
collate names in such way that their semantic meaning cannot be
misunderstood. You need namespaces as soon as there is the remote
possibility that someone chooses a name for something already existent
in the current scope. Like files in a file system. You cannot have two
files with the same name, they must at least be different in their path.
Think of a telephone book, or of DNS.

The namespace declaration
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform" has three parts:
- the prefix "xmlns:"
- the name of your namespace, "xsl" in this case
- the URI of that namespace (every namespace needs a unique URI)

By prefixing the elements with their approriate namespace, like
<xsl:for-each>
you give them their meaning. Nothing keeps you from using <my:for-each>
elements, if you like. If you have declared it, of course:
xmlns:my=http://my.namespace.co m

For more on namespaces:
http://www.google.com/search?q=XML+namespace+tutorial ;-)

HTH

Martin
Jul 20 '05 #3
In article <e0************ **************@ posting.google. com>,
Joe Price <jo*****@hotmai l.com> wrote:
It works fine in Internet Explorer, however when I use Netscape6 or
Opera to view the same page the disable-output-escaping function does
not work and it is displaying html tags as text rather than code.


You can only really expect disable-output-escaping to work when the
XSLT processor outputs XML. Output escaping is something that happens
when the tree resulting from the transform is converted into text, and
that doesn't happen in a web browser: the tree is interpreted as
[X]HTML, not output as text.

I'm surprised it worked in Internet Explorer.

-- Richard
--
Spam filter: to mail me from a .com/.net site, put my surname in the headers.

FreeBSD rules!
Jul 20 '05 #4
Many thanks for your responses as they were really useful

Could you please point me in the right direction for tutorials on
embedding xhtml within an xml document?

many thanks
Jul 20 '05 #5
> Could you please point me in the right direction for tutorials on
embedding xhtml within an xml document?


XHTML is XML, so you are talking about embedding XML from one source into
another XML document. There are various ways to go about it, from slapping
together strings (with careful attention paid to encoding issues, if they're
not both Unicode) to DOM's importNode().

You are probably wondering how to first convert HTML to XHTML. For that, see
http://tidy.sourceforge.net/
Jul 20 '05 #6
This XML file i'm displaying through a web browser, I also load into
Flash.

If i was to write xhtml within my xml document - so that it would
display properly in netscape / opera etc - it would confuse the flash
parser as you have to specify which tag you want to extract content
from.

So, for example, just by adding a <p></p> tag to my xml file will mess
up the existing references to the xml tags within flash.

Any suggestions, solutions? Has anyone come across this problem
before?
Jul 20 '05 #7

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

Similar topics

17
7264
by: Torbjørn Pettersen | last post by:
I've got a table where I want some of the cells to use a background image. The cells have variable height, so I am using an image with a rather small height to fill up the background of the cells, thus making I look like one high image in there. When validating it, I get this error: there is no attribute "BACKGROUND" The validators also tell me there are no "HEIGHT" or
4
3952
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.
5
2478
by: Mark Hannon | last post by:
I have been researching the "disabled" property for form data and wanted to know: - Does the disabled property supress the form item from being submitted? - Can the disabled property be applied when the submit button is pressed? I am designing a PayPal order page that will have 4 items, each with a 3-character text box where the customer will enter quantity. The default value will be "0." I want to be able to test whether the
6
2126
by: MLH | last post by:
You know how the text in the attached label sort of 'greys out' when you click something that sets MyTextbox.Enabled = False? I would like to make a label's text look like that? How do I do it? It look sort-a-like sunken text or shadowed - I don't know what.
1
1270
by: Brian Takita | last post by:
Hello, Whenever I add an existing aspx/ascx file to the project, a dialog box saying "There is no class file in the project associaated with the Web Form 'blah.ascx'. Create a new class file now?" This is a Yes|No dialog box. This is fine when theres a couple of files, but when there are 40+ files, clicking "No" 40+ times (I'd like to get everything working before using Codebehind) gets highly annoying.
6
7467
by: Brendan | last post by:
Hi, I'm trying to mimic the IPC/messaging system of an specific OS in a portable way by using GCC's library. The IPC system uses buffered asynchronous messages, where any thread can send a message to any other thread (i.e. to the "threadID") without blocking, and the receiver does any security checks necessary. I'm trying to implement the portable/linux version on top of sockets/datagrams ("SOCK_DGRAM" in the local namespace), and so...
10
10055
by: morangolds | last post by:
Hi, I've been having a problem with C++ Windows Forms apps not "ending" when you close the form window. I've searched about this problem all over the place and most searches have lead me to believe that this has to do with unreleased form component events or event handlers. I'm comparatively new to .net and windows forms, in the sense that though I've been using them for over 2 years now, it's been rather sporadic. I work with...
0
1187
by: Joe | last post by:
I tried PageSetup.PaperSize and Application.DisplayAlerts = False but none of these really works. Any ideas/comments will be helpful thanks!
84
8600
by: aarklon | last post by:
Hi all, I found an interesting article here:- http://en.wikipedia.org/wiki/Criticism_of_the_C_programming_language well what do you guys think of this article....??? Is it constructive criticism that needs to be appreciated always...???
2
5595
DonRayner
by: DonRayner | last post by:
This one has me stumped. I'm getting a "Type Mismatch" error on one of my forms when it's being opened. It's hapening before the forms "On Open" event, I stuck a msgbox in there to check and I'm getting the error before it opens. The line of code that calls the form from another form is. DoCmd.OpenForm "NonConformanceAdd",,,,acFormAdd,acDialog I get the error, click ok, then the form opens and works exactly how it's supposed to. I even...
0
9685
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
10469
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10246
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10209
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10023
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
6803
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
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3750
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2934
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.