libxslt-ruby 0.6.0-x86-mswin32-60 → 0.7.0-x86-mswin32-60

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 (42) hide show
  1. data/README +125 -136
  2. data/doc/classes/XSLT.html +215 -0
  3. data/doc/classes/XSLT/Stylesheet.html +244 -0
  4. data/doc/classes/XSLT/TransformContext.html +111 -0
  5. data/doc/created.rid +1 -0
  6. data/doc/files/CHANGES.html +168 -0
  7. data/doc/files/LICENSE.html +133 -0
  8. data/doc/files/README.html +269 -0
  9. data/doc/files/ext/libxslt/libxslt_c.html +101 -0
  10. data/doc/files/ext/libxslt/ruby_xslt_stylesheet_c.html +101 -0
  11. data/doc/files/ext/libxslt/ruby_xslt_transform_context_c.html +101 -0
  12. data/doc/files/lib/deprecated_rb.html +101 -0
  13. data/doc/files/lib/libxslt_rb.html +110 -0
  14. data/doc/fr_class_index.html +29 -0
  15. data/doc/fr_file_index.html +34 -0
  16. data/doc/fr_method_index.html +28 -0
  17. data/doc/index.html +24 -0
  18. data/doc/rdoc-style.css +208 -0
  19. data/ext/libxslt/libxslt.c +21 -212
  20. data/ext/libxslt/libxslt.h +0 -17
  21. data/ext/libxslt/ruby_xslt_stylesheet.c +135 -173
  22. data/ext/libxslt/ruby_xslt_stylesheet.h +5 -10
  23. data/ext/libxslt/ruby_xslt_transform_context.c +5 -2
  24. data/ext/libxslt/version.h +2 -2
  25. data/lib/deprecated.rb +66 -0
  26. data/lib/libxslt.rb +1 -0
  27. data/lib/libxslt_ruby.so +0 -0
  28. data/mingw/libxslt_ruby.so +0 -0
  29. data/tests/files/commentary.dtd +34 -0
  30. data/tests/files/fuzface.xml +154 -0
  31. data/tests/files/fuzface.xsl +4 -0
  32. data/tests/files/params.xml +2 -0
  33. data/tests/files/params.xsl +11 -0
  34. data/tests/files/ramblings.xsl +46 -0
  35. data/tests/test_deprecated.rb +99 -0
  36. data/tests/test_libxslt.rb +21 -0
  37. data/tests/test_stylesheet.rb +64 -0
  38. data/tests/test_suite.rb +3 -0
  39. data/vc/libxslt_ruby.sln +1 -1
  40. data/vc/libxslt_ruby.vcproj +3 -3
  41. metadata +41 -10
  42. data/mingw/mingw.rake +0 -36
@@ -0,0 +1,133 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: LICENSE</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>LICENSE</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>LICENSE
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Mon Jul 07 00:32:33 Mountain Daylight Time 2008</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <p>
73
+ # $Id: LICENSE 33 2007-08-29 18:18:15Z transami $
74
+ </p>
75
+ <p>
76
+ Copyright &#169; 2002-2006 Sean Chittenden &lt;sean@chittenden.org&gt; and
77
+ contributors
78
+ </p>
79
+ <p>
80
+ Permission is hereby granted, free of charge, to any person obtaining a
81
+ copy of this software and associated documentation files (the
82
+ &quot;Software&quot;), to deal in the Software without restriction,
83
+ including without limitation the rights to use, copy, modify, merge,
84
+ publish, distribute, sublicense, and/or sell copies of the Software, and to
85
+ permit persons to whom the Software is furnished to do so, subject to the
86
+ following conditions:
87
+ </p>
88
+ <p>
89
+ The above copyright notice and this permission notice shall be included in
90
+ all copies or substantial portions of the Software.
91
+ </p>
92
+ <p>
93
+ THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,
94
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
95
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
96
+ NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
97
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
98
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
99
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
100
+ </p>
101
+
102
+ </div>
103
+
104
+
105
+ </div>
106
+
107
+
108
+ </div>
109
+
110
+
111
+ <!-- if includes -->
112
+
113
+ <div id="section">
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+ <!-- if method_list -->
123
+
124
+
125
+ </div>
126
+
127
+
128
+ <div id="validator-badges">
129
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
130
+ </div>
131
+
132
+ </body>
133
+ </html>
@@ -0,0 +1,269 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: README</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>README</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>README
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Thu Jul 10 00:39:45 Mountain Daylight Time 2008</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <h1>libxslt-ruby</h1>
73
+ <h2>Overview</h2>
74
+ <p>
75
+ The libxslt gem provides Ruby language bindings for GNOME&#8217;s Libxslt
76
+ toolkit. It is free software, released under the MIT License.
77
+ </p>
78
+ <h2>Requirements</h2>
79
+ <p>
80
+ libxslt-ruby requires Ruby 1.8.4 or higher. It is dependent on the
81
+ following libraries to function properly:
82
+ </p>
83
+ <ul>
84
+ <li>libm (math routines: very standard)
85
+
86
+ </li>
87
+ <li>libz (zlib)
88
+
89
+ </li>
90
+ <li>libiconv
91
+
92
+ </li>
93
+ <li>libxml2
94
+
95
+ </li>
96
+ <li>libxslt
97
+
98
+ </li>
99
+ <li>libxml-ruby bindings
100
+
101
+ </li>
102
+ </ul>
103
+ <p>
104
+ If you are running Linux or Unix you&#8217;ll need a C compiler so the
105
+ extension can be compiled when it is installed. If you are running Windows,
106
+ then install the Windows specific RubyGem which includes an already built
107
+ extension.
108
+ </p>
109
+ <p>
110
+ !!!NOTE!!! The libxml-ruby and libxslt-ruby bindings must absolutely,
111
+ positively, without a doubt share the same libxml2 library. This is because
112
+ libxslt modifies XML documents created by libxml2. If there are two copies
113
+ of libxml2 on your system, then when XML documents allocated in copy 1 are
114
+ manipulated by copy 2, a segmentation fault will occur. So make sure that
115
+ your system has only one copy of libxml2 installed.
116
+ </p>
117
+ <h2>INSTALLATION</h2>
118
+ <p>
119
+ The easiest way to install libxslt-ruby is via Ruby Gems. To install:
120
+ </p>
121
+ <p>
122
+ <tt>gem install libxslt-ruby</tt>
123
+ </p>
124
+ <p>
125
+ If you are running Windows, make sure to install the Win32 RubyGem which
126
+ includes an already built binary file. The binary is built against libxml2
127
+ version 2.6.32, iconv version 1.12 and libxslt version 1.1.24. Binaries for
128
+ libxml2 and iconv are provided in the libxml-ruby bindings, while a binary
129
+ for libxslt is provided in the libxslt-ruby bindings. These binaries should
130
+ be put either in the libxslt/lib directory or on the Windows path.
131
+ </p>
132
+ <p>
133
+ The Windows binaries are biult with MingW. The gem also includes a
134
+ Microsoft VC++ 2005 solution. If you wish to run a debug version of
135
+ libxml-ruby on Windows, then it is highly recommended you use VC++.
136
+ </p>
137
+ <h2>USAGE</h2>
138
+ <p>
139
+ Given an XML file like:
140
+ </p>
141
+ <pre>
142
+ &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
143
+ &lt;?xml-stylesheet href=&quot;fuzface.xsl&quot; type=&quot;text/xsl&quot;?&gt;
144
+
145
+ &lt;commentary&gt;
146
+ &lt;meta&gt;
147
+ &lt;author&gt;
148
+ &lt;first_name&gt;Sean&lt;/first_name&gt;
149
+ &lt;last_name&gt;Chittenden&lt;/last_name&gt;
150
+ &lt;email&gt;sean@chittenden.org&lt;/email&gt;
151
+ &lt;/author&gt;
152
+ &lt;version&gt;$Version$&lt;/version&gt;
153
+ &lt;date&gt;$Date: 2008-07-10 00:39:47 -0600 (Thu, 10 Jul 2008) $&lt;/date&gt;
154
+ &lt;id&gt;$Id: README 64 2008-07-10 06:39:47Z cfis $&lt;/id&gt; &lt;title&gt;Fuzface...&lt;/title&gt;
155
+ &lt;subtitle&gt;The Internet's a big place and here's some proof...&lt;/subtitle&gt;
156
+ &lt;/meta&gt;
157
+
158
+ &lt;body&gt;
159
+ &lt;para&gt;
160
+ I think it's a tragedy that I'm going to start off my new
161
+ commentary by talking about facial hair and the Internet.
162
+ Something about that just screams pathetic, but whatever: it's
163
+ humor and that's life.
164
+ &lt;/para&gt;
165
+ &lt;/body&gt;
166
+ &lt;/commentary&gt;
167
+ </pre>
168
+ <p>
169
+ And an <a href="../classes/XSLT.html">XSLT</a> file like this:
170
+ </p>
171
+ <pre>
172
+ &lt;?xml version=&quot;1.0&quot; ?&gt;
173
+ &lt;xsl:stylesheet xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; version=&quot;1.0&quot;&gt;
174
+ &lt;xsl:template match=&quot;/&quot;&gt;
175
+ &lt;xsl:element name=&quot;html&quot;&gt;
176
+ &lt;xsl:element name=&quot;head&quot;&gt;
177
+ &lt;xsl:element name=&quot;title&quot;&gt;Ramblings - &lt;xsl:value-of select=&quot;commentary/meta/title&quot; /&gt; - &lt;xsl:value-of select=&quot;commentary/meta/subtitle&quot; /&gt;&lt;/xsl:element&gt;
178
+ &lt;/xsl:element&gt;
179
+
180
+ &lt;xsl:element name=&quot;body&quot;&gt;
181
+ &lt;xsl:element name=&quot;h1&quot;&gt;&lt;xsl:value-of select=&quot;commentary/meta/title&quot; /&gt;&lt;/xsl:element&gt;
182
+ &lt;xsl:element name=&quot;h3&quot;&gt;&lt;xsl:value-of select=&quot;commentary/meta/subtitle&quot; /&gt;&lt;/xsl:element&gt;
183
+ By: &lt;xsl:value-of select=&quot;commentary/meta/author/first_name&quot; /&gt; &lt;xsl:value-of select=&quot;commentary/meta/author/last_name&quot; /&gt;&lt;xsl:element name=&quot;br&quot; /&gt;
184
+ Date: &lt;xsl:value-of select=&quot;commentary/meta/date&quot; /&gt;&lt;xsl:element name=&quot;br&quot; /&gt;
185
+
186
+ &lt;xsl:for-each select=&quot;./commentary/body&quot;&gt;
187
+ &lt;xsl:apply-templates /&gt;
188
+ &lt;/xsl:for-each&gt;
189
+
190
+ &lt;/xsl:element&gt;
191
+ &lt;/xsl:element&gt;
192
+ &lt;/xsl:template&gt;
193
+
194
+ &lt;xsl:template match=&quot;para&quot;&gt;
195
+ &lt;xsl:element name=&quot;p&quot;&gt;
196
+ &lt;xsl:value-of select=&quot;.&quot; /&gt;
197
+ &lt;/xsl:element&gt;
198
+ &lt;/xsl:template&gt;
199
+ &lt;/xsl:stylesheet&gt;
200
+ </pre>
201
+ <p>
202
+ We can easily transform the XML with the following ruby code:
203
+ </p>
204
+ <pre>
205
+ require 'libxslt'
206
+
207
+ # Create a new XSL Transform
208
+ stylesheet_doc = XML::Document.file('files/fuzface.xsl')
209
+ stylesheet = XSLT::Stylesheet.new(stylesheet_doc)
210
+
211
+ # Transform a xml document
212
+ xml_doc = XML::Document.file('files/fuzface.xml')
213
+ result = stylesheet.apply(xml_doc)
214
+ </pre>
215
+ <p>
216
+ You can then print, save or manipulate the returned document.
217
+ </p>
218
+ <h2>License</h2>
219
+ <p>
220
+ See LICENSE for license information.
221
+ </p>
222
+ <h2>DOCUMENTATION</h2>
223
+ <p>
224
+ RDoc comments are included - run &#8216;rake doc&#8217; to generate
225
+ documentation. You can find the latest documentation at:
226
+ </p>
227
+ <ul>
228
+ <li><a href="http://libxsl.rubyforge.org">libxsl.rubyforge.org</a>/
229
+
230
+ </li>
231
+ </ul>
232
+ <h2>MORE INFORMATION</h2>
233
+ <p>
234
+ For more information please refer to the documentation. If you have any
235
+ questions, please send email to libxml-devel@rubyforge.org.
236
+ </p>
237
+
238
+ </div>
239
+
240
+
241
+ </div>
242
+
243
+
244
+ </div>
245
+
246
+
247
+ <!-- if includes -->
248
+
249
+ <div id="section">
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+ <!-- if method_list -->
259
+
260
+
261
+ </div>
262
+
263
+
264
+ <div id="validator-badges">
265
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
266
+ </div>
267
+
268
+ </body>
269
+ </html>
@@ -0,0 +1,101 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: libxslt.c</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>libxslt.c</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>ext/libxslt/libxslt.c
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Thu Jul 10 16:41:08 Mountain Daylight Time 2008</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+
72
+
73
+ </div>
74
+
75
+
76
+ </div>
77
+
78
+
79
+ <!-- if includes -->
80
+
81
+ <div id="section">
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+ <!-- if method_list -->
91
+
92
+
93
+ </div>
94
+
95
+
96
+ <div id="validator-badges">
97
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
98
+ </div>
99
+
100
+ </body>
101
+ </html>