Class: WirisPlugin::TextFilterTags

Inherits:
Object
  • Object
show all
Includes:
Wiris
Defined in:
lib/com/wiris/plugin/impl/TextFilterTags.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTextFilterTags

Returns a new instance of TextFilterTags.



21
22
23
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 21

def initialize()
    super()
end

Instance Attribute Details

#in_appletcloseObject

Returns the value of attribute in_appletclose.



19
20
21
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 19

def in_appletclose
  @in_appletclose
end

#in_appletopenObject

Returns the value of attribute in_appletopen.



18
19
20
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 18

def in_appletopen
  @in_appletopen
end

#in_closeObject

Returns the value of attribute in_close.



12
13
14
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 12

def in_close
  @in_close
end

#in_double_quoteObject

Returns the value of attribute in_double_quote.



8
9
10
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 8

def in_double_quote
  @in_double_quote
end

#in_entityObject

Returns the value of attribute in_entity.



14
15
16
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 14

def in_entity
  @in_entity
end

#in_mathcloseObject

Returns the value of attribute in_mathclose.



7
8
9
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 7

def in_mathclose
  @in_mathclose
end

#in_mathopenObject

Returns the value of attribute in_mathopen.



6
7
8
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 6

def in_mathopen
  @in_mathopen
end

#in_openObject

Returns the value of attribute in_open.



10
11
12
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 10

def in_open
  @in_open
end

#in_quoteObject

Returns the value of attribute in_quote.



16
17
18
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 16

def in_quote
  @in_quote
end

#mathTagObject

Returns the value of attribute mathTag.



20
21
22
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 20

def mathTag
  @mathTag
end

#out_closeObject

Returns the value of attribute out_close.



13
14
15
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 13

def out_close
  @out_close
end

#out_double_quoteObject

Returns the value of attribute out_double_quote.



9
10
11
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 9

def out_double_quote
  @out_double_quote
end

#out_entityObject

Returns the value of attribute out_entity.



15
16
17
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 15

def out_entity
  @out_entity
end

#out_openObject

Returns the value of attribute out_open.



11
12
13
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 11

def out_open
  @out_open
end

#out_quoteObject

Returns the value of attribute out_quote.



17
18
19
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 17

def out_quote
  @out_quote
end

Class Method Details

.newSafeXmlObject



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 24

def self.newSafeXml()
    tags = TextFilterTags.new()
    tags::in_open = Std::fromCharCode(171)
    tags::in_close = Std::fromCharCode(187)
    tags::in_entity = Std::fromCharCode(167)
    tags::in_quote = "`"
    tags::in_double_quote = Std::fromCharCode(168)
    tags::mathTag = "math"
    tags::init(tags,nil)
    return tags
end

.newXml(mathNamespace) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 35

def self.newXml(mathNamespace)
    tags = TextFilterTags.new()
    tags::in_open = "<"
    tags::in_close = ">"
    tags::in_entity = "&"
    tags::in_quote = "\'"
    tags::in_double_quote = "\""
    tags::mathTag = "math"
    tags::init(tags,mathNamespace)
    return tags
end

Instance Method Details

#init(tags, mathNamespace) ⇒ Object



46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/com/wiris/plugin/impl/TextFilterTags.rb', line 46

def init(tags, mathNamespace)
    if mathNamespace != nil
        tags::mathTag = (mathNamespace + ":") + tags::mathTag
    end
    tags::in_appletopen = @in_open + "APPLET"
    tags::in_appletclose = (@in_open + "/APPLET") + @in_close
    tags::in_mathopen = @in_open + @mathTag
    tags::in_mathclose = ((@in_open + "/") + @mathTag) + @in_close
    tags::out_open = "<"
    tags::out_close = ">"
    tags::out_entity = "&"
    tags::out_quote = "\'"
    tags::out_double_quote = "\""
end