DLang Spec rewrite (?)
Juan Manuel Cabo
juanmanuel.cabo at gmail.com
Sun May 26 09:25:04 PDT 2013
On Sunday, 26 May 2013 at 08:09:16 UTC, Borden wrote:
> [...]
> My 'complaint' - although I would prefer to have my
> observations about difficulties working with a markup system be
> called 'observations' - is that the current body of text files
> which comprise the DLang spec source cannot be easily compiled
> into clean, well-formed, XHTML5-compliant files from which I
> can build an ePUB file.
> [...]
Maybe you can automatically convert HTML to XHTML, and then apply
an XSLT transformation.
You mentioned somewhere that you needed something like a CSS
transformation to target a <p> inside another element. You could
do that with XSLT.
To convert from HTML to XHTML you could use the following:
http://www.codeproject.com/Articles/10792/Convert-HTML-to-XHTML-and-Clean-Unnecessary-Tags-a
It is made in C#, though if it works, I guess it could be ported
to D.
ALso you could use Addam D. Ruppe XML DOM classes, which, though
I'm not sure, seem to tolerate HTML4:
https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff
(grab dom.d and characterencoding.d from there).
Or maybe the next generation xml library for D which will be
revieed for inclusion, which supports XPATH queries:
http://dsource.org/projects/xmlp
--jm
More information about the Digitalmars-d
mailing list