Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > XHTML page displays as source in WinME

Reply
Thread Tools

XHTML page displays as source in WinME

 
 
Quadibloc
Guest
Posts: n/a
 
      02-13-2008
I have been working on my page at

http://www.quadibloc.com/math/ideint.htm

and after some effort, I managed to get the MathML to display properly
in Amaya 8.54; it had been created to work with Amaya 2.0. This
required changing the page to conform to XHTML rules.

To get it to display also in Internet Explorer with the DesignScience
MathPlayer plug-in and in Mozilla Firefox, which now supports MathML,
I had to go one step further, and rename the page to

http://www.quadibloc.com/math/ideint.xhtml

and this works when I'm booted into WinXP.

When I'm in Windows ME, IE works on my page. And Mozilla Firefox will
let me see

http://baruchel.free.fr/~thomas/notebook.xhtml

correctly, as well as Mozilla's own test page.

But when I try to look at *my* page with the .xhtml extension... I see
the page source, as if Firefox had never *heard* of xhtml! Doubtless,
I'm doing _something_ wrong...

John Savard
 
Reply With Quote
 
 
 
 
Jonathan N. Little
Guest
Posts: n/a
 
      02-13-2008
Quadibloc wrote:
> I have been working on my page at
>
> http://www.quadibloc.com/math/ideint.htm
>
> and after some effort, I managed to get the MathML to display properly
> in Amaya 8.54; it had been created to work with Amaya 2.0. This
> required changing the page to conform to XHTML rules.
>
> To get it to display also in Internet Explorer with the DesignScience
> MathPlayer plug-in and in Mozilla Firefox, which now supports MathML,
> I had to go one step further, and rename the page to
>
> http://www.quadibloc.com/math/ideint.xhtml
>
> and this works when I'm booted into WinXP.
>
> When I'm in Windows ME, IE works on my page. And Mozilla Firefox will
> let me see
>
> http://baruchel.free.fr/~thomas/notebook.xhtml
>
> correctly, as well as Mozilla's own test page.
>
> But when I try to look at *my* page with the .xhtml extension... I see
> the page source, as if Firefox had never *heard* of xhtml! Doubtless,
> I'm doing _something_ wrong...


It is not Firefox, you will find the results the same with other
browsers, it is your server:

Date: Wed, 13 Feb 2008 15:08:18 GMT
Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_fastcgi/2.2.12
mod_perl/1.26 PHP/4.3.3 FrontPage/5.0.2 mod_ssl/2.8.12 OpenSSL/0.9.6b
Last-Modified: Wed, 13 Feb 2008 13:03:35 GMT
Etag: "348134-16fe-47b2eaa7"
Accept-Ranges: bytes
Content-Length: 5886
Content-Type: text/plain
## NOTE-------^^^^^^^^^^

As opposed to baruchel.free.fr:

Date: Wed, 13 Feb 2008 15:10:16 GMT
Server: Apache/ProXad [Jan 10 2008 05:02:06]
Last-Modified: Fri, 30 Dec 2005 22:15:50 GMT
Etag: "7dbe33-197a-43b5b196"
Accept-Ranges: bytes
Content-Length: 6522
Content-Type: application/xhtml+xml
^^^^^^^^^^^^^^^^^^^^^
If you can use .htaccess files with your server that add this to file:

# add mime type for xhtml extension
AddType application/xhtml+xml .xhtml

But do realize that your IE (ver6) will not be able to handle your page,
you will have to use Firefox to view the page as application/xhtml+xml

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
 
 
 
Quadibloc
Guest
Posts: n/a
 
      02-14-2008
On Feb 13, 8:19 am, "Jonathan N. Little" <(E-Mail Removed)> wrote:

> If you can use .htaccess files with your server that add this to file:
>
> # add mime type for xhtml extension
> AddType application/xhtml+xml .xhtml
>
> But do realize that your IE (ver6) will not be able to handle your page,
> you will have to use Firefox to view the page as application/xhtml+xml


Turns out a meta tag did the trick. I have a version for IE and a
different version for Firefox, and they both work now.

John Savard
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      02-14-2008
Quadibloc wrote:
> On Feb 13, 8:19 am, "Jonathan N. Little" <(E-Mail Removed)> wrote:
>
>> If you can use .htaccess files with your server that add this to file:
>>
>> # add mime type for xhtml extension
>> AddType application/xhtml+xml .xhtml
>>
>> But do realize that your IE (ver6) will not be able to handle your page,
>> you will have to use Firefox to view the page as application/xhtml+xml

>
> Turns out a meta tag did the trick. I have a version for IE and a
> different version for Firefox, and they both work now.


????

Your problem is at the server level, how could a meta tag help?


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
JWS
Guest
Posts: n/a
 
      02-15-2008
Quadibloc wrote:
> I have been working on my page at
>
> http://www.quadibloc.com/math/ideint.htm
>
> and after some effort, I managed to get the MathML to display
> properly

[..]

If you let your page load a piece of javascript called
ASCIIMathML.js
(http://www1.chapman.edu/~jipsen/mathml/asciimath.html) you can
get MATHML display in ordinary HTML pages (not XHTML). You write
your formulas using a very simple notation, and the Javascript
translates them 'on the fly' into MATHML. This works in all MATHML
capable browsers (in IE you must install MathPlayer for this).
Much easier than coding MATHML by hand.

For an example, see my page http://www.jw-stumpel.nl/bounce.html

Regards, Jan


 
Reply With Quote
 
Quadibloc
Guest
Posts: n/a
 
      02-16-2008
On Feb 15, 1:07 am, JWS <(E-Mail Removed)> wrote:
> Quadibloc wrote:
> > I have been working on my page at

>
> >http://www.quadibloc.com/math/ideint.htm

>
> > and after some effort, I managed to get the MathML to display
> > properly

>
> [..]
>
> If you let your page load a piece of javascript called
> ASCIIMathML.js
> (http://www1.chapman.edu/~jipsen/mathml/asciimath.html) you can
> get MATHML display in ordinary HTML pages (not XHTML). You write
> your formulas using a very simple notation, and the Javascript
> translates them 'on the fly' into MATHML. This works in all MATHML
> capable browsers (in IE you must install MathPlayer for this).
> Much easier than coding MATHML by hand.
>
> For an example, see my pagehttp://www.jw-stumpel.nl/bounce.html


But that forces people visiting my web site to enable JavaScript.

If I was a Fortune 500 company, I could expect that people might trust
my site not to damage their computers, but with the Internet the way
it is, surely for ordinary web pages that's not a reasonable
expectation.

Most of my site is _very_ accessible. Only a few pages require support
for tables. Math formulas on other pages are done using ASCII art.

I'm trying to demo MathML using one page, so far. As for writing
MathML by hand, I am using Amaya to write it, then I correct its
output by hand.

John Savard
 
Reply With Quote
 
Quadibloc
Guest
Posts: n/a
 
      02-16-2008
On Feb 13, 9:20 pm, "Jonathan N. Little" <(E-Mail Removed)> wrote:
> Quadibloc wrote:
> > On Feb 13, 8:19 am, "Jonathan N. Little" <(E-Mail Removed)> wrote:


> > Turns out a meta tag did the trick. I have a version for IE and a
> > different version for Firefox, and they both work now.

>
> ????
>
> Your problem is at the server level, how could a meta tag help?


Well, if the server were to deign to read the meta tag, and act on its
contents, it might.

Maybe my own site admin abilities let me change the type of a page
somehow; I'll visit the console and have a look, but I doubt it.

Firefox on another computer still showed text/plain; the page that
worked on IE with MathPlayer worked with Firefox on *that* computer. I
am quite puzzled.

John Savard
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      02-16-2008
Quadibloc wrote:
> On Feb 13, 9:20 pm, "Jonathan N. Little" <(E-Mail Removed)> wrote:
>> Quadibloc wrote:
>>> On Feb 13, 8:19 am, "Jonathan N. Little" <(E-Mail Removed)> wrote:

>
>>> Turns out a meta tag did the trick. I have a version for IE and a
>>> different version for Firefox, and they both work now.

>> ????
>>
>> Your problem is at the server level, how could a meta tag help?

>
> Well, if the server were to deign to read the meta tag, and act on its
> contents, it might.


No they are not.

> Maybe my own site admin abilities let me change the type of a page
> somehow; I'll visit the console and have a look, but I doubt it.
>


Since you are on an apache server maybe you have the ability to use an
..htaccess file

create a plain text file and name it ".htaccess", note the leading dot.
content should be:

# add XHTML
AddType application/xhtml+xml .xhtml


> Firefox on another computer still showed text/plain; the page that
> worked on IE with MathPlayer worked with Firefox on *that* computer. I
> am quite puzzled.


Because Firefox obeys the ContentType sent from the server, IE is
"extension-based". Microsoft uses the file extension to determine what a
file is and how it should be handled. That is how Windows works built
not how the web or other OSes work.

You can prove it. In notepad make a file named "plaintext.txt", write
"Hello World" Save it, make copies and rename them "plaintext.doc",
"plaintext.zip", "plaintext.exe" if you try to open them see what
happens with each. Windows will even try to run the "plaintext.exe", of
course it will fail. That is not how the rest of the world works. So in
your problem you have to get the server to send the file with the proper
content type. Either via the .htaccess by associating the extension
..xhtml with xhtml or using a server side script to send the correct
header. Note that by setting the header the file extension won't matter.

<?php
header('Content-Type: text/html');
echo '<html><head><title>HTML</title></head>';
echo '<body><p>via <b>HTML</b></p></body></html>';
?>

<?php
header('Content-Type: application/xhtml+xml');
echo '<html><head><title>XHTML</title></head>';
echo '<body><p>via <b>XHTML</b></p></body></html>';
?>

<?php
header('Content-Type: plain/text');
echo '<html><head><title>TEXT</title></head>';
echo '<body><p>via <b>plain text</b> see the markup!</p></body></html>';
?>


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      02-16-2008
Quadibloc wrote:
> On Feb 15, 1:07 am, JWS <(E-Mail Removed)> wrote:
>> Quadibloc wrote:
>>> I have been working on my page at
>>> http://www.quadibloc.com/math/ideint.htm
>>> and after some effort, I managed to get the MathML to display
>>> properly

>> [..]
>>
>> If you let your page load a piece of javascript called
>> ASCIIMathML.js
>> (http://www1.chapman.edu/~jipsen/mathml/asciimath.html) you can
>> get MATHML display in ordinary HTML pages (not XHTML). You write
>> your formulas using a very simple notation, and the Javascript
>> translates them 'on the fly' into MATHML. This works in all MATHML
>> capable browsers (in IE you must install MathPlayer for this).
>> Much easier than coding MATHML by hand.
>>
>> For an example, see my pagehttp://www.jw-stumpel.nl/bounce.html

>
> But that forces people visiting my web site to enable JavaScript.


For folks with IE you're going to force them to do something one way or
another else all they'll get is a download dialog box.


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Quadibloc
Guest
Posts: n/a
 
      02-16-2008
On Feb 16, 7:38 am, "Jonathan N. Little" <(E-Mail Removed)> wrote:

> Since you are on an apache server maybe you have the ability to use an
> .htaccess file


Thank you very much; that appears to have been the solution to the
problem.

John Savard
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web-page that *BOTH* changes current page + displays a Pop-up pagefrom JavaScript John L. Javascript 10 05-18-2009 09:27 AM
XHTML page displays as source in WinME Quadibloc XML 15 02-16-2008 03:57 PM
Resolved -- Re: Simple page displays once then shows only source!? Mark Adams HTML 0 11-13-2005 06:43 PM
Classic asp date displays- changing over to aspnet date object displays Chumley Walrus ASP .Net 1 12-16-2004 09:57 PM
what is URL command that displays source instead of page? David W. Deley Javascript 1 06-29-2004 06:45 PM



Advertisments