GIF87a;
require 'rexml/xmltokens' module REXML # Adds named attributes to an object. module Namespace # The name of the object, valid if set attr_reader :name, :expanded_name # The expanded name of the object, valid if name is set attr_accessor :prefix include XMLTokens NAMESPLIT = /^(?:(#{NCNAME_STR}):)?(#{NCNAME_STR})/u # Sets the name and the expanded name def name=( name ) @expanded_name = name name =~ NAMESPLIT if $1 @prefix = $1 else @prefix = "" @namespace = "" end @name = $2 end # Compares names optionally WITH namespaces def has_name?( other, ns=nil ) if ns return (namespace() == ns and name() == other) elsif other.include? ":" return fully_expanded_name == other else return name == other end end alias :local_name :name # Fully expand the name, even if the prefix wasn't specified in the # source file. def fully_expanded_name ns = prefix return "#{ns}:#@name" if ns.size > 0 return @name end end end
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
dtd | Folder | 0755 |
|
|
formatters | Folder | 0755 |
|
|
light | Folder | 0755 |
|
|
parsers | Folder | 0755 |
|
|
validation | Folder | 0755 |
|
|
attlistdecl.rb | File | 1.89 KB | 0644 |
|
attribute.rb | File | 5.39 KB | 0644 |
|
cdata.rb | File | 1.54 KB | 0644 |
|
child.rb | File | 2.63 KB | 0644 |
|
comment.rb | File | 2.14 KB | 0644 |
|
doctype.rb | File | 6.58 KB | 0644 |
|
document.rb | File | 9.52 KB | 0644 |
|
element.rb | File | 43.85 KB | 0644 |
|
encoding.rb | File | 1.13 KB | 0644 |
|
entity.rb | File | 5.53 KB | 0644 |
|
functions.rb | File | 11.27 KB | 0644 |
|
instruction.rb | File | 2.01 KB | 0644 |
|
namespace.rb | File | 1.09 KB | 0644 |
|
node.rb | File | 2.13 KB | 0644 |
|
output.rb | File | 519 B | 0644 |
|
parent.rb | File | 4.33 KB | 0644 |
|
parseexception.rb | File | 1.22 KB | 0644 |
|
quickpath.rb | File | 9.08 KB | 0644 |
|
rexml.rb | File | 1.65 KB | 0644 |
|
sax2listener.rb | File | 3.6 KB | 0644 |
|
source.rb | File | 7.6 KB | 0644 |
|
streamlistener.rb | File | 3.88 KB | 0644 |
|
syncenumerator.rb | File | 685 B | 0644 |
|
text.rb | File | 13.57 KB | 0644 |
|
undefinednamespaceexception.rb | File | 210 B | 0644 |
|
xmldecl.rb | File | 2.68 KB | 0644 |
|
xmltokens.rb | File | 526 B | 0644 |
|
xpath.rb | File | 3.31 KB | 0644 |
|
xpath_parser.rb | File | 25.7 KB | 0644 |
|