473,406 Members | 2,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 4538
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*****@hotmail.com> wrote in message
news:e0**************************@posting.google.c om
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.com

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*****@hotmail.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
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,...
4
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...
5
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...
6
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?...
1
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...
6
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...
10
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...
0
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
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...
2
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
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...
0
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,...

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.