sdl4r 0.9.5 → 0.9.6
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/CHANGELOG +11 -2
- data/Rakefile +1 -1
- data/TODO +9 -1
- data/doc/classes/SDL4R.html +42 -196
- data/doc/classes/SDL4R/Parser.html +45 -107
- data/doc/classes/SDL4R/SdlBinary.html +59 -119
- data/doc/classes/SDL4R/SdlParseError.html +28 -50
- data/doc/classes/SDL4R/SdlTimeSpan.html +257 -475
- data/doc/classes/SDL4R/Tag.html +497 -828
- data/doc/created.rid +1 -1
- data/doc/files/CHANGELOG.html +46 -18
- data/doc/files/LICENSE.html +51 -42
- data/doc/files/README.html +42 -32
- data/doc/files/lib/sdl4r/parser/reader_rb.html +21 -11
- data/doc/files/lib/sdl4r/parser/time_span_with_zone_rb.html +21 -11
- data/doc/files/lib/sdl4r/parser/token_rb.html +21 -11
- data/doc/files/lib/sdl4r/parser/tokenizer_rb.html +21 -11
- data/doc/files/lib/sdl4r/parser_rb.html +21 -14
- data/doc/files/lib/sdl4r/sdl4r_rb.html +23 -18
- data/doc/files/lib/sdl4r/sdl_binary_rb.html +21 -11
- data/doc/files/lib/sdl4r/sdl_parse_error_rb.html +21 -11
- data/doc/files/lib/sdl4r/sdl_time_span_rb.html +21 -11
- data/doc/files/lib/sdl4r/tag_rb.html +23 -18
- data/doc/files/lib/sdl4r_rb.html +21 -11
- data/doc/fr_class_index.html +11 -14
- data/doc/fr_file_index.html +11 -22
- data/doc/fr_method_index.html +90 -175
- data/doc/index.html +7 -4
- data/doc/rdoc-style.css +119 -210
- data/lib/sdl4r/tag.rb +23 -12
- data/test/sdl4r/tag_test.rb +53 -0
- metadata +9 -4
data/doc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Tue, 10 Aug 2010 08:17:56 +0900
|
data/doc/files/CHANGELOG.html
CHANGED
@@ -1,8 +1,11 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
3
6
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
7
|
<head>
|
5
|
-
<title>File: CHANGELOG
|
8
|
+
<title>File: CHANGELOG</title>
|
6
9
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
10
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
8
11
|
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
@@ -22,7 +25,7 @@
|
|
22
25
|
return false;
|
23
26
|
|
24
27
|
elemStyle = elem.style;
|
25
|
-
|
28
|
+
|
26
29
|
if ( elemStyle.display != "block" ) {
|
27
30
|
elemStyle.display = "block"
|
28
31
|
} else {
|
@@ -31,10 +34,10 @@
|
|
31
34
|
|
32
35
|
return true;
|
33
36
|
}
|
34
|
-
|
37
|
+
|
35
38
|
// Make codeblocks hidden by default
|
36
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }
|
37
|
-
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
38
41
|
// ]]>
|
39
42
|
</script>
|
40
43
|
|
@@ -42,18 +45,18 @@
|
|
42
45
|
<body>
|
43
46
|
|
44
47
|
|
48
|
+
|
45
49
|
<div id="fileHeader">
|
46
50
|
<h1>CHANGELOG</h1>
|
47
51
|
<table class="header-table">
|
48
52
|
<tr class="top-aligned-row">
|
49
53
|
<td><strong>Path:</strong></td>
|
50
54
|
<td>CHANGELOG
|
51
|
-
|
52
55
|
</td>
|
53
56
|
</tr>
|
54
57
|
<tr class="top-aligned-row">
|
55
58
|
<td><strong>Last Update:</strong></td>
|
56
|
-
<td>
|
59
|
+
<td>Tue Aug 10 07:57:22 +0900 2010</td>
|
57
60
|
</tr>
|
58
61
|
</table>
|
59
62
|
</div>
|
@@ -61,11 +64,31 @@
|
|
61
64
|
|
62
65
|
<div id="bodyContent">
|
63
66
|
|
67
|
+
|
68
|
+
|
64
69
|
<div id="contextContent">
|
65
70
|
|
66
71
|
<div id="description">
|
67
|
-
<h2>v0.9.
|
68
|
-
<h2>v0.9.6 (
|
72
|
+
<h2>v0.9.7 (建設中)</h2>
|
73
|
+
<h2>v0.9.6 (10-aug-2010)</h2>
|
74
|
+
<h3>Major changes:</h3>
|
75
|
+
<ul>
|
76
|
+
<li>Tag.set_attribute(): fixed as it failed if the value was nil.
|
77
|
+
|
78
|
+
</li>
|
79
|
+
<li>Tag.write(): now returns the given output (especially necessary if a String
|
80
|
+
was given).
|
81
|
+
|
82
|
+
</li>
|
83
|
+
<li>Tag.write(): fixed as it failed when writing children without including the
|
84
|
+
root Tag.
|
85
|
+
|
86
|
+
</li>
|
87
|
+
<li>Tag.write(): it is now possible to give a StringIO as an output
|
88
|
+
|
89
|
+
</li>
|
90
|
+
</ul>
|
91
|
+
<h2>v0.9.5 (8-aug-2010)</h2>
|
69
92
|
<h3>Major changes:</h3>
|
70
93
|
<ul>
|
71
94
|
<li>Fixes in order to make <a href="../classes/SDL4R.html">SDL4R</a> work in
|
@@ -78,7 +101,7 @@ Ruby 1.9 (mainly concerning encodings and dates).
|
|
78
101
|
</ul>
|
79
102
|
<h3>Minor changes:</h3>
|
80
103
|
<ul>
|
81
|
-
<li>General & contact info in the
|
104
|
+
<li>General & contact info in the README
|
82
105
|
|
83
106
|
</li>
|
84
107
|
</ul>
|
@@ -88,7 +111,7 @@ Ruby 1.9 (mainly concerning encodings and dates).
|
|
88
111
|
<li>The use of BigDecimal (standard) has been preferred to Flt::DecNum.
|
89
112
|
|
90
113
|
</li>
|
91
|
-
<li
|
114
|
+
<li>"sdl4r/sdl.rb" has been renamed to "sdl4r/sdl4r.rb"
|
92
115
|
|
93
116
|
</li>
|
94
117
|
<li>A sdl4r.rb has been added so that users can actually write (as the
|
@@ -99,7 +122,7 @@ documentation pretended):
|
|
99
122
|
</pre>
|
100
123
|
</li>
|
101
124
|
<li><a href="../classes/SDL4R.html#M000004">SDL4R#coerce_or_fail</a> has been
|
102
|
-
implemented, which means that random objects can&#
|
125
|
+
implemented, which means that random objects can‘t be added to a Tag
|
103
126
|
as before. Rational instances are coerced using Rational#to_f.
|
104
127
|
|
105
128
|
</li>
|
@@ -112,13 +135,13 @@ usec()
|
|
112
135
|
<h3>Major changes</h3>
|
113
136
|
<ul>
|
114
137
|
<li>Tag: any method that use to take namespace/name parameters now follows the
|
115
|
-
natural order
|
138
|
+
natural order "namespace" and then "name":
|
116
139
|
|
117
140
|
<pre>
|
118
141
|
Tag.new "ns1", "tag1"
|
119
142
|
</pre>
|
120
143
|
<p>
|
121
|
-
WARNING: this was the contrary before!!! Also, the
|
144
|
+
WARNING: this was the contrary before!!! Also, the "recursive"
|
122
145
|
parameter should always be at the first place now.
|
123
146
|
</p>
|
124
147
|
</li>
|
@@ -130,11 +153,13 @@ instances when parsing rather than DateTime instances.
|
|
130
153
|
|
131
154
|
</div>
|
132
155
|
|
156
|
+
|
133
157
|
</div>
|
134
158
|
|
135
159
|
|
136
160
|
</div>
|
137
161
|
|
162
|
+
|
138
163
|
<!-- if includes -->
|
139
164
|
|
140
165
|
<div id="section">
|
@@ -142,16 +167,19 @@ instances when parsing rather than DateTime instances.
|
|
142
167
|
|
143
168
|
|
144
169
|
|
145
|
-
<!-- if method_list -->
|
146
170
|
|
171
|
+
|
147
172
|
|
148
173
|
|
174
|
+
<!-- if method_list -->
|
175
|
+
|
149
176
|
|
150
177
|
</div>
|
151
178
|
|
179
|
+
|
152
180
|
<div id="validator-badges">
|
153
181
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
154
182
|
</div>
|
155
183
|
|
156
184
|
</body>
|
157
|
-
</html>
|
185
|
+
</html>
|
data/doc/files/LICENSE.html
CHANGED
@@ -1,8 +1,11 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
3
6
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
7
|
<head>
|
5
|
-
<title>File: LICENSE
|
8
|
+
<title>File: LICENSE</title>
|
6
9
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
10
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
8
11
|
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
@@ -22,7 +25,7 @@
|
|
22
25
|
return false;
|
23
26
|
|
24
27
|
elemStyle = elem.style;
|
25
|
-
|
28
|
+
|
26
29
|
if ( elemStyle.display != "block" ) {
|
27
30
|
elemStyle.display = "block"
|
28
31
|
} else {
|
@@ -31,10 +34,10 @@
|
|
31
34
|
|
32
35
|
return true;
|
33
36
|
}
|
34
|
-
|
37
|
+
|
35
38
|
// Make codeblocks hidden by default
|
36
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }
|
37
|
-
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
38
41
|
// ]]>
|
39
42
|
</script>
|
40
43
|
|
@@ -42,18 +45,18 @@
|
|
42
45
|
<body>
|
43
46
|
|
44
47
|
|
48
|
+
|
45
49
|
<div id="fileHeader">
|
46
50
|
<h1>LICENSE</h1>
|
47
51
|
<table class="header-table">
|
48
52
|
<tr class="top-aligned-row">
|
49
53
|
<td><strong>Path:</strong></td>
|
50
54
|
<td>LICENSE
|
51
|
-
|
52
55
|
</td>
|
53
56
|
</tr>
|
54
57
|
<tr class="top-aligned-row">
|
55
58
|
<td><strong>Last Update:</strong></td>
|
56
|
-
<td>
|
59
|
+
<td>Thu Jul 29 21:59:58 +0900 2010</td>
|
57
60
|
</tr>
|
58
61
|
</table>
|
59
62
|
</div>
|
@@ -61,6 +64,8 @@
|
|
61
64
|
|
62
65
|
<div id="bodyContent">
|
63
66
|
|
67
|
+
|
68
|
+
|
64
69
|
<div id="contextContent">
|
65
70
|
|
66
71
|
<div id="description">
|
@@ -141,7 +146,7 @@ permission to copy, distribute and/or modify the library.
|
|
141
146
|
<p>
|
142
147
|
there is no warranty for the free library. Also, if the library is modified
|
143
148
|
by someone else and passed on, the recipients should know that what they
|
144
|
-
have is not the original version, so that the original author&#
|
149
|
+
have is not the original version, so that the original author‘s
|
145
150
|
reputation will not be affected by problems that might be introduced by
|
146
151
|
others.
|
147
152
|
</p>
|
@@ -179,7 +184,7 @@ criteria for linking other code with the library.
|
|
179
184
|
We call this license the "Lesser" General Public License because it
|
180
185
|
</pre>
|
181
186
|
<p>
|
182
|
-
does Less to protect the user&#
|
187
|
+
does Less to protect the user‘s freedom than the ordinary General
|
183
188
|
Public License. It also provides other free software developers Less of an
|
184
189
|
advantage over competing non-free programs. These disadvantages are the
|
185
190
|
reason we use the ordinary General Public License for many libraries.
|
@@ -219,8 +224,8 @@ program using a modified version of the Library.
|
|
219
224
|
</pre>
|
220
225
|
<p>
|
221
226
|
modification follow. Pay close attention to the difference between a
|
222
|
-
|
223
|
-
library
|
227
|
+
"work based on the library" and a "work that uses the
|
228
|
+
library". The former contains code derived from the library, whereas
|
224
229
|
the latter must be combined with the library in order to run.
|
225
230
|
</p>
|
226
231
|
<pre>
|
@@ -232,8 +237,8 @@ the latter must be combined with the library in order to run.
|
|
232
237
|
<p>
|
233
238
|
program which contains a notice placed by the copyright holder or other
|
234
239
|
authorized party saying it may be distributed under the terms of this
|
235
|
-
Lesser General Public License (also called
|
236
|
-
|
240
|
+
Lesser General Public License (also called "this License"). Each
|
241
|
+
licensee is addressed as "you".
|
237
242
|
</p>
|
238
243
|
<pre>
|
239
244
|
A "library" means a collection of software functions and/or data
|
@@ -246,12 +251,12 @@ use some of those functions and data) to form executables.
|
|
246
251
|
The "Library", below, refers to any such software library or work
|
247
252
|
</pre>
|
248
253
|
<p>
|
249
|
-
which has been distributed under these terms. A
|
250
|
-
Library
|
254
|
+
which has been distributed under these terms. A "work based on the
|
255
|
+
Library" means either the Library or any derivative work under
|
251
256
|
copyright law: that is to say, a work containing the Library or a portion
|
252
257
|
of it, either verbatim or with modifications and/or translated
|
253
258
|
straightforwardly into another language. (Hereinafter, translation is
|
254
|
-
included without limitation in the term
|
259
|
+
included without limitation in the term "modification".)
|
255
260
|
</p>
|
256
261
|
<pre>
|
257
262
|
"Source code" for a work means the preferred form of the work for
|
@@ -392,18 +397,18 @@ with the object code.
|
|
392
397
|
</pre>
|
393
398
|
<p>
|
394
399
|
Library, but is designed to work with the Library by being compiled or
|
395
|
-
linked with it, is called a
|
396
|
-
|
397
|
-
|
400
|
+
linked with it, is called a "work that uses the Library". Such a
|
401
|
+
work, in isolation, is not a derivative work of the Library, and therefore
|
402
|
+
falls outside the scope of this License.
|
398
403
|
</p>
|
399
404
|
<pre>
|
400
405
|
However, linking a "work that uses the Library" with the Library
|
401
406
|
</pre>
|
402
407
|
<p>
|
403
408
|
creates an executable that is a derivative of the Library (because it
|
404
|
-
contains portions of the Library), rather than a
|
405
|
-
library
|
406
|
-
|
409
|
+
contains portions of the Library), rather than a "work that uses the
|
410
|
+
library". The executable is therefore covered by this License. Section
|
411
|
+
6 states terms for distribution of such executables.
|
407
412
|
</p>
|
408
413
|
<pre>
|
409
414
|
When a "work that uses the Library" uses material from a header file
|
@@ -437,10 +442,10 @@ they are linked directly with the Library itself.
|
|
437
442
|
6. As an exception to the Sections above, you may also combine or
|
438
443
|
</pre>
|
439
444
|
<p>
|
440
|
-
link a
|
441
|
-
|
445
|
+
link a "work that uses the Library" with the Library to produce a
|
446
|
+
work containing portions of the Library, and distribute that work under
|
442
447
|
terms of your choice, provided that the terms permit modification of the
|
443
|
-
work for the customer&#
|
448
|
+
work for the customer‘s own use and reverse engineering for debugging
|
444
449
|
such modifications.
|
445
450
|
</p>
|
446
451
|
<pre>
|
@@ -489,7 +494,7 @@ the copy of this License. Also, you must do one of these things:
|
|
489
494
|
For an executable, the required form of the "work that uses the
|
490
495
|
</pre>
|
491
496
|
<p>
|
492
|
-
Library
|
497
|
+
Library" must include any data and utility programs needed for
|
493
498
|
reproducing the executable from it. However, as a special exception, the
|
494
499
|
materials to be distributed need not include anything that is normally
|
495
500
|
distributed (in either source or binary form) with the major components
|
@@ -614,7 +619,7 @@ in detail to address new problems or concerns.
|
|
614
619
|
<p>
|
615
620
|
Each version is given a distinguishing version number. If the Library
|
616
621
|
specifies a version number of this License which applies to it and
|
617
|
-
|
622
|
+
"any later version", you have the option of following the terms
|
618
623
|
and conditions either of that version or of any later version published by
|
619
624
|
the Free Software Foundation. If the Library does not specify a license
|
620
625
|
version number, you may choose any version ever published by the Free
|
@@ -639,12 +644,12 @@ and of promoting the sharing and reuse of software generally.
|
|
639
644
|
<p>
|
640
645
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
|
641
646
|
WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
642
|
-
PROVIDE THE LIBRARY
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
647
|
+
PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
648
|
+
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
649
|
+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
650
|
+
TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE
|
651
|
+
LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
652
|
+
REPAIR OR CORRECTION.
|
648
653
|
</p>
|
649
654
|
<pre>
|
650
655
|
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
@@ -678,8 +683,7 @@ ordinary General Public License).
|
|
678
683
|
<p>
|
679
684
|
safest to attach them to the start of each source file to most effectively
|
680
685
|
convey the exclusion of warranty; and each file should have at least the
|
681
|
-
|
682
|
-
found.
|
686
|
+
"copyright" line and a pointer to where the full notice is found.
|
683
687
|
</p>
|
684
688
|
<pre>
|
685
689
|
<one line to give the library's name and a brief idea of what it does.>
|
@@ -704,8 +708,8 @@ Also add information on how to contact you by electronic and paper mail.
|
|
704
708
|
</p>
|
705
709
|
<p>
|
706
710
|
You should also get your employer (if you work as a programmer) or your
|
707
|
-
school, if any, to sign a
|
708
|
-
|
711
|
+
school, if any, to sign a "copyright disclaimer" for the library,
|
712
|
+
if necessary. Here is a sample; alter the names:
|
709
713
|
</p>
|
710
714
|
<pre>
|
711
715
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
@@ -715,16 +719,18 @@ library, if necessary. Here is a sample; alter the names:
|
|
715
719
|
Ty Coon, President of Vice
|
716
720
|
</pre>
|
717
721
|
<p>
|
718
|
-
That&#
|
722
|
+
That‘s all there is to it!
|
719
723
|
</p>
|
720
724
|
|
721
725
|
</div>
|
722
726
|
|
727
|
+
|
723
728
|
</div>
|
724
729
|
|
725
730
|
|
726
731
|
</div>
|
727
732
|
|
733
|
+
|
728
734
|
<!-- if includes -->
|
729
735
|
|
730
736
|
<div id="section">
|
@@ -732,16 +738,19 @@ That’s all there is to it!
|
|
732
738
|
|
733
739
|
|
734
740
|
|
735
|
-
<!-- if method_list -->
|
736
741
|
|
742
|
+
|
737
743
|
|
738
744
|
|
745
|
+
<!-- if method_list -->
|
746
|
+
|
739
747
|
|
740
748
|
</div>
|
741
749
|
|
750
|
+
|
742
751
|
<div id="validator-badges">
|
743
752
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
744
753
|
</div>
|
745
754
|
|
746
755
|
</body>
|
747
|
-
</html>
|
756
|
+
</html>
|
data/doc/files/README.html
CHANGED
@@ -1,8 +1,11 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
3
6
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
7
|
<head>
|
5
|
-
<title>File: README
|
8
|
+
<title>File: README</title>
|
6
9
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
10
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
8
11
|
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
@@ -22,7 +25,7 @@
|
|
22
25
|
return false;
|
23
26
|
|
24
27
|
elemStyle = elem.style;
|
25
|
-
|
28
|
+
|
26
29
|
if ( elemStyle.display != "block" ) {
|
27
30
|
elemStyle.display = "block"
|
28
31
|
} else {
|
@@ -31,10 +34,10 @@
|
|
31
34
|
|
32
35
|
return true;
|
33
36
|
}
|
34
|
-
|
37
|
+
|
35
38
|
// Make codeblocks hidden by default
|
36
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }
|
37
|
-
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
38
41
|
// ]]>
|
39
42
|
</script>
|
40
43
|
|
@@ -42,18 +45,18 @@
|
|
42
45
|
<body>
|
43
46
|
|
44
47
|
|
48
|
+
|
45
49
|
<div id="fileHeader">
|
46
50
|
<h1>README</h1>
|
47
51
|
<table class="header-table">
|
48
52
|
<tr class="top-aligned-row">
|
49
53
|
<td><strong>Path:</strong></td>
|
50
54
|
<td>README
|
51
|
-
|
52
55
|
</td>
|
53
56
|
</tr>
|
54
57
|
<tr class="top-aligned-row">
|
55
58
|
<td><strong>Last Update:</strong></td>
|
56
|
-
<td>
|
59
|
+
<td>Fri Aug 06 13:03:22 +0900 2010</td>
|
57
60
|
</tr>
|
58
61
|
</table>
|
59
62
|
</div>
|
@@ -61,6 +64,8 @@
|
|
61
64
|
|
62
65
|
<div id="bodyContent">
|
63
66
|
|
67
|
+
|
68
|
+
|
64
69
|
<div id="contextContent">
|
65
70
|
|
66
71
|
<div id="description">
|
@@ -128,7 +133,7 @@ which will write the following in your file:
|
|
128
133
|
SDL documents are made up of Tags. A Tag contains
|
129
134
|
</p>
|
130
135
|
<ul>
|
131
|
-
<li>a name (if not present, the name
|
136
|
+
<li>a name (if not present, the name "content" is used)
|
132
137
|
|
133
138
|
</li>
|
134
139
|
<li>a namespace (optional)
|
@@ -163,9 +168,9 @@ be read using the following code (ignoring exceptions):
|
|
163
168
|
<p>
|
164
169
|
A tag is basically a data structure with a list of values, a map of
|
165
170
|
attributes, and (if it has a body) child tags. In the example above, the
|
166
|
-
<tt>values.sdl</tt> file is read into a tag called
|
167
|
-
|
168
|
-
|
171
|
+
<tt>values.sdl</tt> file is read into a tag called "root". It has
|
172
|
+
two children (tags) called "size" and "smoker". Both
|
173
|
+
these children have one value, no attributes, and no bodies.
|
169
174
|
</p>
|
170
175
|
<p>
|
171
176
|
SDL is often used for simple key-value mappings. To simplify things Tag has
|
@@ -197,8 +202,8 @@ with a unicode letter or an underscore (_) followed by zero or more unicode
|
|
197
202
|
letters, numbers, underscores (_), dashes (-) and periods (.).
|
198
203
|
</p>
|
199
204
|
<p>
|
200
|
-
Tags without bodies are terminated by a new line character (n) and may be
|
201
|
-
continue onto the next line by placing a backslash () at the end of the
|
205
|
+
Tags without bodies are terminated by a new line character (\n) and may be
|
206
|
+
continue onto the next line by placing a backslash (\) at the end of the
|
202
207
|
line. Tags may be nested to an arbitrary depth. SDL ignores all other white
|
203
208
|
space characters between tokens. Although nested blocks are indented by
|
204
209
|
convention, tabs have no significance in the language.
|
@@ -206,9 +211,9 @@ convention, tabs have no significance in the language.
|
|
206
211
|
<h2>Anonymous Tags</h2>
|
207
212
|
<p>
|
208
213
|
SDL also supports anonymous tags which are assigned the name
|
209
|
-
|
210
|
-
|
211
|
-
|
214
|
+
"content". An anonymous tag starts with a literal and is followed
|
215
|
+
by zero or more additional literals and zero or more attributes. The
|
216
|
+
examples section below demonstrates the use of anonymous tags.
|
212
217
|
</p>
|
213
218
|
<pre>
|
214
219
|
greetings {
|
@@ -223,10 +228,10 @@ The examples section below demonstrates the use of anonymous tags.
|
|
223
228
|
<p>
|
224
229
|
There are two ways to write String literals.
|
225
230
|
</p>
|
226
|
-
<h3>Starting and ending with double quotes (
|
231
|
+
<h3>Starting and ending with double quotes (")</h3>
|
227
232
|
<p>
|
228
|
-
Double quotes, backslash characters (), and new lines (n) within this
|
229
|
-
of String literal must be escaped like so:
|
233
|
+
Double quotes, backslash characters (\), and new lines (\n) within this
|
234
|
+
type of String literal must be escaped like so:
|
230
235
|
</p>
|
231
236
|
<pre>
|
232
237
|
file "C:\\folder\\file.txt"
|
@@ -234,7 +239,7 @@ of String literal must be escaped like so:
|
|
234
239
|
</pre>
|
235
240
|
<p>
|
236
241
|
This type of String literal can be continued on the next line by placing a
|
237
|
-
backslash () at the end of the line like so:
|
242
|
+
backslash (\) at the end of the line like so:
|
238
243
|
</p>
|
239
244
|
<pre>
|
240
245
|
line "this is a \
|
@@ -263,7 +268,7 @@ Examples:
|
|
263
268
|
</pre>
|
264
269
|
<p>
|
265
270
|
Note: SDL interprets new lines in `` String literals as a single new line
|
266
|
-
character (n) regarless of the platform.
|
271
|
+
character (\n) regarless of the platform.
|
267
272
|
</p>
|
268
273
|
<h2>Binary literals</h2>
|
269
274
|
<p>
|
@@ -290,13 +295,13 @@ Examples:
|
|
290
295
|
<p>
|
291
296
|
SDL supports date, time span, and date/time literals. Date and Date/Time
|
292
297
|
literals use a 24 hour clock (0-23). If a timezone is not specified, the
|
293
|
-
default locale&#
|
298
|
+
default locale‘s timezone will be used.
|
294
299
|
</p>
|
295
300
|
<p>
|
296
301
|
Examples:
|
297
302
|
</p>
|
298
303
|
<ul>
|
299
|
-
<li>create a tag called
|
304
|
+
<li>create a tag called "date" with a date value of Dec 5, 2005
|
300
305
|
|
301
306
|
<pre>
|
302
307
|
date 2005/12/05
|
@@ -329,8 +334,8 @@ components)
|
|
329
334
|
<li>string (unicode) - examples: <tt>"hello"</tt> or <tt>`aloha`</tt>
|
330
335
|
|
331
336
|
</li>
|
332
|
-
<li>character (unicode) - example: <tt
|
333
|
-
escapes are not supported (or needed because sdl files are UTF8)
|
337
|
+
<li>character (unicode) - example: <tt>’/’</tt> Note: \uXXXX style
|
338
|
+
unicode escapes are not supported (or needed because sdl files are UTF8)
|
334
339
|
|
335
340
|
</li>
|
336
341
|
<li>integer (32 bits signed) - example: <tt>123</tt>
|
@@ -477,8 +482,8 @@ An example SDL file:
|
|
477
482
|
# List rows = tag.getChild("matrix").getChildrenValues("content");
|
478
483
|
</pre>
|
479
484
|
<p>
|
480
|
-
Example of getting the
|
481
|
-
|
485
|
+
Example of getting the "location" attribute from the
|
486
|
+
"daughter" tag above (ignoring exceptions)
|
482
487
|
</p>
|
483
488
|
<pre>
|
484
489
|
root = SDL4R.read(Pathname.new("myfile.sdl"))
|
@@ -557,7 +562,7 @@ following lines:
|
|
557
562
|
</pre>
|
558
563
|
<p>
|
559
564
|
This will give you correct input and output and correct UTF-8
|
560
|
-
|
565
|
+
"general" sorting. Alternatively you can use the following
|
561
566
|
options when launching the Ruby interpreter:
|
562
567
|
</p>
|
563
568
|
<pre>
|
@@ -588,11 +593,13 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
588
593
|
|
589
594
|
</div>
|
590
595
|
|
596
|
+
|
591
597
|
</div>
|
592
598
|
|
593
599
|
|
594
600
|
</div>
|
595
601
|
|
602
|
+
|
596
603
|
<!-- if includes -->
|
597
604
|
|
598
605
|
<div id="section">
|
@@ -600,16 +607,19 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
600
607
|
|
601
608
|
|
602
609
|
|
603
|
-
<!-- if method_list -->
|
604
610
|
|
611
|
+
|
605
612
|
|
606
613
|
|
614
|
+
<!-- if method_list -->
|
615
|
+
|
607
616
|
|
608
617
|
</div>
|
609
618
|
|
619
|
+
|
610
620
|
<div id="validator-badges">
|
611
621
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
612
622
|
</div>
|
613
623
|
|
614
624
|
</body>
|
615
|
-
</html>
|
625
|
+
</html>
|