[MarkLogic Dev General] How to get xdmp:tidy() to tidy up HTML5?

Geert Josten geert.josten at daidalos.nl
Tue Sep 6 14:03:22 PDT 2011


Hi Ryan,

Good question! :) I am afraid HTML5 is a bit too new for the current tidy in MarkLogic Server. Let's hope it gets upgraded soon.

Meanwhile you could pass in an input-xml option, but that requires input to be well-formed I guess, and I think it disables several HTML cleanup options as well. Not sure this will work for you..

Kind regards,
Geert

Van: general-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com] Namens semerau at hotmail.com
Verzonden: dinsdag 6 september 2011 22:05
Aan: general at developer.marklogic.com
Onderwerp: [MarkLogic Dev General] How to get xdmp:tidy() to tidy up HTML5?

With the new doctype and elements that are part of HTML5, how do you get xdmp:tidy() to recognize those in HTML5?
If I have an html page that contains something like:

<!DOCTYPE html>

<html>

    <header>blah</header>

    <section>blah</section>
and then try something like: xdmp:tidy(xdmp:document-get("home.html"))
I get errors like:

<section> is not recognized! discarding unexpected <section>

<header> is not recognized! discarding unexpected <header>
Are there some options I can send to xdmp:tidy() to get it to handle it?


thanks,
Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20110906/b2bc750d/attachment.html 


More information about the General mailing list