title: Falling back on Android resource values for attribute defaults in a microformat
body: <p>I'm designing a microformat to be consumed by my Android client, where I extract some elements containing menu commands and other metadata before pushing the remaining content into a WebView.</p>
  
  <p>I currently embed each menu command as a JSON object, like:</p>
  
  <pre><code>&lt;span class="menu-command"&gt;{"type": "SHARE"}&lt;/span&gt;
  </code></pre>
  
  <p>The handler logic is implemented natively by the client, and the display properties (title, icon) are pulled from the resource XML.</p>
  
  <p>Now I'm considering switching to more semantic HTML5 tags, possibly something like:</p>
  
  <pre><code>&lt;menu&gt;
    &lt;menuitem label="Share" data-type="SHARE"&gt;
    &lt;!-- other actions --&gt;
  &lt;/menu&gt;
  </code></pre>
  
  <p>with data-* attributes for any other fields required for the JSON spec (depending on the type of the action).</p>
  
  <p>We'd still like to use the Android app's resource file to get default values for the command's label and icon, but I'm not sure of the most standards-friendly way to do so; the label attribute is required, and any logic to replace that value isn't to the letter of the standard, at least.</p>
  
  <p>Is there any standards-compliant, or at least conventional way for a client to replace the value of an HTML attribute in this fashion?</p>