// file : web/xhtml -*- C++ -*- // copyright : Copyright (c) 2014-2015 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file #ifndef WEB_XHTML #define WEB_XHTML #include namespace web { // "Canonical" XHTML5 vocabulary. // // * One-letter tag names and local variable clash problem // // a at|an|an anc anch // b bt|bo|bl bld bold // i it|it|it itl ital // p pt|pr|pr par para // q qt|qu|qt quo quot // s st|st|st stk strk // u ut|un|un unl undr // // Other options: // - _a, a_, xa // - A, I // - x::i // - user-defined literals: "a"_e, "/a"_e, "id"_a // // Things can actually get much worse, consider: // // int i; // s << i << "text" << ~i; // // So perhaps this is the situation where the explicit namespace // qualification (e.g., x::p) is the only robust option? // // // * Element/attribute name clash problem (e.g., STYLE) // // - some attribute/element name decorator (STYLEA, STYLE_A, STYLE_) // - rename attribute/element (e.g., STYLEDEF or CSSSTYLE[adds TYPE]); // in case of STYLE we should probably rename the element since // attribute will be much more frequently used. // - "scope" attributes inside elements (P::STYLE); somewhat // burdensome: P(P::STYLE); could then use low-case names // for attributes // - "scope" elements inside other elements (HEAD::STYLE); also // burdensome. // // // * Text wrapping/indentation // // For some (inline) elements we want additional indentation: // // 1. Indent content on newline (e.g., for