473,322 Members | 1,347 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,322 software developers and data experts.

XHTML 1.1 to (X)HTML 1.0/4.01 Strict Conversion

Hi,
I'm in the process of setting up content negotiation on the server
for my website, and I have set it up so that UAs will either recieve
application/xhtml+xml or text/html, depending on their support.

Does anybody know where I can get a freely available XSLT file, or
other conversion program (or a dreamweaver extension) that can convert
from XHTML 1.1 (for application/xhtml+xml) to (X)HTML 1.0/4.01 Strict
(for text/html), so I can author each document once, but publish both
formats easily. Ideally, I'd have this conversion done on the fly, by
the server (and cached to improve performance), but for now, a program
to do it manually before uploading will be acceptable, until I learn
more about server side processing.

--
Lachlan Hunt
http://www.lachy.id.au/
la**********@lachy.id.au.update.virus.scanners

Remove .update.virus.scanners to email me,
NO SPAM and NO VIRUSES!!!
Jul 20 '05 #1
3 2274
Lachlan Hunt wrote:
Hi,
I'm in the process of setting up content negotiation on the server for
my website, and I have set it up so that UAs will either recieve
application/xhtml+xml or text/html, depending on their support.


http://tranchant.plus.com/notes/multiviews

--
Mark.
Jul 20 '05 #2
In article <6f*****************@news-server.bigpond.net.au>,
Lachlan Hunt <la**********@lachy.id.au.update.virus.scanners> wrote:
Does anybody know where I can get a freely available [...] conversion
program [...] that can convert from XHTML 1.1
(for application/xhtml+xml) to (X)HTML 1.0/4.01 Strict (for text/html),


A SAX serializer that takes an event stream representing an XHTML 1.0
Strict document and produces an HTML 4.01 document is available at
http://www.hut.fi/u/hsivonen/HtmlSerializer.java

A SAX filter that should take out the Ruby stuff is available at
http://www.hut.fi/u/hsivonen/XHTMLCruftDropper.java

Producing the required program is a matter of connecting these pieces
with an XML parser (from the JDK).

--
Henri Sivonen
hs******@iki.fi
http://iki.fi/hsivonen/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Jul 20 '05 #3
In article <6f*****************@news-server.bigpond.net.au>,
Lachlan Hunt <la**********@lachy.id.au.update.virus.scanners> writes:
Does anybody know where I can get a freely available XSLT file, or
other conversion program (or a dreamweaver extension) that can convert
from XHTML 1.1 (for application/xhtml+xml) to (X)HTML 1.0/4.01 Strict
(for text/html), so I can author each document once, but publish both
formats easily. Ideally, I'd have this conversion done on the fly, by
the server


http://apache.webthing.com/mod_proxy_html/ will convert html <--> xhtml
on the fly - although that's not its intended purpose:-) Combine it
with standard content negotiation to fix up the headers.

--
Nick Kew

Nick's manifesto: http://www.htmlhelp.com/~nick/
Jul 20 '05 #4

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

Similar topics

3
by: John Resler | last post by:
Hi, I am trying to track down a bug in a program I've written which parses an XHTML document. The document has been cleaned up with Tidy and converted to XHTML and has a strict.dtd reference. When...
0
by: LU | last post by:
Using VS.Net 03 v.7.1.3 and ASP.NET I'm geting help with javascript and the person helping me is asking me to " get rid of your XHTML ending tag slashes, use a HTML STRICT DOCTYPE" or to use the...
3
by: KMA | last post by:
Just a general Q, but how do people feel about whether their html (or ASP.NETs html product) validates according w3org standards? I've just gone through a few hoops to get the warnings cleaned...
2
by: PapaRandy | last post by:
Hello, I am trying to validate the following .py webpage as HTML (through W3C). I put: ----------------------------------------------------------------------------- print "Content-type:...
11
by: Tim Arnold | last post by:
hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop to create CHM files. That application really hates xhtml, so I need to convert self-ending tags (e.g. <br />) to plain html...
0
by: John Krukoff | last post by:
-----Original Message----- One method which wouldn't require much python code, would be to run the XHTML through a simple identity XSL tranform with the output method set to HTML. It would...
0
by: M.-A. Lemburg | last post by:
On 2008-04-24 19:16, John Krukoff wrote: You could filter the XHTML through mxTidy and set the hide_endtags to 1: http://www.egenix.com/products/python/mxExperimental/mxTidy/ -- Marc-Andre...
0
by: dorayme | last post by:
In article <cKqdnfzW-uftDh_V4p2dnAA@giganews.com>, Guy Macon <http://www.GuyMacon.com/wrote: In fact, it is nothing like this at all. There are much more convincing arguments that most website...
6
by: Guy Macon | last post by:
cwdjrxyz wrote: HTML 5 has solved the above probem. See the following web page: HTML 5, one vocabulary, two serializations http://www.w3.org/QA/2008/01/html5-is-html-and-xml.html
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.