468,257 Members | 1,410 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,257 developers. It's quick & easy.

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 2049
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by John Resler | last post: by
3 posts views Thread by KMA | last post: by
2 posts views Thread by PapaRandy | last post: by
11 posts views Thread by Tim Arnold | last post: by
reply views Thread by John Krukoff | last post: by
reply views Thread by M.-A. Lemburg | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.