libxml-ruby 0.9.3 → 0.9.4
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/CHANGES +9 -0
- data/README +61 -128
- data/doc/css/normal.css +182 -0
- data/doc/img/raze-tiny.png +0 -0
- data/doc/img/red-cube.jpg +0 -0
- data/doc/img/xml-ruby.png +0 -0
- data/doc/index.xml +43 -0
- data/doc/install.xml +77 -0
- data/doc/layout.rhtml +38 -0
- data/doc/layout.xsl +67 -0
- data/doc/license.xml +32 -0
- data/doc/log/changelog.xml +1324 -0
- data/doc/log/changelog.xsl +42 -0
- data/ext/libxml/ruby_xml_document.c +1084 -1057
- data/ext/libxml/ruby_xml_html_parser.c +37 -40
- data/ext/libxml/ruby_xml_input.c +17 -40
- data/ext/libxml/ruby_xml_input.h +2 -2
- data/ext/libxml/ruby_xml_parser.c +151 -151
- data/ext/libxml/ruby_xml_reader.c +910 -893
- data/ext/libxml/ruby_xml_sax_parser.c +174 -174
- data/ext/libxml/ruby_xml_sax_parser.h +12 -12
- data/ext/libxml/ruby_xml_xpointer.h +13 -25
- data/ext/libxml/version.h +2 -2
- data/ext/vc/libxml_ruby.vcproj +1 -1
- data/test/model/ruby-lang.html +238 -0
- data/test/tc_html_parser.rb +2 -12
- data/test/tc_reader.rb +87 -87
- metadata +17 -3
- data/test/test.rb +0 -8
@@ -1,174 +1,174 @@
|
|
1
|
-
/* $Id: ruby_xml_sax_parser.c
|
2
|
-
|
3
|
-
/* Please see the LICENSE file for copyright and distribution information */
|
4
|
-
|
5
|
-
#include "ruby_libxml.h"
|
6
|
-
#include "ruby_xml_sax_parser.h"
|
7
|
-
|
8
|
-
/*
|
9
|
-
* Document-class: LibXML::XML::SaxParser
|
10
|
-
*
|
11
|
-
* XML::SaxParser provides a callback based API for parsing documents,
|
12
|
-
* in contrast to XML::Parser's tree based API and XML::Reader's stream
|
13
|
-
* based API.
|
14
|
-
*
|
15
|
-
* Note that the XML::SaxParser API is fairly complex, not well standardized,
|
16
|
-
* and does not directly support validation making entity, namespace and
|
17
|
-
* base processing relatively hard.
|
18
|
-
*
|
19
|
-
* To use the XML::SaxParser, register a callback class via the
|
20
|
-
* XML::SaxParser#callbacks=. It is easiest to include the
|
21
|
-
* XML::SaxParser::Callbacks module in your class and override
|
22
|
-
* the methods as needed.
|
23
|
-
*
|
24
|
-
* Basic example:
|
25
|
-
*
|
26
|
-
* class MyCallbacks
|
27
|
-
* include XML::SaxParser::Callbacks
|
28
|
-
* def on_start_element(element, attributes)
|
29
|
-
* puts #Element started: #{element}"
|
30
|
-
* end
|
31
|
-
* end
|
32
|
-
*
|
33
|
-
* parser = XML::SaxParser.new
|
34
|
-
* parser.callbacks = MyCallbacks.new
|
35
|
-
* parser.parse
|
36
|
-
*/
|
37
|
-
|
38
|
-
VALUE cXMLSaxParser;
|
39
|
-
VALUE mXMLSaxParserCallbacks;
|
40
|
-
|
41
|
-
static ID INPUT_ATTR;
|
42
|
-
static ID CALLBACKS_ATTR;
|
43
|
-
|
44
|
-
VALUE cbidOnInternalSubset;
|
45
|
-
VALUE cbidOnIsStandalone;
|
46
|
-
VALUE cbidOnHasInternalSubset;
|
47
|
-
VALUE cbidOnHasExternalSubset;
|
48
|
-
VALUE cbidOnStartDocument;
|
49
|
-
VALUE cbidOnEndDocument;
|
50
|
-
VALUE cbidOnStartElement;
|
51
|
-
VALUE cbidOnEndElement;
|
52
|
-
VALUE cbidOnReference;
|
53
|
-
VALUE cbidOnCharacters;
|
54
|
-
VALUE cbidOnProcessingInstruction;
|
55
|
-
VALUE cbidOnComment;
|
56
|
-
VALUE cbidOnXmlParserWarning;
|
57
|
-
VALUE cbidOnXmlParserError;
|
58
|
-
VALUE cbidOnXmlParserFatalError;
|
59
|
-
VALUE cbidOnCdataBlock;
|
60
|
-
VALUE cbidOnExternalSubset;
|
61
|
-
|
62
|
-
#include "sax_parser_callbacks.inc"
|
63
|
-
|
64
|
-
/*
|
65
|
-
* call-seq:
|
66
|
-
* sax_parser.initialize -> sax_parser
|
67
|
-
*
|
68
|
-
* Initiliazes instance of parser.
|
69
|
-
*/
|
70
|
-
static VALUE
|
71
|
-
rxml_sax_parser_initialize(VALUE self) {
|
72
|
-
VALUE input = rb_class_new_instance(0, NULL, cXMLInput);
|
73
|
-
rb_iv_set(self, "@input", input);
|
74
|
-
return self;
|
75
|
-
}
|
76
|
-
|
77
|
-
|
78
|
-
/* Parsing data sources */
|
79
|
-
static int
|
80
|
-
rxml_sax_parser_parse_file(VALUE self, VALUE input) {
|
81
|
-
VALUE file = rb_ivar_get(input, FILE_ATTR);
|
82
|
-
return xmlSAXUserParseFile(&rxml_sax_hander_struct, self, StringValuePtr(file));
|
83
|
-
}
|
84
|
-
|
85
|
-
static int
|
86
|
-
rxml_sax_parser_parse_string(VALUE self, VALUE input) {
|
87
|
-
VALUE str = rb_ivar_get(input, STRING_ATTR);
|
88
|
-
return xmlSAXUserParseMemory(&rxml_sax_hander_struct, self, StringValuePtr(str), RSTRING_LEN(str));
|
89
|
-
}
|
90
|
-
|
91
|
-
static int
|
92
|
-
rxml_sax_parser_parse_io(VALUE self, VALUE input) {
|
93
|
-
VALUE io = rb_ivar_get(input, IO_ATTR);
|
94
|
-
VALUE encoding = rb_ivar_get(input, ENCODING_ATTR);
|
95
|
-
xmlCharEncoding xmlEncoding = NUM2INT(encoding);
|
96
|
-
xmlParserCtxtPtr ctxt = xmlCreateIOParserCtxt(&rxml_sax_hander_struct, self,
|
97
|
-
(xmlInputReadCallback) rxml_read_callback,
|
98
|
-
NULL, io, xmlEncoding);
|
99
|
-
return xmlParseDocument(ctxt);
|
100
|
-
}
|
101
|
-
|
102
|
-
|
103
|
-
/*
|
104
|
-
* call-seq:
|
105
|
-
* parser.parse -> (true|false)
|
106
|
-
*
|
107
|
-
* Parse the input XML, generating callbacks to the object
|
108
|
-
* registered via the +callbacks+ attributesibute.
|
109
|
-
*/
|
110
|
-
static VALUE
|
111
|
-
rxml_sax_parser_parse(VALUE self) {
|
112
|
-
int status;
|
113
|
-
VALUE input = rb_ivar_get(self, INPUT_ATTR);
|
114
|
-
|
115
|
-
if (rb_ivar_get(input, FILE_ATTR) != Qnil)
|
116
|
-
status = rxml_sax_parser_parse_file(self, input);
|
117
|
-
else if (rb_ivar_get(input, STRING_ATTR) != Qnil)
|
118
|
-
status = rxml_sax_parser_parse_string(self, input);
|
119
|
-
else if (rb_ivar_get(input, IO_ATTR) != Qnil)
|
120
|
-
status = rxml_sax_parser_parse_io(self, input);
|
121
|
-
else
|
122
|
-
rb_raise(rb_eArgError, "You must specify a parser data source");
|
123
|
-
|
124
|
-
if (status)
|
125
|
-
{
|
126
|
-
rxml_raise(&xmlLastError);
|
127
|
-
return Qfalse;
|
128
|
-
}
|
129
|
-
else
|
130
|
-
{
|
131
|
-
return(Qtrue);
|
132
|
-
}
|
133
|
-
}
|
134
|
-
|
135
|
-
// Rdoc needs to know
|
136
|
-
#ifdef RDOC_NEVER_DEFINED
|
137
|
-
mLibXML = rb_define_module("LibXML");
|
138
|
-
mXML = rb_define_module_under(mLibXML, "XML");
|
139
|
-
#endif
|
140
|
-
|
141
|
-
void
|
142
|
-
ruby_init_xml_sax_parser(void) {
|
143
|
-
/* SaxParser */
|
144
|
-
cXMLSaxParser = rb_define_class_under(mXML, "SaxParser", rb_cObject);
|
145
|
-
|
146
|
-
/* Atributes */
|
147
|
-
CALLBACKS_ATTR = rb_intern("@callbacks");
|
148
|
-
INPUT_ATTR = rb_intern("@input");
|
149
|
-
rb_define_attr(cXMLSaxParser, "callbacks", 1, 1);
|
150
|
-
rb_define_attr(cXMLSaxParser, "input", 1, 0);
|
151
|
-
|
152
|
-
/* Instance Methods */
|
153
|
-
rb_define_method(cXMLSaxParser, "initialize", rxml_sax_parser_initialize, 0);
|
154
|
-
rb_define_method(cXMLSaxParser, "parse", rxml_sax_parser_parse, 0);
|
155
|
-
|
156
|
-
/* SaxCallbacks */
|
157
|
-
cbidOnInternalSubset = rb_intern("on_internal_subset");
|
158
|
-
cbidOnIsStandalone = rb_intern("on_is_standalone");
|
159
|
-
cbidOnHasInternalSubset = rb_intern("on_has_internal_subset");
|
160
|
-
cbidOnHasExternalSubset = rb_intern("on_has_external_subset");
|
161
|
-
cbidOnStartDocument = rb_intern("on_start_document");
|
162
|
-
cbidOnEndDocument = rb_intern("on_end_document");
|
163
|
-
cbidOnStartElement = rb_intern("on_start_element");
|
164
|
-
cbidOnEndElement = rb_intern("on_end_element");
|
165
|
-
cbidOnReference = rb_intern("on_reference");
|
166
|
-
cbidOnCharacters = rb_intern("on_characters");
|
167
|
-
cbidOnProcessingInstruction = rb_intern("on_processing_instruction");
|
168
|
-
cbidOnComment = rb_intern("on_comment");
|
169
|
-
cbidOnXmlParserWarning = rb_intern("on_parser_warning");
|
170
|
-
cbidOnXmlParserError = rb_intern("on_parser_error");
|
171
|
-
cbidOnXmlParserFatalError = rb_intern("on_parser_fatal_error");
|
172
|
-
cbidOnCdataBlock = rb_intern("on_cdata_block");
|
173
|
-
cbidOnExternalSubset = rb_intern("on_external_subset");
|
174
|
-
}
|
1
|
+
/* $Id: ruby_xml_sax_parser.c 630 2008-11-24 06:53:01Z cfis $ */
|
2
|
+
|
3
|
+
/* Please see the LICENSE file for copyright and distribution information */
|
4
|
+
|
5
|
+
#include "ruby_libxml.h"
|
6
|
+
#include "ruby_xml_sax_parser.h"
|
7
|
+
|
8
|
+
/*
|
9
|
+
* Document-class: LibXML::XML::SaxParser
|
10
|
+
*
|
11
|
+
* XML::SaxParser provides a callback based API for parsing documents,
|
12
|
+
* in contrast to XML::Parser's tree based API and XML::Reader's stream
|
13
|
+
* based API.
|
14
|
+
*
|
15
|
+
* Note that the XML::SaxParser API is fairly complex, not well standardized,
|
16
|
+
* and does not directly support validation making entity, namespace and
|
17
|
+
* base processing relatively hard.
|
18
|
+
*
|
19
|
+
* To use the XML::SaxParser, register a callback class via the
|
20
|
+
* XML::SaxParser#callbacks=. It is easiest to include the
|
21
|
+
* XML::SaxParser::Callbacks module in your class and override
|
22
|
+
* the methods as needed.
|
23
|
+
*
|
24
|
+
* Basic example:
|
25
|
+
*
|
26
|
+
* class MyCallbacks
|
27
|
+
* include XML::SaxParser::Callbacks
|
28
|
+
* def on_start_element(element, attributes)
|
29
|
+
* puts #Element started: #{element}"
|
30
|
+
* end
|
31
|
+
* end
|
32
|
+
*
|
33
|
+
* parser = XML::SaxParser.new
|
34
|
+
* parser.callbacks = MyCallbacks.new
|
35
|
+
* parser.parse
|
36
|
+
*/
|
37
|
+
|
38
|
+
VALUE cXMLSaxParser;
|
39
|
+
VALUE mXMLSaxParserCallbacks;
|
40
|
+
|
41
|
+
static ID INPUT_ATTR;
|
42
|
+
static ID CALLBACKS_ATTR;
|
43
|
+
|
44
|
+
VALUE cbidOnInternalSubset;
|
45
|
+
VALUE cbidOnIsStandalone;
|
46
|
+
VALUE cbidOnHasInternalSubset;
|
47
|
+
VALUE cbidOnHasExternalSubset;
|
48
|
+
VALUE cbidOnStartDocument;
|
49
|
+
VALUE cbidOnEndDocument;
|
50
|
+
VALUE cbidOnStartElement;
|
51
|
+
VALUE cbidOnEndElement;
|
52
|
+
VALUE cbidOnReference;
|
53
|
+
VALUE cbidOnCharacters;
|
54
|
+
VALUE cbidOnProcessingInstruction;
|
55
|
+
VALUE cbidOnComment;
|
56
|
+
VALUE cbidOnXmlParserWarning;
|
57
|
+
VALUE cbidOnXmlParserError;
|
58
|
+
VALUE cbidOnXmlParserFatalError;
|
59
|
+
VALUE cbidOnCdataBlock;
|
60
|
+
VALUE cbidOnExternalSubset;
|
61
|
+
|
62
|
+
#include "sax_parser_callbacks.inc"
|
63
|
+
|
64
|
+
/*
|
65
|
+
* call-seq:
|
66
|
+
* sax_parser.initialize -> sax_parser
|
67
|
+
*
|
68
|
+
* Initiliazes instance of parser.
|
69
|
+
*/
|
70
|
+
static VALUE
|
71
|
+
rxml_sax_parser_initialize(VALUE self) {
|
72
|
+
VALUE input = rb_class_new_instance(0, NULL, cXMLInput);
|
73
|
+
rb_iv_set(self, "@input", input);
|
74
|
+
return self;
|
75
|
+
}
|
76
|
+
|
77
|
+
|
78
|
+
/* Parsing data sources */
|
79
|
+
static int
|
80
|
+
rxml_sax_parser_parse_file(VALUE self, VALUE input) {
|
81
|
+
VALUE file = rb_ivar_get(input, FILE_ATTR);
|
82
|
+
return xmlSAXUserParseFile((xmlSAXHandlerPtr)&rxml_sax_hander_struct, (void *)self, StringValuePtr(file));
|
83
|
+
}
|
84
|
+
|
85
|
+
static int
|
86
|
+
rxml_sax_parser_parse_string(VALUE self, VALUE input) {
|
87
|
+
VALUE str = rb_ivar_get(input, STRING_ATTR);
|
88
|
+
return xmlSAXUserParseMemory((xmlSAXHandlerPtr)&rxml_sax_hander_struct, (void *)self, StringValuePtr(str), RSTRING_LEN(str));
|
89
|
+
}
|
90
|
+
|
91
|
+
static int
|
92
|
+
rxml_sax_parser_parse_io(VALUE self, VALUE input) {
|
93
|
+
VALUE io = rb_ivar_get(input, IO_ATTR);
|
94
|
+
VALUE encoding = rb_ivar_get(input, ENCODING_ATTR);
|
95
|
+
xmlCharEncoding xmlEncoding = NUM2INT(encoding);
|
96
|
+
xmlParserCtxtPtr ctxt = xmlCreateIOParserCtxt((xmlSAXHandlerPtr)&rxml_sax_hander_struct, (void *)self,
|
97
|
+
(xmlInputReadCallback) rxml_read_callback,
|
98
|
+
NULL, (void *)io, xmlEncoding);
|
99
|
+
return xmlParseDocument(ctxt);
|
100
|
+
}
|
101
|
+
|
102
|
+
|
103
|
+
/*
|
104
|
+
* call-seq:
|
105
|
+
* parser.parse -> (true|false)
|
106
|
+
*
|
107
|
+
* Parse the input XML, generating callbacks to the object
|
108
|
+
* registered via the +callbacks+ attributesibute.
|
109
|
+
*/
|
110
|
+
static VALUE
|
111
|
+
rxml_sax_parser_parse(VALUE self) {
|
112
|
+
int status;
|
113
|
+
VALUE input = rb_ivar_get(self, INPUT_ATTR);
|
114
|
+
|
115
|
+
if (rb_ivar_get(input, FILE_ATTR) != Qnil)
|
116
|
+
status = rxml_sax_parser_parse_file(self, input);
|
117
|
+
else if (rb_ivar_get(input, STRING_ATTR) != Qnil)
|
118
|
+
status = rxml_sax_parser_parse_string(self, input);
|
119
|
+
else if (rb_ivar_get(input, IO_ATTR) != Qnil)
|
120
|
+
status = rxml_sax_parser_parse_io(self, input);
|
121
|
+
else
|
122
|
+
rb_raise(rb_eArgError, "You must specify a parser data source");
|
123
|
+
|
124
|
+
if (status)
|
125
|
+
{
|
126
|
+
rxml_raise(&xmlLastError);
|
127
|
+
return Qfalse;
|
128
|
+
}
|
129
|
+
else
|
130
|
+
{
|
131
|
+
return(Qtrue);
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
// Rdoc needs to know
|
136
|
+
#ifdef RDOC_NEVER_DEFINED
|
137
|
+
mLibXML = rb_define_module("LibXML");
|
138
|
+
mXML = rb_define_module_under(mLibXML, "XML");
|
139
|
+
#endif
|
140
|
+
|
141
|
+
void
|
142
|
+
ruby_init_xml_sax_parser(void) {
|
143
|
+
/* SaxParser */
|
144
|
+
cXMLSaxParser = rb_define_class_under(mXML, "SaxParser", rb_cObject);
|
145
|
+
|
146
|
+
/* Atributes */
|
147
|
+
CALLBACKS_ATTR = rb_intern("@callbacks");
|
148
|
+
INPUT_ATTR = rb_intern("@input");
|
149
|
+
rb_define_attr(cXMLSaxParser, "callbacks", 1, 1);
|
150
|
+
rb_define_attr(cXMLSaxParser, "input", 1, 0);
|
151
|
+
|
152
|
+
/* Instance Methods */
|
153
|
+
rb_define_method(cXMLSaxParser, "initialize", rxml_sax_parser_initialize, 0);
|
154
|
+
rb_define_method(cXMLSaxParser, "parse", rxml_sax_parser_parse, 0);
|
155
|
+
|
156
|
+
/* SaxCallbacks */
|
157
|
+
cbidOnInternalSubset = rb_intern("on_internal_subset");
|
158
|
+
cbidOnIsStandalone = rb_intern("on_is_standalone");
|
159
|
+
cbidOnHasInternalSubset = rb_intern("on_has_internal_subset");
|
160
|
+
cbidOnHasExternalSubset = rb_intern("on_has_external_subset");
|
161
|
+
cbidOnStartDocument = rb_intern("on_start_document");
|
162
|
+
cbidOnEndDocument = rb_intern("on_end_document");
|
163
|
+
cbidOnStartElement = rb_intern("on_start_element");
|
164
|
+
cbidOnEndElement = rb_intern("on_end_element");
|
165
|
+
cbidOnReference = rb_intern("on_reference");
|
166
|
+
cbidOnCharacters = rb_intern("on_characters");
|
167
|
+
cbidOnProcessingInstruction = rb_intern("on_processing_instruction");
|
168
|
+
cbidOnComment = rb_intern("on_comment");
|
169
|
+
cbidOnXmlParserWarning = rb_intern("on_parser_warning");
|
170
|
+
cbidOnXmlParserError = rb_intern("on_parser_error");
|
171
|
+
cbidOnXmlParserFatalError = rb_intern("on_parser_fatal_error");
|
172
|
+
cbidOnCdataBlock = rb_intern("on_cdata_block");
|
173
|
+
cbidOnExternalSubset = rb_intern("on_external_subset");
|
174
|
+
}
|
@@ -1,12 +1,12 @@
|
|
1
|
-
/* $Id: ruby_xml_sax_parser.h 616 2008-11-22 09:25:12Z cfis $ */
|
2
|
-
|
3
|
-
/* Please see the LICENSE file for copyright and distribution information */
|
4
|
-
|
5
|
-
#ifndef __rxml_SAX_PARSER__
|
6
|
-
#define __rxml_SAX_PARSER__
|
7
|
-
|
8
|
-
extern VALUE cXMLSaxParser;
|
9
|
-
|
10
|
-
void ruby_init_xml_sax_parser(void);
|
11
|
-
|
12
|
-
#endif
|
1
|
+
/* $Id: ruby_xml_sax_parser.h 616 2008-11-22 09:25:12Z cfis $ */
|
2
|
+
|
3
|
+
/* Please see the LICENSE file for copyright and distribution information */
|
4
|
+
|
5
|
+
#ifndef __rxml_SAX_PARSER__
|
6
|
+
#define __rxml_SAX_PARSER__
|
7
|
+
|
8
|
+
extern VALUE cXMLSaxParser;
|
9
|
+
|
10
|
+
void ruby_init_xml_sax_parser(void);
|
11
|
+
|
12
|
+
#endif
|
@@ -1,25 +1,13 @@
|
|
1
|
-
/* $Id: ruby_xml_xpointer.h
|
2
|
-
|
3
|
-
/* Please see the LICENSE file for copyright and distribution information */
|
4
|
-
|
5
|
-
#ifndef __rxml_XPOINTER__
|
6
|
-
#define __rxml_XPOINTER__
|
7
|
-
|
8
|
-
extern VALUE cXMLXPointer;
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
/*
|
15
|
-
* This needs to go into a xpointer data struct:
|
16
|
-
*
|
17
|
-
* xmlLocationSetPtr xptr;
|
18
|
-
*
|
19
|
-
* I also need an xpointer data struct type.
|
20
|
-
*/
|
21
|
-
} rxml_xpointer;
|
22
|
-
|
23
|
-
void ruby_init_xml_xpointer(void);
|
24
|
-
|
25
|
-
#endif
|
1
|
+
/* $Id: ruby_xml_xpointer.h 630 2008-11-24 06:53:01Z cfis $ */
|
2
|
+
|
3
|
+
/* Please see the LICENSE file for copyright and distribution information */
|
4
|
+
|
5
|
+
#ifndef __rxml_XPOINTER__
|
6
|
+
#define __rxml_XPOINTER__
|
7
|
+
|
8
|
+
extern VALUE cXMLXPointer;
|
9
|
+
|
10
|
+
void ruby_init_xml_xpointer(void);
|
11
|
+
VALUE rxml_xpointer_point2(VALUE node, VALUE xptr_str);
|
12
|
+
|
13
|
+
#endif
|
data/ext/libxml/version.h
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
/* Don't nuke this block! It is used for automatically updating the
|
2
2
|
* versions below. VERSION = string formatting, VERNUM = numbered
|
3
3
|
* version for inline testing: increment both or none at all.*/
|
4
|
-
#define RUBY_LIBXML_VERSION "0.9.
|
4
|
+
#define RUBY_LIBXML_VERSION "0.9.4"
|
5
5
|
#define RUBY_LIBXML_VERNUM 0
|
6
6
|
#define RUBY_LIBXML_VER_MAJ 0
|
7
7
|
#define RUBY_LIBXML_VER_MIN 9
|
8
|
-
#define RUBY_LIBXML_VER_MIC
|
8
|
+
#define RUBY_LIBXML_VER_MIC 4
|
9
9
|
#define RUBY_LIBXML_VER_PATCH 0
|
data/ext/vc/libxml_ruby.vcproj
CHANGED
@@ -63,7 +63,7 @@
|
|
63
63
|
<Tool
|
64
64
|
Name="VCLinkerTool"
|
65
65
|
AdditionalDependencies="msvcrt-ruby18.lib libxml2.lib"
|
66
|
-
OutputFile="C:\Development\ruby\lib\ruby\gems\1.8\gems\libxml-ruby-0.9.
|
66
|
+
OutputFile="C:\Development\ruby\lib\ruby\gems\1.8\gems\libxml-ruby-0.9.4-x86-mswin32-60\lib\$(ProjectName).so"
|
67
67
|
LinkIncremental="2"
|
68
68
|
AdditionalLibraryDirectories="C:\Development\ruby\lib;C:\Development\msys\local\lib"
|
69
69
|
GenerateDebugInformation="true"
|
@@ -0,0 +1,238 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
4
|
+
<head>
|
5
|
+
<title>Ruby Programming Language</title>
|
6
|
+
<link rel="stylesheet" type="text/css" href="/stylesheets/low.css" />
|
7
|
+
<link rel="stylesheet" type="text/css" href="/stylesheets/screen.css" media="screen" />
|
8
|
+
<link rel="stylesheet" type="text/css" href="/stylesheets/print.css" media="print" />
|
9
|
+
<link title="Low vision" rel="alternate stylesheet" type="text/css" href="/stylesheets/low_vision_screen.css" media="screen" />
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
|
11
|
+
<link href="/en/feeds/news.rss" rel="alternate" title="RSS" type="application/rss+xml" />
|
12
|
+
|
13
|
+
</head>
|
14
|
+
<body id="home-page-layout">
|
15
|
+
<div id="page">
|
16
|
+
<div id="header">
|
17
|
+
<div id="logo"><img src="/images/logo.gif" width="331" height="119" alt="Ruby - A Programmer's Best Friend" title="" /></div>
|
18
|
+
<div class="site-links">
|
19
|
+
<a href="/en/downloads/">Downloads</a><span class="separator"> | </span><a href="/en/documentation/">Documentation</a><span class="separator"> | </span><a href="/en/libraries/">Libraries</a><span class="separator"> | </span><a href="/en/community/">Community</a><span class="separator"> | </span><a href="/en/news/">News</a><span class="separator"> | </span><a href="/en/security/">Security</a><span class="separator"> | </span><a href="/en/about/">About Ruby</a>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<hr class="hidden-modern" />
|
23
|
+
<div id="main-wrapper">
|
24
|
+
<div id="main">
|
25
|
+
<div id="content-wrapper">
|
26
|
+
<div id="head-wrapper-1">
|
27
|
+
<div id="head-wrapper-2">
|
28
|
+
<div id="head">
|
29
|
+
|
30
|
+
<div id="intro">
|
31
|
+
<h1>Ruby is…</h1>
|
32
|
+
<p>A dynamic, open source programming language with a focus on
|
33
|
+
simplicity and productivity. It has an elegant syntax that is
|
34
|
+
natural to read and easy to write.</p>
|
35
|
+
<p><a href="about/">Read More…</a></p>
|
36
|
+
</div>
|
37
|
+
<div id="code">
|
38
|
+
|
39
|
+
<div class="comment"># The Greeter class</div>
|
40
|
+
<div><span class="keyword">class</span> Greeter</div>
|
41
|
+
<div> <span class="keyword">def</span> initialize<span class="op">(</span>name<span class="op">)</span></div>
|
42
|
+
<div> @name <span class="op">=</span> name<span class="op">.</span>capitalize</div>
|
43
|
+
<div> <span class="keyword">end</span></div>
|
44
|
+
<div class="blank-line"> </div>
|
45
|
+
<div> <span class="keyword">def</span> salute</div>
|
46
|
+
<div> puts <span class="string">"Hello #{</span><span class="op">@</span>name<span class="string">}!"</span></div>
|
47
|
+
<div> <span class="keyword">end</span></div>
|
48
|
+
<div><span class="keyword">end</span></div>
|
49
|
+
<div class="blank-line"> </div>
|
50
|
+
<div class="comment"># Create a new object</div>
|
51
|
+
<div>g <span class="op">=</span> Greeter<span class="op">.</span>new<span class="op">(</span><span class="string">"world"</span><span class="op">)</span></div>
|
52
|
+
<div class="blank-line"> </div>
|
53
|
+
<div class="comment"># Output "Hello World!"</div>
|
54
|
+
<div>g<span class="op">.</span>salute</div>
|
55
|
+
|
56
|
+
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
<div id="content">
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
<div class="post">
|
67
|
+
<h3><a href="/en/news/2008/11/10/scotland-on-rails-2009/">Scotland on Rails 2009</a></h3>
|
68
|
+
|
69
|
+
<p><a href="http://scotlandonrails.com">Scotland on Rails</a> is pleased to announce that Conference2009 will be held March 26-28 in Edinburgh, Scotland.</p>
|
70
|
+
|
71
|
+
|
72
|
+
<p>We are now accepting submissions. The closing date for submissions is December 1st 2008, so there’s still time! Please mail your plaintext proposals for 45 minute sessions to <a href="mailto:submissions@scotlandonrails.com">submissions@scotlandonrails.com</a>.</p>
|
73
|
+
|
74
|
+
|
75
|
+
<p>Alternatively, if you are interested in sponsoring the conference, please mail <a href="mailto:sponsorship@scotlandonrails.com">sponsorship@scotlandonrails.com</a> for a prospectus.</p>
|
76
|
+
|
77
|
+
|
78
|
+
<p>Lastly, if you wish to be notified when we open for registration, you can sign up on the site.</p>
|
79
|
+
|
80
|
+
|
81
|
+
<p>Come and enjoy all that Edinburgh has to offer (whisky! castle! volcano! ruby! whisky!) in March. We hope to see you there.</p>
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
<p class="post-info">Posted by James Edward Gray II on 10 Nov 2008</p>
|
86
|
+
</div>
|
87
|
+
|
88
|
+
|
89
|
+
<div class="post">
|
90
|
+
<h3><a href="/en/news/2008/11/08/mountainwest-rubyconf-2009-dates-and-cfp/">MountainWest RubyConf 2009 dates and CFP</a></h3>
|
91
|
+
|
92
|
+
<p><a href="http://mtnwestrubyconf.org">MountainWest RubyConf 2009</a> will be held March 13-14, 2009, in Salt Lake City, Utah, <span class="caps">USA</span>.</p>
|
93
|
+
|
94
|
+
|
95
|
+
<p>Proposals to speak at this regional conference are now being accepted. Please send your proposal to proposals@mtnwestrubyconf.org.</p>
|
96
|
+
|
97
|
+
|
98
|
+
<p>The submission deadline is midnight (MST) on December 31st, 2008.</p>
|
99
|
+
|
100
|
+
|
101
|
+
<p>There are sponsorship opportunities available as well. Please contact sponsorship@mtnwestruby.org if you are interested.</p>
|
102
|
+
|
103
|
+
|
104
|
+
<p>Please see <a href="http://mtnwestrubyconf.org">mtnwestrubyconf.org/</a> for more details as they become available.</p>
|
105
|
+
|
106
|
+
<p><a href="/en/news/2008/11/08/mountainwest-rubyconf-2009-dates-and-cfp/">Continue Reading…</a></p>
|
107
|
+
|
108
|
+
<p class="post-info">Posted by james on 08 Nov 2008</p>
|
109
|
+
</div>
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
<div id="news">
|
114
|
+
<h3><a href="/en/news/">Other News</a></h3>
|
115
|
+
<ul>
|
116
|
+
<li><a href="/en/news/2008/10/28/ruby-1-9-1-preview-1-released/"> Ruby 1.9.1-preview 1 released</a>
|
117
|
+
<span class="post-info">Posted by james on 28 Oct 2008</span></li>
|
118
|
+
<li><a href="/en/news/2008/10/02/rubyconf-2008-is-sold-out/">RubyConf 2008 is Sold-out</a>
|
119
|
+
<span class="post-info">Posted by james on 02 Oct 2008</span></li>
|
120
|
+
<li><a href="/en/news/2008/09/09/voices-that-matter-2008/">Voices That Matter 2008</a>
|
121
|
+
<span class="post-info">Posted by James Edward Gray II on 09 Sep 2008</span></li>
|
122
|
+
</ul>
|
123
|
+
<ul>
|
124
|
+
<li><a href="/en/news/2008/08/23/dos-vulnerability-in-rexml/">DoS vulnerability in REXML</a>
|
125
|
+
<span class="post-info">Posted by Shugo Maeda on 23 Aug 2008</span></li>
|
126
|
+
<li><a href="/en/news/2008/08/11/ruby-1-8-7-p72-and-1-8-6-p287-released/">Ruby 1.8.7-p72 and 1.8.6-p287 released</a>
|
127
|
+
<span class="post-info">Posted by Shugo Maeda on 11 Aug 2008</span></li>
|
128
|
+
<li><a href="/en/news/2008/08/08/multiple-vulnerabilities-in-ruby/">Multiple vulnerabilities in Ruby</a>
|
129
|
+
<span class="post-info">Posted by Shugo Maeda on 08 Aug 2008</span></li>
|
130
|
+
</ul>
|
131
|
+
<p class="more"><a href="/en/news/">More News…</a></p>
|
132
|
+
</div>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
<hr class="hidden-modern" />
|
140
|
+
<div id="sidebar-wrapper">
|
141
|
+
<div id="sidebar">
|
142
|
+
|
143
|
+
<div class="navigation"><a href="/en/downloads/"><img src="/images/download.gif" alt="Download Ruby" title="" /></a></div>
|
144
|
+
|
145
|
+
|
146
|
+
<div class="navigation">
|
147
|
+
<h3><strong>Get Started,</strong> it’s easy!</h3>
|
148
|
+
<ul class="menu">
|
149
|
+
<li><a href="http://tryruby.hobix.com/">Try Ruby! (in your browser)</a></li>
|
150
|
+
|
151
|
+
<li><a href="/en/documentation/quickstart/">Ruby in Twenty Minutes</a></li>
|
152
|
+
<li><a href="/en/documentation/ruby-from-other-languages/">Ruby from Other Languages</a></li>
|
153
|
+
</ul>
|
154
|
+
</div>
|
155
|
+
|
156
|
+
<div class="navigation">
|
157
|
+
<h3><strong>Explore</strong> a new world…</h3>
|
158
|
+
<ul class="menu">
|
159
|
+
<li><a href="/en/documentation/">Documentation</a></li>
|
160
|
+
<li><a href="http://www.amazon.com">Books</a></li>
|
161
|
+
<li><a href="/en/libraries/">Libraries</a></li>
|
162
|
+
<li><a href="/en/documentation/success-stories/">Success Stories</a></li>
|
163
|
+
</ul>
|
164
|
+
</div>
|
165
|
+
|
166
|
+
<div class="navigation">
|
167
|
+
<h3><strong>Participate</strong> in a friendly and growing community.</h3>
|
168
|
+
<ul>
|
169
|
+
<li><a href="/en/community/mailing-lists/">Mailing Lists</a>: Talk about Ruby with programmers from all around the world.</li>
|
170
|
+
<li><a href="/en/community/user-groups/">User Groups</a>: Get in contact with Rubyists in your area.</li>
|
171
|
+
<li><a href="/en/community/weblogs/">Weblogs</a>: Read about what’s happening right now in the Ruby community.</li>
|
172
|
+
<li><a href="/en/community/ruby-core/">Ruby Core</a>: Help polish the rough edges of the latest Ruby.</li>
|
173
|
+
<li><a href="http://redmine.ruby-lang.org/">Issue Tracking</a>: Report or help solve issues in Ruby.</li>
|
174
|
+
</ul>
|
175
|
+
</div>
|
176
|
+
|
177
|
+
|
178
|
+
<h3>Top Ruby Projects</h3>
|
179
|
+
|
180
|
+
<ul>
|
181
|
+
<li><a href="http://rubyforge.org/projects/instantrails/" title="Instant Rails is a one-stop Rails runtime solution containing Ruby, Rails, Apache, and MySQL, all pre-configured and ready to run. No installer, you simply drop it into the directory of your choice and run it. It does not modify your system environment. ">Instant Rails</a></li>
|
182
|
+
|
183
|
+
<li><a href="http://rubyforge.org/projects/ruby/" title="Main Ruby language project for providing a mirror of the Ruby releases, tracking bugs, etc.">Ruby</a></li>
|
184
|
+
|
185
|
+
<li><a href="http://rubyforge.org/projects/nitro/" title="Nitro is an efficient, yet simple engine for developing professional Web Applications using the Ruby language.">Nitro</a></li>
|
186
|
+
|
187
|
+
<li><a href="http://rubyforge.org/projects/activesupport/" title="Utility classes and extension to the standard library that were required by Rails, but found of general use.">Active Support</a></li>
|
188
|
+
|
189
|
+
<li><a href="http://rubyforge.org/projects/typo/" title="Typo is a lean weblogging engine powered by rails. It supports XMLRPC posting, ping/trackback, comments, textile, markdown, categories, all common exports, fulltext search and so on.">typo</a></li>
|
190
|
+
|
191
|
+
</ul>
|
192
|
+
<p class="more"><a href="/en/libraries/top-projects/">More…</a></p>
|
193
|
+
|
194
|
+
|
195
|
+
<h3>Syndicate</h3>
|
196
|
+
<p><a href="/en/feeds/news.rss">Recent News (RSS)</a></p>
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
<hr class="hidden-modern" />
|
200
|
+
<div class="foot">
|
201
|
+
<div class="site-links">
|
202
|
+
<a href="/en/downloads/">Downloads</a><span class="separator"> | </span><a href="/en/documentation/">Documentation</a><span class="separator"> | </span><a href="/en/libraries/">Libraries</a><span class="separator"> | </span><a href="/en/community/">Community</a><span class="separator"> | </span><a href="/en/news/">News</a><span class="separator"> | </span><a href="/en/security/">Security</a><span class="separator"> | </span><a href="/en/about/">About Ruby</a>
|
203
|
+
</div>
|
204
|
+
</div>
|
205
|
+
</div>
|
206
|
+
</div>
|
207
|
+
<div id="search-box">
|
208
|
+
<form id="search-form" action="/en/search/">
|
209
|
+
<table class="fieldset">
|
210
|
+
<tr>
|
211
|
+
<td>
|
212
|
+
<input class="field" type="text" name="q" />
|
213
|
+
</td>
|
214
|
+
<td>
|
215
|
+
<input class="button" type="submit" value="Search" />
|
216
|
+
</td>
|
217
|
+
</tr>
|
218
|
+
</table>
|
219
|
+
</form>
|
220
|
+
</div>
|
221
|
+
<div id="footer">
|
222
|
+
<div class="fine-print">
|
223
|
+
<p>Content available in <a href="/en/">English</a>, <a href="/fr/">French</a>, <a href="/ja/">Japanese</a>, <a href="/ko/">Korean</a>, <a href="/pl/">Polish</a>, <a href="/es/">Spanish</a>, <a href="/pt/">Portuguese</a>, <a href="/zh_CN/">Simplified Chinese</a>, <a href="/zh_TW/">Traditional Chinese</a>, <a href="/id/">Bahasa Indonesia</a>, <a href="/de/">German</a> and <a href="/it/">Italian</a>.</p>
|
224
|
+
<p>This website is made with Ruby and powered by <a href="http://radiantcms.org">Radiant CMS</a>.
|
225
|
+
It is proudly maintained by <a href="http://rubyidentity.org">members of the Ruby community</a>. Please contact
|
226
|
+
our <a href="mailto:webmaster@ruby-lang.org">webmaster</a> for questions or comments
|
227
|
+
concerning this website.</p>
|
228
|
+
</div>
|
229
|
+
</div>
|
230
|
+
</div>
|
231
|
+
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
|
232
|
+
</script>
|
233
|
+
<script type="text/javascript">
|
234
|
+
_uacct = "UA-620926-1";
|
235
|
+
urchinTracker();
|
236
|
+
</script>
|
237
|
+
</body>
|
238
|
+
</html>
|