libxslt-ruby 0.8.0-x86-mswin32-60 → 0.8.2-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Jul 15 15:48:25 Mountain Daylight Time 2008</td>
59
+ <td>Mon Jul 21 20:44:12 -0600 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -72,7 +72,7 @@
72
72
  <h1>libxslt-ruby</h1>
73
73
  <h2>Overview</h2>
74
74
  <p>
75
- The libxslt gem provides Ruby language bindings for GNOME&#8217;s Libxslt
75
+ The libxslt gem provides Ruby language bindings for GNOME&#8216;s Libxslt
76
76
  toolkit. It is free software, released under the MIT License.
77
77
  </p>
78
78
  <h2>Requirements</h2>
@@ -101,7 +101,7 @@ following libraries to function properly:
101
101
  </li>
102
102
  </ul>
103
103
  <p>
104
- If you are running Linux or Unix you&#8217;ll need a C compiler so the
104
+ If you are running Linux or Unix you&#8216;ll need a C compiler so the
105
105
  extension can be compiled when it is installed. If you are running Windows,
106
106
  then install the Windows specific RubyGem which includes an already built
107
107
  extension.
@@ -124,10 +124,9 @@ The easiest way to install libxslt-ruby is via Ruby Gems. To install:
124
124
  <p>
125
125
  If you are running Windows, make sure to install the Win32 RubyGem which
126
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
127
+ version 2.6.32, iconv version 1.11 and libxslt version 1.1.24. Binaries for
128
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.
129
+ for libxslt is provided in the libxslt-ruby bindings.
131
130
  </p>
132
131
  <p>
133
132
  The Windows binaries are biult with MingW. The gem also includes a
@@ -136,6 +135,40 @@ libxml-ruby on Windows, then it is highly recommended you use VC++.
136
135
  </p>
137
136
  <h2>USAGE</h2>
138
137
  <p>
138
+ For in-depth information about using libxslt-ruby please refer to its
139
+ online Rdoc documentation.
140
+ </p>
141
+ <p>
142
+ All libxslt classes are in the <a
143
+ href="../classes/LibXSLT/XSLT.html">LibXSLT::XSLT</a> module. The simplest
144
+ way to use libxslt is to require &#8216;xslt&#8217;. This will mixin the
145
+ LibXML and <a href="../classes/LibXSLT.html">LibXSLT</a> modules into the
146
+ global namespace, allowing you to write code like this:
147
+ </p>
148
+ <p>
149
+ require &#8216;xslt&#8217; document = XML::Document.new stylesheett =
150
+ XSLT::Stylesheet.new(document)
151
+ </p>
152
+ <p>
153
+ If you prefer not to add the <a href="../classes/LibXSLT.html">LibXSLT</a>
154
+ module to the global namepace, then write your code like this:
155
+ </p>
156
+ <p>
157
+ require &#8216;libxslt&#8216;
158
+ </p>
159
+ <p>
160
+ class MyClass
161
+ </p>
162
+ <pre>
163
+ def some_method
164
+ document = LibXML::XML::Document.new
165
+ stylesheett = LibXSLT::XSLT::Stylesheet.new(document)
166
+ end
167
+ </pre>
168
+ <p>
169
+ end
170
+ </p>
171
+ <p>
139
172
  Given an XML file like:
140
173
  </p>
141
174
  <pre>
@@ -150,8 +183,8 @@ Given an XML file like:
150
183
  &lt;email&gt;sean@chittenden.org&lt;/email&gt;
151
184
  &lt;/author&gt;
152
185
  &lt;version&gt;$Version$&lt;/version&gt;
153
- &lt;date&gt;$Date: 2008-07-14 21:23:19 -0600 (Mon, 14 Jul 2008) $&lt;/date&gt;
154
- &lt;id&gt;$Id: README 94 2008-07-15 03:23:19Z cfis $&lt;/id&gt; &lt;title&gt;Fuzface...&lt;/title&gt;
186
+ &lt;date&gt;$Date: 2008-07-21 20:44:12 -0600 (Mon, 21 Jul 2008) $&lt;/date&gt;
187
+ &lt;id&gt;$Id: README 109 2008-07-22 02:44:12Z cfis $&lt;/id&gt; &lt;title&gt;Fuzface...&lt;/title&gt;
155
188
  &lt;subtitle&gt;The Internet's a big place and here's some proof...&lt;/subtitle&gt;
156
189
  &lt;/meta&gt;
157
190
 
@@ -202,7 +235,7 @@ And an <a href="../classes/XSLT.html">XSLT</a> file like this:
202
235
  We can easily transform the XML with the following ruby code:
203
236
  </p>
204
237
  <pre>
205
- require 'libxslt'
238
+ require 'xslt'
206
239
 
207
240
  # Create a new XSL Transform
208
241
  stylesheet_doc = XML::Document.file('files/fuzface.xsl')
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Jul 15 15:46:46 Mountain Daylight Time 2008</td>
59
+ <td>Mon Jul 21 20:17:20 -0600 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Jul 15 15:49:01 Mountain Daylight Time 2008</td>
59
+ <td>Mon Jul 21 20:17:20 -0600 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Jul 15 15:39:34 Mountain Daylight Time 2008</td>
59
+ <td>Mon Jul 21 20:17:20 -0600 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Jul 15 15:48:02 Mountain Daylight Time 2008</td>
59
+ <td>Mon Jul 21 22:22:46 -0600 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Jul 15 15:41:51 Mountain Daylight Time 2008</td>
59
+ <td>Mon Jul 21 20:31:16 -0600 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -68,6 +68,12 @@
68
68
 
69
69
  <div id="contextContent">
70
70
 
71
+ <div id="description">
72
+ <p>
73
+ First make sure libxml is loaded
74
+ </p>
75
+
76
+ </div>
71
77
 
72
78
  <div id="requires-list">
73
79
  <h3 class="section-bar">Required files</h3>
@@ -0,0 +1,135 @@
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: xslt.rb</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>xslt.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>lib/xslt.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Mon Jul 21 20:31:26 -0600 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
+ This file loads libxslt and adds the <a
74
+ href="../../classes/LibXSLT.html">LibXSLT</a> namespace to the toplevel for
75
+ conveneience. The end result
76
+ </p>
77
+ <table>
78
+ <tr><td valign="top">is to have <a href="../../classes/XSLT.html">XSLT</a>:</td><td>universally exposed.
79
+
80
+ </td></tr>
81
+ </table>
82
+ <p>
83
+ It is recommend that you only load this file for libs that do not have
84
+ their own namespace, eg. administrative scripts, personal programs, etc.
85
+ For other applications require &#8216;libxslt&#8217; instead and include <a
86
+ href="../../classes/LibXSLT.html">LibXSLT</a> into your app/libs namespace.
87
+ </p>
88
+
89
+ </div>
90
+
91
+ <div id="requires-list">
92
+ <h3 class="section-bar">Required files</h3>
93
+
94
+ <div class="name-list">
95
+ libxslt&nbsp;&nbsp;
96
+ </div>
97
+ </div>
98
+
99
+ </div>
100
+
101
+
102
+ </div>
103
+
104
+
105
+ <!-- if includes -->
106
+ <div id="includes">
107
+ <h3 class="section-bar">Included Modules</h3>
108
+
109
+ <div id="includes-list">
110
+ <span class="include-name">LibXML</span>
111
+ <span class="include-name"><a href="../../classes/LibXSLT.html">LibXSLT</a></span>
112
+ </div>
113
+ </div>
114
+
115
+ <div id="section">
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+ <!-- if method_list -->
125
+
126
+
127
+ </div>
128
+
129
+
130
+ <div id="validator-badges">
131
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
132
+ </div>
133
+
134
+ </body>
135
+ </html>
@@ -28,6 +28,7 @@
28
28
  <a href="files/ext/libxslt/ruby_xslt_transform_context_c.html">ext/libxslt/ruby_xslt_transform_context.c</a><br />
29
29
  <a href="files/lib/libxslt_rb.html">lib/libxslt.rb</a><br />
30
30
  <a href="files/lib/libxslt/deprecated_rb.html">lib/libxslt/deprecated.rb</a><br />
31
+ <a href="files/lib/xslt_rb.html">lib/xslt.rb</a><br />
31
32
  </div>
32
33
  </div>
33
34
  </body>
@@ -1,5 +1,5 @@
1
- #define RUBY_LIBXSLT_VERSION "0.8.0"
1
+ #define RUBY_LIBXSLT_VERSION "0.8.2"
2
2
  #define RUBY_LIBXSLT_VERNUM 0
3
3
  #define RUBY_LIBXSLT_VER_MAJ 0
4
4
  #define RUBY_LIBXSLT_VER_MIN 8
5
- #define RUBY_LIBXSLT_VER_MIC 0
5
+ #define RUBY_LIBXSLT_VER_MIC 2
@@ -0,0 +1,42 @@
1
+ # We can't use Ruby's standard build procedures
2
+ # on Windows because the Ruby executable is
3
+ # built with VC++ while here we want to build
4
+ # with MingW. So just roll our own...
5
+
6
+ require 'rubygems'
7
+ require 'rake/clean'
8
+ require 'rbconfig'
9
+
10
+ RUBY_INCLUDE_DIR = Config::CONFIG["archdir"]
11
+ RUBY_BIN_DIR = Config::CONFIG["bindir"]
12
+ RUBY_LIB_DIR = Config::CONFIG["libdir"]
13
+ RUBY_SHARED_LIB = Config::CONFIG["LIBRUBY"]
14
+ RUBY_SHARED_DLL = RUBY_SHARED_LIB.gsub(/lib$/, 'dll')
15
+
16
+ EXTENSION_NAME = "libxslt_ruby.#{Config::CONFIG['DLEXT']}"
17
+
18
+ gem_specs = Gem::SourceIndex.from_installed_gems.search('libxml-ruby')
19
+ LIBXML_RUBY_DIR = gem_specs.sort_by {|spec| spec.version}.reverse.first.full_gem_path
20
+
21
+ CLEAN.include('*.o')
22
+ CLOBBER.include('libxslt.so')
23
+
24
+ task :default => "libxslt"
25
+
26
+ SRC = FileList['../libxslt/*.c']
27
+ OBJ = SRC.collect do |file_name|
28
+ File.basename(file_name).ext('o')
29
+ end
30
+
31
+ SRC.each do |srcfile|
32
+ objfile = File.basename(srcfile).ext('o')
33
+ file objfile => srcfile do
34
+ command = "gcc -c -fPIC -O2 -Wall -o #{objfile} -I/usr/local/include -I../../rlibxml/ext #{srcfile} -I#{LIBXML_RUBY_DIR}/ext -I#{RUBY_INCLUDE_DIR}"
35
+ sh "sh -c '#{command}'"
36
+ end
37
+ end
38
+
39
+ file "libxslt" => OBJ do
40
+ command = "gcc -shared -o #{EXTENSION_NAME} -L#{LIBXML_RUBY_DIR}/lib -L/usr/local/lib #{OBJ} -lxml_ruby -lxslt -lxml2 #{RUBY_BIN_DIR}/#{RUBY_SHARED_DLL}"
41
+ sh "sh -c '#{command}'"
42
+ end
@@ -1,9 +1,9 @@
1
1
  
2
- Microsoft Visual Studio Solution File, Format Version 9.00
3
- # Visual Studio 2005
2
+ Microsoft Visual Studio Solution File, Format Version 10.00
3
+ # Visual Studio 2008
4
4
  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxslt_ruby", "libxslt_ruby.vcproj", "{6DCFD1E6-224E-479C-BBD9-B6931DFCD02C}"
5
5
  EndProject
6
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml_ruby", "..\..\..\libxml-ruby\trunk\vc\libxml_ruby.vcproj", "{0B65CD1D-EEB9-41AE-93BB-75496E504152}"
6
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml_ruby", "..\..\..\libxml-ruby\ext\vc\libxml_ruby.vcproj", "{0B65CD1D-EEB9-41AE-93BB-75496E504152}"
7
7
  EndProject
8
8
  Global
9
9
  GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -1,11 +1,12 @@
1
1
  <?xml version="1.0" encoding="Windows-1252"?>
2
2
  <VisualStudioProject
3
3
  ProjectType="Visual C++"
4
- Version="8.00"
4
+ Version="9.00"
5
5
  Name="libxslt_ruby"
6
6
  ProjectGUID="{6DCFD1E6-224E-479C-BBD9-B6931DFCD02C}"
7
7
  RootNamespace="libxsl"
8
8
  Keyword="Win32Proj"
9
+ TargetFrameworkVersion="131072"
9
10
  >
10
11
  <Platforms>
11
12
  <Platform
@@ -17,7 +18,7 @@
17
18
  <Configurations>
18
19
  <Configuration
19
20
  Name="Debug|Win32"
20
- OutputDirectory="C:\Development\ruby\lib\ruby\gems\1.8\gems\libxsl-ruby-0.6.1-x86-mswin32-60\lib"
21
+ OutputDirectory="C:\Development\ruby\lib\ruby\gems\1.8\gems\libxsl-ruby-0.8.2-x86-mswin32-60\lib"
21
22
  IntermediateDirectory="$(ConfigurationName)"
22
23
  ConfigurationType="2"
23
24
  CharacterSet="1"
@@ -40,7 +41,7 @@
40
41
  <Tool
41
42
  Name="VCCLCompilerTool"
42
43
  Optimization="0"
43
- AdditionalIncludeDirectories="&quot;C:\Development\msys\src\libiconv-1.12\include&quot;;&quot;C:\Development\ruby\lib\ruby\1.8\i386-mswin32&quot;;&quot;C:\Development\msys\src\libxml2-2.6.32\include&quot;;&quot;C:\Development\msys\src\libxslt-1.1.24&quot;;&quot;C:\Development\msys\src\libxml-ruby\trunk\ext&quot;"
44
+ AdditionalIncludeDirectories="&quot;C:\Development\src\libxml-ruby\ext&quot;;&quot;C:\Development\ruby\lib\ruby\1.8\i386-mswin32&quot;;C:\Development\msys\local\include;C:\Development\msys\local\include\libxml2"
44
45
  PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;libxsl_EXPORTS"
45
46
  MinimalRebuild="true"
46
47
  BasicRuntimeChecks="3"
@@ -64,9 +65,11 @@
64
65
  AdditionalDependencies="msvcrt-ruby18.lib libxml2.lib libxslt.lib libexslt.lib"
65
66
  OutputFile="C:\Development\ruby\lib\ruby\gems\1.8\gems\libxslt-ruby-0.7.1-x86-mswin32-60\lib\$(ProjectName).so"
66
67
  LinkIncremental="2"
67
- AdditionalLibraryDirectories="C:\Development\ruby\lib;&quot;C:\Development\msys\src\libxml2-2.6.32\win32\bin.msvc&quot;;&quot;C:\Development\msys\src\libxslt-1.1.24\win32\bin.msvc&quot;"
68
+ AdditionalLibraryDirectories="C:\Development\ruby\lib;C:\Development\msys\local\lib"
68
69
  GenerateDebugInformation="true"
69
70
  SubSystem="2"
71
+ RandomizedBaseAddress="1"
72
+ DataExecutionPrevention="0"
70
73
  TargetMachine="1"
71
74
  />
72
75
  <Tool
@@ -87,9 +90,6 @@
87
90
  <Tool
88
91
  Name="VCAppVerifierTool"
89
92
  />
90
- <Tool
91
- Name="VCWebDeploymentTool"
92
- />
93
93
  <Tool
94
94
  Name="VCPostBuildEventTool"
95
95
  />
@@ -146,6 +146,8 @@
146
146
  SubSystem="2"
147
147
  OptimizeReferences="2"
148
148
  EnableCOMDATFolding="2"
149
+ RandomizedBaseAddress="1"
150
+ DataExecutionPrevention="0"
149
151
  TargetMachine="1"
150
152
  />
151
153
  <Tool
@@ -166,9 +168,6 @@
166
168
  <Tool
167
169
  Name="VCAppVerifierTool"
168
170
  />
169
- <Tool
170
- Name="VCWebDeploymentTool"
171
- />
172
171
  <Tool
173
172
  Name="VCPostBuildEventTool"
174
173
  />
@@ -177,7 +176,7 @@
177
176
  <References>
178
177
  <ProjectReference
179
178
  ReferencedProjectIdentifier="{0B65CD1D-EEB9-41AE-93BB-75496E504152}"
180
- RelativePathToProject="..\..\..\libxml-ruby\trunk\vc\libxml_ruby.vcproj"
179
+ RelativePathToProject="..\..\..\libxml-ruby\ext\vc\libxml_ruby.vcproj"
181
180
  />
182
181
  </References>
183
182
  <Files>
@@ -187,15 +186,15 @@
187
186
  UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
188
187
  >
189
188
  <File
190
- RelativePath="..\ext\libxslt\libxslt.c"
189
+ RelativePath="..\libxslt\libxslt.c"
191
190
  >
192
191
  </File>
193
192
  <File
194
- RelativePath="..\ext\libxslt\ruby_xslt_stylesheet.c"
193
+ RelativePath="..\libxslt\ruby_xslt_stylesheet.c"
195
194
  >
196
195
  </File>
197
196
  <File
198
- RelativePath="..\ext\libxslt\ruby_xslt_transform_context.c"
197
+ RelativePath="..\libxslt\ruby_xslt_transform_context.c"
199
198
  >
200
199
  </File>
201
200
  </Filter>
@@ -205,19 +204,19 @@
205
204
  UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
206
205
  >
207
206
  <File
208
- RelativePath="..\ext\libxslt\libxslt.h"
207
+ RelativePath="..\libxslt\libxslt.h"
209
208
  >
210
209
  </File>
211
210
  <File
212
- RelativePath="..\ext\libxslt\ruby_xslt_stylesheet.h"
211
+ RelativePath="..\libxslt\ruby_xslt_stylesheet.h"
213
212
  >
214
213
  </File>
215
214
  <File
216
- RelativePath="..\ext\libxslt\ruby_xslt_transform_context.h"
215
+ RelativePath="..\libxslt\ruby_xslt_transform_context.h"
217
216
  >
218
217
  </File>
219
218
  <File
220
- RelativePath="..\ext\libxslt\version.h"
219
+ RelativePath="..\libxslt\version.h"
221
220
  >
222
221
  </File>
223
222
  </Filter>
@@ -2,65 +2,66 @@
2
2
  # These classes provide provide backwards compatibility with
3
3
  # versions of libxslt-ruby prior to version 0.7.0
4
4
 
5
- module XML
6
- module XSLT
7
- MAX_DEPTH = LibXSLT::XSLT::MAX_DEPTH
8
- MAX_SORT = LibXSLT::XSLT::MAX_SORT
9
- ENGINE_VERSION = LibXSLT::XSLT::ENGINE_VERSION
10
- LIBXSLT_VERSION = LibXSLT::XSLT::LIBXSLT_VERSION
11
- LIBXML_VERSION = LibXSLT::XSLT::LIBXML_VERSION
12
- XSLT_NAMESPACE = LibXSLT::XSLT::XSLT_NAMESPACE
13
- DEFAULT_VENDOR = LibXSLT::XSLT::DEFAULT_VENDOR
14
- DEFAULT_VERSION = LibXSLT::XSLT::DEFAULT_VERSION
15
- DEFAULT_URL = LibXSLT::XSLT::DEFAULT_URL
16
- NAMESPACE_LIBXSLT = LibXSLT::XSLT::NAMESPACE_LIBXSLT
17
- NAMESPACE_NORM_SAXON = LibXSLT::XSLT::NAMESPACE_NORM_SAXON
18
- NAMESPACE_SAXON = LibXSLT::XSLT::NAMESPACE_SAXON
19
- NAMESPACE_XT = LibXSLT::XSLT::NAMESPACE_XT
20
- NAMESPACE_XALAN = LibXSLT::XSLT::NAMESPACE_XALAN
21
-
22
- def self.new
23
- Stylesheet.new(nil)
24
- end
25
-
26
- def self.file(filename)
27
- doc = XML::Document.file(filename)
28
- stylesheet = LibXSLT::XSLT::Stylesheet.new(doc)
29
-
30
- result = Stylesheet.new(stylesheet)
31
- result.filename = filename
32
- result
33
- end
34
-
35
- class Stylesheet
36
- attr_accessor :doc, :filename
37
-
38
- def initialize(stylesheet)
39
- @stylesheet = stylesheet
40
- end
41
-
42
- def filename=(value)
43
- @doc = XML::Document.file(value)
44
- @filename = value
45
- end
46
-
47
- def parse
48
- self
49
- end
50
-
51
- def apply
52
- @result = @stylesheet.apply(@doc)
5
+ module LibXML
6
+ module XML
7
+ module XSLT
8
+ MAX_DEPTH = LibXSLT::XSLT::MAX_DEPTH
9
+ MAX_SORT = LibXSLT::XSLT::MAX_SORT
10
+ ENGINE_VERSION = LibXSLT::XSLT::ENGINE_VERSION
11
+ LIBXSLT_VERSION = LibXSLT::XSLT::LIBXSLT_VERSION
12
+ LIBXML_VERSION = LibXSLT::XSLT::LIBXML_VERSION
13
+ XSLT_NAMESPACE = LibXSLT::XSLT::XSLT_NAMESPACE
14
+ DEFAULT_VENDOR = LibXSLT::XSLT::DEFAULT_VENDOR
15
+ DEFAULT_VERSION = LibXSLT::XSLT::DEFAULT_VERSION
16
+ DEFAULT_URL = LibXSLT::XSLT::DEFAULT_URL
17
+ NAMESPACE_LIBXSLT = LibXSLT::XSLT::NAMESPACE_LIBXSLT
18
+ NAMESPACE_NORM_SAXON = LibXSLT::XSLT::NAMESPACE_NORM_SAXON
19
+ NAMESPACE_SAXON = LibXSLT::XSLT::NAMESPACE_SAXON
20
+ NAMESPACE_XT = LibXSLT::XSLT::NAMESPACE_XT
21
+ NAMESPACE_XALAN = LibXSLT::XSLT::NAMESPACE_XALAN
22
+
23
+ def self.new
24
+ Stylesheet.new(nil)
53
25
  end
54
-
55
- def save(filename)
56
- raise(ArgumentError) unless @result
57
- @result.save(filename)
26
+
27
+ def self.file(filename)
28
+ doc = ::LibXML::XML::Document.file(filename)
29
+ stylesheet = LibXSLT::XSLT::Stylesheet.new(doc)
30
+
31
+ result = Stylesheet.new(stylesheet)
32
+ result.filename = filename
33
+ result
58
34
  end
59
-
60
- def print(filename)
61
- raise(ArgumentError) unless @result
35
+
36
+ class Stylesheet
37
+ attr_accessor :doc, :filename
38
+
39
+ def initialize(stylesheet)
40
+ @stylesheet = stylesheet
41
+ end
42
+
43
+ def filename=(value)
44
+ @doc = ::LibXML::XML::Document.file(value)
45
+ @filename = value
46
+ end
47
+
48
+ def parse
49
+ self
50
+ end
51
+
52
+ def apply
53
+ @result = @stylesheet.apply(@doc)
54
+ end
55
+
56
+ def save(filename)
57
+ raise(ArgumentError) unless @result
58
+ @result.save(filename)
59
+ end
60
+
61
+ def print(filename)
62
+ raise(ArgumentError) unless @result
63
+ end
62
64
  end
63
65
  end
64
66
  end
65
67
  end
66
-
data/lib/libxslt-1.dll ADDED
Binary file
data/lib/libxslt.rb CHANGED
@@ -1,9 +1,13 @@
1
+ # First make sure libxml is loaded
1
2
  require 'libxml'
3
+
4
+ # Now if running on Windows, then add the current directory to the PATH
5
+ # for the current process so it can find the pre-built libxml2 and
6
+ # iconv2 shared libraries (dlls).
7
+ if RUBY_PLATFORM.match(/mswin/i)
8
+ ENV['PATH'] += ";#{File.dirname(__FILE__)}"
9
+ end
10
+
2
11
  require 'libxslt_ruby'
3
- require 'libxslt/deprecated'
4
12
 
5
- # Map the LibXSLT module into the XSLT module for both backwards
6
- # compatibility and ease of use.
7
- module XSLT
8
- include LibXSLT::XSLT
9
- end
13
+ require 'libxslt/deprecated'
data/lib/libxslt_ruby.so CHANGED
Binary file