1SOAP::WSDL::XSD::TypeliUbs:e:rBuCiolnttirni(b3u)ted PerlSODAoPc:u:mWeSnDtLa:t:iXoSnD::Typelib::Builtin(3)
2
3
4

NAME

6       SOAP::WSDL::XSD::Typelib::Builtin - Built-in XML Schema datatypes
7

DESCRIPTION

9       The SOAP::WSDL::XSD::Typelib::Builtin hierarchy implements all builtin
10       types from the XML schema specification.
11
12       All XML schema derived types inherit from
13       SOAP::WSDL::XSD::Typelib::Builtin::anyType.
14
15       These basic type classes are most useful when used as element or
16       simpleType base classes.
17
18       Using SOAP::WSDL::XSD::Typelib::Builtin uses all of the builtin
19       datatype classes.
20
21       All builtin types feature common behaviour described below in
22       "OVERLOADED OPERATORS"
23

EXAMPLES

25        my $bool = SOAP::WSDL::XSD::Typelib::Builtin::bool->new({ value => 0} );
26        print $bool;    # prints "true"
27
28        # implements <simpleType name="MySimpleType">
29        #               <list itemType="xsd:string" />
30        #            </simpleType>
31        package MySimpleType;
32        use SOAP::WSDL::XSD::Typelib::Builtin;
33        use SOAP::WSDL::XSD::Typelib::SimpleType;
34
35        use base qw(SOAP::WSDL::XSD::Typelib::SimpleType
36           SOAP::WSDL::XSD::Typelib::Builtin::list
37           SOAP::WSDL::XSD::Typelib::Builtin::string
38        );
39        1;
40
41        # somewhere else
42        my $list = MySimpleType->new({ value => [ 'You', 'shall', 'overcome' ] });
43        print $list;   # prints "You shall overcome"
44

CLASS HIERARCHY

46       This is the inheritance graph for builtin types.
47
48       Types with [] marker describe types derived via the item in [] in the
49       XML Schema specs.
50
51       Derivation is implemented via multiple inheritance with the derivation
52       method as first item in the base class list.
53
54        anyType
55        - anySimpleType
56            - duration
57            - dateTime
58            - date
59            - time
60            - gYearMonth
61            - gYear
62            - gMonthDay
63            - gDay
64            - gMonth
65            - boolean
66            - base64Binary
67            - hexBinary
68            - float
69            - decimal
70                - integer
71                - nonPositiveInteger
72                    - negativeInteger
73                - nonNegativeInteger
74                    - positiveInteger
75                    - unsignedLong
76                    - unsignedInt
77                    - unsignedShort
78                    - unsignedByte
79                - long
80                    - int
81                        - short
82                            - byte
83            - double
84            - anyURI
85            - NOTATION
86            - string
87                 - normalizedString
88                     - language
89                     - Name
90                         - NCName
91                             - ID
92                             - IDREF
93                                 - IDREFS [list]
94                             - ENTITY
95                     - token
96                         - NMTOKEN
97                             - NMTOKENS [list]
98

OVERLOADED OPERATORS

100       Overloading is implemented via Class::Std's trait mechanism.
101
102       The following behaviours apply:
103
104       ·   string context
105
106           All classes use the "serialize" method for stringification.
107
108       ·   bool context
109
110           All classes derived from anySimpleType return their value in bool
111           context
112
113       ·   numeric context
114
115           The boolean class returns 0 or 1 in numeric context.
116
117           decimal, float and double (and derived classes) return their value
118           in numeric context.
119
120       ·   arrayification (@{})
121
122           When accessed as a list ref, objects of all classes return a list
123           ref with the object itself as single element.
124
125           This is most useful for writing loops without additional
126           conversions, especially in mini-languages found in templating
127           systems or the like, which may not natively support converting to
128           list refs.
129
130           Instead of writing something like
131
132            my $value = $complexType->get_ELEMENT;
133            $value = ref $value eq 'ARRAY' ? $value : [ $value ];
134            for (@{ $value }) { ... }
135
136           you can just write
137
138            for (@{ $complexType->get_ELEMENT }) {...}
139
140           Note that complexTypes with undef elements still return undef when
141           accessing an undefined element, so when an element may be empty you
142           still have to write something like:
143
144            my $value = $complexType->get_ELEMENT();
145            if (defined $value) {
146                for (@{ $value }) {
147                    ...
148                }
149            }
150

Subclasses

152   SOAP::WSDL::XSD::Typelib::Builtin::anyType
153       Base class for all types
154
155   SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType
156       Base class for all simple types
157
158   SOAP::WSDL::XSD::Typelib::Builtin::anyURI
159       Type representing URIs
160
161   SOAP::WSDL::XSD::Typelib::Builtin::boolean
162       Represents boolean data.
163
164       Serializes to "true" or "false".
165
166       Everything true in perl and not "false" is deserialized as true.
167
168       Returns true/false in boolean context.
169
170       Returns 1 / 0 in numeric context.
171
172       boolean objects have a special method for deleting their value, because
173       calling "setl_value(undef)" results in the value being set to false.
174
175        $obj->delete_value();
176
177   SOAP::WSDL::XSD::Typelib::Builtin::byte
178       byte integer objects.
179
180   SOAP::WSDL::XSD::Typelib::Builtin::date
181       date values are automatically converted into XML date strings during
182       setting:
183
184        YYYY-MM-DD+zz:zz
185
186       The time zone is set to the local time zone if not included.
187
188       All input variants supported by Date::Parse are supported. You may even
189       pass in dateTime strings - the time part will be ignored. Note that
190       set_value is around 100 times slower when setting non-XML-time strings
191
192       When setting dates before the beginning of the epoch (negative UNIX
193       timestamp), you should use the XML date string format for setting
194       dates. The behaviour of Date::Parse for dates before the epoch is
195       system dependent.
196
197   SOAP::WSDL::XSD::Typelib::Builtin::dateTime
198       dateTime values are automatically converted into XML dateTime strings
199       during setting:
200
201        YYYY-MM-DDThh:mm:ss.nnnnnnn+zz:zz
202
203       The fraction of seconds (nnnnnnn) part is optional. Fractions of
204       seconds may be given with arbitrary precision
205
206       The fraction of seconds part is excluded in converted values, as it
207       would always be 0.
208
209       All input variants supported by Date::Parse are supported. Note that
210       set_value is around 100 times slower when setting non-XML-time strings
211
212   SOAP::WSDL::XSD::Typelib::Builtin::decimal
213       decimal is the base of all non-float numbers
214
215   SOAP::WSDL::XSD::Typelib::Builtin::double
216   SOAP::WSDL::XSD::Typelib::Builtin::duration
217   SOAP::WSDL::XSD::Typelib::Builtin::ENTITY
218   SOAP::WSDL::XSD::Typelib::Builtin::float
219   SOAP::WSDL::XSD::Typelib::Builtin::gDay
220   SOAP::WSDL::XSD::Typelib::Builtin::gMonth
221   SOAP::WSDL::XSD::Typelib::Builtin::gMonthDay
222   SOAP::WSDL::XSD::Typelib::Builtin::gYear
223   SOAP::WSDL::XSD::Typelib::Builtin::gYearMonth
224   SOAP::WSDL::XSD::Typelib::Builtin::hexBinary
225   SOAP::WSDL::XSD::Typelib::Builtin::ID
226   SOAP::WSDL::XSD::Typelib::Builtin::IDREF
227   SOAP::WSDL::XSD::Typelib::Builtin::IDREFS
228       List of SOAP::WSDL::XSD::Typelib::Builtin::IDREF objects.
229
230       Derived by SOAP::WSDL::XSD::Typelib::Builtin::list.
231
232   SOAP::WSDL::XSD::Typelib::Builtin::int
233   SOAP::WSDL::XSD::Typelib::Builtin::integer
234   SOAP::WSDL::XSD::Typelib::Builtin::language
235   SOAP::WSDL::XSD::Typelib::Builtin::list
236   SOAP::WSDL::XSD::Typelib::Builtin::long
237   SOAP::WSDL::XSD::Typelib::Builtin::Name
238   SOAP::WSDL::XSD::Typelib::Builtin::NCName
239   SOAP::WSDL::XSD::Typelib::Builtin::negativeInteger
240   SOAP::WSDL::XSD::Typelib::Builtin::nonNegativeInteger
241   SOAP::WSDL::XSD::Typelib::Builtin::nonPositiveInteger
242   SOAP::WSDL::XSD::Typelib::Builtin::normalizedString
243       Tab, newline and carriage return characters are replaced by whitespace
244       in set_value.
245
246   SOAP::WSDL::XSD::Typelib::Builtin::NOTATION
247   SOAP::WSDL::XSD::Typelib::Builtin::positiveInteger
248   SOAP::WSDL::XSD::Typelib::Builtin::QName
249   SOAP::WSDL::XSD::Typelib::Builtin::short
250   SOAP::WSDL::XSD::Typelib::Builtin::string
251       String values are XML-escaped on serialization.
252
253       The following characters are escaped: <, >, &
254
255   SOAP::WSDL::XSD::Typelib::Builtin::time
256       time values are automatically converted into XML time strings during
257       setting:
258
259        hh:mm:ss.nnnnnnn+zz:zz
260        hh:mm:ss+zz:zz
261
262       The time zone is set to the local time zone if not included. The
263       optional nanoseconds part is not included in converted values, as it
264       would always be 0.
265
266       All input variants supported by Date::Parse are supported. You may even
267       pass in dateTime strings - the date part will be ignored. Note that
268       set_value is around 100 times slower when setting non-XML-time strings.
269
270   SOAP::WSDL::XSD::Typelib::Builtin::token
271   SOAP::WSDL::XSD::Typelib::Builtin::unsignedByte
272   SOAP::WSDL::XSD::Typelib::Builtin::unsignedInt
273   SOAP::WSDL::XSD::Typelib::Builtin::unsignedLong
274   SOAP::WSDL::XSD::Typelib::Builtin::unsignedShort

CAVEATS

276       ·   set_value
277
278           In contrast to Class::Std-generated mutators (setters), set_value
279           does not return the last value.
280
281           This is for speed reasons: SOAP::WSDL never needs to know the last
282           value when calling set_calue, but calls it over and over again...
283

BUGS AND LIMITATIONS

285       ·   Thread safety
286
287           SOAP::WSDL::XSD::Typelib::Builtin uses Class::Std::Fast::Storable
288           which uses Class::Std. Class::Std is not thread safe, so
289           SOAP::WSDL::XSD::Typelib::Builtin is neither.
290
291       ·   XML Schema facets
292
293           No facets are implemented yet.
294

AUTHOR

296       Replace whitespace by @ in e-mail address.
297
298        Martin Kutter E<gt>martin.kutter fen-net.deE<lt>
299
301       Copyright 2004-2007 Martin Kutter.
302
303       This file is part of SOAP-WSDL. You may distribute/modify it under the
304       same terms as perl itself
305
306
307
308perl v5.28.0                      2015-04-0S2OAP::WSDL::XSD::Typelib::Builtin(3)
Impressum