Re: MicroXML is for hand | automated generation

On Thu, 2012-07-26 at 09:40 +0700, James Clark wrote:

> The only thing that I have found to be a major pain point for
> generation is namespaces, but they are a pain throughout XML
> processing.

True, they are. But you are smarter and wiser than many... I've seen a
great many XML subject to CDATA injection attacks,

    printf("<![CDTA[%s]]>", value);

and losing CDATA sections will force people to do escaping that actually
works.

>  Most of the time the XML that various code I have written
> generates would conform to MicroXML. (This, I remember now, is why my
> drafts have allowed > in attribute values: so that exisiting XML
> toolchains would usually generate MicroXML output if given MicroXML
> input.)

existing toolchains will likely put CDATA sections around things too,
and may also use decimal numeric character references.

> > MicroXML shall support the use of text editors for authoring, and
> shall also make automated generation of MicroXML simpler than XML.
> 
> I don't think it's helpful to combine these two goals: they have quite
> different implications.

+1

Also, "simpler" is subjective -- simpler for the API designer or for the
user of the API? Simpler because fewer characters to type or because
easier to understand, or because easier to debug?
    xml.write("out.xml"); is pretty simple today, if that's what you
have.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml
Co-author, some XML book or other.

Received on Thursday, 26 July 2012 02:51:41 UTC