Module: Mml::Base::Content::AnnotationXml

Included in:
V2::AnnotationXml, V3::AnnotationXml, V4::AnnotationXml
Defined in:
lib/mml/base/content/annotation_xml.rb

Overview

annotation-xml is an XML-encoded annotation for semantic markup. Used within semantics element to embed presentation or other markup.

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/mml/base/content/annotation_xml.rb', line 9

def self.included(klass)
  klass.class_eval do
    attribute :definitionURL, :string
    attribute :annotation_xml_encoding, :string
    attribute :cd, :string
    attribute :name, :string

    xml do
      namespace Mml::Namespace
      element "annotation-xml"
      mixed_content

      map_attribute "definitionURL", to: :definitionURL
      map_attribute "encoding", to: :annotation_xml_encoding
      map_attribute "cd", to: :cd
      map_attribute "name", to: :name
    end
  end
end