Open Source Software Solutions

XHTMLTranscoder

NameXHTMLTranscoder
Version1.0.007
Date2006-02-03
AuthorNicola Asuni
CopyrightTecnick.com S.r.l.
Via Ugo Foscolo n.19
09045 Quartu Sant'Elena (CA)
ITALY
www.tecnick.com
LicenseGNU LESSER GENERAL PUBLIC LICENSE v.2.1

Source Code and Documentation

Description

XHTMLTranscoder is an Open Source Java class that quickly converts broken HTML code to well-formed XHTML.
XHTMLTranscoder is a fast transcoder useful to convert HTML code in real-time.
This class do not check headers, it checks only the general rules for tags, attributes and nesting:
  • tags (elements) names in lowercase (eg: <ACRONYM> become <acronym>);
  • attributes names in lowercase (eg: <acronym TITLE="example"> become <acronym title="example">);
  • unquoted attributes (eg: <acronym title=example> become <acronym title="example">);
  • elements nesting (eg: <b><i>hello</b></i> become <b><i>hello</i></b>);
  • elements termination (eg: <p>hello world ... become <p>hello world ...</p>);
  • unminimized attributes (eg: <input type="checkbox" checked /> become <input type="checkbox" checked="checked" />);
  • unterminated empty tags (eg: <br> become <br />);
  • preserve other languages elements (php, asp, jsp, ...)
The HTML documents transcoded using the XHTMLTranscoder class are generally recognized as valid XHTML document by the W3C Markup Validation Service.

This project is shipped as Eclipse project, with classes compiled into the "classes" directory.
However a packaged version of this class is available as a JAR archive inside the www directory.
To install the JAR file, just copy it on your project classpath.

Documentation and examples are included on the distribution.

Download XHTMLTranscoder from SourceForge

Get XHTMLTranscoder at SourceForge.net. Fast, secure and Free Open Source software downloadsSupport This Project

IT | EN
W3C XHTML 1.0 | W3C CSS 2.0