Verbosity of microdata

Hi,

I'm in a process of developing mapping of ITS
(http://www.w3.org/TR/its/) vocabulary to HTML5 and microdata.

ITS is simple XML vocabulary which defines several global attributes
which can be used on any element to convey information useful for
translation of content.

If I use XHTML I can use ITS attributes directly, like:

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:its="http://www.w3.org/2005/11/its"
      its:version="1.0">
  <head>
    <title>INBOX</title>
  </head>
  <body>
    <h1>Welcome</h1>
    <p its:locNote="MSGCNT is a number of messages">There are {MSGCNT}
messages in your mailbox.</p>
    <p its:locNote="STGCPT is percentage">Your are using {STGCPT} of
your mailbox capacity.</p>
    …
  </body>
</html>

Now when I want to forgot about XML syntax and use HTML syntax of HTML5
I can't use XML namespaces and additional attributes anymore. My
understanding is that Microdata tries to fill this area. After reading
Microdata spec I came up with the following:

<!DOCTYPE html>
<html>
  <head>
    <title>INBOX</title>
  </head>
  <body>
    <h1>Welcome</h1>
    <p itemscope itemtype="http://www.w3.org/2005/11/its">
      <meta itemprop="locNote" content="MSGCNT is a number of messages">
      There are {MSGCNT} messages in your mailbox.
    </p>
    <p itemscope itemtype="http://www.w3.org/2005/11/its">
      <meta itemprop="locNote" content="STGCPT is percentage">
      Your are using {STGCPT} of your mailbox capacity.
    </p>
    …
  </body>
</html>

I would like to hear from Microdata experts answers to the following
questions:

1. Is such mapping reasonable/correct/...?

2. Is there any way how to make Microdata version more concise?
It's very verbose compared to version relying on XML namespace and
attributes. For example it's possible to factor out itemtype? (My
understanding is that it is not possible, that it has to be specified
each time on the element with itemscope.)

3. If there is no way in Microdata how to make this more compact, is
this really our answer to distributed extensibility? Or does HTML5
provide other mechanism how to express such information in a more
concise way?

Thanks in advance,

     Jirka

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------

Received on Thursday, 15 March 2012 09:03:58 UTC