Class: RubySpeech::SSML::Mark

Inherits:
Element
  • Object
show all
Defined in:
lib/ruby_speech/ssml/mark.rb

Overview

A mark element is an empty element that places a marker into the text/tag sequence. It has one required attribute, name, which is of type xsd:token [SCHEMA2 ยง3.3.2]. The mark element can be used to reference a specific location in the text/tag sequence, and can additionally be used to insert a marker into an output stream for asynchronous notification. When processing a mark element, a synthesis processor must do one or both of the following:

  • inform the hosting environment with the value of the name attribute and with information allowing the platform to retrieve the corresponding position in the rendered output.

  • when audio output of the SSML document reaches the mark, issue an event that includes the required name attribute of the element. The hosting environment defines the destination of the event.

The mark element does not affect the speech output process.

www.w3.org/TR/speech-synthesis/#S3.3.2

Instance Attribute Summary

Attributes included from GenericElement

#parent

Instance Method Summary collapse

Methods inherited from Element

module, namespace, root_element, #to_doc

Methods included from GenericElement

#+, #==, #base_uri, #base_uri=, #build, #children, #clone, #create_node, #embed, #eval_dsl_block, included, #inherit, #initialize, #inspect, #mass_assign, #method_missing, #namespace=, #namespace_href, #node, #nokogiri_children, #read_attr, #respond_to_missing?, #string, #to_s, #traverse, #version, #version=, #write_attr

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RubySpeech::GenericElement

Instance Method Details

#<<(*args) ⇒ Object

Raises:


35
36
37
# File 'lib/ruby_speech/ssml/mark.rb', line 35

def <<(*args)
  raise InvalidChildError, "A Mark cannot contain children"
end

#eql?(o) ⇒ Boolean

Returns:

  • (Boolean)

39
40
41
# File 'lib/ruby_speech/ssml/mark.rb', line 39

def eql?(o)
  super o, :name
end

#nameString

This attribute is a token by which to reference the mark

Returns:

  • (String)

24
25
26
# File 'lib/ruby_speech/ssml/mark.rb', line 24

def name
  read_attr :name
end

#name=(other) ⇒ Object

Parameters:

  • the (String)

    name token


31
32
33
# File 'lib/ruby_speech/ssml/mark.rb', line 31

def name=(other)
  self[:name] = other
end