# XはてなML: Structure Module # はてなダイアリーの構造要素 start = element diary { diary-content } diary-content = element head { head-content }, body-content head-content = element title { xml-lang?, text } & element author { xml-lang?, text }? & element contact { xml-lang?, text }? & element base { xsd:anyURI }? xml-lang = attribute xml:lang { xsd:language } body-content = element day { attribute date { date-content }?, element title { text }?, # タグ使えません element photo { photo-content }?, anonymous-section?, element section { section-content }* }* date-content = xsd:date #TBD: タイムゾーン不許可にする photo-content = attribute src { xsd:anyURI }, attribute title { text }? anonymous-section = Block.model section-content = attribute id { text }?, #TBD: id は半角英数のみ、't' はダメ ( element title { title-content } & element c { category-content }* ), Block.model title-content = Inline.model category-content = text