Jens Meiert

Notes on XML, Elements, and Attributes

Jens O. Meiert, April 23, 2009.

This entry is filed under .

Contrary to what one might expect, I’m not necessarily bringing in much XML design experience with my occasional contributions to the HTML 5 specification. However, the design of markup languages is something I consider beneficial for my job as a web professional as well. So just as I did with recent notes on maintainability, here are some on XML design. Heavily inspired by some internal and external documentation.

It is tempting to publish more “notes” posts, but that should be it for now. Similar to PowerPoint presentations that condense information in a way that that information’s essentially starving, notes like this lack the narrative context that helps people make use out of the given information.

Read More

Enjoy the most popular posts, probably including:

Comments

  1. On April 23, 2009, 23:15 CEST, Steffen said:

    My thoughts on that considering only the information structure aspects of the document:

    As long as the information is and stays flat, I would prefer an attribute for brevity.

    If information is extensible in nature (concerning cardinality and depth) you should opt for an element, which also contributes to simplification of validation (thinking of xsd or dtd).

    That said, I can’t resist to state that the style attribute must be considered as an anti pattern (I know, you will like that, Jens ;-)), looking at sth. like style=”a: 1; b: 2; c: url(y) #3 […];’. It’s ignoring the (x/ht)ml grammar and starts a completely new one instead of using means of XML.
    I wonder, if this would still be the design of choice today with the growing popularity of extensible (in terms of namespaces) documents - neglecting all backward compatibility and nostalgic feelings ;-).

  2. On April 24, 2009, 15:10 CEST, Jens Meiert said:

    Interesting, thanks Steffen! Would be lovely to hear some thoughts on that from other HTML WG members – and I can follow, but not comment on the history of @style.

Leave a Comment

Leave a Comment

Respect the comment guidelines. HTML allowed: <a href=""> <abbr title=""> <blockquote> <code> <em> <strong>

Found a mistake? Reward! Email me, jens@meiert.com.

You are here: meiert.com – Archive for 2009 – Notes on XML, Elements, and Attributes

Last update: April 23, 2009. Copyright 2000-2010 Jens O. Meiert.