X7ROOT File Manager
Current Path:
/opt/alt/ruby25/lib64/ruby/2.5.0/rexml
opt
/
alt
/
ruby25
/
lib64
/
ruby
/
2.5.0
/
rexml
/
ðŸ“
..
📄
attlistdecl.rb
(1.92 KB)
📄
attribute.rb
(5.53 KB)
📄
cdata.rb
(1.58 KB)
📄
child.rb
(2.66 KB)
📄
comment.rb
(2.12 KB)
📄
doctype.rb
(7.64 KB)
📄
document.rb
(9.51 KB)
ðŸ“
dtd
📄
element.rb
(44.38 KB)
📄
encoding.rb
(1.16 KB)
📄
entity.rb
(5.39 KB)
ðŸ“
formatters
📄
functions.rb
(11.9 KB)
📄
instruction.rb
(2.05 KB)
ðŸ“
light
📄
namespace.rb
(1.12 KB)
📄
node.rb
(2.17 KB)
📄
output.rb
(550 B)
📄
parent.rb
(4.27 KB)
📄
parseexception.rb
(1.25 KB)
ðŸ“
parsers
📄
quickpath.rb
(9.12 KB)
📄
rexml.rb
(1.32 KB)
📄
sax2listener.rb
(3.61 KB)
📄
security.rb
(824 B)
📄
source.rb
(7.64 KB)
📄
streamlistener.rb
(3.84 KB)
📄
syncenumerator.rb
(716 B)
📄
text.rb
(13.78 KB)
📄
undefinednamespaceexception.rb
(241 B)
ðŸ“
validation
📄
xmldecl.rb
(2.71 KB)
📄
xmltokens.rb
(2.32 KB)
📄
xpath.rb
(3.34 KB)
📄
xpath_parser.rb
(20.44 KB)
Editing: attlistdecl.rb
# frozen_string_literal: false #vim:ts=2 sw=2 noexpandtab: require 'rexml/child' require 'rexml/source' module REXML # This class needs: # * Documentation # * Work! Not all types of attlists are intelligently parsed, so we just # spew back out what we get in. This works, but it would be better if # we formatted the output ourselves. # # AttlistDecls provide *just* enough support to allow namespace # declarations. If you need some sort of generalized support, or have an # interesting idea about how to map the hideous, terrible design of DTD # AttlistDecls onto an intuitive Ruby interface, let me know. I'm desperate # for anything to make DTDs more palateable. class AttlistDecl < Child include Enumerable # What is this? Got me. attr_reader :element_name # Create an AttlistDecl, pulling the information from a Source. Notice # that this isn't very convenient; to create an AttlistDecl, you basically # have to format it yourself, and then have the initializer parse it. # Sorry, but for the foreseeable future, DTD support in REXML is pretty # weak on convenience. Have I mentioned how much I hate DTDs? def initialize(source) super() if (source.kind_of? Array) @element_name, @pairs, @contents = *source end end # Access the attlist attribute/value pairs. # value = attlist_decl[ attribute_name ] def [](key) @pairs[key] end # Whether an attlist declaration includes the given attribute definition # if attlist_decl.include? "xmlns:foobar" def include?(key) @pairs.keys.include? key end # Iterate over the key/value pairs: # attlist_decl.each { |attribute_name, attribute_value| ... } def each(&block) @pairs.each(&block) end # Write out exactly what we got in. def write out, indent=-1 out << @contents end def node_type :attlistdecl end end end
Upload File
Create Folder