Print

Print


Hi Stuart,

On 8/28/2011 2:01 PM, Stuart Yeates wrote:
> There has been a lot of discussion about what the relationship between TEI
> XML and some forms of HTML might be.
>
> Such discussion is great, because HTML is likely to remain the dominant
> textual display form for years to come. We need to play nicely with HTML
> (and ePub, which is essentially a carrier for HTML).
>
> However, there are clear semantic differences between HTML and TEI.
>
> All the semantics additions to  HTML consist of tagging either the entire
> document or some portion of the document text with additional semantics
> over and above the baseline semantics of HTML. This additive model is
> great, because it allows tools to understand HTML without understanding
> all the semantic additions---tools which rely on just the semantics of HTML
> can safely ignore all the rest.
>
> Alas, this additive approach assumes only addition.
>
> When you have tei:ab defined using phrases like "...analogous to, but
> without the semantic baggage of, a paragraph", you have wording that is
> categorically not representable in any of the HTML semantic systems
> that I'm aware of.

Fortunately, this can also be accommodated:

http://www.w3.org/TR/html5/grouping-content.html#the-div-element  :

    The div element has no special meaning at all. It represents its
    children. It can be used with the class, lang, and title attributes
    to mark up semantics common to a group of consecutive elements.

http://www.w3.org/TR/html5/text-level-semantics.html#the-span-element

    The span element doesn't mean anything on its own, but can be useful
    when used together with the global attributes, e.g. class, lang, or
    dir. It represents its children.


If you add Microdata to a div, you would be able to represent tei:ab 
without polluting it with some other HTML tag's explicitness (though in 
this case, <div>, by being an anonymous block, would I think already be 
equivalent).

(The difference between div and span, by the way, is that <div> is 
rendered by default in a browser as a "block" element, meaning that line 
breaks will be added on either side of it, whereas a <span> is rendered 
without any formatting by default, being inline (though these default 
behaviors can be overridden completely by a CSS stylesheet where purely 
formatting decisions are to be controlled--e.g., turning a div into an 
inline element, or a span into a block element).)

Best wishes,
Brett