libxml-ruby 0.5.4 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. data/LICENSE +23 -23
  2. data/README +144 -144
  3. data/ext/libxml/extconf.rb +26 -27
  4. data/ext/libxml/libxml.c +7 -37
  5. data/ext/libxml/{libxml.h → ruby_libxml.h} +93 -98
  6. data/ext/libxml/ruby_xml_attr.c +405 -387
  7. data/ext/libxml/ruby_xml_attr.h +19 -18
  8. data/ext/libxml/ruby_xml_document.c +1111 -1115
  9. data/ext/libxml/ruby_xml_document.h +27 -24
  10. data/ext/libxml/ruby_xml_dtd.c +168 -168
  11. data/ext/libxml/ruby_xml_html_parser.c +449 -450
  12. data/ext/libxml/ruby_xml_html_parser.h +1 -1
  13. data/ext/libxml/ruby_xml_input_cbg.c +158 -158
  14. data/ext/libxml/ruby_xml_node.c +2410 -2395
  15. data/ext/libxml/ruby_xml_node.h +1 -1
  16. data/ext/libxml/ruby_xml_node_set.c +170 -170
  17. data/ext/libxml/ruby_xml_node_set.h +1 -1
  18. data/ext/libxml/ruby_xml_ns.c +153 -153
  19. data/ext/libxml/ruby_xml_ns.h +1 -1
  20. data/ext/libxml/ruby_xml_parser.c +1425 -1422
  21. data/ext/libxml/ruby_xml_parser.h +1 -1
  22. data/ext/libxml/ruby_xml_parser_context.c +750 -716
  23. data/ext/libxml/ruby_xml_parser_context.h +1 -1
  24. data/ext/libxml/ruby_xml_reader.c +900 -896
  25. data/ext/libxml/ruby_xml_sax_parser.c +485 -485
  26. data/ext/libxml/ruby_xml_sax_parser.h +1 -1
  27. data/ext/libxml/ruby_xml_schema.c +146 -142
  28. data/ext/libxml/ruby_xml_state.c +5 -6
  29. data/ext/libxml/ruby_xml_state.h +1 -0
  30. data/ext/libxml/ruby_xml_tree.c +43 -43
  31. data/ext/libxml/ruby_xml_tree.h +1 -1
  32. data/ext/libxml/ruby_xml_xinclude.c +20 -20
  33. data/ext/libxml/ruby_xml_xinclude.h +1 -1
  34. data/ext/libxml/ruby_xml_xpath.c +243 -252
  35. data/ext/libxml/ruby_xml_xpath.h +1 -1
  36. data/ext/libxml/ruby_xml_xpath_context.c +118 -118
  37. data/ext/libxml/ruby_xml_xpath_context.h +1 -1
  38. data/ext/libxml/ruby_xml_xpath_object.c +43 -29
  39. data/ext/libxml/ruby_xml_xpath_object.h +0 -1
  40. data/ext/libxml/ruby_xml_xpointer.c +100 -100
  41. data/ext/libxml/ruby_xml_xpointer.h +1 -1
  42. data/ext/libxml/ruby_xml_xpointer_context.c +21 -21
  43. data/ext/libxml/ruby_xml_xpointer_context.h +1 -1
  44. data/ext/libxml/sax_parser_callbacks.inc +213 -213
  45. data/ext/libxml/version.h +9 -9
  46. data/lib/libxml.rb +24 -3
  47. data/mingw/libiconv-2.dll +0 -0
  48. data/mingw/libxml2-2.dll +0 -0
  49. data/mingw/libxml_ruby.so +0 -0
  50. data/mingw/mingw.rake +36 -0
  51. data/test/dtd-test.rb +24 -24
  52. data/test/etc_doc_to_s.rb +1 -3
  53. data/test/ets_copy_bug.rb +21 -21
  54. data/test/ets_copy_bug2.rb +32 -32
  55. data/test/ets_copy_bug3.rb +38 -0
  56. data/test/ets_doc_file.rb +1 -0
  57. data/test/{model/default_validation_bug.rb → gc.log} +0 -0
  58. data/test/merge_bug.rb +55 -55
  59. data/test/schema-test.rb +74 -74
  60. data/test/tc_well_formed.rb +11 -0
  61. data/test/tc_xml_document.rb +52 -52
  62. data/test/tc_xml_document_write.rb +24 -24
  63. data/test/tc_xml_document_write2.rb +54 -54
  64. data/test/tc_xml_document_write3.rb +96 -96
  65. data/test/tc_xml_html_parser.rb +63 -63
  66. data/test/tc_xml_node.rb +59 -59
  67. data/test/tc_xml_node2.rb +25 -25
  68. data/test/tc_xml_node3.rb +27 -27
  69. data/test/tc_xml_node4.rb +86 -86
  70. data/test/tc_xml_node5.rb +52 -52
  71. data/test/tc_xml_node6.rb +27 -27
  72. data/test/tc_xml_node7.rb +35 -35
  73. data/test/tc_xml_node8.rb +32 -32
  74. data/test/tc_xml_node9.rb +32 -32
  75. data/test/tc_xml_node_set.rb +24 -24
  76. data/test/tc_xml_node_set2.rb +37 -37
  77. data/test/tc_xml_node_xlink.rb +28 -28
  78. data/test/tc_xml_parser.rb +190 -178
  79. data/test/tc_xml_parser2.rb +16 -17
  80. data/test/tc_xml_parser3.rb +23 -23
  81. data/test/tc_xml_parser4.rb +33 -33
  82. data/test/tc_xml_parser5.rb +27 -27
  83. data/test/tc_xml_parser6.rb +23 -23
  84. data/test/tc_xml_parser7.rb +28 -28
  85. data/test/tc_xml_parser8.rb +32 -32
  86. data/test/tc_xml_parser9.rb +11 -0
  87. data/test/tc_xml_parser_context.rb +88 -88
  88. data/test/tc_xml_reader.rb +112 -109
  89. data/test/tc_xml_sax_parser.rb +104 -94
  90. data/test/tc_xml_sax_parser2.rb +51 -0
  91. data/test/tc_xml_xinclude.rb +30 -30
  92. data/test/tc_xml_xpath.rb +38 -38
  93. data/test/tc_xml_xpath2.rb +14 -0
  94. data/test/tc_xml_xpointer.rb +78 -78
  95. data/vc/libxml.sln +20 -0
  96. data/vc/libxml.vcproj +389 -0
  97. data/work/Rakefile +247 -0
  98. data/work/task/make +26 -0
  99. data/work/task/memory +37 -0
  100. data/work/task/rdoc +39 -0
  101. data/work/task/setup +1616 -0
  102. data/work/task/test +29 -0
  103. data/work/test/ets_runner.rb +33 -0
  104. data/work/test/libxml_test.rb +3 -0
  105. data/work/test/runner.rb +0 -0
  106. data/work/test/runner_ets.rb +33 -0
  107. data/work/vc/debug/libxml.exp +0 -0
  108. data/work/vc/debug/libxml.ilk +0 -0
  109. data/work/vc/debug/libxml.lib +0 -0
  110. data/work/vc/debug/libxml.pdb +0 -0
  111. data/work/vc/debug/libxml.so +0 -0
  112. metadata +158 -189
  113. data/MANIFEST +0 -138
  114. data/NOTES +0 -9
  115. data/Rakefile +0 -38
  116. data/TODO +0 -75
  117. data/VERSION +0 -1
  118. data/log/Changelog-0.txt +0 -426
  119. data/log/Changelog.txt +0 -435
  120. data/meta/project.yaml +0 -27
  121. data/meta/unixname +0 -1
  122. data/setup.rb +0 -1472
  123. data/site/css/normal.css +0 -182
  124. data/site/img/raze-tiny.png +0 -0
  125. data/site/img/red-cube.jpg +0 -0
  126. data/site/img/xml-ruby.png +0 -0
  127. data/site/index.xml +0 -43
  128. data/site/install.xml +0 -77
  129. data/site/layout.rhtml +0 -38
  130. data/site/layout.xsl +0 -67
  131. data/site/license.xml +0 -32
  132. data/site/log/changelog.xml +0 -1324
  133. data/site/log/changelog.xsl +0 -42
  134. data/test/model/merge_bug_data.xml +0 -58
  135. data/test/model/rubynet.xml +0 -78
  136. data/test/model/rubynet_project +0 -13
  137. data/test/model/saxtest.xml +0 -5
  138. data/test/model/simple.xml +0 -7
  139. data/test/model/xinclude.xml +0 -5
data/site/css/normal.css DELETED
@@ -1,182 +0,0 @@
1
- /*
2
- * Uncopyrighted 2005 Ross Bamford.
3
- *
4
- * rosco at roscopeco dot co dot uk
5
- */
6
- body {
7
- background: #ffffff;
8
- color: #000000;
9
- font-family: Microsoft sans-serif, sans-serif, arial, helvetica;
10
- font-size: 12px;
11
- padding: 0px;
12
- margin: 0px 0px 0px 0px;
13
- }
14
-
15
- .container {
16
- width: 800px;
17
- margin: 0 auto;
18
- }
19
-
20
- /* ** links ** */
21
- a {
22
- color: red;
23
- text-decoration: none;
24
- }
25
-
26
- a:hover {
27
- color: red;
28
- text-decoration: underline;
29
- }
30
-
31
- a:active {
32
- color: red;
33
- text-decoration: underline;
34
- }
35
-
36
- .navlinks a {
37
- color: red;
38
- text-decoration: none;
39
- font-weight: bold;
40
- }
41
-
42
- .navlinks a:hover {
43
- color: red;
44
- text-decoration: underline;
45
- font-weight: bold;
46
- }
47
-
48
- .navlinks {
49
- padding: 10px;
50
- background: white;
51
- white-space: nowrap
52
- }
53
-
54
- div.copyright {
55
- /* Copyright bit on pages */
56
- color: #909090;
57
- position: relative;
58
- top: 5em;
59
- right: 2%;
60
- text-align: right;
61
- font-size: 8pt;
62
- }
63
-
64
- /* * page styles *** */
65
-
66
- h1.title {
67
- font-size: 48px;
68
- padding-left: 0;
69
- }
70
-
71
- h1 {
72
- padding: 10px;
73
- }
74
-
75
- h2 {
76
- border-bottom: thin #959595 solid;
77
- }
78
-
79
- h3 {
80
- border-bottom: thin #b8c8c8 solid;
81
- }
82
-
83
- h5 {
84
- border-bottom: thin #c0c0d8 solid;
85
- }
86
-
87
- div.note {
88
- background: #e8e8fa;
89
- border: thin dashed #3e5972;
90
- position: relative;
91
- width: 90%;
92
- left: 5%;
93
- right: 5%;
94
- text-align: right;
95
- font-size: 10pt;
96
- padding: 5px;
97
- margin-bottom: 5px;
98
- }
99
-
100
- /* * syntax ******** */
101
- pre.ruby {
102
- background: #f5f5f5;
103
- border: thin dashed #3e5972;
104
- padding: 10px;
105
- margin-left: 2em;
106
- }
107
-
108
- pre.ruby span.normal {
109
- color: #000000;
110
- }
111
-
112
- pre.ruby span.comment {
113
- color: #789a86;
114
- text-decoration: oblique;
115
- }
116
-
117
- pre.ruby span.ident {
118
- color: #0b0202;
119
- }
120
-
121
- pre.ruby span.punct {
122
- color: #8a7070;
123
- }
124
-
125
- pre.ruby span.symbol {
126
- color: #aa1010;
127
- font-weight: bold;
128
- }
129
-
130
- pre.ruby span.keyword {
131
- color: #903030;
132
- font-weight: bold;
133
- }
134
-
135
- pre.ruby span.constant {
136
- color: #3e5972;
137
- font-weight: bold;
138
- }
139
-
140
- pre.ruby span.string {
141
- color: #2020f0;
142
- }
143
-
144
- pre.ruby span.char {
145
- color: #2020f0;
146
- font-weight: bold;
147
- }
148
-
149
- pre.ruby span.number {
150
- color: #aa1010;
151
- }
152
-
153
- pre.ruby span.regex {
154
- color: #552090;
155
- }
156
-
157
- pre.ruby span.expr {
158
- color: #101080;
159
- font-weight: bold;
160
- }
161
-
162
- pre.ruby span.global {
163
- color: #557462;
164
- }
165
-
166
- pre.ruby span.class {
167
- color: #3e5972;
168
- font-weight: bold;
169
- }
170
-
171
- pre.ruby span.method {
172
- color: #aa1010;
173
- }
174
-
175
- pre.ruby span.attribute {
176
- color: #3e5972;
177
- }
178
-
179
- pre.ruby span.escape {
180
- color: #2020f0;
181
- font-weight: bold;
182
- }
Binary file
Binary file
Binary file
data/site/index.xml DELETED
@@ -1,43 +0,0 @@
1
- <?xml version="1.0" encoding="ISO-8859-1" ?>
2
- <?xml-stylesheet href="layout.xsl" type="text/xsl" ?>
3
-
4
- <content>
5
-
6
- <h2> Welcome to LibXml Ruby </h2>
7
-
8
- <p>The <span style="color: red;">Libxml-Ruby</span> project provides Ruby
9
- language bindings for the <a href="http://xmlsoft.org">GNOME Libxml2 XML toolkit</a>.
10
- It is free software, released under the <a href="license.xml">MIT License</a>.</p>
11
-
12
- <p>Libxml-ruby's primary advantage over REXML is performance - if speed is your need,
13
- these are good libraries to consider, as demonstrated by the informal benchmark below.</p>
14
-
15
- <table border="1" style="border: 1px solid red; margin: 30px;">
16
- <tr><td colspan="3"><b>Speed Comparison libxml vs. rexml</b></td></tr>
17
- <tr><th> in seconds </th><th> libxml </th><th> rexml </th></tr>
18
- <tr><td> opening </td><td> 0.003954 </td><td> 0.104750 </td></tr>
19
- <tr><td> attribute_add </td><td> 0.001895 </td><td> 0.011114 </td></tr>
20
- <tr><td> subelems </td><td> 0.000585 </td><td> 0.004729 </td></tr>
21
- <tr><td> xpath </td><td> 0.013269 </td><td> 2.981499 </td></tr>
22
- </table>
23
-
24
- <h2>Download</h2>
25
-
26
- <p>You can find the latest release at:</p>
27
-
28
- <pre>
29
- <a href="http://rubyforge.org/frs/?group_id=494">http://rubyforge.org/frs/?group_id=494</a>
30
- </pre>
31
-
32
- <p>Libxml-Ruby is also available for installation via <a href="http://rubygems.rubyforge.org">Rubygems</a>
33
- -- see the <a href="install.xml">installation page</a> for details.</p>
34
-
35
- <h2> Project Status </h2>
36
-
37
- <p>The code has now been updated to work with Ruby 1.8, and is compiling cleanly
38
- and working well with GCC 4.x. We still have a number of open bugs to address,
39
- which is being done as we work toward a 0.4.0 release and the library is
40
- generally fairly stable in use.</p>
41
-
42
- </content>
43
-
data/site/install.xml DELETED
@@ -1,77 +0,0 @@
1
- <?xml version="1.0" encoding="ISO-8859-1" ?>
2
- <?xml-stylesheet href="layout.xsl" type="text/xsl" ?>
3
-
4
- <content>
5
-
6
- <h2> Installation </h2>
7
-
8
- <p>Libxml-Ruby supports installation via both the standard Ruby extconf install and
9
- "Rubygems":http://rubygems.rubyforge.org/ . In either case the requirements are
10
- the same - only the installation process differs.</p>
11
-
12
- <h3> Prerequisites </h3>
13
-
14
- <p>libxml requires a few other libraries to be installed in order to build and
15
- function properly.</p>
16
-
17
- <pre>
18
- * libm (math routines: very standard)
19
- * libz (zlib)
20
- * libiconv
21
- * libxml2
22
- </pre>
23
-
24
- <p>We recommend GCC 4 be used for the build.</p>
25
-
26
- <h3> Installing with gems </h3>
27
-
28
- <p>Installation via Gems is very simple - just issue the appropriate command,
29
- e.g:</p>
30
-
31
- <pre>
32
- gem install -r libxml-ruby
33
- </pre>
34
-
35
- <p>Note that depending on your setup you may need to run this as root:</p>
36
-
37
- <pre>
38
- su -c 'gem install -r libxml-ruby'
39
- </pre>
40
-
41
- <p>During installation Gems should build and install the extension to the correct
42
- location. If there are errors at this stage, Gem will report them and offer you
43
- the option to delete the extension.</p>
44
-
45
- <h3> Installing from the tarball </h3>
46
-
47
- <p>Installation from the source tarball is only slightly more complex. Untar the
48
- archive somewhere appropriate, and change to the new directory this creates.
49
- If your environment requires no special configuration, you can simply type:</p>
50
-
51
- <pre>
52
- $ rake install
53
- </pre>
54
-
55
- <p>to build, test, and install the extension.</p>
56
-
57
- <p>If you do need to pass options to extconf (to support a non-standard libxml2
58
- install location, for example) you will need to use make manually instead:</p>
59
-
60
- <pre>
61
- $ cd ext/xml
62
- $ ruby extconf.rb [your-options]
63
- $ make
64
- $ [su -c ']make install[']
65
- </pre>
66
-
67
- <p>Once the makefile is generated, the rest of the Rake tasks will function as
68
- intended, so you could run 'rake test' prior to installing, for example.</p>
69
-
70
- <h3> Installation problems </h3>
71
-
72
- <p>If you experience problems during your build, please report them to the
73
- "mailing list":http://rubyforge.org/mail/?group_id=494 after searching the
74
- "archive":http://rubyforge.org/pipermail/libxml-devel/ .</p>
75
-
76
- </content>
77
-
data/site/layout.rhtml DELETED
@@ -1,38 +0,0 @@
1
- <html>
2
- <head>
3
- <title>Libxml</title>
4
- <link rel='stylesheet' href='<%= link_rel 'styles/normal.css' %>'/>
5
- <link REL='SHORTCUT ICON' HREF='<%= link_rel 'img/xml-ruby.png' %>'/>
6
- </head>
7
- <body>
8
- <table>
9
- <tr valign="top">
10
- <td class='navlinks'>
11
- <strong>Navigation</strong><br/>
12
- <li><a class='nav' href="<%= link_rel 'index.html' %>">Home</a></li>
13
- <li><a class='nav' href="<%= link_rel 'install.html' %>">Installation</a></li>
14
- <li><a class='nav' href="<%= link_rel 'rdoc/' %>">Documentation</a></li>
15
- <li><a class='nav' href="http://rubyforge.org/projects/libxml">Project Page</a></li>
16
- <li><a class='nav' href="<%= link_rel 'license.html' %>">License</a></li>
17
- <br/>
18
- <strong>External</strong><br/>
19
- <li><a class='nav' href="http://xmlsoft.org/">Libxml2 project</a></li>
20
- </td>
21
- <td style="padding: 10px;">
22
- <h1><span style="color: #901414">Libxml</span>-Ruby Project</h1>
23
- <%= part :body %>
24
- </td>
25
- </tr>
26
- </table>
27
-
28
-
29
-
30
- <div class='copyright'>
31
- Copyright &copy; 2001-2006 Libxml-Ruby project contributors.<br/>
32
- Website managed with<br/>
33
- <a href='http://proutils.rubyforge.org/' target='_blank'>
34
- <img src='<%= link_rel 'img/raze-tiny.png' %>' border="0" alt='Raze'/>
35
- </a>
36
- </p>
37
- </body>
38
- </html>
data/site/layout.xsl DELETED
@@ -1,67 +0,0 @@
1
- <?xml version="1.0" encoding="ISO-8859-1"?>
2
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
-
4
- <xsl:output cdata-section-elements="script"/>
5
-
6
- <xsl:template match="/">
7
-
8
- <html>
9
- <head>
10
- <title>Libxml</title>
11
- <link rel="stylesheet" href="css/normal.css" />
12
- <link REL='SHORTCUT ICON' HREF="img/xml-ruby.png" />
13
- </head>
14
- <body>
15
- <div class="container">
16
-
17
- <table>
18
- <tr valign="top">
19
- <td class='navlinks'>
20
- <img src="img/red-cube.jpg" align="top" style="margin-left: -100px;"/>
21
-
22
- <br/><br/>
23
-
24
- <strong>Navigation</strong><br/>
25
- <li><a href="index.xml">Home</a></li>
26
- <li><a href="install.xml">Installation</a></li>
27
- <li><a href="license.xml">License</a></li>
28
- <li><a href="rdoc/index.html">API Docs</a></li>
29
- <br/>
30
- <strong>Development</strong><br/>
31
- <li><a href="http://rubyforge.org/projects/libxml">Rubyforge</a></li>
32
- <li><a href="http://rubyforge.org/tracker/?group_id=494">Tickets</a></li>
33
- <li><a href="http://rubyforge.org/mail/?group_id=494">Mail Lists</a></li>
34
- <li><a href="http://rubyforge.org/forum/?group_id=494">Forums</a></li>
35
- <li><a href="http://rubyforge.org/news/?group_id=494">News</a></li>
36
- <li><a href="http://rubyforge.org/scm/?group_id=494">Source</a></li>
37
- <li><a href="http://rubyforge.org/frs/?group_id=494">Files</a></li>
38
- <br/>
39
- <strong>External</strong><br/>
40
- <li><a href="http://groups.google.com/group/libxml-devel">List on Google</a></li>
41
- <li><a href="http://xmlsoft.org/">Libxml2 project</a></li>
42
- </td>
43
- <td style="padding: 10px;">
44
- <h1 class="title"><span style="color: red;">LibXml</span> Ruby Project</h1>
45
-
46
- <xsl:apply-templates />
47
- </td>
48
- </tr>
49
- </table>
50
-
51
- <div class='copyright'>
52
- Copyright &#x00A9; 2001-2006 Libxml-Ruby project contributors.<br/>
53
- Website is, yea baby!, pure XML/XSLT<br/>
54
- </div>
55
-
56
- </div>
57
- </body>
58
- </html>
59
-
60
- </xsl:template>
61
-
62
- <xsl:template match="content">
63
- <xsl:copy-of select="."/>
64
- </xsl:template>
65
-
66
- </xsl:stylesheet>
67
-
data/site/license.xml DELETED
@@ -1,32 +0,0 @@
1
- <?xml version="1.0" encoding="ISO-8859-1" ?>
2
- <?xml-stylesheet href="layout.xsl" type="text/xsl" ?>
3
-
4
- <content>
5
-
6
- <pre><code>
7
- Copyright (c) 2007 Dan Janowski
8
- Copyright (c) 2006 Ross Bramford
9
- Copyright (c) 2002,2003,2004,2005 Sean Chittenden &lt;sean@chittenden.org&gt;
10
- Copyright (c) 2001 Wai-Sun "Squidster" Chia &lt;waisun.chia@compaq.com&gt;
11
-
12
- Permission is hereby granted, free of charge, to any person obtaining a copy of
13
- this software and associated documentation files (the "Software"), to deal in
14
- the Software without restriction, including without limitation the rights to
15
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
16
- of the Software, and to permit persons to whom the Software is furnished to do
17
- so, subject to the following conditions:
18
-
19
- The above copyright notice and this permission notice shall be included in all
20
- copies or substantial portions of the Software.
21
-
22
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- SOFTWARE.
29
- </code></pre>
30
-
31
- </content>
32
-