[Home]  [List]  [News]  [Docs]  [FAQ]  [Downloads]  [Resources]  [About]
Search :
/Home /List

list4xt : Mailing list for the XT users community.

[list4xt] Re: Tidy as output handler (was: XT and XHTML)

Subject: [list4xt] Re: Tidy as output handler (was: XT and XHTML)
From: Eric van der Vlist (vdv@dyomedea.com)
Date: 28/04/2000 - 20:43


> I think it's probably easier just to build an XHTMLOutputHandler that
> subclasses HTMLOutputHandler without trying to string together too many
> modules. I'm not actually in need of very many changes - mostly just empty
> element handling - so I don't think it'll be too hard.

Curiously, there is already a "minimize" attribute in XMLOutputMethod,
but there is no provision to call it anywhere in the rest of the code...

The output method can be as simple as

----------
import com.jclark.xsl.sax.*;
import java.io.*;

public class XhtmlOutputHandler extends XMLOutputHandler implements
OutputDocumentHandler {

  public XhtmlOutputHandler() {
    super();
        setMinimize(MINIMIZE_EMPTY_ELEMENTS_HTML);
  }

  public XhtmlOutputHandler(OutputStream out) {
    super(out);
        setMinimize(MINIMIZE_EMPTY_ELEMENTS_HTML);
  }

}
----------
and the output is then "half perfect" :

<br /> (OK)
<hr /> (OK)
<p /> (should rather be <p> </p> according to the spec).

Eric

-- 
------------------------------------------------------------------------
Eric van der Vlist       Dyomedea                    http://orfcu.org
creator                  http://highriskexperts.com -              http://canaanchamber.com
editor                                 http://merchantaccountcompanies.com
------------------------------------------------------------------------

-- Mailing list for the XT users community. (http://ashleysextoys.com) (mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)



Archive générée par hypermail 2b28 le 06/11/2001 - 11:46 CET

webmaster@4xt.org


A site designed by Dyomedea