libxslt-ruby 0.7.0-x86-mswin32-60 → 0.8.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.
- data/README +141 -141
- data/doc/classes/LibXSLT.html +120 -0
- data/doc/classes/LibXSLT/XSLT.html +207 -0
- data/doc/classes/{XSLT → LibXSLT/XSLT}/Stylesheet.html +22 -17
- data/doc/classes/LibXSLT/XSLT/TransformContext.html +111 -0
- data/doc/classes/{XSLT/TransformContext.html → LibXSLT/XSLTError.html} +5 -5
- data/doc/classes/XSLT.html +12 -103
- data/doc/created.rid +1 -1
- data/doc/files/CHANGES.html +18 -3
- data/doc/files/README.html +4 -4
- data/doc/files/ext/libxslt/libxslt_c.html +1 -1
- data/doc/files/ext/libxslt/ruby_xslt_stylesheet_c.html +1 -1
- data/doc/files/ext/libxslt/ruby_xslt_transform_context_c.html +1 -1
- data/doc/files/lib/{deprecated_rb.html → libxslt/deprecated_rb.html} +3 -3
- data/doc/files/lib/libxslt_rb.html +3 -3
- data/doc/fr_class_index.html +5 -2
- data/doc/fr_file_index.html +1 -1
- data/doc/fr_method_index.html +2 -2
- data/ext/libxslt/libxslt.c +22 -18
- data/ext/libxslt/libxslt.h +4 -6
- data/ext/libxslt/ruby_xslt_stylesheet.c +59 -41
- data/ext/libxslt/ruby_xslt_transform_context.c +3 -3
- data/ext/libxslt/version.h +2 -2
- data/lib/libxslt.rb +8 -2
- data/lib/libxslt/deprecated.rb +66 -0
- data/lib/libxslt_ruby.so +0 -0
- data/mingw/libxslt_ruby.so +0 -0
- data/setup.rb +1585 -0
- data/vc/libxslt_ruby.vcproj +2 -2
- metadata +16 -19
- data/lib/deprecated.rb +0 -66
- data/tests/files/commentary.dtd +0 -34
- data/tests/files/fuzface.xml +0 -154
- data/tests/files/fuzface.xsl +0 -4
- data/tests/files/params.xml +0 -2
- data/tests/files/params.xsl +0 -11
- data/tests/files/ramblings.xsl +0 -46
- data/tests/test_deprecated.rb +0 -99
- data/tests/test_libxslt.rb +0 -21
- data/tests/test_stylesheet.rb +0 -64
- data/tests/test_suite.rb +0 -3
data/README
CHANGED
@@ -1,142 +1,142 @@
|
|
1
|
-
= libxslt-ruby
|
2
|
-
|
3
|
-
== Overview
|
4
|
-
|
5
|
-
The libxslt gem provides Ruby language bindings for GNOME's Libxslt
|
6
|
-
toolkit. It is free software, released under the MIT License.
|
7
|
-
|
8
|
-
|
9
|
-
== Requirements
|
10
|
-
|
11
|
-
libxslt-ruby requires Ruby 1.8.4 or higher. It is dependent on
|
12
|
-
the following libraries to function properly:
|
13
|
-
|
14
|
-
* libm (math routines: very standard)
|
15
|
-
* libz (zlib)
|
16
|
-
* libiconv
|
17
|
-
* libxml2
|
18
|
-
* libxslt
|
19
|
-
* libxml-ruby bindings
|
20
|
-
|
21
|
-
If you are running Linux or Unix you'll need a C compiler so the extension
|
22
|
-
can be compiled when it is installed. If you are running Windows, then install the Windows specific RubyGem which
|
23
|
-
includes an already built extension.
|
24
|
-
|
25
|
-
!!!NOTE!!! The libxml-ruby and libxslt-ruby bindings must absolutely, positively,
|
26
|
-
without a doubt share the same libxml2 library. This is because libxslt modifies
|
27
|
-
XML documents created by libxml2. If there are two copies of libxml2 on your
|
28
|
-
system, then when XML documents allocated in copy #1 are manipulated by copy #2,
|
29
|
-
a segmentation fault will occur. So make sure that your system has only one copy of libxml2
|
30
|
-
installed.
|
31
|
-
|
32
|
-
|
33
|
-
== INSTALLATION
|
34
|
-
|
35
|
-
The easiest way to install libxslt-ruby is via Ruby Gems. To install:
|
36
|
-
|
37
|
-
<tt>gem install libxslt-ruby</tt>
|
38
|
-
|
39
|
-
If you are running Windows, make sure to install the Win32 RubyGem which
|
40
|
-
includes an already built binary file. The binary is built against
|
41
|
-
libxml2 version 2.6.32, iconv version 1.12 and libxslt version 1.1.24.
|
42
|
-
Binaries for libxml2 and iconv are provided in the libxml-ruby bindings,
|
43
|
-
while a binary for libxslt is provided in the libxslt-ruby bindings.
|
44
|
-
These binaries should be put either in the libxslt/lib directory
|
45
|
-
or on the Windows path.
|
46
|
-
|
47
|
-
The Windows binaries are biult with MingW. The gem also includes
|
48
|
-
a Microsoft VC++ 2005 solution. If you wish to run a debug version
|
49
|
-
of libxml-ruby on Windows, then it is highly recommended
|
50
|
-
you use VC++.
|
51
|
-
|
52
|
-
|
53
|
-
== USAGE
|
54
|
-
|
55
|
-
Given an XML file like:
|
56
|
-
|
57
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
58
|
-
<?xml-stylesheet href="fuzface.xsl" type="text/xsl"?>
|
59
|
-
|
60
|
-
<commentary>
|
61
|
-
<meta>
|
62
|
-
<author>
|
63
|
-
<first_name>Sean</first_name>
|
64
|
-
<last_name>Chittenden</last_name>
|
65
|
-
<email>sean@chittenden.org</email>
|
66
|
-
</author>
|
67
|
-
<version>$Version$</version>
|
68
|
-
<date>$Date: 2008-07-
|
69
|
-
<id>$Id: README
|
70
|
-
<subtitle>The Internet's a big place and here's some proof...</subtitle>
|
71
|
-
</meta>
|
72
|
-
|
73
|
-
<body>
|
74
|
-
<para>
|
75
|
-
I think it's a tragedy that I'm going to start off my new
|
76
|
-
commentary by talking about facial hair and the Internet.
|
77
|
-
Something about that just screams pathetic, but whatever: it's
|
78
|
-
humor and that's life.
|
79
|
-
</para>
|
80
|
-
</body>
|
81
|
-
</commentary>
|
82
|
-
|
83
|
-
And an XSLT file like this:
|
84
|
-
|
85
|
-
<?xml version="1.0" ?>
|
86
|
-
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
87
|
-
<xsl:template match="/">
|
88
|
-
<xsl:element name="html">
|
89
|
-
<xsl:element name="head">
|
90
|
-
<xsl:element name="title">Ramblings - <xsl:value-of select="commentary/meta/title" /> - <xsl:value-of select="commentary/meta/subtitle" /></xsl:element>
|
91
|
-
</xsl:element>
|
92
|
-
|
93
|
-
<xsl:element name="body">
|
94
|
-
<xsl:element name="h1"><xsl:value-of select="commentary/meta/title" /></xsl:element>
|
95
|
-
<xsl:element name="h3"><xsl:value-of select="commentary/meta/subtitle" /></xsl:element>
|
96
|
-
By: <xsl:value-of select="commentary/meta/author/first_name" /> <xsl:value-of select="commentary/meta/author/last_name" /><xsl:element name="br" />
|
97
|
-
Date: <xsl:value-of select="commentary/meta/date" /><xsl:element name="br" />
|
98
|
-
|
99
|
-
<xsl:for-each select="./commentary/body">
|
100
|
-
<xsl:apply-templates />
|
101
|
-
</xsl:for-each>
|
102
|
-
|
103
|
-
</xsl:element>
|
104
|
-
</xsl:element>
|
105
|
-
</xsl:template>
|
106
|
-
|
107
|
-
<xsl:template match="para">
|
108
|
-
<xsl:element name="p">
|
109
|
-
<xsl:value-of select="." />
|
110
|
-
</xsl:element>
|
111
|
-
</xsl:template>
|
112
|
-
</xsl:stylesheet>
|
113
|
-
|
114
|
-
We can easily transform the XML with the following ruby code:
|
115
|
-
|
116
|
-
require 'libxslt'
|
117
|
-
|
118
|
-
# Create a new XSL Transform
|
119
|
-
stylesheet_doc = XML::Document.file('files/fuzface.xsl')
|
120
|
-
stylesheet =
|
121
|
-
|
122
|
-
# Transform a xml document
|
123
|
-
xml_doc = XML::Document.file('files/fuzface.xml')
|
124
|
-
result = stylesheet.apply(xml_doc)
|
125
|
-
|
126
|
-
You can then print, save or manipulate the returned document.
|
127
|
-
|
128
|
-
== License
|
129
|
-
|
130
|
-
See LICENSE for license information.
|
131
|
-
|
132
|
-
== DOCUMENTATION
|
133
|
-
|
134
|
-
RDoc comments are included - run 'rake doc' to generate documentation.
|
135
|
-
You can find the latest documentation at:
|
136
|
-
|
137
|
-
* http://libxsl.rubyforge.org/
|
138
|
-
|
139
|
-
== MORE INFORMATION
|
140
|
-
|
141
|
-
For more information please refer to the documentation. If you have any
|
1
|
+
= libxslt-ruby
|
2
|
+
|
3
|
+
== Overview
|
4
|
+
|
5
|
+
The libxslt gem provides Ruby language bindings for GNOME's Libxslt
|
6
|
+
toolkit. It is free software, released under the MIT License.
|
7
|
+
|
8
|
+
|
9
|
+
== Requirements
|
10
|
+
|
11
|
+
libxslt-ruby requires Ruby 1.8.4 or higher. It is dependent on
|
12
|
+
the following libraries to function properly:
|
13
|
+
|
14
|
+
* libm (math routines: very standard)
|
15
|
+
* libz (zlib)
|
16
|
+
* libiconv
|
17
|
+
* libxml2
|
18
|
+
* libxslt
|
19
|
+
* libxml-ruby bindings
|
20
|
+
|
21
|
+
If you are running Linux or Unix you'll need a C compiler so the extension
|
22
|
+
can be compiled when it is installed. If you are running Windows, then install the Windows specific RubyGem which
|
23
|
+
includes an already built extension.
|
24
|
+
|
25
|
+
!!!NOTE!!! The libxml-ruby and libxslt-ruby bindings must absolutely, positively,
|
26
|
+
without a doubt share the same libxml2 library. This is because libxslt modifies
|
27
|
+
XML documents created by libxml2. If there are two copies of libxml2 on your
|
28
|
+
system, then when XML documents allocated in copy #1 are manipulated by copy #2,
|
29
|
+
a segmentation fault will occur. So make sure that your system has only one copy of libxml2
|
30
|
+
installed.
|
31
|
+
|
32
|
+
|
33
|
+
== INSTALLATION
|
34
|
+
|
35
|
+
The easiest way to install libxslt-ruby is via Ruby Gems. To install:
|
36
|
+
|
37
|
+
<tt>gem install libxslt-ruby</tt>
|
38
|
+
|
39
|
+
If you are running Windows, make sure to install the Win32 RubyGem which
|
40
|
+
includes an already built binary file. The binary is built against
|
41
|
+
libxml2 version 2.6.32, iconv version 1.12 and libxslt version 1.1.24.
|
42
|
+
Binaries for libxml2 and iconv are provided in the libxml-ruby bindings,
|
43
|
+
while a binary for libxslt is provided in the libxslt-ruby bindings.
|
44
|
+
These binaries should be put either in the libxslt/lib directory
|
45
|
+
or on the Windows path.
|
46
|
+
|
47
|
+
The Windows binaries are biult with MingW. The gem also includes
|
48
|
+
a Microsoft VC++ 2005 solution. If you wish to run a debug version
|
49
|
+
of libxml-ruby on Windows, then it is highly recommended
|
50
|
+
you use VC++.
|
51
|
+
|
52
|
+
|
53
|
+
== USAGE
|
54
|
+
|
55
|
+
Given an XML file like:
|
56
|
+
|
57
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
58
|
+
<?xml-stylesheet href="fuzface.xsl" type="text/xsl"?>
|
59
|
+
|
60
|
+
<commentary>
|
61
|
+
<meta>
|
62
|
+
<author>
|
63
|
+
<first_name>Sean</first_name>
|
64
|
+
<last_name>Chittenden</last_name>
|
65
|
+
<email>sean@chittenden.org</email>
|
66
|
+
</author>
|
67
|
+
<version>$Version$</version>
|
68
|
+
<date>$Date: 2008-07-14 21:23:19 -0600 (Mon, 14 Jul 2008) $</date>
|
69
|
+
<id>$Id: README 94 2008-07-15 03:23:19Z cfis $</id> <title>Fuzface...</title>
|
70
|
+
<subtitle>The Internet's a big place and here's some proof...</subtitle>
|
71
|
+
</meta>
|
72
|
+
|
73
|
+
<body>
|
74
|
+
<para>
|
75
|
+
I think it's a tragedy that I'm going to start off my new
|
76
|
+
commentary by talking about facial hair and the Internet.
|
77
|
+
Something about that just screams pathetic, but whatever: it's
|
78
|
+
humor and that's life.
|
79
|
+
</para>
|
80
|
+
</body>
|
81
|
+
</commentary>
|
82
|
+
|
83
|
+
And an XSLT file like this:
|
84
|
+
|
85
|
+
<?xml version="1.0" ?>
|
86
|
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
87
|
+
<xsl:template match="/">
|
88
|
+
<xsl:element name="html">
|
89
|
+
<xsl:element name="head">
|
90
|
+
<xsl:element name="title">Ramblings - <xsl:value-of select="commentary/meta/title" /> - <xsl:value-of select="commentary/meta/subtitle" /></xsl:element>
|
91
|
+
</xsl:element>
|
92
|
+
|
93
|
+
<xsl:element name="body">
|
94
|
+
<xsl:element name="h1"><xsl:value-of select="commentary/meta/title" /></xsl:element>
|
95
|
+
<xsl:element name="h3"><xsl:value-of select="commentary/meta/subtitle" /></xsl:element>
|
96
|
+
By: <xsl:value-of select="commentary/meta/author/first_name" /> <xsl:value-of select="commentary/meta/author/last_name" /><xsl:element name="br" />
|
97
|
+
Date: <xsl:value-of select="commentary/meta/date" /><xsl:element name="br" />
|
98
|
+
|
99
|
+
<xsl:for-each select="./commentary/body">
|
100
|
+
<xsl:apply-templates />
|
101
|
+
</xsl:for-each>
|
102
|
+
|
103
|
+
</xsl:element>
|
104
|
+
</xsl:element>
|
105
|
+
</xsl:template>
|
106
|
+
|
107
|
+
<xsl:template match="para">
|
108
|
+
<xsl:element name="p">
|
109
|
+
<xsl:value-of select="." />
|
110
|
+
</xsl:element>
|
111
|
+
</xsl:template>
|
112
|
+
</xsl:stylesheet>
|
113
|
+
|
114
|
+
We can easily transform the XML with the following ruby code:
|
115
|
+
|
116
|
+
require 'libxslt'
|
117
|
+
|
118
|
+
# Create a new XSL Transform
|
119
|
+
stylesheet_doc = XML::Document.file('files/fuzface.xsl')
|
120
|
+
stylesheet = LibXSLT::Stylesheet.new(stylesheet_doc)
|
121
|
+
|
122
|
+
# Transform a xml document
|
123
|
+
xml_doc = XML::Document.file('files/fuzface.xml')
|
124
|
+
result = stylesheet.apply(xml_doc)
|
125
|
+
|
126
|
+
You can then print, save or manipulate the returned document.
|
127
|
+
|
128
|
+
== License
|
129
|
+
|
130
|
+
See LICENSE for license information.
|
131
|
+
|
132
|
+
== DOCUMENTATION
|
133
|
+
|
134
|
+
RDoc comments are included - run 'rake doc' to generate documentation.
|
135
|
+
You can find the latest documentation at:
|
136
|
+
|
137
|
+
* http://libxsl.rubyforge.org/
|
138
|
+
|
139
|
+
== MORE INFORMATION
|
140
|
+
|
141
|
+
For more information please refer to the documentation. If you have any
|
142
142
|
questions, please send email to libxml-devel@rubyforge.org.
|
@@ -0,0 +1,120 @@
|
|
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</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</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
|
+
<a href="../files/ext/libxslt/ruby_xslt_stylesheet_c.html">
|
63
|
+
ext/libxslt/ruby_xslt_stylesheet.c
|
64
|
+
</a>
|
65
|
+
<br />
|
66
|
+
<a href="../files/ext/libxslt/ruby_xslt_transform_context_c.html">
|
67
|
+
ext/libxslt/ruby_xslt_transform_context.c
|
68
|
+
</a>
|
69
|
+
<br />
|
70
|
+
</td>
|
71
|
+
</tr>
|
72
|
+
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
|
91
|
+
<!-- if includes -->
|
92
|
+
|
93
|
+
<div id="section">
|
94
|
+
|
95
|
+
<div id="class-list">
|
96
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
97
|
+
|
98
|
+
Module <a href="LibXSLT/XSLT.html" class="link">LibXSLT::XSLT</a><br />
|
99
|
+
Class <a href="LibXSLT/XSLTError.html" class="link">LibXSLT::XSLTError</a><br />
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
<!-- if method_list -->
|
110
|
+
|
111
|
+
|
112
|
+
</div>
|
113
|
+
|
114
|
+
|
115
|
+
<div id="validator-badges">
|
116
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
117
|
+
</div>
|
118
|
+
|
119
|
+
</body>
|
120
|
+
</html>
|
@@ -0,0 +1,207 @@
|
|
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
|
+
The libxslt gem provides Ruby language bindings for GNOME’s Libxslt
|
78
|
+
toolkit. It is free software, released under the MIT License.
|
79
|
+
</p>
|
80
|
+
<p>
|
81
|
+
Using the bindings is straightforward:
|
82
|
+
</p>
|
83
|
+
<pre>
|
84
|
+
stylesheet_doc = XML::Document.file('stylesheet_file')
|
85
|
+
stylesheet = XSLT::Stylesheet.new(stylesheet_doc)
|
86
|
+
|
87
|
+
xml_doc = XML::Document.file('xml_file')
|
88
|
+
result = stylesheet.apply(xml_doc)
|
89
|
+
</pre>
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
|
94
|
+
</div>
|
95
|
+
|
96
|
+
|
97
|
+
</div>
|
98
|
+
|
99
|
+
|
100
|
+
<!-- if includes -->
|
101
|
+
|
102
|
+
<div id="section">
|
103
|
+
|
104
|
+
<div id="class-list">
|
105
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
106
|
+
|
107
|
+
Class <a href="XSLT/Stylesheet.html" class="link">LibXSLT::XSLT::Stylesheet</a><br />
|
108
|
+
Class <a href="XSLT/TransformContext.html" class="link">LibXSLT::XSLT::TransformContext</a><br />
|
109
|
+
|
110
|
+
</div>
|
111
|
+
|
112
|
+
<div id="constants-list">
|
113
|
+
<h3 class="section-bar">Constants</h3>
|
114
|
+
|
115
|
+
<div class="name-list">
|
116
|
+
<table summary="Constants">
|
117
|
+
<tr class="top-aligned-row context-row">
|
118
|
+
<td class="context-item-name">MAX_DEPTH</td>
|
119
|
+
<td>=</td>
|
120
|
+
<td class="context-item-value">INT2NUM(xsltMaxDepth)</td>
|
121
|
+
</tr>
|
122
|
+
<tr class="top-aligned-row context-row">
|
123
|
+
<td class="context-item-name">MAX_SORT</td>
|
124
|
+
<td>=</td>
|
125
|
+
<td class="context-item-value">INT2NUM(XSLT_MAX_SORT)</td>
|
126
|
+
</tr>
|
127
|
+
<tr class="top-aligned-row context-row">
|
128
|
+
<td class="context-item-name">ENGINE_VERSION</td>
|
129
|
+
<td>=</td>
|
130
|
+
<td class="context-item-value">rb_str_new2(xsltEngineVersion)</td>
|
131
|
+
</tr>
|
132
|
+
<tr class="top-aligned-row context-row">
|
133
|
+
<td class="context-item-name">LIBXSLT_VERSION</td>
|
134
|
+
<td>=</td>
|
135
|
+
<td class="context-item-value">INT2NUM(xsltLibxsltVersion)</td>
|
136
|
+
</tr>
|
137
|
+
<tr class="top-aligned-row context-row">
|
138
|
+
<td class="context-item-name">LIBXML_VERSION</td>
|
139
|
+
<td>=</td>
|
140
|
+
<td class="context-item-value">INT2NUM(xsltLibxmlVersion)</td>
|
141
|
+
</tr>
|
142
|
+
<tr class="top-aligned-row context-row">
|
143
|
+
<td class="context-item-name">XSLT_NAMESPACE</td>
|
144
|
+
<td>=</td>
|
145
|
+
<td class="context-item-value">rb_str_new2((const char*)XSLT_NAMESPACE)</td>
|
146
|
+
</tr>
|
147
|
+
<tr class="top-aligned-row context-row">
|
148
|
+
<td class="context-item-name">DEFAULT_VENDOR</td>
|
149
|
+
<td>=</td>
|
150
|
+
<td class="context-item-value">rb_str_new2(XSLT_DEFAULT_VENDOR)</td>
|
151
|
+
</tr>
|
152
|
+
<tr class="top-aligned-row context-row">
|
153
|
+
<td class="context-item-name">DEFAULT_VERSION</td>
|
154
|
+
<td>=</td>
|
155
|
+
<td class="context-item-value">rb_str_new2(XSLT_DEFAULT_VERSION)</td>
|
156
|
+
</tr>
|
157
|
+
<tr class="top-aligned-row context-row">
|
158
|
+
<td class="context-item-name">DEFAULT_URL</td>
|
159
|
+
<td>=</td>
|
160
|
+
<td class="context-item-value">rb_str_new2(XSLT_DEFAULT_URL)</td>
|
161
|
+
</tr>
|
162
|
+
<tr class="top-aligned-row context-row">
|
163
|
+
<td class="context-item-name">NAMESPACE_LIBXSLT</td>
|
164
|
+
<td>=</td>
|
165
|
+
<td class="context-item-value">rb_str_new2((const char*)XSLT_LIBXSLT_NAMESPACE)</td>
|
166
|
+
</tr>
|
167
|
+
<tr class="top-aligned-row context-row">
|
168
|
+
<td class="context-item-name">NAMESPACE_NORM_SAXON</td>
|
169
|
+
<td>=</td>
|
170
|
+
<td class="context-item-value">rb_str_new2((const char*)XSLT_NORM_SAXON_NAMESPACE)</td>
|
171
|
+
</tr>
|
172
|
+
<tr class="top-aligned-row context-row">
|
173
|
+
<td class="context-item-name">NAMESPACE_SAXON</td>
|
174
|
+
<td>=</td>
|
175
|
+
<td class="context-item-value">rb_str_new2((const char*)XSLT_SAXON_NAMESPACE)</td>
|
176
|
+
</tr>
|
177
|
+
<tr class="top-aligned-row context-row">
|
178
|
+
<td class="context-item-name">NAMESPACE_XT</td>
|
179
|
+
<td>=</td>
|
180
|
+
<td class="context-item-value">rb_str_new2((const char*)XSLT_XT_NAMESPACE)</td>
|
181
|
+
</tr>
|
182
|
+
<tr class="top-aligned-row context-row">
|
183
|
+
<td class="context-item-name">NAMESPACE_XALAN</td>
|
184
|
+
<td>=</td>
|
185
|
+
<td class="context-item-value">rb_str_new2((const char*)XSLT_XALAN_NAMESPACE)</td>
|
186
|
+
</tr>
|
187
|
+
</table>
|
188
|
+
</div>
|
189
|
+
</div>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
<!-- if method_list -->
|
197
|
+
|
198
|
+
|
199
|
+
</div>
|
200
|
+
|
201
|
+
|
202
|
+
<div id="validator-badges">
|
203
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
204
|
+
</div>
|
205
|
+
|
206
|
+
</body>
|
207
|
+
</html>
|