Qt 4.8
Protected Functions | List of all members
QPatternist::XPath20CoreFunctions Class Reference

Handles the functions defines in XQuery 1.0 and XPath 2.0 Function and Operators, except those also available in XPath 1.0. More...

#include <qxpath20corefunctions_p.h>

Inheritance diagram for QPatternist::XPath20CoreFunctions:
QPatternist::AbstractFunctionFactory QPatternist::FunctionFactory QSharedData

Protected Functions

virtual Expression::Ptr retrieveExpression (const QXmlName name, const Expression::List &args, const FunctionSignature::Ptr &sign) const
 
virtual FunctionSignature::Ptr retrieveFunctionSignature (const NamePool::Ptr &np, const QXmlName name)
 
- Protected Functions inherited from QPatternist::AbstractFunctionFactory
FunctionSignature::Ptr addFunction (const QXmlName::LocalNameCode localName, const FunctionSignature::Arity minArgs, const FunctionSignature::Arity maxArgs, const SequenceType::Ptr &returnType, const Expression::Properties props)
 
FunctionSignature::Ptr addFunction (const QXmlName::LocalNameCode &localName, const FunctionSignature::Arity minArgs, const FunctionSignature::Arity maxArgs, const SequenceType::Ptr &returnType, const Expression::ID id=Expression::IDIgnorableExpression, const Expression::Properties props=Expression::Properties(), const StandardNamespaces::ID ns=StandardNamespaces::fn)
 
- Protected Functions inherited from QPatternist::FunctionFactory
 FunctionFactory ()
 This constructor cannot be removed, because it can't be synthesized, for some reason. More...
 

Additional Inherited Members

- Public Types inherited from QPatternist::FunctionFactory
typedef QList< FunctionFactory::PtrList
 
typedef QExplicitlySharedDataPointer< FunctionFactoryPtr
 
- Public Functions inherited from QPatternist::AbstractFunctionFactory
virtual Expression::Ptr createFunctionCall (const QXmlName name, const Expression::List &arguments, const StaticContext::Ptr &context, const SourceLocationReflection *const r)
 
virtual FunctionSignature::Hash functionSignatures () const
 
- Public Functions inherited from QPatternist::FunctionFactory
bool hasSignature (const FunctionSignature::Ptr &signature) const
 
virtual bool isAvailable (const NamePool::Ptr &np, const QXmlName name, const xsInteger arity)
 
virtual ~FunctionFactory ()
 
- Public Functions inherited from QSharedData
 QSharedData ()
 Constructs a QSharedData object with a reference count of 0. More...
 
 QSharedData (const QSharedData &)
 Constructs a QSharedData object with reference count 0. More...
 
- Public Variables inherited from QSharedData
QAtomicInt ref
 
- Static Protected Functions inherited from QPatternist::AbstractFunctionFactory
static QXmlName::LocalNameCode argument (const NamePool::Ptr &np, const char *const name)
 
- Protected Variables inherited from QPatternist::AbstractFunctionFactory
FunctionSignature::Hash m_signatures
 

Detailed Description

Handles the functions defines in XQuery 1.0 and XPath 2.0 Function and Operators, except those also available in XPath 1.0.

All XPath 2.0 functions is the union of the functions available in XPath20CoreFunctions and XPath10CoreFunctions. One could therefore say that the name XPath20CoreFunctions is a bit misleading.

See also
XPath10CoreFunctions
XQuery 1.0 and XPath 2.0 Functions and Operators
XML Path Language (XPath) Version 1.0, 4 Core Function Library
Author
Frans Englich frans.nosp@m..eng.nosp@m.lich@.nosp@m.noki.nosp@m.a.com

Definition at line 80 of file qxpath20corefunctions_p.h.

Functions

◆ retrieveExpression()

Expression::Ptr XPath20CoreFunctions::retrieveExpression ( const QXmlName  name,
const Expression::List args,
const FunctionSignature::Ptr sign 
) const
protectedvirtual

This function is responsible for creating the actual Expression, corresponding to localName and the function signature sign. It is called by createFunctionCall(), once it have been determined the function actually exists and have the correct arity.

This function will only be called for names in the fn namespace.

Implements QPatternist::AbstractFunctionFactory.

Definition at line 83 of file qxpath20corefunctions.cpp.

86 {
87  Q_ASSERT(sign);
88 
89  Expression::Ptr fn;
90 #define testFN(ln, cname) else if(name.localName() == StandardLocalNames::ln) fn = Expression::Ptr(new cname())
91 
92  if(false) /* Dummy for the macro handling. Will be optimized away anyway. */
93  return Expression::Ptr();
94  /* Alphabetic order. */
95  testFN(QName, QNameFN);
96  testFN(abs, AbsFN);
97  testFN(adjust_date_to_timezone, AdjustDateToTimezoneFN);
98  testFN(adjust_dateTime_to_timezone, AdjustDateTimeToTimezoneFN);
99  testFN(adjust_time_to_timezone, AdjustTimeToTimezoneFN);
100  testFN(avg, AvgFN);
101  testFN(base_uri, BaseURIFN);
102  testFN(codepoint_equal, CodepointEqualFN);
103  testFN(codepoints_to_string, CodepointsToStringFN);
104  testFN(collection, CollectionFN);
106  testFN(current_date, CurrentDateFN);
107  testFN(current_dateTime, CurrentDateTimeFN);
108  testFN(current_time, CurrentTimeFN);
109  testFN(dateTime, DateTimeFN);
110  testFN(day_from_date, DayFromAbstractDateTimeFN);
111  testFN(day_from_dateTime, DayFromAbstractDateTimeFN);
112  testFN(days_from_duration, DaysFromDurationFN);
113  testFN(deep_equal, DeepEqualFN);
114  testFN(default_collation, DefaultCollationFN);
115  testFN(distinct_values, DistinctValuesFN);
116  testFN(doc, DocFN);
117  testFN(doc_available, DocAvailableFN);
118  testFN(document_uri, DocumentURIFN);
120  testFN(encode_for_uri, EncodeForURIFN);
121  testFN(ends_with, EndsWithFN);
122  testFN(error, ErrorFN);
123  testFN(escape_html_uri, EscapeHtmlURIFN);
125  testFN(hours_from_dateTime, HoursFromAbstractDateTimeFN);
126  testFN(hours_from_duration, HoursFromDurationFN);
127  testFN(hours_from_time, HoursFromAbstractDateTimeFN);
128  testFN(idref, IdrefFN);
129  testFN(implicit_timezone, ImplicitTimezoneFN);
130  testFN(in_scope_prefixes, InScopePrefixesFN);
131  testFN(index_of, IndexOfFN);
132  testFN(insert_before, InsertBeforeFN);
133  testFN(iri_to_uri, IriToURIFN);
134  testFN(local_name_from_QName, LocalNameFromQNameFN);
135  testFN(lower_case, LowerCaseFN);
136  testFN(matches, MatchesFN);
137  testFN(max, MaxFN);
138  testFN(min, MinFN);
139  testFN(minutes_from_dateTime, MinutesFromAbstractDateTimeFN);
140  testFN(minutes_from_duration, MinutesFromDurationFN);
141  testFN(minutes_from_time, MinutesFromAbstractDateTimeFN);
142  testFN(month_from_date, MonthFromAbstractDateTimeFN);
143  testFN(month_from_dateTime, MonthFromAbstractDateTimeFN);
144  testFN(months_from_duration, MonthsFromDurationFN);
145  testFN(namespace_uri_for_prefix, NamespaceURIForPrefixFN);
146  testFN(namespace_uri_from_QName, NamespaceURIFromQNameFN);
147  testFN(nilled, NilledFN);
148  testFN(node_name, NodeNameFN);
149  testFN(normalize_unicode, NormalizeUnicodeFN);
150  testFN(prefix_from_QName, PrefixFromQNameFN);
151  testFN(remove, RemoveFN);
152  testFN(replace, ReplaceFN);
153  testFN(resolve_QName, ResolveQNameFN);
154  testFN(resolve_uri, ResolveURIFN);
155  testFN(generic_string_join, StringJoinFN);
157  testFN(root, RootFN);
158  testFN(round_half_to_even, RoundHalfToEvenFN);
159  testFN(seconds_from_dateTime, SecondsFromAbstractDateTimeFN);
160  testFN(seconds_from_duration, SecondsFromDurationFN);
161  testFN(seconds_from_time, SecondsFromAbstractDateTimeFN);
162  testFN(static_base_uri, StaticBaseURIFN);
163  testFN(string_join, StringJoinFN);
164  testFN(string_to_codepoints, StringToCodepointsFN);
165  testFN(subsequence, SubsequenceFN);
166  testFN(timezone_from_date, TimezoneFromAbstractDateTimeFN);
167  testFN(timezone_from_dateTime, TimezoneFromAbstractDateTimeFN);
168  testFN(timezone_from_time, TimezoneFromAbstractDateTimeFN);
169  testFN(tokenize, TokenizeFN);
170  testFN(trace, TraceFN);
171  testFN(upper_case, UpperCaseFN);
172  testFN(year_from_date, YearFromAbstractDateTimeFN);
173  testFN(year_from_dateTime, YearFromAbstractDateTimeFN);
174  testFN(years_from_duration, YearsFromDurationFN);
175 #undef testFN
176 
177  if(fn)
178  {
179  fn->setOperands(args);
180  fn->as<FunctionCall>()->setSignature(sign);
181  }
182  else
183  {
184  /* Do the ones which are not FunctionCall sub-classes. The effect is
185  * that FunctionCall sub-classes has "automatic" type checking in the base
186  * class done from the background of their function signature, while
187  * these special classes are on their own, and must do it manually. */
188  if(name.localName() == StandardLocalNames::data)
189  fn = Expression::Ptr(new Atomizer(args.first()));
190  else if(name.localName() == StandardLocalNames::zero_or_one)
193  else if(name.localName() == StandardLocalNames::one_or_more)
196  else if(name.localName() == StandardLocalNames::exactly_one)
199  else if(name.localName() == StandardLocalNames::unordered)
200  /* We don't make use of the unordered() function, so just pop in
201  * the arg. */
202  fn = args.first();
203  }
204 
205  return fn;
206 }
Implements the function fn:current-dateTime().
Implements the function fn:years-from-duration().
Implements the function fn:base-uri().
Base class for implementations of builtin functions.
Implements the function fn:adjust-dateTime-to-timezone().
virtual void setOperands(const Expression::List &operands)=0
Verifies that the sequence an Expression evaluates to conforms to a Cardinality.
#define error(msg)
static C reverse(const C &l)
Implements the function fn:lower-case().
Implements the function fn:replace().
Implements the function fn:remove().
Implements the function fn:prefix-from-QXmlName().
Definition: qqnamefns_p.h:103
Implements the function fn:local-name-from-QXmlName().
Definition: qqnamefns_p.h:115
Implements the function fn:doc().
Implements the function fn:idref().
Implements the function fn:abs().
Definition: qnumericfns_p.h:91
Implements the function fn:namespace-uri-from-QXmlName().
Definition: qqnamefns_p.h:139
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
Implements the function fn:local-name-from-QXmlName().
Definition: qqnamefns_p.h:127
Implements the function fn:default-collation().
Implements the function fn:document-uri().
Implements the function fn:index-of().
Implements the function fn:string-join().
const TCastTarget * as() const
static bool compare(const QVariant::Private *a, const QVariant::Private *b)
Compares a to b.
Definition: qvariant.cpp:383
Implements the function fn:root().
Definition: qnodefns_p.h:161
Implements the function fn:nilled().
static Cardinality oneOrMore()
Implements the function fn:normalize-unicode().
Implements the function fn:node-name().
Implements the function fn:resolve-QXmlName().
Definition: qqnamefns_p.h:91
Implements the function fn:dateTime().
Definition: qdatetimefn_p.h:71
Implements the function fn:ends-with().
Implements the function fn:implicit-timezone().
Extracts the timezone property from a sub-class of AbstractDateTime such as DateTime or Date...
Implements the function fn:deep-equal().
Implements the function fn:current-date().
Implements the function fn:adjust-time-to-timezone().
Base class for the implementations of the fn:min() and fn:max() function.
Implements the function fn:trace().
Definition: qtracefn_p.h:68
Implements the function fn:adjust-dateTime-to-timezone().
Implements the function fn:distinct-values().
Implements the function fn:string-to-codepoints().
QString localName(const QXmlNamePool &query) const
Returns the local name.
Definition: qxmlname.cpp:387
Implements the function fn:iri-to-uri().
Performs atomization. Effectively, it is an implementation of the fn:data() function.
Definition: qatomizer_p.h:76
T & first()
Returns a reference to the first item in the list.
Definition: qlist.h:282
QExplicitlySharedDataPointer< Expression > Ptr
A smart pointer wrapping mutable Expression instances.
Implements the function fn:months-from-duration().
Implements the function fn:QXmlName().
Definition: qqnamefns_p.h:79
Extracts the day property from a sub-class of AbstractDateTime such as DateTime or Date...
Implements the function fn:codepoint-equal().
Implements the function fn:collection().
static Cardinality zeroOrOne()
Implements the function fn:avg().
Implements the function fn:subsequence().
Implements the function fn:escape-html-uri().
Implements the function fn:hours-from-duration().
Implements the function fn:static-base-uri().
Implements the function fn:days-from-duration().
Implements the function fn:minutes-from-duration().
Implements the function fn:current-time().
implements the functions fn:month-from-dateTime() and fn:month-from-date().
Implements the function fn:compare().
Extracts the minutes property from a sub-class of AbstractDateTime such as DateTime or Date...
Implements the function fn:seconds-from-duration().
static Cardinality exactlyOne()
#define testFN(ln, cname)
Implements the function fn:matches().
Implements the function fn:resolve-uri().
Implements the function fn:upper-case().
Implements the function fn:error().
Definition: qerrorfn_p.h:79
Extracts the minute property from a sub-class of AbstractDateTime such as DateTime or SchemaTime...
Implements the function fn:doc-available().
Implements the function fn:round-half-to-even().
Extracts the seconds property from a sub-class of AbstractDateTime such as DateTime or Date...
Implements the function fn:reverse().
Implements the function fn:tokenize().
Implements the function fn:in-scope-prefixes().
Definition: qqnamefns_p.h:151
Extracts the year property from a sub-class of AbstractDateTime such as DateTime or Date...
Implements the functions fn:exists() and fn:empty().
Implements the function fn:codepoints-to-string().
Implements the function fn:encode-for-uri().
Implements the function fn:insert-before().

◆ retrieveFunctionSignature()

FunctionSignature::Ptr XPath20CoreFunctions::retrieveFunctionSignature ( const NamePool::Ptr np,
const QXmlName  name 
)
protectedvirtual

This is a convenience function for sub-classes. It retrieves the function signature for function with name name.

According to the specifications are function signatures identified by their name and arity, but currently is the arity not part of the signature.

If no function could be found for the given name, null is returned.

Implements QPatternist::FunctionFactory.

Definition at line 208 of file qxpath20corefunctions.cpp.

210 {
212  return FunctionSignature::Ptr();
213 
215 
216  if(!s)
217  {
218  const QXmlName::LocalNameCode localName = name.localName();
219 
220  /* Alphabetic order. */
221  if(StandardLocalNames::QName == localName)
222  {
224  s->appendArgument(argument(np, "paramURI"), CommonSequenceTypes::ZeroOrOneString);
225  s->appendArgument(argument(np, "paramQName"), CommonSequenceTypes::ExactlyOneString);
226  }
227  else if(StandardLocalNames::abs == localName)
228  {
231  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneNumeric);
232  }
233  else if(StandardLocalNames::adjust_date_to_timezone == localName)
234  {
237  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDate);
238  s->appendArgument(argument(np, "timezone"), CommonSequenceTypes::ZeroOrOneDayTimeDuration);
239  }
241  {
244  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDateTime);
245  s->appendArgument(argument(np, "timezone"), CommonSequenceTypes::ZeroOrOneDayTimeDuration);
246  }
247  else if(StandardLocalNames::adjust_time_to_timezone == localName)
248  {
251  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneTime);
252  s->appendArgument(argument(np, "timezone"), CommonSequenceTypes::ZeroOrOneDayTimeDuration);
253  }
254  else if(StandardLocalNames::avg == localName)
255  {
258  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrMoreAtomicTypes);
259  }
260  else if(StandardLocalNames::base_uri == localName)
261  {
264  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneNode);
265  }
266  else if(StandardLocalNames::codepoint_equal == localName)
267  {
269  s->appendArgument(argument(np, "comparand1"), CommonSequenceTypes::ZeroOrOneString);
270  s->appendArgument(argument(np, "comparand2"), CommonSequenceTypes::ZeroOrOneString);
271  }
272  else if(StandardLocalNames::codepoints_to_string == localName)
273  {
275  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrMoreIntegers);
276  }
277  else if(StandardLocalNames::collection == localName)
278  {
280  s->appendArgument(argument(np, "uri"), CommonSequenceTypes::ZeroOrOneString);
281  }
282  else if(StandardLocalNames::compare == localName)
283  {
286  s->appendArgument(argument(np, "comparand1"), CommonSequenceTypes::ZeroOrOneString);
287  s->appendArgument(argument(np, "comparand2"), CommonSequenceTypes::ZeroOrOneString);
288  s->appendArgument(argument(np, "collation"), CommonSequenceTypes::ExactlyOneString);
289  }
290  else if(StandardLocalNames::current_date == localName)
291  {
294  }
295  else if(StandardLocalNames::current_dateTime == localName)
296  {
299  }
300  else if(StandardLocalNames::current_time == localName)
301  {
304  }
305  else if(StandardLocalNames::data == localName)
306  {
308  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrMoreItems);
309  }
310  else if(StandardLocalNames::dateTime == localName)
311  {
313  s->appendArgument(argument(np, "arg1"), CommonSequenceTypes::ZeroOrOneDate);
314  s->appendArgument(argument(np, "arg2"), CommonSequenceTypes::ZeroOrOneTime);
315  }
316  else if(StandardLocalNames::day_from_date == localName)
317  {
320  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDate);
321  }
322  else if(StandardLocalNames::day_from_dateTime == localName)
323  {
326  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDateTime);
327  }
328  else if(StandardLocalNames::days_from_duration == localName)
329  {
332  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDuration);
333  }
334  else if(StandardLocalNames::deep_equal == localName)
335  {
338  s->appendArgument(argument(np, "arg1"), CommonSequenceTypes::ZeroOrMoreItems);
339  s->appendArgument(argument(np, "arg2"), CommonSequenceTypes::ZeroOrMoreItems);
340  s->appendArgument(argument(np, "collation"), CommonSequenceTypes::ExactlyOneString);
341  }
342  else if(StandardLocalNames::default_collation == localName)
343  {
345  }
346  else if(StandardLocalNames::distinct_values == localName)
347  {
352  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrMoreAtomicTypes);
353  s->appendArgument(argument(np, "collation"), CommonSequenceTypes::ExactlyOneString);
354  }
355  else if(StandardLocalNames::doc == localName)
356  {
358  s->appendArgument(argument(np, "uri"), CommonSequenceTypes::ZeroOrOneString);
359  }
360  else if(StandardLocalNames::doc_available == localName)
361  {
363  s->appendArgument(argument(np, "uri"), CommonSequenceTypes::ZeroOrOneString);
364  }
365  else if(StandardLocalNames::document_uri == localName)
366  {
368  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneNode);
369  }
370  else if(StandardLocalNames::empty == localName)
371  {
373  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrMoreItems);
374  }
375  else if(StandardLocalNames::encode_for_uri == localName)
376  {
378  s->appendArgument(argument(np, "uriPart"), CommonSequenceTypes::ZeroOrOneString);
379  }
380  else if(StandardLocalNames::ends_with == localName)
381  {
384  s->appendArgument(argument(np, "arg1"), CommonSequenceTypes::ZeroOrOneString);
385  s->appendArgument(argument(np, "arg2"), CommonSequenceTypes::ZeroOrOneString);
386  s->appendArgument(argument(np, "collation"), CommonSequenceTypes::ExactlyOneString);
387  }
388  else if(StandardLocalNames::error == localName)
389  {
392  s->appendArgument(argument(np, "error"), CommonSequenceTypes::ZeroOrOneQName);
393  s->appendArgument(argument(np, "description"), CommonSequenceTypes::ExactlyOneString);
394  s->appendArgument(argument(np, "errorObject"), CommonSequenceTypes::ZeroOrMoreItems);
395  }
396  else if(StandardLocalNames::escape_html_uri == localName)
397  {
399  s->appendArgument(argument(np, "uri"), CommonSequenceTypes::ZeroOrOneString);
400  }
401  else if(StandardLocalNames::exactly_one == localName)
402  {
404  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ExactlyOneItem);
405  }
406  else if(StandardLocalNames::exists == localName)
407  {
409  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrMoreItems);
410  }
411  else if(StandardLocalNames::hours_from_dateTime == localName)
412  {
415  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDateTime);
416  }
417  else if(StandardLocalNames::hours_from_duration == localName)
418  {
421  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDuration);
422  }
423  else if(StandardLocalNames::hours_from_time == localName)
424  {
427  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneTime);
428  }
429  else if(StandardLocalNames::idref == localName)
430  {
433  s->appendArgument(argument(np, "idrefs"), CommonSequenceTypes::ZeroOrMoreStrings);
434  s->appendArgument(argument(np, "node"), CommonSequenceTypes::ExactlyOneNode);
435  }
436  else if(StandardLocalNames::implicit_timezone == localName)
437  {
440  }
441  else if(StandardLocalNames::in_scope_prefixes == localName)
442  {
444  s->appendArgument(argument(np, "element"), CommonSequenceTypes::ExactlyOneElement);
445  }
446  else if(StandardLocalNames::index_of == localName)
447  {
450  s->appendArgument(argument(np, "seqParam"), CommonSequenceTypes::ZeroOrMoreAtomicTypes);
451  s->appendArgument(argument(np, "searchParam"), CommonSequenceTypes::ExactlyOneAtomicType);
452  s->appendArgument(argument(np, "collation"), CommonSequenceTypes::ExactlyOneString);
453  }
454  else if(StandardLocalNames::insert_before == localName)
455  {
457  s->appendArgument(argument(np, "target"), CommonSequenceTypes::ZeroOrMoreItems);
458  s->appendArgument(argument(np, "position"), CommonSequenceTypes::ExactlyOneInteger);
459  s->appendArgument(argument(np, "insert"), CommonSequenceTypes::ZeroOrMoreItems);
460  }
461  else if(StandardLocalNames::iri_to_uri == localName)
462  {
464  s->appendArgument(argument(np, "uri_part"), CommonSequenceTypes::ZeroOrOneString);
465  }
466  else if(StandardLocalNames::local_name_from_QName == localName)
467  {
470  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneQName);
471  }
472  else if(StandardLocalNames::lower_case == localName)
473  {
476  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneString);
477  }
478  else if(StandardLocalNames::matches == localName)
479  {
481  s->appendArgument(argument(np, "input"), CommonSequenceTypes::ZeroOrOneString);
482  s->appendArgument(argument(np, "pattern"), CommonSequenceTypes::ExactlyOneString);
483  s->appendArgument(argument(np, "flags"), CommonSequenceTypes::ExactlyOneString);
484  }
485  else if(StandardLocalNames::max == localName)
486  {
491  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrMoreAtomicTypes);
492  s->appendArgument(argument(np, "collation"), CommonSequenceTypes::ExactlyOneString);
493  }
494  else if(StandardLocalNames::min == localName)
495  {
500  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrMoreAtomicTypes);
501  s->appendArgument(argument(np, "collation"), CommonSequenceTypes::ExactlyOneString);
502  }
503  else if(StandardLocalNames::minutes_from_dateTime == localName)
504  {
507  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDateTime);
508  }
509  else if(StandardLocalNames::minutes_from_duration == localName)
510  {
513  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDuration);
514  }
515  else if(StandardLocalNames::minutes_from_time == localName)
516  {
519  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneTime);
520  }
521  else if(StandardLocalNames::month_from_date == localName)
522  {
525  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDate);
526  }
527  else if(StandardLocalNames::month_from_dateTime == localName)
528  {
531  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDateTime);
532  }
533  else if(StandardLocalNames::months_from_duration == localName)
534  {
537  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDuration);
538  }
540  {
542  s->appendArgument(argument(np, "prefix"), CommonSequenceTypes::ZeroOrOneString);
543  s->appendArgument(argument(np, "element"), CommonSequenceTypes::ExactlyOneElement);
544  }
546  {
549  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneQName);
550  }
551  else if(StandardLocalNames::nilled == localName)
552  {
554  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneNode);
555  }
556  else if(StandardLocalNames::node_name == localName)
557  {
559  s->appendArgument(argument(np, "theNode"), CommonSequenceTypes::ZeroOrOneNode);
560  }
561  else if(StandardLocalNames::normalize_unicode == localName)
562  {
564  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneString);
565  s->appendArgument(argument(np, "normalizationForm"), CommonSequenceTypes::ExactlyOneString);
566  }
567  else if(StandardLocalNames::one_or_more == localName)
568  {
570  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrMoreItems);
571  }
572  else if(StandardLocalNames::prefix_from_QName == localName)
573  {
576  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneQName);
577  }
578  else if(StandardLocalNames::remove == localName)
579  {
582  s->appendArgument(argument(np, "target"), CommonSequenceTypes::ZeroOrMoreItems);
583  s->appendArgument(argument(np, "position"), CommonSequenceTypes::ExactlyOneInteger);
584  }
585  else if(StandardLocalNames::replace == localName)
586  {
588  s->appendArgument(argument(np, "input"), CommonSequenceTypes::ZeroOrOneString);
589  s->appendArgument(argument(np, "pattern"), CommonSequenceTypes::ExactlyOneString);
590  s->appendArgument(argument(np, "replacement"), CommonSequenceTypes::ExactlyOneString);
591  s->appendArgument(argument(np, "flags"), CommonSequenceTypes::ExactlyOneString);
592  }
593  else if(StandardLocalNames::resolve_QName == localName)
594  {
597  s->appendArgument(argument(np, "qname"), CommonSequenceTypes::ZeroOrOneString);
598  s->appendArgument(argument(np, "element"), CommonSequenceTypes::ExactlyOneElement);
599  }
600  else if(StandardLocalNames::resolve_uri == localName)
601  {
604  s->appendArgument(argument(np, "relative"), CommonSequenceTypes::ZeroOrOneString);
605  s->appendArgument(argument(np, "base"), CommonSequenceTypes::ExactlyOneString);
606  }
607  else if(StandardLocalNames::reverse == localName)
608  {
610  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrMoreItems);
611  }
612  else if(StandardLocalNames::root == localName)
613  {
618  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneNode);
619  }
620  else if(StandardLocalNames::round_half_to_even == localName)
621  {
624  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneNumeric);
625  s->appendArgument(argument(np, "precision"), CommonSequenceTypes::ExactlyOneInteger);
626  }
627  else if(StandardLocalNames::seconds_from_dateTime == localName)
628  {
631  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDateTime);
632  }
633  else if(StandardLocalNames::seconds_from_duration == localName)
634  {
637  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDuration);
638  }
639  else if(StandardLocalNames::seconds_from_time == localName)
640  {
643  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneTime);
644  }
645  else if(StandardLocalNames::static_base_uri == localName)
646  {
648  }
649  else if(StandardLocalNames::string_join == localName)
650  {
652  s->appendArgument(argument(np, "arg1"), CommonSequenceTypes::ZeroOrMoreStrings);
653  s->appendArgument(argument(np, "separator"), CommonSequenceTypes::ExactlyOneString);
654  }
655  else if(StandardLocalNames::generic_string_join == localName)
656  {
661  s->appendArgument(argument(np, "arg1"), CommonSequenceTypes::ZeroOrMoreAtomicTypes);
662  s->appendArgument(argument(np, "separator"), CommonSequenceTypes::ExactlyOneString);
663  }
664  else if(StandardLocalNames::string_to_codepoints == localName)
665  {
667  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneString);
668  }
669  else if(StandardLocalNames::subsequence == localName)
670  {
672  s->appendArgument(argument(np, "sourceSeq"), CommonSequenceTypes::ZeroOrMoreItems);
673  s->appendArgument(argument(np, "startingLoc"), CommonSequenceTypes::ExactlyOneDouble);
674  s->appendArgument(argument(np, "length"), CommonSequenceTypes::ExactlyOneDouble);
675  }
676  else if(StandardLocalNames::timezone_from_date == localName)
677  {
680  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDate);
681  }
682  else if(StandardLocalNames::timezone_from_dateTime == localName)
683  {
686  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDateTime);
687  }
688  else if(StandardLocalNames::timezone_from_time == localName)
689  {
692  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneTime);
693  }
694  else if(StandardLocalNames::tokenize == localName)
695  {
697  s->appendArgument(argument(np, "input"), CommonSequenceTypes::ZeroOrOneString);
698  s->appendArgument(argument(np, "pattern"), CommonSequenceTypes::ExactlyOneString);
699  s->appendArgument(argument(np, "flags"), CommonSequenceTypes::ExactlyOneString);
700  }
701  else if(StandardLocalNames::trace == localName)
702  {
705  s->appendArgument(argument(np, "value"), CommonSequenceTypes::ZeroOrMoreItems);
706  s->appendArgument(argument(np, "label"), CommonSequenceTypes::ExactlyOneString);
707  }
708  else if(StandardLocalNames::unordered == localName)
709  {
711  s->appendArgument(argument(np, "sourceSeq"), CommonSequenceTypes::ZeroOrMoreItems);
712  }
713  else if(StandardLocalNames::upper_case == localName)
714  {
717  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneString);
718  }
719  else if(StandardLocalNames::year_from_date == localName)
720  {
723  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDate);
724  }
725  else if(StandardLocalNames::year_from_dateTime == localName)
726  {
729  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDateTime);
730  }
731  else if(StandardLocalNames::years_from_duration == localName)
732  {
735  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrOneDuration);
736  }
737  else if(StandardLocalNames::zero_or_one == localName)
738  {
740  s->appendArgument(argument(np, "arg"), CommonSequenceTypes::ZeroOrMoreItems);
741  }
742  }
743 
744  return s;
745 }
static const SequenceType::Ptr ZeroOrOneNode
NamespaceCode LocalNameCode
Definition: qxmlname.h:84
static const SequenceType::Ptr ZeroOrMoreItems
static QXmlName::LocalNameCode argument(const NamePool::Ptr &np, const char *const name)
static const SequenceType::Ptr ExactlyOneQName
static const SequenceType::Ptr ZeroOrOneQName
static const SequenceType::Ptr ExactlyOneString
static const SequenceType::Ptr ZeroOrMoreNodes
static const SequenceType::Ptr ExactlyOneAtomicType
static const SequenceType::Ptr ZeroOrOneNCName
static const SequenceType::Ptr ExactlyOneTime
FunctionSignature::Ptr addFunction(const QXmlName::LocalNameCode localName, const FunctionSignature::Arity minArgs, const FunctionSignature::Arity maxArgs, const SequenceType::Ptr &returnType, const Expression::Properties props)
static const SequenceType::Ptr ZeroOrOneInteger
static const SequenceType::Ptr ZeroOrOneString
static const SequenceType::Ptr ZeroOrOneDuration
static const SequenceType::Ptr ExactlyOneInteger
static const SequenceType::Ptr ZeroOrMoreIntegers
virtual FunctionSignature::Hash functionSignatures() const
static const SequenceType::Ptr ExactlyOneAnyURI
static const SequenceType::Ptr ZeroOrMoreElements
static const SequenceType::Ptr ZeroOrOneDayTimeDuration
static const SequenceType::Ptr ExactlyOneDateTime
static const SequenceType::Ptr ZeroOrOneBoolean
static const SequenceType::Ptr ExactlyOneDayTimeDuration
static const SequenceType::Ptr OneOrMoreItems
static const SequenceType::Ptr ZeroOrOneDate
QString localName(const QXmlNamePool &query) const
Returns the local name.
Definition: qxmlname.cpp:387
static const SequenceType::Ptr ZeroOrOneNumeric
static const SequenceType::Ptr ZeroOrOneTime
static const SequenceType::Ptr ExactlyOneBoolean
NamespaceCode namespaceURI() const
Definition: qnamepool_p.h:503
static const SequenceType::Ptr ZeroOrOneDocumentNode
static const SequenceType::Ptr ExactlyOneDouble
static const SequenceType::Ptr ExactlyOneItem
static const SequenceType::Ptr ExactlyOneDate
The QFlags class provides a type-safe way of storing OR-combinations of enum values.
Definition: qglobal.h:2313
static const SequenceType::Ptr ZeroOrOneAtomicType
static const SequenceType::Ptr ZeroOrMoreAtomicTypes
static const SequenceType::Ptr ExactlyOneElement
static const SequenceType::Ptr ZeroOrOneItem
static const SequenceType::Ptr ZeroOrOneAnyURI
static const SequenceType::Ptr ZeroOrOneDecimal
static const SequenceType::Ptr ZeroOrMoreStrings
static const SequenceType::Ptr ExactlyOneNode
static const SequenceType::Ptr ZeroOrOneDateTime

The documentation for this class was generated from the following files: