libxml-ruby 0.7.0-x86-mswin32-60 → 0.8.0-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +24 -1
- data/README +48 -3
- data/benchmark/depixelate.rb +632 -0
- data/benchmark/hamlet.xml +9055 -0
- data/benchmark/sock_entries.xml +507 -0
- data/benchmark/throughput.rb +39 -0
- data/benchmark/xml_benchmarks.rb +222 -0
- data/doc/classes/LibXML.html +237 -0
- data/doc/classes/LibXML/XML.html +178 -0
- data/doc/classes/{XML → LibXML/XML}/Attr.html +213 -182
- data/doc/classes/{XML → LibXML/XML}/Attributes.html +126 -54
- data/doc/classes/{XML → LibXML/XML}/Document.html +299 -297
- data/doc/classes/{XML → LibXML/XML}/Dtd.html +10 -10
- data/doc/classes/{XML/XInclude → LibXML/XML}/Error.html +4 -4
- data/doc/classes/{XML → LibXML/XML}/HTMLParser.html +40 -40
- data/doc/classes/{XML → LibXML/XML}/InputCallbacks.html +10 -10
- data/doc/classes/{XML → LibXML/XML}/NS.html +46 -46
- data/doc/classes/{XML → LibXML/XML}/Node.html +935 -788
- data/doc/classes/LibXML/XML/Node/FailedModify.html +111 -0
- data/doc/classes/{XML → LibXML/XML}/Node/Set.html +69 -68
- data/doc/classes/{XML → LibXML/XML}/Node/SetNamespace.html +4 -4
- data/doc/classes/{XML/Node/FailedModify.html → LibXML/XML/Node/UnknownType.html} +4 -4
- data/doc/classes/{XML → LibXML/XML}/Parser.html +426 -389
- data/doc/classes/{XML → LibXML/XML}/Parser/Context.html +208 -208
- data/doc/classes/{XML → LibXML/XML}/Parser/ParseError.html +4 -4
- data/doc/classes/{XML → LibXML/XML}/Reader.html +288 -287
- data/doc/classes/{XML → LibXML/XML}/SaxParser.html +52 -52
- data/doc/classes/{XML/XPath/Context.html → LibXML/XML/Schema.html} +60 -32
- data/doc/classes/{XML → LibXML/XML}/State.html +4 -4
- data/doc/classes/{XML/Node/UnknownType.html → LibXML/XML/Tree.html} +5 -5
- data/doc/classes/{XML → LibXML/XML}/XInclude.html +5 -5
- data/doc/classes/{XML → LibXML/XML/XInclude}/Error.html +5 -5
- data/doc/classes/{XML → LibXML/XML}/XMLParserOptions.html +5 -5
- data/doc/classes/{XML → LibXML/XML}/XPath.html +23 -64
- data/doc/classes/LibXML/XML/XPath/Context.html +403 -0
- data/doc/classes/{XML/XPointer/Context → LibXML/XML/XPath}/InvalidPath.html +4 -4
- data/doc/classes/LibXML/XML/XPath/Object.html +623 -0
- data/doc/classes/{XML → LibXML/XML}/XPointer.html +12 -12
- data/doc/classes/{XML → LibXML/XML}/XPointer/Context.html +5 -5
- data/doc/classes/{XML/XPath → LibXML/XML/XPointer/Context}/InvalidPath.html +5 -5
- data/doc/classes/{XML → LibXML/XML}/XPointer/InvalidExpression.html +4 -4
- data/doc/classes/XML.html +17 -123
- data/doc/created.rid +1 -1
- data/doc/files/CHANGES.html +49 -25
- data/doc/files/LICENSE.html +1 -1
- data/doc/files/README.html +79 -4
- data/doc/files/VERSION.html +2 -2
- data/doc/files/ext/libxml/cbg_c.html +1 -1
- data/doc/files/ext/libxml/libxml_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_attr_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_attributes_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_document_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_dtd_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_html_parser_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_input_cbg_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_node_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_node_set_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_ns_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_parser_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_parser_context_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_reader_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_sax_parser_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_schema_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_state_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_xinclude_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_xpath_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_xpath_context_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_xpath_object_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_xpointer_c.html +1 -1
- data/doc/files/ext/libxml/ruby_xml_xpointer_context_c.html +1 -1
- data/doc/files/lib/libxml/attr_rb.html +108 -0
- data/doc/files/lib/libxml/attributes_rb.html +108 -0
- data/doc/files/lib/libxml/document_rb.html +108 -0
- data/doc/files/lib/libxml/node_rb.html +108 -0
- data/doc/files/lib/libxml/node_set_rb.html +108 -0
- data/doc/files/lib/libxml/parser_options_rb.html +107 -0
- data/doc/files/{ext/libxml/ruby_xml_tree_c.html → lib/libxml/parser_rb.html} +4 -4
- data/doc/files/lib/libxml/properties_rb.html +108 -0
- data/doc/files/lib/libxml/tree_rb.html +107 -0
- data/doc/files/lib/libxml_rb.html +12 -3
- data/doc/fr_class_index.html +34 -32
- data/doc/fr_file_index.html +9 -1
- data/doc/fr_method_index.html +362 -347
- data/ext/libxml/cbg.c +76 -76
- data/ext/libxml/libxml.c +4 -3
- data/ext/libxml/ruby_libxml.h +1 -1
- data/ext/libxml/ruby_xml_attr.c +4 -3
- data/ext/libxml/ruby_xml_attr.h +16 -16
- data/ext/libxml/ruby_xml_attributes.c +267 -266
- data/ext/libxml/ruby_xml_attributes.h +17 -17
- data/ext/libxml/ruby_xml_document.c +30 -59
- data/ext/libxml/ruby_xml_document.h +27 -27
- data/ext/libxml/ruby_xml_dtd.c +2 -1
- data/ext/libxml/ruby_xml_dtd.h +17 -17
- data/ext/libxml/ruby_xml_html_parser.c +3 -2
- data/ext/libxml/ruby_xml_html_parser.h +29 -29
- data/ext/libxml/ruby_xml_input_cbg.c +2 -1
- data/ext/libxml/ruby_xml_input_cbg.h +20 -20
- data/ext/libxml/ruby_xml_node.c +127 -470
- data/ext/libxml/ruby_xml_node.h +17 -17
- data/ext/libxml/ruby_xml_node_set.c +5 -4
- data/ext/libxml/ruby_xml_node_set.h +20 -20
- data/ext/libxml/ruby_xml_ns.c +3 -2
- data/ext/libxml/ruby_xml_ns.h +12 -12
- data/ext/libxml/ruby_xml_parser.c +20 -48
- data/ext/libxml/ruby_xml_parser.h +31 -31
- data/ext/libxml/ruby_xml_parser_context.c +3 -2
- data/ext/libxml/ruby_xml_parser_context.h +20 -20
- data/ext/libxml/ruby_xml_reader.c +2 -1
- data/ext/libxml/ruby_xml_sax_parser.c +3 -2
- data/ext/libxml/ruby_xml_sax_parser.h +56 -56
- data/ext/libxml/ruby_xml_schema.c +6 -0
- data/ext/libxml/ruby_xml_schema.h +16 -16
- data/ext/libxml/ruby_xml_state.c +13 -12
- data/ext/libxml/ruby_xml_state.h +1 -1
- data/ext/libxml/ruby_xml_xinclude.c +3 -2
- data/ext/libxml/ruby_xml_xinclude.h +13 -13
- data/ext/libxml/ruby_xml_xpath.c +35 -228
- data/ext/libxml/ruby_xml_xpath.h +22 -23
- data/ext/libxml/ruby_xml_xpath_context.c +223 -62
- data/ext/libxml/ruby_xml_xpath_context.h +15 -20
- data/ext/libxml/ruby_xml_xpath_object.c +63 -19
- data/ext/libxml/ruby_xml_xpointer.c +19 -15
- data/ext/libxml/ruby_xml_xpointer.h +27 -27
- data/ext/libxml/ruby_xml_xpointer_context.c +3 -2
- data/ext/libxml/ruby_xml_xpointer_context.h +18 -18
- data/ext/libxml/version.h +9 -9
- data/lib/libxml.rb +16 -128
- data/lib/libxml/attr.rb +45 -0
- data/lib/libxml/attributes.rb +15 -0
- data/lib/libxml/document.rb +54 -0
- data/lib/libxml/node.rb +132 -0
- data/lib/libxml/node_set.rb +27 -0
- data/lib/libxml/parser.rb +42 -0
- data/lib/libxml/parser_options.rb +25 -0
- data/lib/libxml/properties.rb +19 -0
- data/lib/libxml/tree.rb +29 -0
- data/lib/libxml_ruby.so +0 -0
- data/mingw/libxml_ruby.so +0 -0
- data/{work/task/setup → setup.rb} +1585 -1616
- data/test/gc.log +0 -0
- data/test/model/books.xml +147 -0
- data/{work/test/runner.rb → test/model/default_validation_bug.rb} +0 -0
- data/test/model/merge_bug_data.xml +58 -0
- data/test/model/rubynet.xml +78 -0
- data/test/model/rubynet_project +1 -0
- data/test/model/saxtest.xml +5 -0
- data/test/model/shiporder.xml +23 -0
- data/test/model/shiporder.xsd +31 -0
- data/test/model/simple.xml +7 -0
- data/test/model/soap.xml +27 -0
- data/test/model/xinclude.xml +5 -0
- data/test/tc_deprecated_require.rb +13 -0
- data/test/tc_xml_document.rb +57 -16
- data/test/tc_xml_document_write.rb +125 -10
- data/test/tc_xml_dtd.rb +22 -1
- data/test/tc_xml_node.rb +13 -0
- data/test/tc_xml_node_edit.rb +1 -1
- data/test/tc_xml_node_xlink.rb +1 -1
- data/test/tc_xml_parser.rb +64 -7
- data/test/tc_xml_properties.rb +42 -0
- data/test/tc_xml_reader.rb +4 -4
- data/test/tc_xml_sax_parser.rb +50 -50
- data/test/tc_xml_schema.rb +2 -2
- data/test/tc_xml_traversal.rb +220 -0
- data/test/tc_xml_xinclude.rb +12 -15
- data/test/tc_xml_xpath.rb +74 -6
- data/test/tc_xml_xpath_context.rb +72 -0
- data/test/test_suite.rb +6 -4
- data/vc/libxml_ruby.vcproj +1 -9
- metadata +92 -65
- data/doc/classes/XML/SiblingEnum.html +0 -142
- data/doc/classes/XML/Tree.html +0 -224
- data/doc/classes/XML/XPath/Object.html +0 -439
- data/ext/libxml/ruby_xml_tree.c +0 -43
- data/ext/libxml/ruby_xml_tree.h +0 -12
- data/test/ets_copy_bug2.rb +0 -21
- data/test/tc_xml_document_write2.rb +0 -54
- data/test/tc_xml_document_write3.rb +0 -96
- data/test/tc_xml_sax_parser2.rb +0 -51
- data/work/Rakefile +0 -247
- data/work/task/make +0 -26
- data/work/task/memory +0 -37
- data/work/task/rdoc +0 -39
- data/work/task/test +0 -29
- data/work/test/ets_runner.rb +0 -33
- data/work/test/libxml_test.rb +0 -3
- data/work/test/runner_ets.rb +0 -33
data/test/gc.log
CHANGED
Binary file
|
@@ -0,0 +1,147 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<!-- Sample xml file from Microsoft.
|
3
|
+
See http://msdn.microsoft.com/en-us/library/ms762271(VS.85).aspx -->
|
4
|
+
<catalog>
|
5
|
+
<book id="bk101">
|
6
|
+
<author>Gambardella, Matthew</author>
|
7
|
+
<title>XML Developer's Guide</title>
|
8
|
+
<genre>Computer</genre>
|
9
|
+
<price>44.95</price>
|
10
|
+
<publish_date>2000-10-01</publish_date>
|
11
|
+
<description>
|
12
|
+
An in-depth look at creating applications
|
13
|
+
with XML.
|
14
|
+
</description>
|
15
|
+
</book>
|
16
|
+
<book id="bk102">
|
17
|
+
<author>Ralls, Kim</author>
|
18
|
+
<title>Midnight Rain</title>
|
19
|
+
<genre>Fantasy</genre>
|
20
|
+
<price>5.95</price>
|
21
|
+
<publish_date>2000-12-16</publish_date>
|
22
|
+
<description>
|
23
|
+
A former architect battles corporate zombies,
|
24
|
+
an evil sorceress, and her own childhood to become queen
|
25
|
+
of the world.
|
26
|
+
</description>
|
27
|
+
</book>
|
28
|
+
<book id="bk103">
|
29
|
+
<author>Corets, Eva</author>
|
30
|
+
<title>Maeve Ascendant</title>
|
31
|
+
<genre>Fantasy</genre>
|
32
|
+
<price>5.95</price>
|
33
|
+
<publish_date>2000-11-17</publish_date>
|
34
|
+
<description>
|
35
|
+
After the collapse of a nanotechnology
|
36
|
+
society in England, the young survivors lay the
|
37
|
+
foundation for a new society.
|
38
|
+
</description>
|
39
|
+
</book>
|
40
|
+
<book id="bk104">
|
41
|
+
<author>Corets, Eva</author>
|
42
|
+
<title>Oberon's Legacy</title>
|
43
|
+
<genre>Fantasy</genre>
|
44
|
+
<price>5.95</price>
|
45
|
+
<publish_date>2001-03-10</publish_date>
|
46
|
+
<description>
|
47
|
+
In post-apocalypse England, the mysterious
|
48
|
+
agent known only as Oberon helps to create a new life
|
49
|
+
for the inhabitants of London. Sequel to Maeve
|
50
|
+
Ascendant.
|
51
|
+
</description>
|
52
|
+
</book>
|
53
|
+
<book id="bk105">
|
54
|
+
<author>Corets, Eva</author>
|
55
|
+
<title>The Sundered Grail</title>
|
56
|
+
<genre>Fantasy</genre>
|
57
|
+
<price>5.95</price>
|
58
|
+
<publish_date>2001-09-10</publish_date>
|
59
|
+
<description>
|
60
|
+
The two daughters of Maeve, half-sisters,
|
61
|
+
battle one another for control of England. Sequel to
|
62
|
+
Oberon's Legacy.
|
63
|
+
</description>
|
64
|
+
</book>
|
65
|
+
<book id="bk106">
|
66
|
+
<author>Randall, Cynthia</author>
|
67
|
+
<title>Lover Birds</title>
|
68
|
+
<genre>Romance</genre>
|
69
|
+
<price>4.95</price>
|
70
|
+
<publish_date>2000-09-02</publish_date>
|
71
|
+
<description>
|
72
|
+
When Carla meets Paul at an ornithology
|
73
|
+
conference, tempers fly as feathers get ruffled.
|
74
|
+
</description>
|
75
|
+
</book>
|
76
|
+
<book id="bk107">
|
77
|
+
<author>Thurman, Paula</author>
|
78
|
+
<title>Splish Splash</title>
|
79
|
+
<genre>Romance</genre>
|
80
|
+
<price>4.95</price>
|
81
|
+
<publish_date>2000-11-02</publish_date>
|
82
|
+
<description>
|
83
|
+
A deep sea diver finds true love twenty
|
84
|
+
thousand leagues beneath the sea.
|
85
|
+
</description>
|
86
|
+
</book>
|
87
|
+
<book id="bk108">
|
88
|
+
<author>Knorr, Stefan</author>
|
89
|
+
<title>Creepy Crawlies</title>
|
90
|
+
<genre>Horror</genre>
|
91
|
+
<price>4.95</price>
|
92
|
+
<publish_date>2000-12-06</publish_date>
|
93
|
+
<description>
|
94
|
+
An anthology of horror stories about roaches,
|
95
|
+
centipedes, scorpions and other insects.
|
96
|
+
</description>
|
97
|
+
</book>
|
98
|
+
<book id="bk109">
|
99
|
+
<author>Kress, Peter</author>
|
100
|
+
<title>Paradox Lost</title>
|
101
|
+
<genre>Science Fiction</genre>
|
102
|
+
<price>6.95</price>
|
103
|
+
<publish_date>2000-11-02</publish_date>
|
104
|
+
<description>
|
105
|
+
After an inadvertant trip through a Heisenberg
|
106
|
+
Uncertainty Device, James Salway discovers the problems
|
107
|
+
of being quantum.
|
108
|
+
</description>
|
109
|
+
</book>
|
110
|
+
<book id="bk110">
|
111
|
+
<author>O'Brien, Tim</author>
|
112
|
+
<title>Microsoft .NET: The Programming Bible</title>
|
113
|
+
<genre>Computer</genre>
|
114
|
+
<price>36.95</price>
|
115
|
+
<publish_date>2000-12-09</publish_date>
|
116
|
+
<description>
|
117
|
+
Microsoft's .NET initiative is explored in
|
118
|
+
detail in this deep programmer's reference.
|
119
|
+
</description>
|
120
|
+
</book>
|
121
|
+
<book id="bk111">
|
122
|
+
<author>O'Brien, Tim</author>
|
123
|
+
<title>MSXML3: A Comprehensive Guide</title>
|
124
|
+
<genre>Computer</genre>
|
125
|
+
<price>36.95</price>
|
126
|
+
<publish_date>2000-12-01</publish_date>
|
127
|
+
<description>
|
128
|
+
The Microsoft MSXML3 parser is covered in
|
129
|
+
detail, with attention to XML DOM interfaces, XSLT processing,
|
130
|
+
SAX and more.
|
131
|
+
</description>
|
132
|
+
</book>
|
133
|
+
<book id="bk112">
|
134
|
+
<author>Galos, Mike</author>
|
135
|
+
<title>Visual Studio 7: A Comprehensive Guide</title>
|
136
|
+
<genre>Computer</genre>
|
137
|
+
<price>49.95</price>
|
138
|
+
<publish_date>2001-04-16</publish_date>
|
139
|
+
<description>
|
140
|
+
Microsoft Visual Studio 7 is explored in depth,
|
141
|
+
looking at how Visual Basic, Visual C++, C#, and ASP+ are
|
142
|
+
integrated into a comprehensive development
|
143
|
+
environment.
|
144
|
+
</description>
|
145
|
+
</book>
|
146
|
+
</catalog>
|
147
|
+
|
File without changes
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<template>
|
3
|
+
<body>
|
4
|
+
<section>
|
5
|
+
<txt>Some Preset Data Here</txt>
|
6
|
+
<txt>Some Preset Data Here</txt>
|
7
|
+
<txt>name: quack!</txt>
|
8
|
+
<txt>Some Preset Data Here</txt>
|
9
|
+
<txt>Some Preset Data Here</txt>
|
10
|
+
<txt>Some Preset Data Here</txt>
|
11
|
+
<txt>Some Preset Data Here</txt>
|
12
|
+
<txt>city: quack!</txt>
|
13
|
+
<txt>Some Preset Data Here</txt>
|
14
|
+
<txt>Some Preset Data Here</txt>
|
15
|
+
<txt>Some Preset Data Here</txt>
|
16
|
+
<txt>Some Preset Data Here</txt>
|
17
|
+
<txt>state: quack!</txt>
|
18
|
+
<txt>Some Preset Data Here</txt>
|
19
|
+
<txt>Some Preset Data Here</txt>
|
20
|
+
<txt>Some Preset Data Here</txt>
|
21
|
+
<txt>Some Preset Data Here</txt>
|
22
|
+
<row>
|
23
|
+
<txt>year: Vroom!</txt>
|
24
|
+
<txt>make: Vroom!</txt>
|
25
|
+
<txt>model: Vroom!</txt>
|
26
|
+
</row>
|
27
|
+
<row>
|
28
|
+
<txt>year: Vroom!</txt>
|
29
|
+
<txt>make: Vroom!</txt>
|
30
|
+
<txt>model: Vroom!</txt>
|
31
|
+
</row>
|
32
|
+
<row>
|
33
|
+
<txt>year: Vroom!</txt>
|
34
|
+
<txt>make: Vroom!</txt>
|
35
|
+
<txt>model: Vroom!</txt>
|
36
|
+
</row>
|
37
|
+
<txt>Some Preset Data Here</txt>
|
38
|
+
<txt>Some Preset Data Here</txt>
|
39
|
+
<row>
|
40
|
+
<txt>year: Vroom!</txt>
|
41
|
+
<txt>make: Vroom!</txt>
|
42
|
+
<txt>model: Vroom!</txt>
|
43
|
+
</row>
|
44
|
+
<row>
|
45
|
+
<txt>year: Vroom!</txt>
|
46
|
+
<txt>make: Vroom!</txt>
|
47
|
+
<txt>model: Vroom!</txt>
|
48
|
+
</row>
|
49
|
+
<row>
|
50
|
+
<txt>year: Vroom!</txt>
|
51
|
+
<txt>make: Vroom!</txt>
|
52
|
+
<txt>model: Vroom!</txt>
|
53
|
+
</row>
|
54
|
+
<txt>Some Preset Data Here</txt>
|
55
|
+
<txt>Some Preset Data Here</txt>
|
56
|
+
</section>
|
57
|
+
</body>
|
58
|
+
</template>
|
@@ -0,0 +1,78 @@
|
|
1
|
+
<rubynet xmlns:xlink="http://www.w3.org/1999/xlink">
|
2
|
+
<pkg version="1.0">
|
3
|
+
<meta>
|
4
|
+
<pkgname>REXML</pkgname>
|
5
|
+
<authors>
|
6
|
+
<author>
|
7
|
+
<name>Aaron Malone</name>
|
8
|
+
<email>aaron@munge.net</email>
|
9
|
+
<irc_network>irc.opentprojects.org</irc_network>
|
10
|
+
<irc_channel>#ruby-lang</irc_channel>
|
11
|
+
<irc_handle>AAmalone</irc_handle>
|
12
|
+
</author>
|
13
|
+
</authors>
|
14
|
+
<maintainers>
|
15
|
+
<maintainer>
|
16
|
+
<name>Tools Team</name>
|
17
|
+
<email>tools@gentoo.org</email>
|
18
|
+
<irc_network>irc.opentprojects.org</irc_network>
|
19
|
+
<irc_channel>#ruby-lang</irc_channel>
|
20
|
+
<irc_handle>TinyT</irc_handle>
|
21
|
+
</maintainer>
|
22
|
+
</maintainers>
|
23
|
+
<categories>
|
24
|
+
|
25
|
+
<!-- For pieces of data that are repeated constnatly, could we
|
26
|
+
use XLink to centralize some of these definitions? If we move
|
27
|
+
stuff around on rubynet.org, we don't want to have to do a
|
28
|
+
search/replace: just update the entity, IMHO. -->
|
29
|
+
|
30
|
+
<major_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/xml/">XML</major_category>
|
31
|
+
<minor_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/text%20processing/">Text Processing</minor_category>
|
32
|
+
<minor_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/storage/">Storage</minor_category>
|
33
|
+
</categories>
|
34
|
+
<version>
|
35
|
+
<major_version>1</major_version>
|
36
|
+
<minor_version>2</minor_version>
|
37
|
+
<micro_version>3</micro_version>
|
38
|
+
</version>
|
39
|
+
<copyright>1999-2002 Gentoo Technologies,Inc.</copyright>
|
40
|
+
<license>Ruby</license>
|
41
|
+
<status>Stable</status>
|
42
|
+
<full_name>Ruby Electric XML</full_name>
|
43
|
+
<description>Pure Ruby parser, blah blah. Based of Electrice XML</description>
|
44
|
+
<homepage xlink:type="simple" xlink:href="http://www.germane-software.com/~ser/Software/rexml/">REXML Home</homepage>
|
45
|
+
<download xlink:type="simple" xlink:href="http://www.germane-software.com/~ser/Software/rexml/rexml-1.2.3.bz2/">REXML Download</download>
|
46
|
+
</meta>
|
47
|
+
<dependencies>
|
48
|
+
<dependency name="ruby" uri="http://www.rubynet.org/packages/ruby/">
|
49
|
+
<required_version restriction="no-lower-than">
|
50
|
+
<version>
|
51
|
+
<major_version>1</major_version>
|
52
|
+
<minor_version>6</minor_version>
|
53
|
+
<micro_version>0</micro_version>
|
54
|
+
</version>
|
55
|
+
</required_version>
|
56
|
+
</dependency>
|
57
|
+
</dependencies>
|
58
|
+
<files>
|
59
|
+
<file>
|
60
|
+
<filename>uga.rb</filename>
|
61
|
+
<mode>0444</mode>
|
62
|
+
<content encoding="xml">... the file here</content>
|
63
|
+
</file>
|
64
|
+
<file>
|
65
|
+
<filename>booga.h</filename>
|
66
|
+
<mode>0444</mode>
|
67
|
+
<content encoding="xml">... the file here</content>
|
68
|
+
</file>
|
69
|
+
<file>
|
70
|
+
<filename>foo.so</filename>
|
71
|
+
<mode>0555</mode>
|
72
|
+
<!-- Encode routine: str.to_a.pack('m')
|
73
|
+
Decode routine: str.unpack('m') -->
|
74
|
+
<content encoding="mime64">Li4uIHRoZSBmaWxlIGhlcmU=\n</content>
|
75
|
+
</file>
|
76
|
+
</files>
|
77
|
+
</pkg>
|
78
|
+
</rubynet>
|
@@ -0,0 +1 @@
|
|
1
|
+
This is some text to include in an xml file via XInclude.
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<shiporder orderid="889923"
|
3
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4
|
+
xsi:noNamespaceSchemaLocation="shiporder.xsd">
|
5
|
+
<orderperson>John Smith</orderperson>
|
6
|
+
<shipto>
|
7
|
+
<name>Ola Nordmann</name>
|
8
|
+
<address>Langgt 23</address>
|
9
|
+
<city>4000 Stavanger</city>
|
10
|
+
<country>Norway</country>
|
11
|
+
</shipto>
|
12
|
+
<item>
|
13
|
+
<title>Empire Burlesque</title>
|
14
|
+
<note>Special Edition</note>
|
15
|
+
<quantity>1</quantity>
|
16
|
+
<price>10.90</price>
|
17
|
+
</item>
|
18
|
+
<item>
|
19
|
+
<title>Hide your heart</title>
|
20
|
+
<quantity>1</quantity>
|
21
|
+
<price>9.90</price>
|
22
|
+
</item>
|
23
|
+
</shiporder>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1" ?>
|
2
|
+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
3
|
+
<xs:element name="shiporder">
|
4
|
+
<xs:complexType>
|
5
|
+
<xs:sequence>
|
6
|
+
<xs:element name="orderperson" type="xs:string"/>
|
7
|
+
<xs:element name="shipto">
|
8
|
+
<xs:complexType>
|
9
|
+
<xs:sequence>
|
10
|
+
<xs:element name="name" type="xs:string"/>
|
11
|
+
<xs:element name="address" type="xs:string"/>
|
12
|
+
<xs:element name="city" type="xs:string"/>
|
13
|
+
<xs:element name="country" type="xs:string"/>
|
14
|
+
</xs:sequence>
|
15
|
+
</xs:complexType>
|
16
|
+
</xs:element>
|
17
|
+
<xs:element name="item" maxOccurs="unbounded">
|
18
|
+
<xs:complexType>
|
19
|
+
<xs:sequence>
|
20
|
+
<xs:element name="title" type="xs:string"/>
|
21
|
+
<xs:element name="note" type="xs:string" minOccurs="0"/>
|
22
|
+
<xs:element name="quantity" type="xs:positiveInteger"/>
|
23
|
+
<xs:element name="price" type="xs:decimal"/>
|
24
|
+
</xs:sequence>
|
25
|
+
</xs:complexType>
|
26
|
+
</xs:element>
|
27
|
+
</xs:sequence>
|
28
|
+
<xs:attribute name="orderid" type="xs:string" use="required"/>
|
29
|
+
</xs:complexType>
|
30
|
+
</xs:element>
|
31
|
+
</xs:schema>
|
data/test/model/soap.xml
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<soap:Envelope
|
3
|
+
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
|
4
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
5
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
6
|
+
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
|
7
|
+
<soap:Body>
|
8
|
+
<getManufacturerNamesResponse name="widgestRus" xmlns="http://services.somewhere.com">
|
9
|
+
<IDAndNameList xmlns="http://services.somewhere.com">
|
10
|
+
<ns1:IdAndName xmlns:ns1="http://domain.somewhere.com">
|
11
|
+
<id xmlns="http://domain.somewhere.com">1</id>
|
12
|
+
<name xmlns="http://domain.somewhere.com">man1</name>
|
13
|
+
|
14
|
+
</ns1:IdAndName>
|
15
|
+
<ns1:IdAndName xmlns:ns1="http://domain.somewhere.com">
|
16
|
+
<id xmlns="http://domain.somewhere.com">2</id>
|
17
|
+
<name xmlns="http://domain.somewhere.com">man2</name>
|
18
|
+
|
19
|
+
</ns1:IdAndName>
|
20
|
+
<ns1:IdAndName xmlns:ns1="http://domain.somewhere.com">
|
21
|
+
<id xmlns="http://domain.somewhere.com">3</id>
|
22
|
+
<name xmlns="http://domain.somewhere.com">man3</name>
|
23
|
+
</ns1:IdAndName>
|
24
|
+
</IDAndNameList>
|
25
|
+
</getManufacturerNamesResponse>
|
26
|
+
</soap:Body>
|
27
|
+
</soap:Envelope>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'xml/libxml'
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
class TestDeprecatedRequire < Test::Unit::TestCase
|
5
|
+
def test_basic
|
6
|
+
xp = XML::Parser.new
|
7
|
+
assert_instance_of(XML::Parser, xp)
|
8
|
+
str = '<ruby_array uga="booga" foo="bar"><fixnum>one</fixnum><fixnum>two</fixnum></ruby_array>'
|
9
|
+
assert_equal(str, xp.string = str)
|
10
|
+
@doc = xp.parse
|
11
|
+
assert_instance_of(XML::Document, @doc)
|
12
|
+
end
|
13
|
+
end
|
data/test/tc_xml_document.rb
CHANGED
@@ -3,8 +3,8 @@ require 'test/unit'
|
|
3
3
|
|
4
4
|
|
5
5
|
class TC_XML_Document < Test::Unit::TestCase
|
6
|
-
def setup
|
7
|
-
xp = XML::Parser.new
|
6
|
+
def setup
|
7
|
+
xp = XML::Parser.new
|
8
8
|
assert_instance_of(XML::Parser, xp)
|
9
9
|
str = '<ruby_array uga="booga" foo="bar"><fixnum>one</fixnum><fixnum>two</fixnum></ruby_array>'
|
10
10
|
assert_equal(str, xp.string = str)
|
@@ -12,11 +12,11 @@ class TC_XML_Document < Test::Unit::TestCase
|
|
12
12
|
assert_instance_of(XML::Document, @doc)
|
13
13
|
end
|
14
14
|
|
15
|
-
def teardown
|
15
|
+
def teardown
|
16
16
|
@doc = nil
|
17
17
|
end
|
18
18
|
|
19
|
-
def test_libxml_document_find
|
19
|
+
def test_libxml_document_find
|
20
20
|
set = @doc.find('/ruby_array/fixnum')
|
21
21
|
assert_instance_of(XML::XPath::Object, set)
|
22
22
|
assert_raise(NoMethodError) {
|
@@ -24,7 +24,7 @@ class TC_XML_Document < Test::Unit::TestCase
|
|
24
24
|
}
|
25
25
|
end
|
26
26
|
|
27
|
-
def test_ruby_xml_document_compression
|
27
|
+
def test_ruby_xml_document_compression
|
28
28
|
if XML::Parser::enabled_zlib?
|
29
29
|
0.upto(9) do |i|
|
30
30
|
assert_equal(i, @doc.compression = i)
|
@@ -32,21 +32,62 @@ class TC_XML_Document < Test::Unit::TestCase
|
|
32
32
|
end
|
33
33
|
|
34
34
|
9.downto(0) do |i|
|
35
|
-
|
36
|
-
|
35
|
+
assert_equal(i, @doc.compression = i)
|
36
|
+
assert_equal(i, @doc.compression)
|
37
37
|
end
|
38
38
|
|
39
39
|
10.upto(20) do |i|
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
# assert_equal(9, @doc.compression = i)
|
41
|
+
assert_equal(i, @doc.compression = i) # This works around a bug in Ruby 1.8
|
42
|
+
assert_equal(9, @doc.compression)
|
43
43
|
end
|
44
44
|
|
45
45
|
-1.downto(-10) do |i|
|
46
|
-
|
47
|
-
|
48
|
-
|
46
|
+
# assert_equal(0, @doc.compression = i)
|
47
|
+
assert_equal(i, @doc.compression = i) # FIXME This bug should get fixed ASAP
|
48
|
+
assert_equal(0, @doc.compression)
|
49
49
|
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_save
|
54
|
+
filename = 'test_write'
|
55
|
+
bytes = @doc.save(filename)
|
56
|
+
assert_equal(110, bytes)
|
57
|
+
contents = File.read(filename)
|
58
|
+
|
59
|
+
expected =<<-EOS
|
60
|
+
<?xml version="1.0"?>
|
61
|
+
<ruby_array uga="booga" foo="bar"><fixnum>one</fixnum><fixnum>two</fixnum></ruby_array>
|
62
|
+
EOS
|
63
|
+
assert_equal(expected, contents)
|
64
|
+
ensure
|
65
|
+
File.delete(filename)
|
66
|
+
end
|
67
|
+
|
68
|
+
def test_save_formatted
|
69
|
+
filename = 'test_write'
|
70
|
+
bytes = @doc.save(filename, true)
|
71
|
+
assert_equal(117, bytes)
|
72
|
+
contents = File.read(filename)
|
73
|
+
|
74
|
+
expected =<<-EOS
|
75
|
+
<?xml version="1.0"?>
|
76
|
+
<ruby_array uga="booga" foo="bar">
|
77
|
+
<fixnum>one</fixnum>
|
78
|
+
<fixnum>two</fixnum>
|
79
|
+
</ruby_array>
|
80
|
+
EOS
|
81
|
+
assert_equal(expected, contents)
|
82
|
+
ensure
|
83
|
+
File.delete(filename)
|
84
|
+
end
|
85
|
+
|
86
|
+
def test_save_formatted_invalid
|
87
|
+
filename = 'test_write'
|
88
|
+
|
89
|
+
assert_raise(ArgumentError) do
|
90
|
+
@doc.save(filename, 1)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|