[Prev][Next][Index][Thread]

Re: HTML Tidy Wrapper for Functional Developer



In article <wk1ywb21qt.fsf@double.co.nz>,
  Chris Double <chris@double.co.nz> wrote:
> Klemens Schmid <klemens.schmid@gmx.de> writes:
>
> > I have problems with the compile of TidyCOM. I get lots of
> > unresolved external I guess because the tidy.lib cannot be
> > found. Can this come from the different configurations of Tidy and
> > TidyCOM?
>
> As far as I know you don't need the tidy.lib. All I did on a clean
> machine to test the library was put the TidyCOM.zip files in a
> directory, run regsvr32.exe on the TidyCOM.DLL and then built the
> library in FD.
>
> Have you got the COM libraries for FD available from the fun-o
> website? I'm also using the MS linker if that makes a difference. If
> this still doesn't work can you send me the log file of the link stage
> or a list of the FD errors and I'll see what I can find.
>
> > I have another problem when I pass the resulting XML file to
> > e.g. XML notepad. He refuses to load because of duplicate
> > attributes. Some special & expressions like &uuml; &middot; &copy;
> > are not treated by tidy (not by your code) and therefore cause
> > errors in XML parsers.  Do you know by heart where to treat this?
>
> My tidycom dylan library only converts the HTML to well formed HTML,
> not XML or XHTML. Things like fixing overlapping tags. I then parse
> the code using a Dylan HTML parser. To convert to XML you need to use
> some of the TidyCOM options. This involves doing something like:
>
>   let s = "<html>...</html>"
>   let tidy := make(<ITidyObject>, class-id: $TidyObject-class-id);
>   ITidyOptions/OutputXML(tidy.ITidyObject/Options) := #t;
>   let result = bstr-to-byte-string(ITidyObject/TidyMemToMem(tidy, s));
>
> See the implementation of my html-tidy() method for more
> details. Eventually I plan to extend the dylan wrapper so it has an
> easy way to set the various HTML tidy options like XML output, etc.
>
> Hope that helps,
> Chris.
> --
> http://www.double.co.nz/dylan
>
I compile using Microsoft C++. What do I have to consider here to get
the compile thru?

Regards,
Klemens


Sent via Deja.com http://www.deja.com/
Before you buy.



Follow-Ups: References: