By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,766 Members | 1,265 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,766 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.