Improve quotation elements.
I was inspired by Org MIME to compose HTML email in Emacs but I
don't use Org. Personally I think XML is all the way better with
XSLT and RelaxNG. How about
text/enriched? Well it is almost dead.
I'm not afraid of writing HTML directly, but I want to make the
result as modern as possible, so a lot of formatting stuff of HTML
has been moved to CSS, and in modern time HTML email makes a lot
use of inline CSS. Meanwhile, I'm using Emacs'
library to render my HTML emails most of the time, so I also want
the result to be recognizable in Emacs.
MJML is something similar to what I want, but:
It is commercial email oriented. I just want to write personalized mail.
The result requires lot of modern browser features not available in Emacs.
I don't want to install
So a simple conclusion: I want something that can be easily converted to HTML5 with XSLT 1.0 only, since I don't have Saxon installed on my local computer. Also I need a RelaxNG Schema so I can editing the format with Emacs.
This is the sample XML source file for version 0.1. The corresponding HTML output.
When in doubt, reference the sample input file.
The root element is
lsml, it has XML name space
version attribute is mandatory and currently
the only permitted value is
format attribute can have
as value, and is used to control MUA.
There are two required elements:
body. Other elements which are
sig, which is used to format signature;
mime are use to provide
information to MUA, and are for internal use only.
Bcc are common email headers, and
they are in capitalized form because XSLT 1.0 has no easy
capitalize string solution.
For elements that are supposed to take email address lists as values, the format is:
(<name>person name</name><email>email address</email>)+
Additional headers can be added as children of
headers element. Notice that field name is case
The idea is from MJML,
preview adds a paragraph of
hidden text in the body so it can only viewed from email
The vertical mode elements are:
raw (raw HTML),
c stands for cite, the other are functioning
similar to standard HTML tags. However, they may not necessary be
translated to exactly the same tags during processing. The
raw tag can also be used to create inline HTML.
This is similar to
section tag from DocBook, that
it can be arbitrarily nested.
Each section must have a
title element. The title
can have optional
level attribute corresponding to
titles in HTML.
quote email messages, there are three optional
Author of original message.
URL to original message.
To make quoting HTML emails much easier, this elements also accepts elements from XHTML namespace.
There is also
vcode, for verbatim inclusion of
code element can be used to format code block.
lang attribute specifies programming