libxslt-ruby 0.8.2 → 0.9.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 (40) hide show
  1. data/Rakefile +16 -37
  2. data/ext/libxslt/extconf.rb +18 -0
  3. data/ext/libxslt/libxslt.c +3 -0
  4. data/ext/libxslt/libxslt.h +1 -1
  5. data/ext/libxslt/ruby_xslt_stylesheet.c +6 -6
  6. data/ext/libxslt/version.h +3 -3
  7. data/ext/mingw/Rakefile +18 -32
  8. data/ext/vc/libxslt_ruby.vcproj +2 -2
  9. data/test/files/commentary.dtd +34 -0
  10. data/{lib/text.xml → test/files/fuzface.xml} +154 -129
  11. data/test/files/fuzface.xsl +4 -0
  12. data/test/files/params.xml +2 -0
  13. data/test/files/params.xsl +11 -0
  14. data/test/files/ramblings.xsl +46 -0
  15. data/test/test_deprecated.rb +97 -0
  16. data/test/test_libxslt.rb +21 -0
  17. data/test/test_stylesheet.rb +108 -0
  18. data/test/test_suite.rb +3 -0
  19. metadata +14 -33
  20. data/doc/classes/LibXSLT.html +0 -126
  21. data/doc/classes/LibXSLT/XSLT.html +0 -196
  22. data/doc/classes/LibXSLT/XSLT/Stylesheet.html +0 -250
  23. data/doc/classes/LibXSLT/XSLT/TransformContext.html +0 -117
  24. data/doc/classes/LibXSLT/XSLTError.html +0 -131
  25. data/doc/classes/XSLT.html +0 -125
  26. data/doc/created.rid +0 -1
  27. data/doc/files/CHANGES.html +0 -204
  28. data/doc/files/LICENSE.html +0 -133
  29. data/doc/files/README.html +0 -302
  30. data/doc/files/ext/libxslt/libxslt_c.html +0 -101
  31. data/doc/files/ext/libxslt/ruby_xslt_stylesheet_c.html +0 -101
  32. data/doc/files/ext/libxslt/ruby_xslt_transform_context_c.html +0 -101
  33. data/doc/files/lib/libxslt/deprecated_rb.html +0 -101
  34. data/doc/files/lib/libxslt_rb.html +0 -116
  35. data/doc/files/lib/xslt_rb.html +0 -135
  36. data/doc/fr_class_index.html +0 -32
  37. data/doc/fr_file_index.html +0 -35
  38. data/doc/fr_method_index.html +0 -28
  39. data/doc/index.html +0 -24
  40. data/doc/rdoc-style.css +0 -208
@@ -1,196 +0,0 @@
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>Module: LibXSLT::XSLT</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="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">LibXSLT::XSLT</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/ext/libxslt/libxslt_c.html">
59
- ext/libxslt/libxslt.c
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- </table>
66
- </div>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
-
71
-
72
-
73
- <div id="contextContent">
74
-
75
- <div id="description">
76
- <p>
77
- :nodoc:
78
- </p>
79
-
80
- </div>
81
-
82
-
83
- </div>
84
-
85
-
86
- </div>
87
-
88
-
89
- <!-- if includes -->
90
-
91
- <div id="section">
92
-
93
- <div id="class-list">
94
- <h3 class="section-bar">Classes and Modules</h3>
95
-
96
- Class <a href="XSLT/Stylesheet.html" class="link">LibXSLT::XSLT::Stylesheet</a><br />
97
- Class <a href="XSLT/TransformContext.html" class="link">LibXSLT::XSLT::TransformContext</a><br />
98
-
99
- </div>
100
-
101
- <div id="constants-list">
102
- <h3 class="section-bar">Constants</h3>
103
-
104
- <div class="name-list">
105
- <table summary="Constants">
106
- <tr class="top-aligned-row context-row">
107
- <td class="context-item-name">MAX_DEPTH</td>
108
- <td>=</td>
109
- <td class="context-item-value">INT2NUM(xsltMaxDepth)</td>
110
- </tr>
111
- <tr class="top-aligned-row context-row">
112
- <td class="context-item-name">MAX_SORT</td>
113
- <td>=</td>
114
- <td class="context-item-value">INT2NUM(XSLT_MAX_SORT)</td>
115
- </tr>
116
- <tr class="top-aligned-row context-row">
117
- <td class="context-item-name">ENGINE_VERSION</td>
118
- <td>=</td>
119
- <td class="context-item-value">rb_str_new2(xsltEngineVersion)</td>
120
- </tr>
121
- <tr class="top-aligned-row context-row">
122
- <td class="context-item-name">LIBXSLT_VERSION</td>
123
- <td>=</td>
124
- <td class="context-item-value">INT2NUM(xsltLibxsltVersion)</td>
125
- </tr>
126
- <tr class="top-aligned-row context-row">
127
- <td class="context-item-name">LIBXML_VERSION</td>
128
- <td>=</td>
129
- <td class="context-item-value">INT2NUM(xsltLibxmlVersion)</td>
130
- </tr>
131
- <tr class="top-aligned-row context-row">
132
- <td class="context-item-name">XSLT_NAMESPACE</td>
133
- <td>=</td>
134
- <td class="context-item-value">rb_str_new2((const char*)XSLT_NAMESPACE)</td>
135
- </tr>
136
- <tr class="top-aligned-row context-row">
137
- <td class="context-item-name">DEFAULT_VENDOR</td>
138
- <td>=</td>
139
- <td class="context-item-value">rb_str_new2(XSLT_DEFAULT_VENDOR)</td>
140
- </tr>
141
- <tr class="top-aligned-row context-row">
142
- <td class="context-item-name">DEFAULT_VERSION</td>
143
- <td>=</td>
144
- <td class="context-item-value">rb_str_new2(XSLT_DEFAULT_VERSION)</td>
145
- </tr>
146
- <tr class="top-aligned-row context-row">
147
- <td class="context-item-name">DEFAULT_URL</td>
148
- <td>=</td>
149
- <td class="context-item-value">rb_str_new2(XSLT_DEFAULT_URL)</td>
150
- </tr>
151
- <tr class="top-aligned-row context-row">
152
- <td class="context-item-name">NAMESPACE_LIBXSLT</td>
153
- <td>=</td>
154
- <td class="context-item-value">rb_str_new2((const char*)XSLT_LIBXSLT_NAMESPACE)</td>
155
- </tr>
156
- <tr class="top-aligned-row context-row">
157
- <td class="context-item-name">NAMESPACE_NORM_SAXON</td>
158
- <td>=</td>
159
- <td class="context-item-value">rb_str_new2((const char*)XSLT_NORM_SAXON_NAMESPACE)</td>
160
- </tr>
161
- <tr class="top-aligned-row context-row">
162
- <td class="context-item-name">NAMESPACE_SAXON</td>
163
- <td>=</td>
164
- <td class="context-item-value">rb_str_new2((const char*)XSLT_SAXON_NAMESPACE)</td>
165
- </tr>
166
- <tr class="top-aligned-row context-row">
167
- <td class="context-item-name">NAMESPACE_XT</td>
168
- <td>=</td>
169
- <td class="context-item-value">rb_str_new2((const char*)XSLT_XT_NAMESPACE)</td>
170
- </tr>
171
- <tr class="top-aligned-row context-row">
172
- <td class="context-item-name">NAMESPACE_XALAN</td>
173
- <td>=</td>
174
- <td class="context-item-value">rb_str_new2((const char*)XSLT_XALAN_NAMESPACE)</td>
175
- </tr>
176
- </table>
177
- </div>
178
- </div>
179
-
180
-
181
-
182
-
183
-
184
-
185
- <!-- if method_list -->
186
-
187
-
188
- </div>
189
-
190
-
191
- <div id="validator-badges">
192
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
193
- </div>
194
-
195
- </body>
196
- </html>
@@ -1,250 +0,0 @@
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>Class: LibXSLT::XSLT::Stylesheet</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="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">LibXSLT::XSLT::Stylesheet</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/ext/libxslt/ruby_xslt_stylesheet_c.html">
59
- ext/libxslt/ruby_xslt_stylesheet.c
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <p>
83
- The <a href="Stylesheet.html">XSLT::Stylesheet</a> represents a XSL
84
- stylesheet that can be used to transform an XML document. For usage
85
- information refer to <a
86
- href="Stylesheet.html#M000002">XSLT::Stylesheet#apply</a>
87
- </p>
88
-
89
- </div>
90
-
91
-
92
- </div>
93
-
94
- <div id="method-list">
95
- <h3 class="section-bar">Methods</h3>
96
-
97
- <div class="name-list">
98
- <a href="#M000002">apply</a>&nbsp;&nbsp;
99
- <a href="#M000001">new</a>&nbsp;&nbsp;
100
- </div>
101
- </div>
102
-
103
- </div>
104
-
105
-
106
- <!-- if includes -->
107
-
108
- <div id="section">
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
- <!-- if method_list -->
118
- <div id="methods">
119
- <h3 class="section-bar">Public Class methods</h3>
120
-
121
- <div id="method-M000001" class="method-detail">
122
- <a name="M000001"></a>
123
-
124
- <div class="method-heading">
125
- <a href="#M000001" class="method-signature">
126
- <span class="method-name">XSLT::Stylesheet.new(document) &rarr; XSLT::Stylesheet<br />
127
- </span>
128
- </a>
129
- </div>
130
-
131
- <div class="method-description">
132
- <p>
133
- Creates a <a href="Stylesheet.html#M000001">new</a> <a
134
- href="../XSLT.html">XSLT</a> stylesheet based on the specified document.
135
- For memory management reasons, a copy of the specified document will be
136
- made, so its best to create a single copy of a stylesheet and use it
137
- multiple times.
138
- </p>
139
- <pre>
140
- stylesheet_doc = XML::Document.file('stylesheet_file')
141
- stylesheet = XSLT::Stylesheet.new(stylesheet_doc)
142
- </pre>
143
- <p><a class="source-toggle" href="#"
144
- onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
145
- <div class="method-source-code" id="M000001-source">
146
- <pre>
147
- /* call-seq:
148
- * XSLT::Stylesheet.new(document) -&gt; XSLT::Stylesheet
149
- *
150
- * Creates a new XSLT stylesheet based on the specified document.
151
- * For memory management reasons, a copy of the specified document
152
- * will be made, so its best to create a single copy of a stylesheet
153
- * and use it multiple times.
154
- *
155
- * stylesheet_doc = XML::Document.file('stylesheet_file')
156
- * stylesheet = XSLT::Stylesheet.new(stylesheet_doc)
157
- *
158
- */
159
- VALUE
160
- ruby_xslt_stylesheet_initialize(VALUE self, VALUE document) {
161
-
162
- </pre>
163
- </div>
164
- </div>
165
- </div>
166
-
167
- <h3 class="section-bar">Public Instance methods</h3>
168
-
169
- <div id="method-M000002" class="method-detail">
170
- <a name="M000002"></a>
171
-
172
- <div class="method-heading">
173
- <a href="#M000002" class="method-signature">
174
- <span class="method-name">stylesheet.apply(document, {params}) &rarr; XML::Document<br />
175
- </span>
176
- </a>
177
- </div>
178
-
179
- <div class="method-description">
180
- <p>
181
- Apply this stylesheet transformation to the provided document. This method
182
- may be invoked multiple times.
183
- </p>
184
- <p>
185
- Params:
186
- </p>
187
- <ul>
188
- <li>document - An instance of an XML::Document
189
-
190
- </li>
191
- <li>params - An optional hash table that specifies the values for xsl:param
192
- values embedded in the stylesheet.
193
-
194
- </li>
195
- </ul>
196
- <p>
197
- Example:
198
- </p>
199
- <pre>
200
- stylesheet_doc = XML::Document.file('stylesheet_file')
201
- stylesheet = XSLT::Stylesheet.new(stylesheet_doc)
202
-
203
- xml_doc = XML::Document.file('xml_file')
204
- result = stylesheet.apply(xml_doc)
205
- result = stylesheet.apply(xml_doc, {:foo =&gt; 'bar'})
206
- </pre>
207
- <p><a class="source-toggle" href="#"
208
- onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
209
- <div class="method-source-code" id="M000002-source">
210
- <pre>
211
- /* call-seq:
212
- * stylesheet.apply(document, {params}) -&gt; XML::Document
213
- *
214
- * Apply this stylesheet transformation to the provided document.
215
- * This method may be invoked multiple times.
216
- *
217
- * Params:
218
- * * document - An instance of an XML::Document
219
- * * params - An optional hash table that specifies the values for xsl:param values embedded in the stylesheet.
220
- *
221
- * Example:
222
- *
223
- * stylesheet_doc = XML::Document.file('stylesheet_file')
224
- * stylesheet = XSLT::Stylesheet.new(stylesheet_doc)
225
- *
226
- * xml_doc = XML::Document.file('xml_file')
227
- * result = stylesheet.apply(xml_doc)
228
- * result = stylesheet.apply(xml_doc, {:foo =&gt; 'bar'})
229
- */
230
- VALUE
231
- ruby_xslt_stylesheet_apply(int argc, VALUE *argv, VALUE self) {
232
-
233
- </pre>
234
- </div>
235
- </div>
236
- </div>
237
-
238
-
239
- </div>
240
-
241
-
242
- </div>
243
-
244
-
245
- <div id="validator-badges">
246
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
247
- </div>
248
-
249
- </body>
250
- </html>
@@ -1,117 +0,0 @@
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>Class: LibXSLT::XSLT::TransformContext</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="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">LibXSLT::XSLT::TransformContext</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/ext/libxslt/ruby_xslt_stylesheet_c.html">
59
- ext/libxslt/ruby_xslt_stylesheet.c
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <p>
83
- :nodoc:
84
- </p>
85
-
86
- </div>
87
-
88
-
89
- </div>
90
-
91
-
92
- </div>
93
-
94
-
95
- <!-- if includes -->
96
-
97
- <div id="section">
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
- <!-- if method_list -->
107
-
108
-
109
- </div>
110
-
111
-
112
- <div id="validator-badges">
113
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
114
- </div>
115
-
116
- </body>
117
- </html>