This commit is contained in:
Bartosz Kuzma
2023-01-11 08:25:15 +01:00
commit 2e0c84ed60
54 changed files with 9875 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
XPath 3.0:
Inline functions (kinda lambda)
Dynamic function calls - function may be called without being referenced by name (find function in collection and call)
Union types - collections containing elements of different types
Namespace literals - Namespace may be embeded into function name
New string concatenation operator '||'
Mapping operator - '!' performs evaluation for each element in sequence and concatenates results
XPath 3.1:
Support for array and map data types
New operator for function chaining - '=>'

View File

@@ -0,0 +1,167 @@
!function;param?desc?param?desc...;expression?result?expression?result
fn:last();current context node?Returns context size in expression context;
fn:position();current context node?Returns possition of current context node in expression context;
fn:count(node-set);node-set?Node-set to count nodes in;count(//b:book)?5?count(//person[@id>5])?17
fn:id(object);if nodeset?string value of each node in the node-set is treated as an id?if string?treated as a space-separated list of ids;
fn:local-name(node-set);node-set?Extract first node and return its local name;local-name(//b:books)?b:book?local-name(//b:book)?b:title
fn:local-name();current context node?Extract first node and return its local name;
fn:namespace-uri(node-set);node-set?Extract first node and return the namespace URI;namespace-uri(//b:book)?http://www.book.com?
fn:namespace-uri();current context node?Extract first node and return the namespace URI;
fn:name(node-set);node-set?Extract first node and return QName;name(//b:books/*)?b:book?name(//b:book/*)?b:title
fn:name();;current context node?Extract first node and return QName;
fn:string(object);string?The object to convert to a string;string((1<0))?false?string(.11)?0.11
fn:string();current context node?Converts current context node to string
fn:concat(string, string, string*);string?String to be merged?string?String to be merged?string*?any number of strings;concat("aa","bb")?aabb?concat("aa", 123)?aa123
fn:starts-with(string, string);string?String to be searched?string?String to be found;starts-with("aabb", "aa")?true?starts-with("aabb", "cc")?false
fn:contains(string, string);string?String to be searched?string?String to be found;contains("abc", "c")?true?contains("abc", "1")?false
fn:substring-before(string, string);string?String to be searched?string?String to be used to split;substring-before("aabbcc","bb")?aa?substring-before("aabbcc","c")?aabb
fn:substring-after(string, string);string?String to be searched?string?String to be used to split;substring-after("aabbcc","bb")?cc?substring-after("aabbcc","a")?abbcc
fn:substring(string, number, number);string?String to be cut?integer?Starting position?integer?Length of the substring;substring("aabbcc", 1, 2)?aa
fn:substring(string, number);string?String to be cut?integer?Starting position?;substring("aabbcc", 3)?bbcc
fn:string-length(string);string?String of which length should be returned;string-length("aabbcc")?6?string-length("aa bb cc")?8
fn:string-length();current context node?Converts current node to string and returns length;
fn:normalize-space(string);string?String to be normalized;normalize-space("aa bb cc")?aa bb cc?normalize-space("aa bb cc")?aa bb cc
fn:normalize-space();current context node?Converts current node to string and performs normalization;
fn:translate(string, string, string);string?String to be edited?string?sequence of characters to be replaced?string?sequence of character to be used in replacement;translate("aabbcc", "ab","xz")?xxzzcc?translate("Test sequence", "e","z")?Tzst szquzncz
fn:boolean(object);expression?The expression to be evaluated;boolean(1>2)?false?boolean("a"="a")?true
fn:not(boolean);boolean?Boolean value to be inverted;not("a"="a")?false?not(true)?false
fn:true();?Returns boolean value true;true()?true
fn:false();?Returns boolean value false;false()?false
fn:lang(string);string?Checks if the context node matches given language;(context: <data xml:lang="en"/>): lang('en')?true?(context: <data xml:lang="en-US"/>): lang('en')?true?(context: <data xml:lang="de"/>): lang('en')?false
fn:number(object);object?Converts given object to a number;number(true())?1?number(false())?0?number("55")?55?number(" 55 ")?55
fn:number();current context node?Converts current context node to a number;number(true())?1?number(false())?0?number("55")?55?number(" 55 ")?55
fn:sum(node-set);node-set?Summs each node from the set passed through number() function;
fn:floor(number);number?Decimal number to be converted to integer;floor(3.1)?3?floor(3.99)?3
fn:ceiling(number);number?Decimal number to be converted to integer;ceiling(3.1)?4?ceiling(3.99)?4
fn:round(number);number?Decimal number to be converted to integer;round(3.1)?3?round(3.6)?4
fn:timezone-from-dateTime(datetime);datetime?DateTime to extract fimezone information from;timezone-from-dateTime(xs:dateTime("2021-01-15T12:10:00-03:00"))?-PT3H
fn:year-from-dateTime(datetime);datetime?datetime to extract years component from;year-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))?2011
fn:month-from-dateTime(datetime);datetime?datetime to extract month component from;month-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))?11
fn:day-from-dateTime(datetime);datetime?datetime to extract day component from;day-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))?15
fn:hours-from-dateTime(datetime);datetime?datetime to extract hours component from;hours-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))?12
fn:minutes-from-dateTime(datetime);datetime?datetime to extract minutes component from;minutes-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))?30
fn:seconds-from-dateTime(datetime);datetime?datetime to extract seconds component from;seconds-from-dateTime(xs:dateTime("2011-11-15T12:30:00-04:10"))?0
fn:hours-from-time(time);time?time to extact hours component from;hours-from-time(xs:time("10:22:00"))?10
fn:minutes-from-time(time);time?time to extract minutes component from;minutes-from-time(xs:time("10:22:00"))?22
fn:seconds-from-time(time);time?Time to convert to seconds;seconds-from-time(xs:time("10:22:00"))?0
fn:year-from-date(date);date?date to extract years component from;year-from-date(xs:date("2011-11-15"))?2011
fn:month-from-date(date);date?Date to extrat the month from;month-from-date(xs:date("2011-11-15"))?11
fn:day-from-date(date);date?date to extact day component from;day-from-date(xs:date("2011-04-23"))?23
fn:current-time();;current-time()?11:48:04.393361+01:00
fn:current-date();current-date()?2021-03-25+01:00
fn:current-dateTime();;current-dateTime()?2021-03-24T18:15:09.808+01:00
fn:dateTime(date,time);date?date to be merged into dateTime?time?time to be merged into dateTime;dateTime(xs:date("2011-11-15"), xs:time("10:22:00"))?2011-11-15T10:22:00
fn:timezone-from-time(time);time?time to extract timezone infromation from;timezone-from-time(xs:time("10:22:00+10:00"))?PT10H
fn:implicit-timezone();;implicit-timezone()?PT1H
fn:years-from-duration(datetimedur);datetimedur?datetimedur to extract years component from;years-from-duration(xs:duration("P5Y2DT10H59M"))?5
fn:months-from-duration(datetimedur);datetimedur?datetimedur to extract months component from;months-from-duration(xs:duration("P5Y10M2DT10H59M"))?10
fn:days-from-duration(datetimedur);datetimedur?datetimedur to extract days component from;days-from-duration(xs:duration("P5Y2DT10H59M"))?2
fn:hours-from-duration(datetimedur);datetimedur?datetimedur to extract hours component from;hours-from-duration(xs:duration("P5Y2DT10H59M"))?10
fn:minutes-from-duration(datetimedur);datetimedur?datetimedur to extract minute component from;years-from-duration(xs:duration("P5Y2DT10H59M"))?59
fn:seconds-from-duration(datetimedur);datetimedur?datetimedur to extract seconds component from;days-from-duration(xs:duration("P5Y2DT10H59M40S"))?40
fn:adjust-dateTime-to-timezone(datetime,timezone);datetime?datetime to be adjusted?timezone?timezone to be used in provided date;adjust-dateTime-to-timezone(xs:dateTime('2011-11-15T12:30:00-04:10'), xs:dayTimeDuration("PT10H"))?2011-11-16T02:40:00+10:00
fn:adjust-date-to-timezone(date,timezone);date?date to be adjusted?timezone?timezone to be imposed into date;adjust-date-to-timezone(xs:date('2011-11-15'), xs:dayTimeDuration("PT10H"))?2011-11-15+10:00
fn:timezone-from-date(date);date?date to extract timezone information from;timezone-from-date(xs:date("2011-11-15+11:00"))?PT1H?timezone-from-date(xs:date("2011-11-15+11:00"))?PT11H
fn:adjust-time-to-timezone(time,timezone);time?time to be adjusted?dayTimeDuration?timezone to be appended?adjust-time-to-timezone(xs:time("12:30:00"),xs:dayTimeDuration("PT11H"))?12:30:00+11:00
!SEQUENCE
fn:data(item.item,...);sequence*?sequence to be split to atomic values;data((1,2,23, "test"))?1 2 23 test
fn:insert-before((item,item,...),pos,inserts);Returns a new sequence constructed from the value of the item arguments
fn:min((arg,arg,...));sequence*?sequence to select minimum from;min((1,2,3))?1?min(('a', 'k'))?'a'
fn:avg((arg,arg,...));sequence*?returns average value of provided elements;avg((1,2,3))?2
fn:max((arg,arg,...));sequence*?sequence to select maximum from;max((1,2,3))?3?max(('a', 'k'))?'k'
fn:exactly-one(item,item,...);sequence?sequence to check;exactly-one((1))?1?exactly-one((1,1))?fn:exactly-one called with a sequence containing zero or more than one item.
fn:one-or-more(item,item,...);sequence?sequence to check;one-or-more((1, 2, 3))?1 2 3?one-or-more()?An empty sequence is not allowed as the first argument of fn:one-or-more()
fn:empty(item,item,...);sequence?sequence to check?empty(())?true?empty((1))?false?empty((1,2,3))?false
fn:distinct-values((item,item,...),collation);sequence?sequence to extract distinct values from;distinct-values((1, 2, 3, 1, 2))?(1, 2, 3)
fn:exists(item,item,...);Returns true if the value of the arguments IS NOT an empty sequence, otherwise it returns false?exists(remove(("ab"), 1))?false
!STRING
fn:upper-case(string);string?string to be converted to upper case;upper-case('aabbCC')?'AABBCC'
fn:lower-case(string);string?string to be converted to upper case;lower-case('aabbCC')?'aabbcc'
fn:string-join((string,string,...),sep);string*?string sequence to be joined?string?separator to be used;string-join(('fox', 'jumps', 'over', 'dog'), ' ')?' fox jumps over dog '?string-join(('fox', 'jumps', 'over', 'dog'))?'joxjumpsoverdog'
fn:string-to-codepoints(string);string?string to be coverted to list of unicode values;string-to-codepoints("test")?(116, 101, 115, 116)
fn:codepoints-to-string((int,int,...));int*?int sequence to be converted to string;codepoints-to-string((116, 101, 115, 116))?'test'
fn:compare(comp1,comp2);string?first parameter to be compared?string?second parameter to be compared;compare('abc', 'abc')?0?compare('abc', 'abd')?-1?compare('abc1', 'abd')?-1?compare("abc1","abc")?1
fn:compare(comp1,comp2,collation);string?first parameter to be compared?string?second parameter to be compared?string?collation to be used in comparison(letter weight may differ between languages);compare('ghi', 'ghi')?0
!NUMBER
fn:deep-equal(param1,param2,collation);
fn:default-collation();;
fn:codepoint-equal(comp1,comp2);int?unicode codepoint?int?unicode codepoint;codepoint-equal(111, 111)?true?codepoint-equal(111, 112)?false?codepoint-equal("111F", "111F")?true
fn:node-name(node);node?node to retrieve QName from;
fn:remove((item,item,...),position);sequence*?sequence to be modified?integer?position to insert element from;remove(("a","b","c"), 1)?b c?remove(("a","b","c"), 0)?a b c
fn:insert-before((item,item,...),position,inserts);sequence*?sequence to be modified?integer?position to insert items to?sequence*?sequence to be inserted?insert-before(("a","b","c"), 2 ,("xx"))?a xx b c
fn:reverse((item,item,...));sequence*?sequence of elements to have its order reversed;reverse(("ab", "cd", "ef"))?("ef", "cd", "ab")?reverse(("ab"))?("ab")
fn:static-base-uri();;default-collation()?http://www.w3.org/2005/xpath-functions/collation/codepoint
fn:root(node);node?node return root from;
fn:tokenize(string,pattern);string?string to be tokenized?string?string to be used to split the first argument;tokenize("fox jumps over dog", "\s+")?("fox", "jumps", "over", "dog")
fn:round-half-to-even(number);number?number to be rounded to nearest whole number;round-half-to-even(0.5)?0?round-half-to-even(1.5)?2?round-half-to-even(2.5)?2
fn:round-half-to-even(number, precision);number?number to be rounded to nearest whole number?number?precision to be used during rounding;round-half-to-even(1.54, 1)?1.5?
fn:abs(num);number?number to be converted to absolute value;abs(5)?5?abs(-5)?5
fn:matches(string,pattern);string?string to search in?string?pattern to be found;matches("Xpath", "pat")?true?matches("Xpath", "abc")?false
fn:document-uri(node);
!Math
math:acos(double);double?value to calculate arcus cosine for;acos(0)?1.5707963267948966?acos(1)?0
math:asin(double);double?value to calculate arcus sine for;asin(1)?1.5707963267948966?asin(0)?0
math:atan(double);double?value to calculate arcus tangent for;atan(0)?0?atan(10)?1.4711276743037347
math:atan2(double, double);double?x value?double?y value;atan2(1,1)?0.7853981633974483
math:cos(double);double?value to calculate cosine for;cos(0)?1?cos(3.14)?-1
math:exp(double);double?value to which power e should be raised;exp(1)?2.718281828459045?exp(10)?22026.465794806718
math:exp10(double);double?value to which power 10 should be raised;exp10(2)?100?exp10(20)?1.0E20
math:log(double);double?value for which to calculate a natural logarithm;log(1)?0?log(10)?2.302585092994046
math:log10(double);double?value for which to calculate a base-10 logarithm;log10(10)?1?log10(100)?2
math:pi();;pi()?3.141592653589793
math:pow(double, double);double?number to be raised?double?value of the power;pow(2,2)?4?pow(3,2)?9
math:sin(double);double?value to calculate sine for;sin(0)?0?sin(1)?0.8414709848078965
math:sqrt(double);double?value to calculate square root for;sqrt(9)?3?sqrt(1)?1.4142135623730951
math:tan(double);double?value to calculate tangent for;tan(0)?0?tan(1)?1.5574077246549023
!Loop / Conditional
fn:for-each(sequence*, function);sequence?sequence to run the function for?function?function to be perfomed on each element of sequence;for-each((1,2,3,4,5),function($a) { $a*$a })?1 4 9 16 25
fn:for-each-pair(sequence*, sequence*, function);sequence1?sequence to run the function for?sequenc2?sequence to run the function for?function?function to be perfomed on each element of sequence;for-each-pair((1,2,3,4,5), (1,2,3,4,5),function($a, $b) { $a+$b })?2 4 6 8 10
fn:fold-left(sequence*, baseValue, function);sequence?sequence to run the function for?item?a starting value for function?function?the function to be run for each consecutive element;fold-left((1,2,3), 0,function($a, $b) { ($a)-($b) })?-6
fn:fold-right();sequence?sequence to run the function for?item?a starting value for function?function?the function to be run for each consecutive element;fold-right((1,2,3), 0,function($a, $b) { ($a)-($b) })?2
fn:filter(sequence*, function);sequence?the sequence to be filtered?function?function to be used as filter;filter((1,2, 3, 4, 5),function($a) { ($a) > 3 })?4 5
fn:analyze-string(input, pattern);string?the string that is to be analized?string?regex?analyze-string("Word and whitespace", "\w+")?<analyze-string-result xmlns="http://www.w3.org/2005/xpath-functions"><br><match>Word</match><br><non-match> </non-match><br><match>and</match><non-match> </non-match><br><match>whitespace</match></analyze-string-result>
fn:available-environment-variables();;available-environment-variables()?PATH INVOCATION_ID XAUTHORITY LC_MEASUREMENT LC_TELEPHONE
fn:doc-available(uri);uri?the document to be checked
fn:element-with-id();;
fn:encode-for-uri(uri-part);string?string containing character to be escaped for uri
fn:environment-variable(name);string?the name of enviroment variable to return;environment-variable("GJS_DEBUG_OUTPUT")?stderr
fn:escape-html-uri(uri);;
fn:format-date(value, pattern);date?value to be formated?pattern?pattern to format the date in (also refered to as picture);format-date(xs:date("2021-03-31+02:00"), "[D]-[M]-[Y]")?31-3-2021
fn:format-dateTime(value, pattern);dateTime?value to be formated?pattern?pattern to format the dateTime in (also refered to as picture);format-dateTime(xs:dateTime("2021-03-31T17:55:54.004666+02:00"), "[D]-[M]-[Y] [H]:[m01]")?31-3-2021 17:55
fn:format-integer(value, pattern);integer?value to be formated?pattern?pattern to format the integer in (also refered to as picture);
fn:format-number(value, pattern);number?value to be formated?pattern?pattern to format the number in (also refered to as picture);
fn:format-time(value, pattern);time?value to be formated?pattern?pattern to format the time in (also refered to as picture);format-time(xs:time("17:57:07.473366+02:00"), "[H]:[m01]")
fn:function-arity(function);function?function for which to check number of parameters
fn:function-lookup(name, arity);;
fn:function-name();;
fn:has-children(node);node?node to be checked if has any children;NONE
fn:head(sequence);sequence?sequence from which the first element is to be retrieved;head((1, 2, 3))?1
fn:innermost(node);NONE
fn:iri-to-uri(iri);;

View File

@@ -0,0 +1,121 @@
!function;param?desc?param?desc...;expression?result?expression?result
fn:last();current context node?Returns context size in expression context;
fn:position();current context node?Returns possition of current context node in expression context;
fn:count(node-set);node-set?Node-set to count nodes in;count(//b:book)?5?count(//person[@id>5])?17
fn:id(object);if nodeset?string value of each node in the node-set is treated as an id?if string?treated as a space-separated list of ids;
fn:local-name(node-set);node-set?Extract first node and return its local name;local-name(//b:books)?b:book?local-name(//b:book)?b:title
fn:local-name();current context node?Extract first node and return its local name;
fn:namespace-uri(node-set);node-set?Extract first node and return the namespace URI;namespace-uri(//b:book)?http://www.book.com?
fn:namespace-uri();current context node?Extract first node and return the namespace URI;
fn:name(node-set);node-set?Extract first node and return QName;name(//b:books/*)?b:book?name(//b:book/*)?b:title
fn:name();;current context node?Extract first node and return QName;
fn:string(object);string?The object to convert to a string;string((1<0))?false?string(.11)?0.11
fn:string();current context node?Converts current context node to string
fn:concat(string, string, string*);string?String to be merged?string?String to be merged?string*?any number of strings;concat("aa","bb")?aabb?concat("aa", 123)?aa123
fn:starts-with(string, string);string?String to be searched?string?String to be found;starts-with("aabb", "aa")?true?starts-with("aabb", "cc")?false
fn:contains(string, string);string?String to be searched?string?String to be found;contains("abc", "c")?true?contains("abc", "1")?false
fn:substring-before(string, string);string?String to be searched?string?String to be used to split;substring-before("aabbcc","bb")?aa?substring-before("aabbcc","c")?aabb
fn:substring-after(string, string);string?String to be searched?string?String to be used to split;substring-after("aabbcc","bb")?cc?substring-after("aabbcc","a")?abbcc
fn:substring(string, number, number);string?String to be cut?integer?Starting position?integer?Length of the substring;substring("aabbcc", 1, 2)?aa
fn:substring(string, number);string?String to be cut?integer?Starting position?;substring("aabbcc", 3)?bbcc
fn:string-length(string);string?String of which length should be returned;string-length("aabbcc")?6?string-length("aa bb cc")?8
fn:string-length();current context node?Converts current node to string and returns length;
fn:normalize-space(string);string?String to be normalized;normalize-space("aa bb cc")?aa bb cc?normalize-space("aa bb cc")?aa bb cc
fn:normalize-space();current context node?Converts current node to string and performs normalization;
fn:translate(string, string, string);string?String to be edited?string?sequence of characters to be replaced?string?sequence of character to be used in replacement;translate("aabbcc", "ab","xz")?xxzzcc?translate("Test sequence", "e","z")?Tzst szquzncz
fn:boolean(object);expression?The expression to be evaluated;boolean(1>2)?false?boolean("a"="a")?true
fn:not(boolean);boolean?Boolean value to be inverted;not("a"="a")?false?not(true)?false
fn:true();?Returns boolean value true;true()?true
fn:false();?Returns boolean value false;false()?false
fn:lang(string);string?Checks if the context node matches given language;(context: <data xml:lang="en"/>): lang('en')?true?(context: <data xml:lang="en-US"/>): lang('en')?true?(context: <data xml:lang="de"/>): lang('en')?false
fn:number(object);object?Converts given object to a number;number(true())?1?number(false())?0?number("55")?55?number(" 55 ")?55
fn:number();current context node?Converts current context node to a number;number(true())?1?number(false())?0?number("55")?55?number(" 55 ")?55
fn:sum(node-set);node-set?Summs each node from the set passed through number() function;
fn:floor(number);number?Decimal number to be converted to integer;floor(3.1)?3?floor(3.99)?3
fn:ceiling(number);number?Decimal number to be converted to integer;ceiling(3.1)?4?ceiling(3.99)?4
fn:round(number);number?Decimal number to be converted to integer;round(3.1)?3?round(3.6)?4
fn:timezone-from-dateTime(datetime);datetime?DateTime to extract fimezone information from;timezone-from-dateTime(xs:dateTime("2021-01-15T12:10:00-03:00"))?-PT3H
fn:year-from-dateTime(datetime);datetime?datetime to extract years component from;year-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))?2011
fn:month-from-dateTime(datetime);datetime?datetime to extract month component from;month-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))?11
fn:day-from-dateTime(datetime);datetime?datetime to extract day component from;day-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))?15
fn:hours-from-dateTime(datetime);datetime?datetime to extract hours component from;hours-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))?12
fn:minutes-from-dateTime(datetime);datetime?datetime to extract minutes component from;minutes-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))?30
fn:seconds-from-dateTime(datetime);datetime?datetime to extract seconds component from;seconds-from-dateTime(xs:dateTime("2011-11-15T12:30:00-04:10"))?0
fn:hours-from-time(time);time?time to extact hours component from;hours-from-time(xs:time("10:22:00"))?10
fn:minutes-from-time(time);time?time to extract minutes component from;minutes-from-time(xs:time("10:22:00"))?22
fn:seconds-from-time(time);time?Time to convert to seconds;seconds-from-time(xs:time("10:22:00"))?0
fn:year-from-date(date);date?date to extract years component from;year-from-date(xs:date("2011-11-15"))?2011
fn:month-from-date(date);date?Date to extrat the month from;month-from-date(xs:date("2011-11-15"))?11
fn:day-from-date(date);date?date to extact day component from;day-from-date(xs:date("2011-04-23"))?23
fn:current-time();;current-time()?11:48:04.393361+01:00
fn:current-date();current-date()?2021-03-25+01:00
fn:current-dateTime();;current-dateTime()?2021-03-24T18:15:09.808+01:00
fn:dateTime(date,time);date?date to be merged into dateTime?time?time to be merged into dateTime;dateTime(xs:date("2011-11-15"), xs:time("10:22:00"))?2011-11-15T10:22:00
fn:timezone-from-time(time);time?time to extract timezone infromation from;timezone-from-time(xs:time("10:22:00+10:00"))?PT10H
fn:implicit-timezone();;implicit-timezone()?PT1H
fn:years-from-duration(datetimedur);datetimedur?datetimedur to extract years component from;years-from-duration(xs:duration("P5Y2DT10H59M"))?5
fn:months-from-duration(datetimedur);datetimedur?datetimedur to extract months component from;months-from-duration(xs:duration("P5Y10M2DT10H59M"))?10
fn:days-from-duration(datetimedur);datetimedur?datetimedur to extract days component from;days-from-duration(xs:duration("P5Y2DT10H59M"))?2
fn:hours-from-duration(datetimedur);datetimedur?datetimedur to extract hours component from;hours-from-duration(xs:duration("P5Y2DT10H59M"))?10
fn:minutes-from-duration(datetimedur);datetimedur?datetimedur to extract minute component from;years-from-duration(xs:duration("P5Y2DT10H59M"))?59
fn:seconds-from-duration(datetimedur);datetimedur?datetimedur to extract seconds component from;days-from-duration(xs:duration("P5Y2DT10H59M40S"))?40
fn:adjust-dateTime-to-timezone(datetime,timezone);datetime?datetime to be adjusted?timezone?timezone to be used in provided date;adjust-dateTime-to-timezone(xs:dateTime('2011-11-15T12:30:00-04:10'), xs:dayTimeDuration("PT10H"))?2011-11-16T02:40:00+10:00
fn:adjust-date-to-timezone(date,timezone);date?date to be adjusted?timezone?timezone to be imposed into date;adjust-date-to-timezone(xs:date('2011-11-15'), xs:dayTimeDuration("PT10H"))?2011-11-15+10:00
fn:timezone-from-date(date);date?date to extract timezone information from;timezone-from-date(xs:date("2011-11-15+11:00"))?PT1H?timezone-from-date(xs:date("2011-11-15+11:00"))?PT11H
fn:adjust-time-to-timezone(time,timezone);time?time to be adjusted?dayTimeDuration?timezone to be appended?adjust-time-to-timezone(xs:time("12:30:00"),xs:dayTimeDuration("PT11H"))?12:30:00+11:00
!SEQUENCE
fn:data(item.item,...);sequence*?sequence to be split to atomic values;data((1,2,23, "test"))?1 2 23 test
fn:insert-before((item,item,...),pos,inserts);Returns a new sequence constructed from the value of the item arguments
fn:min((arg,arg,...));sequence*?sequence to select minimum from;min((1,2,3))?1?min(('a', 'k'))?'a'
fn:avg((arg,arg,...));sequence*?returns average value of provided elements;avg((1,2,3))?2
fn:max((arg,arg,...));sequence*?sequence to select maximum from;max((1,2,3))?3?max(('a', 'k'))?'k'
fn:exactly-one(item,item,...);sequence?sequence to check;exactly-one((1))?1?exactly-one((1,1))?fn:exactly-one called with a sequence containing zero or more than one item.
fn:one-or-more(item,item,...);sequence?sequence to check;one-or-more((1, 2, 3))?1 2 3?one-or-more()?An empty sequence is not allowed as the first argument of fn:one-or-more()
fn:empty(item,item,...);sequence?sequence to check?empty(())?true?empty((1))?false?empty((1,2,3))?false
fn:distinct-values((item,item,...),collation);sequence?sequence to extract distinct values from;distinct-values((1, 2, 3, 1, 2))?(1, 2, 3)
fn:exists(item,item,...);Returns true if the value of the arguments IS NOT an empty sequence, otherwise it returns false?exists(remove(("ab"), 1))?false
!STRING
fn:upper-case(string);string?string to be converted to upper case;upper-case('aabbCC')?'AABBCC'
fn:lower-case(string);string?string to be converted to upper case;lower-case('aabbCC')?'aabbcc'
fn:string-join((string,string,...),sep);string*?string sequence to be joined?string?separator to be used;string-join(('fox', 'jumps', 'over', 'dog'), ' ')?' fox jumps over dog '?string-join(('fox', 'jumps', 'over', 'dog'))?'joxjumpsoverdog'
fn:string-to-codepoints(string);string?string to be coverted to list of unicode values;string-to-codepoints("test")?(116, 101, 115, 116)
fn:codepoints-to-string((int,int,...));int*?int sequence to be converted to string;codepoints-to-string((116, 101, 115, 116))?'test'
fn:compare(comp1,comp2);string?first parameter to be compared?string?second parameter to be compared;compare('abc', 'abc')?0?compare('abc', 'abd')?-1?compare('abc1', 'abd')?-1?compare("abc1","abc")?1
fn:compare(comp1,comp2,collation);string?first parameter to be compared?string?second parameter to be compared?string?collation to be used in comparison(letter weight may differ between languages);compare('ghi', 'ghi')?0
!NUMBER
fn:deep-equal(param1,param2,collation);
fn:default-collation();;
fn:codepoint-equal(comp1,comp2);int?unicode codepoint?int?unicode codepoint;codepoint-equal(111, 111)?true?codepoint-equal(111, 112)?false?codepoint-equal("111F", "111F")?true
fn:node-name(node);node?node to retrieve QName from;
fn:remove((item,item,...),position);sequence*?sequence to be modified?integer?position to insert element from;remove(("a","b","c"), 1)?b c?remove(("a","b","c"), 0)?a b c
fn:insert-before((item,item,...),position,inserts);sequence*?sequence to be modified?integer?position to insert items to?sequence*?sequence to be inserted?insert-before(("a","b","c"), 2 ,("xx"))?a xx b c
fn:reverse((item,item,...));sequence*?sequence of elements to have its order reversed;reverse(("ab", "cd", "ef"))?("ef", "cd", "ab")?reverse(("ab"))?("ab")
fn:static-base-uri();;default-collation()?http://www.w3.org/2005/xpath-functions/collation/codepoint
fn:root(node);node?node return root from;
fn:tokenize(string,pattern);string?string to be tokenized?string?string to be used to split the first argument;tokenize("fox jumps over dog", "\s+")?("fox", "jumps", "over", "dog")
fn:round-half-to-even(number);number?number to be rounded to nearest whole number;round-half-to-even(0.5)?0?round-half-to-even(1.5)?2?round-half-to-even(2.5)?2
fn:round-half-to-even(number, precision);number?number to be rounded to nearest whole number?number?precision to be used during rounding;round-half-to-even(1.54, 1)?1.5?
fn:abs(num);number?number to be converted to absolute value;abs(5)?5?abs(-5)?5
fn:matches(string,pattern);string?string to search in?string?pattern to be found;matches("Xpath", "pat")?true?matches("Xpath", "abc")?false
fn:document-uri(node);

39
FunctionSet/XPath/10 Normal file
View File

@@ -0,0 +1,39 @@
!Node-Set
fn:last();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the position of the last node in the context list
fn:position();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the position of the current context node
fn:count(node-set);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the number of nodes in the node-set
fn:id(object);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the element specified by it's unique id, requires DTD
fn:local-name(node-set);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the local-name for the first node in the node-set
fn:local-name();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the local-name for the context node
fn:namespace-uri(node-set);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the namespace-uri for the first node in the node-set
fn:namespace-uri();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the namespace-uri for the context node
fn:name(node-set);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the name for the first node in the node-set
fn:name();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the name for the context node
!String
fn:string(object);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the string representation of the object argument
fn:string();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns a string value representation of the context node
fn:concat(string, string, string*);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the concatenation of its arguments
fn:starts-with(string, string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns true if the first string starts with the second string
fn:contains(string, string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns true if the first string contains the second string
fn:substring-before(string, string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the substring found before the first occurrence of the second argument
fn:substring-after(string, string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the substring found after the first occurrence of the second argument
fn:substring(string, number, number);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the substring starting at second argument with lenght of third argument
fn:substring(string, number);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the substring of the first argument from the position specified by the second argument
fn:string-length(string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the length of the string specified by the argument
fn:string-length();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the length of the string specified by the context node
fn:normalize-space(string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns a white-space normalized string
fn:normalize-space();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns a white-space normalized string specified by the context-node
fn:translate(string, string, string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Replaces characters specified by the second argument using those from the third argument
!Boolean
fn:boolean(object);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions;Returns the boolean representation of the object argument
fn:not(boolean);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions;Returns a boolean with the opposite value of its argument
fn:true();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions;Returns a boolean with the value of true
fn:false();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions;Returns a boolean with the value of false
fn:lang(string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions;Returns true if the language of the context node is the same as the languag specified by the argument
!Number
fn:number(object);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions;Returns the number representation of the object argument
fn:number();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions;Returns the number representation of the context node
fn:sum(node-set);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions;Returns the sum of all nodes in the node-set
fn:floor(number);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions;Returns the largest integer value not greater than the argument
fn:ceiling(number);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions;Returns the smallest integer value not less than the argument
fn:round(number);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions;Returns the integer value closest to the argument

130
FunctionSet/XPath/10+20 Normal file
View File

@@ -0,0 +1,130 @@
!Node-Set
fn:last();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the position of the last node in the context list
fn:position();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the position of the current context node
fn:count(node-set);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the number of nodes in the node-set
fn:id(object);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the element specified by it's unique id, requires DTD
fn:local-name(node-set);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the local-name for the first node in the node-set
fn:local-name();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the local-name for the context node
fn:namespace-uri(node-set);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the namespace-uri for the first node in the node-set
fn:namespace-uri();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the namespace-uri for the context node
fn:name(node-set);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the name for the first node in the node-set
fn:name();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the name for the context node
!String
fn:string(object);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the string representation of the object argument
fn:string();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns a string value representation of the context node
fn:concat(string, string, string*);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the concatenation of its arguments
fn:starts-with(string, string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns true if the first string starts with the second string
fn:contains(string, string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns true if the first string contains the second string
fn:substring-before(string, string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the substring found before the first occurrence of the second argument
fn:substring-after(string, string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the substring found after the first occurrence of the second argument
fn:substring(string, number, number);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the substring starting at second argument with lenght of third argument
fn:substring(string, number);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the substring of the first argument from the position specified by the second argument
fn:string-length(string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the length of the string specified by the argument
fn:string-length();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the length of the string specified by the context node
fn:normalize-space(string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns a white-space normalized string
fn:normalize-space();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns a white-space normalized string specified by the context-node
fn:translate(string, string, string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Replaces characters specified by the second argument using those from the third argument
fn:string-join((string,string,...),sep);2.0;https://www.w3.org/TR/xpath-functions/#func-string-join;Returns a string created by concatenating the string arguments and using the sep argument as the separator
fn:string-to-codepoints(string);2.0;https://www.w3.org/TR/xpath-functions/#func-string-to-codepoints;Returns the sequence of the Unicode standard code points from a string
fn:compare(comp1,comp2);2.0;https://www.w3.org/TR/xpath-functions/#func-compare;Returns -1 if comp1 is less than comp2, 0 if comp1 is equal to comp2, or 1 if comp1 is greater than comp2 (according to the rules of the collation that is used)
fn:compare(comp1,comp2,collation);2.0;https://www.w3.org/TR/xpath-functions/#func-compare;Returns -1 if comp1 is less than comp2, 0 if comp1 is equal to comp2, or 1 if comp1 is greater than comp2 (according to the rules of the collation that is used)
fn:codepoints-to-string((int,int,...));2.0;https://www.w3.org/TR/xpath-functions/#func-codepoints-to-string;Creates a string from a sequence of the Unicode Standard code points
fn:codepoint-equal(comp1,comp2);2.0;https://www.w3.org/TR/xpath-functions/#func-codepoint-equal;Returns true if the value of comp1 is equal to the value of comp2, according to the Unicode code point collation (http://www.w3.org/2005/02/xpath-functions/collation/codepoint), otherwise it returns false
fn:normalize-unicode();2.0;https://www.w3.org/TR/xpath-functions/#func-normalize-unicode;NONE
fn:upper-case(string);2.0;https://www.w3.org/TR/xpath-functions/#func-upper-case;Converts the string argument to upper-case
fn:lower-case(string);2.0;https://www.w3.org/TR/xpath-functions/#func-lower-case;Converts the string argument to lower-case
fn:escape-uri(stringURI,esc-res);2.0;https://www.w3.org/TR/xpath-functions/#func-escape-uri;
fn:tokenize(string,pattern);2.0;https://www.w3.org/TR/xpath-functions/#func-tokenize;
fn:matches(string,pattern);2.0;https://www.w3.org/TR/xpath-functions/#func-matches;Returns true if the string argument matches the pattern, otherwise, it returns false
fn:replace(string,pattern,replace);2.0;https://www.w3.org/TR/xpath-functions/#func-replace;Returns a string that is created by replacing the given pattern with the replace argument
fn:ends-with(string1,string2);2.0;https://www.w3.org/TR/xpath-functions/#func-ends-with;Returns true if string1 ends with string2, otherwise it returns false
!Boolean
fn:boolean(object);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions;Returns the boolean representation of the object argument
fn:not(boolean);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions;Returns a boolean with the opposite value of its argument
fn:true();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions;Returns a boolean with the value of true
fn:false();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions;Returns a boolean with the value of false
fn:lang(string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions;Returns true if the language of the context node is the same as the languag specified by the argument
!Number
fn:number(object);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions;Returns the number representation of the object argument
fn:number();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions;Returns the number representation of the context node
fn:sum(node-set);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions;Returns the sum of all nodes in the node-set
fn:floor(number);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions;Returns the largest integer value not greater than the argument
fn:ceiling(number);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions;Returns the smallest integer value not less than the argument
fn:round(number);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions;Returns the integer value closest to the argument
fn:round-half-to-even();2.0;https://www.w3.org/TR/xpath-functions/#func-round-half-to-even;
fn:abs(num);2.0;https://www.w3.org/TR/xpath-functions/#func-abs;Returns the absolute value of the argument
!Date / Time
fn:adjust-date-to-timezone(date,timezone);2.0;https://www.w3.org/TR/xpath-functions/#func-adjust-date-to-timezone;If the timezone argument is empty, it returns a date without a timezone. Otherwise, it returns a date with a timezone
fn:adjust-time-to-timezone(time,timezone);2.0;https://www.w3.org/TR/xpath-functions/#func-adjust-time-to-timezone;If the timezone argument is empty, it returns a time without a timezone. Otherwise, it returns a time with a timezone
fn:implicit-timezone();2.0;https://www.w3.org/TR/xpath-functions/#func-implicit-timezone;Returns the value of the implicit timezone
fn:dateTime(date,time);2.0;https://www.w3.org/TR/xpath-functions/#func-dateTime;Converts the arguments to a date and a time
fn:current-time();2.0;https://www.w3.org/TR/xpath-functions/#func-current-time;Returns the current time (with timezone)
fn:timezone-from-time(time);2.0;https://www.w3.org/TR/xpath-functions/#func-timezone-from-time;Returns the time zone component of the argument if any
fn:hours-from-time(time);2.0;https://www.w3.org/TR/xpath-functions/#func-hours-from-time;Returns an integer that represents the hours component in the localized value of the argument
fn:minutes-from-time(time);2.0;https://www.w3.org/TR/xpath-functions/#func-minutes-from-time;Returns an integer that represents the minutes component in the localized value of the argument
fn:seconds-from-time(time);2.0;https://www.w3.org/TR/xpath-functions/#func-seconds-from-time;Returns an integer that represents the seconds component in the localized value of the argument
fn:years-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-years-from-duration;Returns an integer that represents the years component in the canonical lexical representation of the value of the argument
fn:months-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-years-from-duration;Returns an integer that represents the months component in the canonical lexical representation of the value of the argument
fn:days-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-days-from-duration;Returns an integer that represents the days component in the canonical lexical representation of the value of the argument
fn:hours-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-hours-from-duration;Returns an integer that represents the hours component in the canonical lexical representation of the value of the argument
fn:minutes-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-minutes-from-duration;Returns an integer that represents the minutes component in the canonical lexical representation of the value of the argument
fn:seconds-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-seconds-from-duration;Returns a decimal that represents the seconds component in the canonical lexical representation of the value of the argument
fn:current-date();2.0;https://www.w3.org/TR/xpath-functions/#func-current-date;Returns the current date (with timezone)
fn:timezone-from-date(date);2.0;https://www.w3.org/TR/xpath-functions/#func-timezone-from-date;Returns the time zone component of the argument if any
fn:year-from-date(date);2.0;https://www.w3.org/TR/xpath-functions/#func-year-from-date;Returns an integer that represents the year in the localized value of the argument
fn:month-from-date(date);2.0;https://www.w3.org/TR/xpath-functions/#func-month-from-date;Returns an integer that represents the month in the localized value of the argument
fn:day-from-date(date);2.0;https://www.w3.org/TR/xpath-functions/#func-day-from-date;Returns an integer that represents the day in the localized value of the argument
fn:current-dateTime();2.0;https://www.w3.org/TR/xpath-functions/#func-current-dateTime;Returns the current dateTime (with timezone)
fn:timezone-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-timezone-from-dateTime;Returns the time zone component of the argument if any
fn:year-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-year-from-dateTime;Returns an integer that represents the year component in the localized value of the argument
fn:month-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-month-from-dateTime;Returns an integer that represents the month component in the localized value of the argument
fn:day-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-day-from-dateTime;Returns an integer that represents the day component in the localized value of the argument
fn:hours-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-hours-from-dateTime;Returns an integer that represents the hours component in the localized value of the argument
fn:minutes-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-minutes-from-dateTime;Returns an integer that represents the minutes component in the localized value of the argument
fn:seconds-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-seconds-from-dateTime;Returns a decimal that represents the seconds component in the localized value of the argument
fn:adjust-dateTime-to-timezone(datetime,timezone);2.0;https://www.w3.org/TR/xpath-functions/#func-adjust-dateTime-to-timezone;If the timezone argument is empty, it returns a dateTime without a timezone. Otherwise, it returns a dateTime with a timezone
!Collections
fn:avg((arg,arg,...));2.0;https://www.w3.org/TR/xpath-functions/#func-avg;Returns the average of the argument values
fn:exactly-one(item,item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-exactly-one;Returns the argument if it contains exactly one item, otherwise it raises an error
fn:zero-or-one(item,item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-zero-or-one;Returns the argument if it contains zero or one items, otherwise it raises an error
fn:index-of((item,item,...),searchitem);2.0;https://www.w3.org/TR/xpath-functions/#func-index-of;Returns the positions within the sequence of items that are equal to the searchitem argument
fn:reverse((item,item,...));2.0;https://www.w3.org/TR/xpath-functions/#func-reverse;Returns the reversed order of the items specified
fn:one-or-more(item,item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-one-or-more;Returns the argument if it contains one or more items, otherwise it raises an error
fn:distinct-values((item,item,...),collation);2.0;https://www.w3.org/TR/xpath-functions/#func-distinct-values;Returns only distinct (different) values
fn:exists(item,item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-exists;Returns true if the value of the arguments IS NOT an empty sequence, otherwise it returns false
fn:subsequence((item,item,...),start,len);2.0;https://www.w3.org/TR/xpath-functions/#func-subsequence;Returns a sequence of items from the position specified by the start argument and continuing for the number of items specified by the len argument. The first item is located at position 1
fn:empty(item,item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-empty;Returns true if the value of the arguments IS an empty sequence, otherwise it returns false
fn:insert-before((item,item,...),pos,inserts);2.0;https://www.w3.org/TR/xpath-functions/#func-insert-before;Returns a new sequence constructed from the value of the item arguments
fn:remove((item,item,...),position);2.0;https://www.w3.org/TR/xpath-functions/#func-remove;Returns a new sequence constructed from the value of the item arguments
fn:unordered((item,item,...));2.0;https://www.w3.org/TR/xpath-functions/#func-unordered;Returns the items in an implementation dependent order
fn:data(item.item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-data;Takes a sequence of items and returns a sequence of atomic values
fn:collection();2.0;https://www.w3.org/TR/xpath-functions/#func-collection;NONE
fn:collection(string);2.0;https://www.w3.org/TR/xpath-functions/#func-collection;NONE
fn:min((arg,arg,...));2.0;https://www.w3.org/TR/xpath-functions/#func-min;Returns the argument that is less than the others
fn:max((arg,arg,...));2.0;https://www.w3.org/TR/xpath-functions/#func-max;Returns the argument that is greater than the others
fn:deep-equal(param1,param2,collation);2.0;https://www.w3.org/TR/xpath-functions/#func-deep-equal;Returns true if param1 and param2 are deep-equal to each other, otherwise it returns false
!Error
fn:error();2.0;https://www.w3.org/TR/xpath-functions/#func-error;
fn:error(error);2.0;https://www.w3.org/TR/xpath-functions/#func-error;
fn:error(error,description);2.0;https://www.w3.org/TR/xpath-functions/#func-error;
fn:error(error,description,error-object);2.0;https://www.w3.org/TR/xpath-functions/#func-error;
fn:trace(value,label);2.0;https://www.w3.org/TR/xpath-functions/#func-trace;Used to debug queries
!Misc
fn:nilled(node);2.0;https://www.w3.org/TR/xpath-functions/#func-nilled;Returns a Boolean value indicating whether the argument node is nilled
fn:namespace-uri-from-QName();2.0;https://www.w3.org/TR/xpath-functions/#func-namespace-uri-from-QName;NONE
fn:base-uri();2.0;https://www.w3.org/TR/xpath-functions/#func-base-uri;Returns the value of the base-uri property of the current or specified node
fn:base-uri(node);2.0;https://www.w3.org/TR/xpath-functions/#func-base-uri;Returns the value of the base-uri property of the current or specified node
fn:static-base-uri();2.0;https://www.w3.org/TR/xpath-functions/#func-static-base-uri;Returns the value of the base-uri
fn:doc-available(URI);2.0;https://www.w3.org/TR/xpath-functions/#func-doc-available;Returns true if the doc() function returns a document node, otherwise it returns false
fn:resolve-QName();2.0;https://www.w3.org/TR/xpath-functions/#func-resolve-QName;NONE
fn:node-name(node);2.0;https://www.w3.org/TR/xpath-functions/#func-node-name;Returns the node-name of the argument node
fn:default-collation();2.0;https://www.w3.org/TR/xpath-functions/#func-default-collation;Returns the value of the default collation
fn:idref((string,string,...),node);2.0;https://www.w3.org/TR/xpath-functions/#func-idref;Returns a sequence of element or attribute nodes that have an IDREF value equal to the value of one or more of the values specified in the string argument
fn:document-uri(node);2.0;https://www.w3.org/TR/xpath-functions/#func-document-uri;Returns the value of the document-uri property for the specified node
fn:local-name-from-QName();2.0;https://www.w3.org/TR/xpath-functions/#func-local-name-from-QName;NONE
fn:in-scope-prefixes();2.0;https://www.w3.org/TR/xpath-functions/#func-in-scope-prefixes;NONE
fn:namespace-uri-for-prefix();2.0;https://www.w3.org/TR/xpath-functions/#func-namespace-uri-for-prefix;NONE
fn:QName();2.0;https://www.w3.org/TR/xpath-functions/#func-QName;NONE
fn:root() fn:root(node);2.0;https://www.w3.org/TR/xpath-functions/#func-root;Returns the root of the tree to which the current node or the specified belongs. This will usually be a document node
fn:doc(URI);2.0;https://www.w3.org/TR/xpath-functions/#func-doc;NONE
fn:resolve-uri(relative,base);2.0;https://www.w3.org/TR/xpath-functions/#func-resolve-uri;NONE

128
FunctionSet/XPath/10+20+30 Normal file
View File

@@ -0,0 +1,128 @@
!Node-Set
fn:last();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the position of the last node in the context list
fn:position();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the position of the current context node
fn:count(node-set);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the number of nodes in the node-set
fn:id(object);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the element specified by it's unique id, requires DTD
fn:local-name(node-set);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the local-name for the first node in the node-set
fn:local-name();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the local-name for the context node
fn:namespace-uri(node-set);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the namespace-uri for the first node in the node-set
fn:namespace-uri();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the namespace-uri for the context node
fn:name(node-set);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the name for the first node in the node-set
fn:name();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions;Returns the name for the context node
!String
fn:string(object);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the string representation of the object argument
fn:string();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns a string value representation of the context node
fn:concat(string, string, string*);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the concatenation of its arguments
fn:starts-with(string, string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns true if the first string starts with the second string
fn:contains(string, string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns true if the first string contains the second string
fn:substring-before(string, string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the substring found before the first occurrence of the second argument
fn:substring-after(string, string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the substring found after the first occurrence of the second argument
fn:substring(string, number, number);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the substring starting at second argument with lenght of third argument
fn:substring(string, number);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the substring of the first argument from the position specified by the second argument
fn:string-length(string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the length of the string specified by the argument
fn:string-length();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns the length of the string specified by the context node
fn:normalize-space(string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns a white-space normalized string
fn:normalize-space();1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Returns a white-space normalized string specified by the context-node
fn:translate(string, string, string);1.0;https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions;Replaces characters specified by the second argument using those from the third argument
fn:string-join((string,string,...),sep);2.0;https://www.w3.org/TR/xpath-functions/#func-string-join;Returns a string created by concatenating the string arguments and using the sep argument as the separator
fn:string-to-codepoints(string);3.0;https://www.w3.org/TR/xpath-functions-31/#func-string-to-codepoints;Returns sequence of unicode codepoint representing the provided string
fn:compare(comp1,comp2);2.0;https://www.w3.org/TR/xpath-functions/#func-compare;Returns -1 if comp1 is less than comp2, 0 if comp1 is equal to comp2, or 1 if comp1 is greater than comp2 (according to the rules of the collation that is used)
fn:compare(comp1,comp2,collation);2.0;https://www.w3.org/TR/xpath-functions/#func-compare;Returns -1 if comp1 is less than comp2, 0 if comp1 is equal to comp2, or 1 if comp1 is greater than comp2 (according to the rules of the collation that is used)
fn:codepoints-to-string((int,int,...));2.0;https://www.w3.org/TR/xpath-functions/#func-codepoints-to-string;Creates a string from a sequence of the Unicode Standard code points
fn:codepoint-equal(comp1,comp2);2.0;https://www.w3.org/TR/xpath-functions/#func-codepoint-equal;Returns true if the value of comp1 is equal to the value of comp2, according to the Unicode code point collation (http://www.w3.org/2005/02/xpath-functions/collation/codepoint), otherwise it returns false
fn:normalize-unicode();2.0;https://www.w3.org/TR/xpath-functions/#func-normalize-unicode;NONE
fn:upper-case(string);2.0;https://www.w3.org/TR/xpath-functions/#func-upper-case;Converts the string argument to upper-case
fn:lower-case(string);2.0;https://www.w3.org/TR/xpath-functions/#func-lower-case;Converts the string argument to lower-case
fn:escape-uri(stringURI,esc-res);2.0;https://www.w3.org/TR/xpath-functions/#func-escape-uri;
fn:tokenize(string,pattern);2.0;https://www.w3.org/TR/xpath-functions/#func-tokenize;
fn:matches(string,pattern);2.0;https://www.w3.org/TR/xpath-functions/#func-matches;Returns true if the string argument matches the pattern, otherwise, it returns false
fn:replace(string,pattern,replace);2.0;https://www.w3.org/TR/xpath-functions/#func-replace;Returns a string that is created by replacing the given pattern with the replace argument
fn:ends-with(string1,string2);2.0;https://www.w3.org/TR/xpath-functions/#func-ends-with;Returns true if string1 ends with string2, otherwise it returns false
!Collections
fn:avg((arg,arg,...));2.0;https://www.w3.org/TR/xpath-functions/#func-avg;Returns the average of the argument values
fn:exactly-one(item,item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-exactly-one;Returns the argument if it contains exactly one item, otherwise it raises an error
fn:zero-or-one(item,item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-zero-or-one;Returns the argument if it contains zero or one items, otherwise it raises an error
fn:index-of((item,item,...),searchitem);2.0;https://www.w3.org/TR/xpath-functions/#func-index-of;Returns the positions within the sequence of items that are equal to the searchitem argument
fn:reverse((item,item,...));2.0;https://www.w3.org/TR/xpath-functions/#func-reverse;Returns the reversed order of the items specified
fn:one-or-more(item,item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-one-or-more;Returns the argument if it contains one or more items, otherwise it raises an error
fn:distinct-values((item,item,...),collation);2.0;https://www.w3.org/TR/xpath-functions/#func-distinct-values;Returns only distinct (different) values
fn:exists(item,item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-exists;Returns true if the value of the arguments IS NOT an empty sequence, otherwise it returns false
fn:subsequence((item,item,...),start,len);2.0;https://www.w3.org/TR/xpath-functions/#func-subsequence;Returns a sequence of items from the position specified by the start argument and continuing for the number of items specified by the len argument. The first item is located at position 1
fn:empty(item,item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-empty;Returns true if the value of the arguments IS an empty sequence, otherwise it returns false
fn:insert-before((item,item,...),pos,inserts);2.0;https://www.w3.org/TR/xpath-functions/#func-insert-before;Returns a new sequence constructed from the value of the item arguments
fn:remove((item,item,...),position);2.0;https://www.w3.org/TR/xpath-functions/#func-remove;Returns a new sequence constructed from the value of the item arguments
fn:unordered((item,item,...));2.0;https://www.w3.org/TR/xpath-functions/#func-unordered;Returns the items in an implementation dependent order
fn:data(item.item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-data;Takes a sequence of items and returns a sequence of atomic values
fn:collection();2.0;https://www.w3.org/TR/xpath-functions/#func-collection;NONE
fn:collection(string);2.0;https://www.w3.org/TR/xpath-functions/#func-collection;NONE
fn:min((arg,arg,...));2.0;https://www.w3.org/TR/xpath-functions/#func-min;Returns the argument that is less than the others
fn:max((arg,arg,...));2.0;https://www.w3.org/TR/xpath-functions/#func-max;Returns the argument that is greater than the others
fn:deep-equal(param1,param2,collation);2.0;https://www.w3.org/TR/xpath-functions/#func-deep-equal;Returns true if param1 and param2 are deep-equal to each other, otherwise it returns false
!Date / Time
fn:adjust-date-to-timezone(date,timezone);2.0;https://www.w3.org/TR/xpath-functions/#func-adjust-date-to-timezone;If the timezone argument is empty, it returns a date without a timezone. Otherwise, it returns a date with a timezone
fn:adjust-time-to-timezone(time,timezone);2.0;https://www.w3.org/TR/xpath-functions/#func-adjust-time-to-timezone;If the timezone argument is empty, it returns a time without a timezone. Otherwise, it returns a time with a timezone
fn:implicit-timezone();2.0;https://www.w3.org/TR/xpath-functions/#func-implicit-timezone;Returns the value of the implicit timezone
fn:dateTime(date,time);2.0;https://www.w3.org/TR/xpath-functions/#func-dateTime;Converts the arguments to a date and a time
fn:current-time();2.0;https://www.w3.org/TR/xpath-functions/#func-current-time;Returns the current time (with timezone)
fn:timezone-from-time(time);2.0;https://www.w3.org/TR/xpath-functions/#func-timezone-from-time;Returns the time zone component of the argument if any
fn:hours-from-time(time);2.0;https://www.w3.org/TR/xpath-functions/#func-hours-from-time;Returns an integer that represents the hours component in the localized value of the argument
fn:minutes-from-time(time);2.0;https://www.w3.org/TR/xpath-functions/#func-minutes-from-time;Returns an integer that represents the minutes component in the localized value of the argument
fn:seconds-from-time(time);2.0;https://www.w3.org/TR/xpath-functions/#func-seconds-from-time;Returns an integer that represents the seconds component in the localized value of the argument
fn:years-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-years-from-duration;Returns an integer that represents the years component in the canonical lexical representation of the value of the argument
fn:months-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-years-from-duration;Returns an integer that represents the months component in the canonical lexical representation of the value of the argument
fn:days-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-days-from-duration;Returns an integer that represents the days component in the canonical lexical representation of the value of the argument
fn:hours-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-hours-from-duration;Returns an integer that represents the hours component in the canonical lexical representation of the value of the argument
fn:minutes-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-minutes-from-duration;Returns an integer that represents the minutes component in the canonical lexical representation of the value of the argument
fn:seconds-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-seconds-from-duration;Returns a decimal that represents the seconds component in the canonical lexical representation of the value of the argument
fn:current-date();2.0;https://www.w3.org/TR/xpath-functions/#func-current-date;Returns the current date (with timezone)
fn:timezone-from-date(date);2.0;https://www.w3.org/TR/xpath-functions/#func-timezone-from-date;Returns the time zone component of the argument if any
fn:year-from-date(date);2.0;https://www.w3.org/TR/xpath-functions/#func-year-from-date;Returns an integer that represents the year in the localized value of the argument
fn:month-from-date(date);2.0;https://www.w3.org/TR/xpath-functions/#func-month-from-date;Returns an integer that represents the month in the localized value of the argument
fn:day-from-date(date);2.0;https://www.w3.org/TR/xpath-functions/#func-day-from-date;Returns an integer that represents the day in the localized value of the argument
fn:current-dateTime();2.0;https://www.w3.org/TR/xpath-functions/#func-current-dateTime;Returns the current dateTime (with timezone)
fn:timezone-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-timezone-from-dateTime;Returns the time zone component of the argument if any
fn:year-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-year-from-dateTime;Returns an integer that represents the year component in the localized value of the argument
fn:month-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-month-from-dateTime;Returns an integer that represents the month component in the localized value of the argument
fn:day-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-day-from-dateTime;Returns an integer that represents the day component in the localized value of the argument
fn:hours-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-hours-from-dateTime;Returns an integer that represents the hours component in the localized value of the argument
fn:minutes-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-minutes-from-dateTime;Returns an integer that represents the minutes component in the localized value of the argument
fn:seconds-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-seconds-from-dateTime;Returns a decimal that represents the seconds component in the localized value of the argument
fn:adjust-dateTime-to-timezone(datetime,timezone);2.0;https://www.w3.org/TR/xpath-functions/#func-adjust-dateTime-to-timezone;If the timezone argument is empty, it returns a dateTime without a timezone. Otherwise, it returns a dateTime with a timezone
!Error
fn:error();2.0;https://www.w3.org/TR/xpath-functions/#func-error;
fn:error(error);2.0;https://www.w3.org/TR/xpath-functions/#func-error;
fn:error(error,description);2.0;https://www.w3.org/TR/xpath-functions/#func-error;
fn:error(error,description,error-object);2.0;https://www.w3.org/TR/xpath-functions/#func-error;
fn:trace(value,label);2.0;https://www.w3.org/TR/xpath-functions/#func-trace;Used to debug queries
!Misc
fn:nilled(node);2.0;https://www.w3.org/TR/xpath-functions/#func-nilled;Returns a Boolean value indicating whether the argument node is nilled
fn:namespace-uri-from-QName();2.0;https://www.w3.org/TR/xpath-functions/#func-namespace-uri-from-QName;NONE
fn:base-uri();2.0;https://www.w3.org/TR/xpath-functions/#func-base-uri;Returns the value of the base-uri property of the current or specified node
fn:base-uri(node);2.0;https://www.w3.org/TR/xpath-functions/#func-base-uri;Returns the value of the base-uri property of the current or specified node
fn:static-base-uri();2.0;https://www.w3.org/TR/xpath-functions/#func-static-base-uri;Returns the value of the base-uri
fn:doc-available(URI);2.0;https://www.w3.org/TR/xpath-functions/#func-doc-available;Returns true if the doc() function returns a document node, otherwise it returns false
fn:resolve-QName();2.0;https://www.w3.org/TR/xpath-functions/#func-resolve-QName;NONE
fn:node-name(node);2.0;https://www.w3.org/TR/xpath-functions/#func-node-name;Returns the node-name of the argument node
fn:default-collation();2.0;https://www.w3.org/TR/xpath-functions/#func-default-collation;Returns the value of the default collation
fn:idref((string,string,...),node);2.0;https://www.w3.org/TR/xpath-functions/#func-idref;Returns a sequence of element or attribute nodes that have an IDREF value equal to the value of one or more of the values specified in the string argument
fn:document-uri(node);2.0;https://www.w3.org/TR/xpath-functions/#func-document-uri;Returns the value of the document-uri property for the specified node
fn:local-name-from-QName();2.0;https://www.w3.org/TR/xpath-functions/#func-local-name-from-QName;NONE
fn:in-scope-prefixes();2.0;https://www.w3.org/TR/xpath-functions/#func-in-scope-prefixes;NONE
fn:namespace-uri-for-prefix();2.0;https://www.w3.org/TR/xpath-functions/#func-namespace-uri-for-prefix;NONE
fn:QName();2.0;https://www.w3.org/TR/xpath-functions/#func-QName;NONE
fn:root() fn:root(node);2.0;https://www.w3.org/TR/xpath-functions/#func-root;Returns the root of the tree to which the current node or the specified belongs. This will usually be a document node
fn:doc(URI);2.0;https://www.w3.org/TR/xpath-functions/#func-doc;NONE
fn:resolve-uri(relative,base);2.0;https://www.w3.org/TR/xpath-functions/#func-resolve-uri;NONE
fn:available-environment-variables();3.0;https://www.w3.org/TR/xpath-functions-30/#func-available-environment-variables;Returns a list of environment variable names
fn:doc-available(uri);3.0;https://www.w3.org/TR/xpath-functions-30/#func-doc-available;The function returns true the function call fn:doc(uri) would return a document node
fn:element-with-id();3.0;https://www.w3.org/TR/xpath-functions-31/#func-element-with-id;
fn:encode-for-uri(uri-part);3.0;https://www.w3.org/TR/xpath-functions-30/#func-encode-for-uri;Encodes reserved characters in a string that is intended to be used in the path segment of a URI.
fn:environment-variable(name);3.0;https://www.w3.org/TR/xpath-functions-30/#func-environment-variable;Returns the value of a system environment variable, if it exists
fn:escape-html-uri(uri);3.0;https://www.w3.org/TR/xpath-functions-30/#func-escape-html-uri;Escapes a URI in the same way that HTML user agents handle attribute values expected to contain URIs
fn:iri-to-uri(iri);3.0;https://www.w3.org/TR/xpath-functions-30/#func-iri-to-uri;Converts a string containing an IRI into a URI
!Loop / Conditional;3.0
fn:for-each(sequence*, function);3.0;https://www.w3.org/TR/xpath-functions-30/#func-for-each;Applies function item to every element in sequence
fn:for-each-pair(sequence*, sequence*, function);3.0;https://www.w3.org/TR/xpath-functions-30/#func-for-each-pair;Applies the function to consecutive pairs of elements taken from sequences
fn:fold-left(sequence*, baseValue, function);3.0;https://www.w3.org/TR/xpath-functions-30/#func-fold-left;Applies function item to every element in sequence, accumulating value
fn:fold-right();3.0;https://www.w3.org/TR/xpath-functions-30/#func-fold-right;Applies function item to every element in sequence, accumulating value
fn:filter(sequence*, function);3.0;https://www.w3.org/TR/xpath-functions-30/#func-filter;Returns those items from the sequence for which the supplied function returns true

View File

@@ -0,0 +1,39 @@
!function;param?desc?param?desc...;expression?result?expression?result
fn:last();current context node?Returns context size in expression context;
fn:position();current context node?Returns possition of current context node in expression context;
fn:count(node-set);node-set?Node-set to count nodes in;count(//b:book)?5?count(//person[@id>5])?17
fn:id(object);if nodeset?string value of each node in the node-set is treated as an id?if string?treated as a space-separated list of ids;
fn:local-name(node-set);node-set?Extract first node and return its local name;local-name(//b:books)?b:book?local-name(//b:book)?b:title
fn:local-name();current context node?Extract first node and return its local name;
fn:namespace-uri(node-set);node-set?Extract first node and return the namespace URI;namespace-uri(//b:book)?http://www.book.com?
fn:namespace-uri();current context node?Extract first node and return the namespace URI;
fn:name(node-set);node-set?Extract first node and return QName;name(//b:books/*)?b:book?name(//b:book/*)?b:title
fn:name();;current context node?Extract first node and return QName;
fn:string(object);string?The object to convert to a string;string((1<0))?false?string(.11)?0.11
fn:string();current context node?Converts current context node to string
fn:concat(string, string, string*);string?String to be merged?string?String to be merged?string*?any number of strings;concat("aa","bb")?aabb?concat("aa", 123)?aa123
fn:starts-with(string, string);string?String to be searched?string?String to be found;starts-with("aabb", "aa")?true?starts-with("aabb", "cc")?false
fn:contains(string, string);string?String to be searched?string?String to be found;contains("abc", "c")?true?contains("abc", "1")?false
fn:substring-before(string, string);string?String to be searched?string?String to be used to split;substring-before("aabbcc","bb")?aa?substring-before("aabbcc","c")?aabb
fn:substring-after(string, string);string?String to be searched?string?String to be used to split;substring-after("aabbcc","bb")?cc?substring-after("aabbcc","a")?abbcc
fn:substring(string, number, number);string?String to be cut?integer?Starting position?integer?Length of the substring;substring("aabbcc", 1, 2)?aa
fn:substring(string, number);string?String to be cut?integer?Starting position?;substring("aabbcc", 3)?bbcc
fn:string-length(string);string?String of which length should be returned;string-length("aabbcc")?6?string-length("aa bb cc")?8
fn:string-length();current context node?Converts current node to string and returns length;
fn:normalize-space(string);string?String to be normalized;normalize-space("aa bb cc")?aa bb cc?normalize-space("aa bb cc")?aa bb cc
fn:normalize-space();current context node?Converts current node to string and performs normalization;
fn:translate(string, string, string);string?String to be edited?string?sequence of characters to be replaced?string?sequence of character to be used in replacement;translate("aabbcc", "ab","xz")?xxzzcc?translate("Test sequence", "e","z")?Tzst szquzncz
fn:boolean(object);expression?The expression to be evaluated;boolean(1>2)?false?boolean("a"="a")?true
fn:not(boolean);boolean?Boolean value to be inverted;not("a"="a")?false?not(true)?false
fn:true();?Returns boolean value true;true()?true
fn:false();?Returns boolean value false;false()?false
fn:lang(string);string?Checks if the context node matches given language;(context: <data xml:lang="en"/>): lang('en')?true?(context: <data xml:lang="en-US"/>): lang('en')?true?(context: <data xml:lang="de"/>): lang('en')?false
fn:number(object);object?Converts given object to a number;number(true())?1?number(false())?0?number("55")?55?number(" 55 ")?55
fn:number();current context node?Converts current context node to a number;number(true())?1?number(false())?0?number("55")?55?number(" 55 ")?55
fn:sum(node-set);node-set?Summs each node from the set passed through number() function;
fn:floor(number);number?Decimal number to be converted to integer;floor(3.1)?3?floor(3.99)?3
fn:ceiling(number);number?Decimal number to be converted to integer;ceiling(3.1)?4?ceiling(3.99)?4
fn:round(number);number?Decimal number to be converted to integer;round(3.1)?3?round(3.6)?4

109
FunctionSet/XPath/20 Normal file
View File

@@ -0,0 +1,109 @@
!Date / Time
fn:adjust-date-to-timezone(date,timezone);2.0;https://www.w3.org/TR/xpath-functions/#func-adjust-date-to-timezone;If the timezone argument is empty, it returns a date without a timezone. Otherwise, it returns a date with a timezone
fn:adjust-time-to-timezone(time,timezone);2.0;https://www.w3.org/TR/xpath-functions/#func-adjust-time-to-timezone;If the timezone argument is empty, it returns a time without a timezone. Otherwise, it returns a time with a timezone
fn:implicit-timezone();2.0;https://www.w3.org/TR/xpath-functions/#func-implicit-timezone;Returns the value of the implicit timezone
fn:dateTime(date,time);2.0;https://www.w3.org/TR/xpath-functions/#func-dateTime;Converts the arguments to a date and a time
fn:current-time();2.0;https://www.w3.org/TR/xpath-functions/#func-current-time;Returns the current time (with timezone)
fn:timezone-from-time(time);2.0;https://www.w3.org/TR/xpath-functions/#func-timezone-from-time;Returns the time zone component of the argument if any
fn:hours-from-time(time);2.0;https://www.w3.org/TR/xpath-functions/#func-hours-from-time;Returns an integer that represents the hours component in the localized value of the argument
fn:minutes-from-time(time);2.0;https://www.w3.org/TR/xpath-functions/#func-minutes-from-time;Returns an integer that represents the minutes component in the localized value of the argument
fn:seconds-from-time(time);2.0;https://www.w3.org/TR/xpath-functions/#func-seconds-from-time;Returns an integer that represents the seconds component in the localized value of the argument
fn:years-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-years-from-duration;Returns an integer that represents the years component in the canonical lexical representation of the value of the argument
fn:months-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-years-from-duration;Returns an integer that represents the months component in the canonical lexical representation of the value of the argument
fn:days-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-;Returns an integer that represents the days component in the canonical lexical representation of the value of the argument
fn:hours-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-;Returns an integer that represents the hours component in the canonical lexical representation of the value of the argument
fn:minutes-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-;Returns an integer that represents the minutes component in the canonical lexical representation of the value of the argument
fn:seconds-from-duration(datetimedur);2.0;https://www.w3.org/TR/xpath-functions/#func-;Returns a decimal that represents the seconds component in the canonical lexical representation of the value of the argument
fn:current-date();2.0;https://www.w3.org/TR/xpath-functions/#func-current-date;Returns the current date (with timezone)
fn:timezone-from-date(date);2.0;https://www.w3.org/TR/xpath-functions/#func-timezone-from-date;Returns the time zone component of the argument if any
fn:year-from-date(date);2.0;https://www.w3.org/TR/xpath-functions/#func-year-from-date;Returns an integer that represents the year in the localized value of the argument
fn:month-from-date(date);2.0;https://www.w3.org/TR/xpath-functions/#func-month-from-date;Returns an integer that represents the month in the localized value of the argument
fn:day-from-date(date);2.0;https://www.w3.org/TR/xpath-functions/#func-day-from-date;Returns an integer that represents the day in the localized value of the argument
fn:current-dateTime();2.0;https://www.w3.org/TR/xpath-functions/#func-current-dateTime;Returns the current dateTime (with timezone)
fn:timezone-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-timezone-from-dateTime;Returns the time zone component of the argument if any
fn:year-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-year-from-dateTime;Returns an integer that represents the year component in the localized value of the argument
fn:month-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-month-from-dateTime;Returns an integer that represents the month component in the localized value of the argument
fn:day-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-day-from-dateTime;Returns an integer that represents the day component in the localized value of the argument
fn:hours-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-hours-from-dateTime;Returns an integer that represents the hours component in the localized value of the argument
fn:minutes-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-minutes-from-dateTime;Returns an integer that represents the minutes component in the localized value of the argument
fn:seconds-from-dateTime(datetime);2.0;https://www.w3.org/TR/xpath-functions/#func-seconds-from-dateTime;Returns a decimal that represents the seconds component in the localized value of the argument
fn:adjust-dateTime-to-timezone(datetime,timezone);2.0;https://www.w3.org/TR/xpath-functions/#func-adjust-dateTime-to-timezone;If the timezone argument is empty, it returns a dateTime without a timezone. Otherwise, it returns a dateTime with a timezone
!Collections
fn:avg((arg,arg,...));2.0;https://www.w3.org/TR/xpath-functions/#func-avg;Returns the average of the argument values
fn:exactly-one(item,item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-exactly-one;Returns the argument if it contains exactly one item, otherwise it raises an error
fn:zero-or-one(item,item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-zero-or-one;Returns the argument if it contains zero or one items, otherwise it raises an error
fn:index-of((item,item,...),searchitem);2.0;https://www.w3.org/TR/xpath-functions/#func-index-of;Returns the positions within the sequence of items that are equal to the searchitem argument
fn:reverse((item,item,...));2.0;https://www.w3.org/TR/xpath-functions/#func-reverse;Returns the reversed order of the items specified
fn:one-or-more(item,item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-one-or-more;Returns the argument if it contains one or more items, otherwise it raises an error
fn:distinct-values((item,item,...),collation);2.0;https://www.w3.org/TR/xpath-functions/#func-distinct-values;Returns only distinct (different) values
fn:exists(item,item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-exists;Returns true if the value of the arguments IS NOT an empty sequence, otherwise it returns false
fn:subsequence((item,item,...),start,len);2.0;https://www.w3.org/TR/xpath-functions/#func-subsequence;Returns a sequence of items from the position specified by the start argument and continuing for the number of items specified by the len argument. The first item is located at position 1
fn:empty(item,item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-empty;Returns true if the value of the arguments IS an empty sequence, otherwise it returns false
fn:insert-before((item,item,...),pos,inserts);2.0;https://www.w3.org/TR/xpath-functions/#func-insert-before;Returns a new sequence constructed from the value of the item arguments
fn:remove((item,item,...),position);2.0;https://www.w3.org/TR/xpath-functions/#func-remove;Returns a new sequence constructed from the value of the item arguments
fn:unordered((item,item,...));2.0;https://www.w3.org/TR/xpath-functions/#func-unordered;Returns the items in an implementation dependent order
fn:data(item.item,...);2.0;https://www.w3.org/TR/xpath-functions/#func-data;Takes a sequence of items and returns a sequence of atomic values
fn:collection();2.0;https://www.w3.org/TR/xpath-functions/#func-collection;NONE
fn:collection(string);2.0;https://www.w3.org/TR/xpath-functions/#func-collection;NONE
fn:min((arg,arg,...));2.0;https://www.w3.org/TR/xpath-functions/#func-min;Returns the argument that is less than the others
fn:max((arg,arg,...));2.0;https://www.w3.org/TR/xpath-functions/#func-max;Returns the argument that is greater than the others
fn:deep-equal(param1,param2,collation);2.0;https://www.w3.org/TR/xpath-functions/#func-deep-equal;Returns true if param1 and param2 are deep-equal to each other, otherwise it returns false
!anyURI
!String
fn:string-join((string,string,...),sep);2.0;https://www.w3.org/TR/xpath-functions/#func-string-join;Returns a string created by concatenating the string arguments and using the sep argument as the separator
fn:string-to-codepoints(string);2.0;https://www.w3.org/TR/xpath-functions/#func-string-to-codepoints;Returns the sequence of the Unicode standard code points from a string
fn:compare(comp1,comp2);2.0;https://www.w3.org/TR/xpath-functions/#func-compare;Returns -1 if comp1 is less than comp2, 0 if comp1 is equal to comp2, or 1 if comp1 is greater than comp2 (according to the rules of the collation that is used)
fn:compare(comp1,comp2,collation);2.0;https://www.w3.org/TR/xpath-functions/#func-compare;Returns -1 if comp1 is less than comp2, 0 if comp1 is equal to comp2, or 1 if comp1 is greater than comp2 (according to the rules of the collation that is used)
fn:codepoints-to-string((int,int,...));2.0;https://www.w3.org/TR/xpath-functions/#func-codepoints-to-string;Creates a string from a sequence of the Unicode Standard code points
fn:codepoint-equal(comp1,comp2);2.0;https://www.w3.org/TR/xpath-functions/#func-codepoint-equal;Returns true if the value of comp1 is equal to the value of comp2, according to the Unicode code point collation (http://www.w3.org/2005/02/xpath-functions/collation/codepoint), otherwise it returns false
fn:normalize-unicode();2.0;https://www.w3.org/TR/xpath-functions/#func-normalize-unicode;NONE
fn:upper-case(string);2.0;https://www.w3.org/TR/xpath-functions/#func-upper-case;Converts the string argument to upper-case
fn:lower-case(string);2.0;https://www.w3.org/TR/xpath-functions/#func-lower-case;Converts the string argument to lower-case
fn:escape-uri(stringURI,esc-res);2.0;https://www.w3.org/TR/xpath-functions/#func-escape-uri;
fn:tokenize(string,pattern);2.0;https://www.w3.org/TR/xpath-functions/#func-tokenize;
fn:matches(string,pattern);2.0;https://www.w3.org/TR/xpath-functions/#func-matches;Returns true if the string argument matches the pattern, otherwise, it returns false
fn:replace(string,pattern,replace);2.0;https://www.w3.org/TR/xpath-functions/#func-replace;Returns a string that is created by replacing the given pattern with the replace argument
fn:ends-with(string1,string2);2.0;https://www.w3.org/TR/xpath-functions/#func-ends-with;Returns true if string1 ends with string2, otherwise it returns false
!STH
!Number
fn:round-half-to-even();2.0;https://www.w3.org/TR/xpath-functions/#func-round-half-to-even;
fn:abs(num);2.0;https://www.w3.org/TR/xpath-functions/#func-abs;Returns the absolute value of the argument
!Error
fn:error()
fn:error(error)
fn:error(error,description)
fn:error(error,description,error-object);2.0;https://www.w3.org/TR/xpath-functions/#func-error;
fn:trace(value,label);2.0;https://www.w3.org/TR/xpath-functions/#func-trace;Used to debug queries
!STH2
fn:nilled(node);2.0;https://www.w3.org/TR/xpath-functions/#func-nilled;Returns a Boolean value indicating whether the argument node is nilled
fn:namespace-uri-from-QName();2.0;https://www.w3.org/TR/xpath-functions/#func-namespace-uri-from-QName;NONE
fn:base-uri();2.0;https://www.w3.org/TR/xpath-functions/#func-base-uri;Returns the value of the base-uri property of the current or specified node
fn:base-uri(node);2.0;https://www.w3.org/TR/xpath-functions/#func-base-uri;Returns the value of the base-uri property of the current or specified node
fn:static-base-uri();2.0;https://www.w3.org/TR/xpath-functions/#func-static-base-uri;Returns the value of the base-uri
fn:doc-available(URI);2.0;https://www.w3.org/TR/xpath-functions/#func-doc-available;Returns true if the doc() function returns a document node, otherwise it returns false
fn:resolve-QName();2.0;https://www.w3.org/TR/xpath-functions/#func-resolve-QName;NONE
fn:node-name(node);2.0;https://www.w3.org/TR/xpath-functions/#func-node-name;Returns the node-name of the argument node
fn:default-collation();2.0;https://www.w3.org/TR/xpath-functions/#func-default-collation;Returns the value of the default collation
fn:idref((string,string,...),node);2.0;https://www.w3.org/TR/xpath-functions/#func-idref;Returns a sequence of element or attribute nodes that have an IDREF value equal to the value of one or more of the values specified in the string argument
fn:document-uri(node);2.0;https://www.w3.org/TR/xpath-functions/#func-document-uri;Returns the value of the document-uri property for the specified node
fn:local-name-from-QName();2.0;https://www.w3.org/TR/xpath-functions/#func-local-name-from-QName;NONE
fn:in-scope-prefixes();2.0;https://www.w3.org/TR/xpath-functions/#func-in-scope-prefixes;NONE
fn:namespace-uri-for-prefix();2.0;https://www.w3.org/TR/xpath-functions/#func-namespace-uri-for-prefix;NONE
fn:QName();2.0;https://www.w3.org/TR/xpath-functions/#func-QName;NONE
fn:root() fn:root(node);2.0;https://www.w3.org/TR/xpath-functions/#func-root;Returns the root of the tree to which the current node or the specified belongs. This will usually be a document node
fn:doc(URI);2.0;https://www.w3.org/TR/xpath-functions/#func-doc;NONE
fn:resolve-uri(relative,base);2.0;https://www.w3.org/TR/xpath-functions/#func-resolve-uri;NONE

View File

@@ -0,0 +1,74 @@
!DATE/TIMES
!anyURI
fn:resolve-uri(relative,base);NONE
!Number
!String
fn:normalize-unicode();NONE
fn:escape-uri(stringURI,esc-res);;escape-uri("http://example.com/test#car", true())?"http%3A%2F%2Fexample.com%2Ftest#car"?escape-uri("http://example.com/test#car", false())?"http://example.com/test#car"?escape-uri ("http://example.com/~bébé", false())?"http://example.com/~b%C3%A9b%C3%A9"
!STH
fn:nilled(node);Returns a Boolean value indicating whether the argument node is nilled
fn:index-of((item,item,...),searchitem);;index-of((15, 40, 25, 40, 10), 40)?(2, 4)?index-of(("a", "dog", "and", "a", "duck"), "a") Result (1, 4)?index-of((15, 40, 25, 40, 10), 18)?()
fn:collection();NONE
fn:collection(string);NONE
fn:resolve-QName();NONE
fn:deep-equal(param1,param2,collation);Returns true if param1 and param2 are deep-equal to each other, otherwise it returns false
fn:zero-or-one(item,item,...);Returns the argument if it contains zero or one items, otherwise it raises an error
fn:idref((string,string,...),node);Returns a sequence of element or attribute nodes that have an IDREF value equal to the value of one or more of the values specified in the string argument
fn:replace(string,pattern,replace);;replace("Bella Italia", "l", "*")?'Be**a Ita*ia'?replace("Bella Italia", "l", "")?'Bea Itaia'
!STH2
fn:namespace-uri-from-QName();NONE
fn:base-uri();Returns the value of the base-uri property of the current or specified node
fn:base-uri(node);Returns the value of the base-uri property of the current or specified node
fn:error()
fn:error(error)
fn:error(error,description)
fn:error(error,description,error-object);;error(fn:QName('http://example.com/test', 'err:toohigh'), 'Error: Price is too high')?http://example.com/test#toohigh and the string "Error: Price is too high" to the external processing environment
fn:doc-available(URI);Returns true if the doc() function returns a document node, otherwise it returns false
fn:subsequence((item,item,...),start,len);Returns a sequence of items from the position specified by the start argument and continuing for the number of items specified by the len argument. The first item is located at position 1?subsequence(($item1, $item2, $item3,...), 3)?($item3, ...)?subsequence(($item1, $item2, $item3, ...), 2, 2)?($item2, $item3)
fn:trace(value,label);Used to debug queries
fn:local-name-from-QName();NONE
fn:in-scope-prefixes();NONE
fn:namespace-uri-for-prefix();NONE
fn:unordered((item,item,...));Returns the items in an implementation dependent order
fn:QName();NONE
fn:root() fn:root(node);Returns the root of the tree to which the current node or the specified belongs. This will usually be a document node
fn:remove((item,item,...),position);Returns a new sequence constructed from the value of the item arguments
fn:ends-with(string1,string2);Returns true if string1 ends with string2, otherwise it returns false?ends-with('XML','X')?false
fn:doc(URI);NONE

View File

@@ -0,0 +1,82 @@
fn:timezone-from-dateTime(datetime);datetime?DateTime to extract fimezone information from;timezone-from-dateTime(xs:dateTime("2021-01-15T12:10:00-03:00"))?-PT3H
fn:year-from-dateTime(datetime);datetime?datetime to extract years component from;year-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))?2011
fn:month-from-dateTime(datetime);datetime?datetime to extract month component from;month-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))?11
fn:day-from-dateTime(datetime);datetime?datetime to extract day component from;day-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))?15
fn:hours-from-dateTime(datetime);datetime?datetime to extract hours component from;hours-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))?12
fn:minutes-from-dateTime(datetime);datetime?datetime to extract minutes component from;minutes-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))?30
fn:seconds-from-dateTime(datetime);datetime?datetime to extract seconds component from;seconds-from-dateTime(xs:dateTime("2011-11-15T12:30:00-04:10"))?0
fn:hours-from-time(time);time?time to extact hours component from;hours-from-time(xs:time("10:22:00"))?10
fn:minutes-from-time(time);time?time to extract minutes component from;minutes-from-time(xs:time("10:22:00"))?22
fn:seconds-from-time(time);time?Time to convert to seconds;seconds-from-time(xs:time("10:22:00"))?0
fn:year-from-date(date);date?date to extract years component from;year-from-date(xs:date("2011-11-15"))?2011
fn:month-from-date(date);date?Date to extrat the month from;month-from-date(xs:date("2011-11-15"))?11
fn:day-from-date(date);date?date to extact day component from;day-from-date(xs:date("2011-04-23"))?23
fn:current-time();;current-time()?11:48:04.393361+01:00
fn:current-date();current-date()?2021-03-25+01:00
fn:current-dateTime();;current-dateTime()?2021-03-24T18:15:09.808+01:00
fn:dateTime(date,time);date?date to be merged into dateTime?time?time to be merged into dateTime;dateTime(xs:date("2011-11-15"), xs:time("10:22:00"))?2011-11-15T10:22:00
fn:timezone-from-time(time);time?time to extract timezone infromation from;timezone-from-time(xs:time("10:22:00+10:00"))?PT10H
fn:implicit-timezone();;implicit-timezone()?PT1H
fn:years-from-duration(datetimedur);datetimedur?datetimedur to extract years component from;years-from-duration(xs:duration("P5Y2DT10H59M"))?5
fn:months-from-duration(datetimedur);datetimedur?datetimedur to extract months component from;months-from-duration(xs:duration("P5Y10M2DT10H59M"))?10
fn:days-from-duration(datetimedur);datetimedur?datetimedur to extract days component from;days-from-duration(xs:duration("P5Y2DT10H59M"))?2
fn:hours-from-duration(datetimedur);datetimedur?datetimedur to extract hours component from;hours-from-duration(xs:duration("P5Y2DT10H59M"))?10
fn:minutes-from-duration(datetimedur);datetimedur?datetimedur to extract minute component from;years-from-duration(xs:duration("P5Y2DT10H59M"))?59
fn:seconds-from-duration(datetimedur);datetimedur?datetimedur to extract seconds component from;days-from-duration(xs:duration("P5Y2DT10H59M40S"))?40
fn:adjust-dateTime-to-timezone(datetime,timezone);datetime?datetime to be adjusted?timezone?timezone to be used in provided date;adjust-dateTime-to-timezone(xs:dateTime('2011-11-15T12:30:00-04:10'), xs:dayTimeDuration("PT10H"))?2011-11-16T02:40:00+10:00
fn:adjust-date-to-timezone(date,timezone);date?date to be adjusted?timezone?timezone to be imposed into date;adjust-date-to-timezone(xs:date('2011-11-15'), xs:dayTimeDuration("PT10H"))?2011-11-15+10:00
fn:timezone-from-date(date);date?date to extract timezone information from;timezone-from-date(xs:date("2011-11-15+11:00"))?PT1H?timezone-from-date(xs:date("2011-11-15+11:00"))?PT11H
fn:adjust-time-to-timezone(time,timezone);time?time to be adjusted?dayTimeDuration?timezone to be appended?adjust-time-to-timezone(xs:time("12:30:00"),xs:dayTimeDuration("PT11H"))?12:30:00+11:00
!SEQUENCE
fn:data(item.item,...);sequence*?sequence to be split to atomic values;data((1,2,23, "test"))?1 2 23 test
fn:insert-before((item,item,...),pos,inserts);Returns a new sequence constructed from the value of the item arguments
fn:min((arg,arg,...));sequence*?sequence to select minimum from;min((1,2,3))?1?min(('a', 'k'))?'a'
fn:avg((arg,arg,...));sequence*?returns average value of provided elements;avg((1,2,3))?2
fn:max((arg,arg,...));sequence*?sequence to select maximum from;max((1,2,3))?3?max(('a', 'k'))?'k'
fn:exactly-one(item,item,...);sequence?sequence to check;exactly-one((1))?1?exactly-one((1,1))?fn:exactly-one called with a sequence containing zero or more than one item.
fn:one-or-more(item,item,...);sequence?sequence to check;one-or-more((1, 2, 3))?1 2 3?one-or-more()?An empty sequence is not allowed as the first argument of fn:one-or-more()
fn:empty(item,item,...);sequence?sequence to check?empty(())?true?empty((1))?false?empty((1,2,3))?false
fn:distinct-values((item,item,...),collation);sequence?sequence to extract distinct values from;distinct-values((1, 2, 3, 1, 2))?(1, 2, 3)
fn:exists(item,item,...);Returns true if the value of the arguments IS NOT an empty sequence, otherwise it returns false?exists(remove(("ab"), 1))?false
!STRING
fn:upper-case(string);string?string to be converted to upper case;upper-case('aabbCC')?'AABBCC'
fn:lower-case(string);string?string to be converted to upper case;lower-case('aabbCC')?'aabbcc'
fn:string-join((string,string,...),sep);string*?string sequence to be joined?string?separator to be used;string-join(('fox', 'jumps', 'over', 'dog'), ' ')?' fox jumps over dog '?string-join(('fox', 'jumps', 'over', 'dog'))?'joxjumpsoverdog'
fn:string-to-codepoints(string);string?string to be coverted to list of unicode values;string-to-codepoints("test")?(116, 101, 115, 116)
fn:codepoints-to-string((int,int,...));int*?int sequence to be converted to string;codepoints-to-string((116, 101, 115, 116))?'test'
fn:compare(comp1,comp2);string?first parameter to be compared?string?second parameter to be compared;?compare('abc', 'abc')?0?compare('abc', 'abd')?-1?compare('abc1', 'abd')?-1?compare("abc1","abc")?1
fn:compare(comp1,comp2,collation);string?first parameter to be compared?string?second parameter to be compared?string?collation to be used in comparison(letter weight may differ between languages)?compare('ghi', 'ghi')?0
!NUMBER
fn:deep-equal(param1,param2,collation);
fn:default-collation();;
fn:codepoint-equal(comp1,comp2);int?unicode codepoint?int?unicode codepoint;codepoint-equal(111, 111)?true?codepoint-equal(111, 112)?false?codepoint-equal("111F", "111F")?true
fn:node-name(node);node?node to retrieve QName from;
fn:remove((item,item,...),position);sequence*?sequence to be modified?integer?position to insert element from;remove(("a","b","c"), 1)?b c?remove(("a","b","c"), 0)?a b c
fn:insert-before((item,item,...),position,inserts);sequence*?sequence to be modified?integer?position to insert items to?sequence*?sequence to be inserted?insert-before(("a","b","c"), 2 ,("xx"))?a xx b c
fn:reverse((item,item,...));sequence*?sequence of elements to have its order reversed;reverse(("ab", "cd", "ef"))?("ef", "cd", "ab")?reverse(("ab"))?("ab")
fn:static-base-uri();;default-collation()?http://www.w3.org/2005/xpath-functions/collation/codepoint
fn:root(node);node?node return root from;
fn:tokenize(string,pattern);string?string to be tokenized?string?string to be used to split the first argument;tokenize("fox jumps over dog", "\s+")?("fox", "jumps", "over", "dog")
fn:round-half-to-even(number);number?number to be rounded to nearest whole number;round-half-to-even(0.5)?0?round-half-to-even(1.5)?2?round-half-to-even(2.5)?2
fn:round-half-to-even(number, precision);number?number to be rounded to nearest whole number?number?precision to be used during rounding;round-half-to-even(1.54, 1)?1.5?
fn:abs(num);number?number to be converted to absolute value;abs(5)?5?abs(-5)?5
fn:matches(string,pattern);string?string to search in?string?pattern to be found;matches("Xpath", "pat")?true?matches("Xpath", "abc")?false
fn:document-uri(node);

223
FunctionSet/XPath/30 Normal file
View File

@@ -0,0 +1,223 @@
fn:abs
fn:acos
fn:add-dayTimeDurations
fn:add-dayTimeDuration-to-date
fn:add-dayTimeDuration-to-dateTime
fn:add-dayTimeDuration-to-time
fn:add-yearMonthDurations
fn:add-yearMonthDuration-to-date
fn:add-yearMonthDuration-to-dateTime
fn:adjust-dateTime-to-timezone
fn:adjust-date-to-timezone
fn:adjust-time-to-timezone
fn:analyze-string
fn:asin
fn:atan
fn:atan2
fn:available-environment-variables
fn:avg
fn:base64Binary-equal
fn:base-uri
fn:boolean
fn:boolean-equal
fn:boolean-greater-than
fn:boolean-less-than
fn:ceiling
fn:codepoint-equal
fn:codepoints-to-string
fn:collection
fn:compare
fn:concat
fn:concatenate
fn:contains
fn:cos
fn:count
fn:current-date
fn:current-dateTime
fn:current-time
fn:data
fn:date-equal
fn:date-greater-than
fn:date-less-than
fn:dateTime
fn:dateTime-equal
fn:dateTime-greater-than
fn:dateTime-less-than
fn:day-from-date
fn:day-from-dateTime
fn:days-from-duration
fn:dayTimeDuration-greater-than
fn:dayTimeDuration-less-than
fn:deep-equal
fn:default-collation
fn:distinct-values
fn:divide-dayTimeDuration
fn:divide-dayTimeDuration-by-dayTimeDuration
fn:divide-yearMonthDuration
fn:divide-yearMonthDuration-by-yearMonthDuration
fn:doc
fn:doc-available
fn:document-uri
fn:duration-equal
fn:element-with-id
fn:empty
fn:encode-for-uri
fn:ends-with
fn:environment-variable
fn:error
fn:escape-html-uri
fn:exactly-one
fn:except
fn:exists
fn:exp
fn:exp10
fn:falsefilter
fn:floor
fn:fold-left
fn:fold-right
fn:for-each
fn:for-each-pair
fn:format-date
fn:format-dateTime
fn:format-integer
fn:format-number
fn:format-time
fn:function-arity
fn:function-lookup
fn:function-name
fn:gDay-equal
fn:generate-id
fn:gMonthDay-equal
fn:gMonth-equal
fn:gYear-equal
fn:gYearMonth-equal
fn:has-children
fn:head
fn:hexBinary-equal
fn:hours-from-dateTime
fn:hours-from-duration
fn:hours-from-time
fn:id
fn:idref
fn:implicit-timezone
fn:index-of
fn:innermost
fn:in-scope-prefixes
fn:insert-before
fn:intersect
fn:iri-to-uri
fn:is-same-node
fn:lang
fn:last
fn:local-name
fn:local-name-from-QName
fn:log
fn:log10
fn:lower-case
fn:matches
fn:max
fn:min
fn:minutes-from-dateTime
fn:minutes-from-duration
fn:minutes-from-time
fn:month-from-date
fn:month-from-dateTime
fn:months-from-duration
fn:multiply-dayTimeDuration
fn:multiply-yearMonthDuration
fn:name
fn:namespace-uri
fn:namespace-uri-for-prefix
fn:namespace-uri-from-QName
fn:nilled
fn:node-after
fn:node-before
fn:node-name
fn:normalize-space
fn:normalize-unicode
fn:not
fn:NOTATION-equal
fn:number
fn:numeric-add
fn:numeric-divide
fn:numeric-equal
fn:numeric-greater-than
fn:numeric-integer-divide
fn:numeric-less-than
fn:numeric-mod
fn:numeric-multiply
fn:numeric-subtract
fn:numeric-unary-minus
fn:numeric-unary-plus
fn:one-or-more
fn:outermost
fn:parse-xml
fn:parse-xml-fragment
fn:path
fn:pi
fn:position
fn:pow
fn:prefix-from-QName
fn:QName
fn:QName-equal
fn:remove
fn:replace
fn:resolve-QName
fn:resolve-uri
fn:reverse
fn:root
fn:round
fn:round-half-to-even
fn:seconds-from-dateTime
fn:seconds-from-duration
fn:seconds-from-time
fn:serialize
fn:sin
fn:sqrt
fn:starts-with
fn:static-base-uri
fn:string
fn:string-join
fn:string-length
fn:string-to-codepoints
fn:subsequence
fn:substring
fn:substring-after
fn:substring-before
fn:subtract-dates
fn:subtract-dateTimes
fn:subtract-dayTimeDuration-from-date
fn:subtract-dayTimeDuration-from-dateTime
fn:subtract-dayTimeDuration-from-time
fn:subtract-dayTimeDurations
fn:subtract-times
fn:subtract-yearMonthDuration-from-date
fn:subtract-yearMonthDuration-from-dateTime
fn:subtract-yearMonthDurations
fn:sum
fn:tail
fn:tan
fn:time-equal
fn:time-greater-than
fn:time-less-than
fn:timezone-from-date
fn:timezone-from-dateTime
fn:timezone-from-time
fn:to
fn:tokenize
fn:trace
fn:translate
fn:true
fn:union
fn:unordered
fn:unparsed-text
fn:unparsed-text-available
fn:unparsed-text-lines
fn:upper-case
fn:uri-collection
fn:year-from-date
fn:year-from-dateTime
fn:yearMonthDuration-greater-than
fn:yearMonthDuration-less-than
fn:years-from-duration
fn:zero-or-one

134
FunctionSet/XPath/30_unique Normal file
View File

@@ -0,0 +1,134 @@
!Math
math:acos(double);3.0;https://www.w3.org/TR/xpath-functions-30/#func-math-acos;Returns the arc cosine of the argument
math:asin(double);3.0;https://www.w3.org/TR/xpath-functions-30/#func-math-asin;Returns the arc sine of the argument
math:atan(double);3.0;https://www.w3.org/TR/xpath-functions-30/#func-math-atan;Returns the arc tangent of the argument
math:atan2(double, double);3.0;https://www.w3.org/TR/xpath-functions-30/#func-math-atan2;Returns the angle in radians subtended at the origin by the point on a plane with coordinates (x, y) and the positive x-axis
math:cos(double);3.0;https://www.w3.org/TR/xpath-functions-30/#func-math-cos;Returns the cosine of the argument
math:exp(double);3.0;https://www.w3.org/TR/xpath-functions-30/#func-math-exp;Returns the value of e^x
math:exp10(double);3.0;https://www.w3.org/TR/xpath-functions-30/#func-math-exp10;Returns the value of 10^x
math:log(double);3.0;https://www.w3.org/TR/xpath-functions-30/#func-math-log;Returns thenatural logarithm of the argument
math:log10(double);3.0;https://www.w3.org/TR/xpath-functions-30/#func-math-log10;Returns the base-ten logarithm of the argument
math:pi();3.0;https://www.w3.org/TR/xpath-functions-30/#func-math-pi;Returns an approximation to the mathematical constant π
math:pow(double, double);3.0;https://www.w3.org/TR/xpath-functions-30/#func-math-pow;Returns the result of raising the first argument to the power of the second
math:sin(double);3.0;https://www.w3.org/TR/xpath-functions-30/#func-math-sin;Returns the sine of the argument
math:sqrt(double);3.0;https://www.w3.org/TR/xpath-functions-30/#func-math-sqrt;Returns the non-negative square root of the argument
math:tan(double);3.0;https://www.w3.org/TR/xpath-functions-30/#func-math-tan;Returns the tangent of the argument
!Loop / Conditional
fn:for-each(sequence*, function);3.0;https://www.w3.org/TR/xpath-functions-30/#func-for-each;Applies function item to every element in sequence
fn:for-each-pair(sequence*, sequence*, function);3.0;https://www.w3.org/TR/xpath-functions-30/#func-for-each-pair;Applies the function to consecutive pairs of elements taken from sequences
fn:fold-left(sequence*, baseValue, function);3.0;https://www.w3.org/TR/xpath-functions-30/#func-fold-left;Applies function item to every element in sequence, accumulating value
fn:fold-right();3.0;https://www.w3.org/TR/xpath-functions-30/#func-fold-right;Applies function item to every element in sequence, accumulating value
fn:filter(sequence*, function);3.0;https://www.w3.org/TR/xpath-functions-30/#func-filter;Returns those items from the sequence for which the supplied function returns true
fn:analyze-string(input, pattern);3.0;https://www.w3.org/TR/xpath-functions-30/#func-analyze-string;Analyzes string using regex, returns XML indicating parts that matched and failed to match
fn:available-environment-variables();3.0;https://www.w3.org/TR/xpath-functions-30/#func-available-environment-variables;Returns a list of environment variable names
fn:doc-available(uri);3.0;https://www.w3.org/TR/xpath-functions-30/#func-doc-available;The function returns true the function call fn:doc($uri) would return a document node
fn:element-with-id();3.0;;
fn:encode-for-uri(uri-part);3.0;https://www.w3.org/TR/xpath-functions-30/#func-encode-for-uri;Encodes reserved characters in a string that is intended to be used in the path segment of a URI.
fn:environment-variable(name);3.0;https://www.w3.org/TR/xpath-functions-30/#func-environment-variable;Returns the value of a system environment variable, if it exists
fn:escape-html-uri(uri);3.0;https://www.w3.org/TR/xpath-functions-30/#func-escape-html-uri;Escapes a URI in the same way that HTML user agents handle attribute values expected to contain URIs
fn:format-date(value, pattern);3.0;https://www.w3.org/TR/xpath-functions-30/#func-format-date;Returns a string formatted using provided pattern
fn:format-dateTime(value, pattern);3.0;https://www.w3.org/TR/xpath-functions-30/#func-format-dateTime;Returns a string containing using provided pattern
fn:format-integer(value, pattern);3.0;https://www.w3.org/TR/xpath-functions-30/#func-format-integer;Returns a string formatted using provided pattern
fn:format-number(value, pattern);3.0;https://www.w3.org/TR/xpath-functions-30/#func-format-number;Returns a string formatted using provided pattern
fn:format-time(value, pattern);3.0;https://www.w3.org/TR/xpath-functions-30/#func-format-time;Returns a string formatted using provided pattern
fn:function-arity(function);3.0;https://www.w3.org/TR/xpath-functions-30/#func-function-arity;Returns the number of arguments of provided function
fn:function-lookup(name, arity);3.0;https://www.w3.org/TR/xpath-functions-30/#func-function-lookup;Returns the function having a given name and arity, if there is one.
fn:function-name();3.0;https://www.w3.org/TR/xpath-functions-30/#func-function-name;Returns the name of the function identified by a function item
fn:has-children();3.0;https://www.w3.org/TR/xpath-functions-30/#func-has-children;Returns true if the supplied node has one or more child nodes
fn:head();3.0;https://www.w3.org/TR/xpath-functions-30/#func-head;Returns the first item in a sequence
fn:innermost();3.0;https://www.w3.org/TR/xpath-functions-30/#func-innermost;Retruns the collection with parrents (if any) of contained elements removed
fn:iri-to-uri(iri);3.0;https://www.w3.org/TR/xpath-functions-30/#func-iri-to-uri;Converts a string containing an IRI into a URI
fn:NOTATION-equal();3.0;;
fn:parse-xml(string);3.0;https://www.w3.org/TR/xpath-functions-30/#func-parse-xml;Converts xml from string to document node
fn:parse-xml-fragment(string);3.0;https://www.w3.org/TR/xpath-functions-30/#func-parse-xml-fragment;Converts xml fragment from string to document node
fn:path();3.0;https://www.w3.org/TR/xpath-functions-30/#func-path;Returns node path relative to its root
fn:prefix-from-QName(QName);3.0;https://www.w3.org/TR/xpath-functions-30/#func-prefix-from-QName;Returns the prefix component of the supplied QName
fn:QName-equal(QName1, QName2);3.0;https://www.w3.org/TR/xpath-functions-30/#func-QName-equal;Returns true if two supplied QNames are equal (namespace URI and local part)
fn:serialize(item);3.0;https://www.w3.org/TR/xpath-functions-30/#func-serialize;Returns serialized representation
fn:tail(sequence);3.0;https://www.w3.org/TR/xpath-functions-30/#func-tail;Returns all but the first item in a sequence
fn:tokenize(input, separator);3.0;https://www.w3.org/TR/xpath-functions-30/#func-tokenize;Splits string wherever a separator is found
fn:unparsed-text(uri);3.0;https://www.w3.org/TR/xpath-functions-30/#func-unparsed-text;Returns text representation of external resource
fn:unparsed-text-available(uri);3.0;https://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-available;Checks if unparsed-text call would succeed
fn:unparsed-text-lines(uri);3.0;https://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-lines;Returns strings, one for each line of file
fn:uri-collection();3.0;https://www.w3.org/TR/xpath-functions-30/#func-uri-collection;Returns a sequence of xs:anyURI values representing the URIs in a resource collection
!Operators
op:base64Binary-equal();3.0;;
op:add-dayTimeDurations(dayTimeDuration, dayTimeDuration);3.0;Returns the sum of two dayTimeDuration values;
op:add-dayTimeDuration-to-date(dayTimeDuration, date);3.0;Moves given date by given duration;
op:add-dayTimeDuration-to-dateTime(dayTimeDuration, dateTime);3.0;Moves given dateTime by given duration;
op:add-dayTimeDuration-to-time(dayTimeDuration, time);3.0;Moves given time by given duration;
op:add-yearMonthDurations(yearMonthDuration, yearMonthDuration);3.0;Returns the sum of two yearMonthDuration values;
op:add-yearMonthDuration-to-date(yearMonthDuration, date);3.0;Moves given date by given duration;
op:add-yearMonthDuration-to-dateTime(yearMonthDuration, dateTime);3.0;Moves given dateTime by given duration;
op:substring-before();3.0;;
op:subtract-dates();3.0;;
op:subtract-dateTimes();3.0;;
op:subtract-dayTimeDuration-from-date();3.0;;
op:subtract-dayTimeDuration-from-dateTime();3.0;;
op:subtract-dayTimeDuration-from-time();3.0;;
op:subtract-dayTimeDurations();3.0;;
op:subtract-times();3.0;;
op:subtract-yearMonthDuration-from-date();3.0;;
op:subtract-yearMonthDuration-from-dateTime();3.0;;
op:subtract-yearMonthDurations();3.0;;
op:date-equal();3.0;;
op:date-greater-than();3.0;;
op:date-less-than();3.0;;
op:dateTime-equal();3.0;;
op:dateTime-greater-than();3.0;;
op:dateTime-less-than();3.0;;
op:dayTimeDuration-greater-than();3.0;;
op:dayTimeDuration-less-than();3.0;;
op:divide-dayTimeDuration();3.0;;
op:divide-dayTimeDuration-by-dayTimeDuration();3.0;;
op:divide-yearMonthDuration();3.0;;
op:divide-yearMonthDuration-by-yearMonthDuration();3.0;;
op:boolean-equal();3.0;;
op:boolean-greater-than();3.0;;
op:boolean-less-than();3.0;;
op:concatenate();3.0;;
op:multiply-dayTimeDuration();3.0;;
op:multiply-yearMonthDuration();3.0;;
op:time-equal();3.0;;
op:time-greater-than();3.0;;
op:time-less-than();3.0;;
op:numeric-add();3.0;;
op:numeric-divide();3.0;;
op:numeric-equal();3.0;;
op:numeric-greater-than();3.0;;
op:numeric-integer-divide();3.0;;
op:numeric-less-than();3.0;;
op:numeric-mod();3.0;;
op:numeric-multiply();3.0;;
op:numeric-subtract();3.0;;
op:numeric-unary-minus();3.0;;
op:numeric-unary-plus();3.0;;
op:outermost();3.0;;
op:yearMonthDuration-greater-than();3.0;;
op:yearMonthDuration-less-than();3.0;;
op:gDay-equal();3.0;;
op:generate-id();3.0;;
op:gMonthDay-equal();3.0;;
op:gMonth-equal();3.0;;
op:gYear-equal();3.0;;
op:gYearMonth-equal();3.0;;
op:duration-equal();3.0;;
op:intersect();3.0;;
op:union();3.0;;
op:except();3.0;;
op:node-after();3.0;;
op:node-before();3.0;;
op:is-same-node();3.0;;
op:hexBinary-equal();3.0;;

View File

@@ -0,0 +1,62 @@
!Math
math:acos(double);double?value to calculate arcus cosine for;acos(0)?1.5707963267948966?acos(1)?0
math:asin(double);double?value to calculate arcus sine for;asin(1)?1.5707963267948966?asin(0)?0
math:atan(double);double?value to calculate arcus tangent for;atan(0)?0?atan(10)?1.4711276743037347
math:atan2(double, double);double?x value?double?y value;atan2(1,1)?0.7853981633974483
math:cos(double);double?value to calculate cosine for;cos(0)?1?cos(3.14)?-1
math:exp(double);double?value to which power e should be raised;exp(1)?2.718281828459045?exp(10)?22026.465794806718
math:exp10(double);double?value to which power 10 should be raised;exp10(2)?100?exp10(20)?1.0E20
math:log(double);double?value for which to calculate a natural logarithm;log(1)?0?log(10)?2.302585092994046
math:log10(double);double?value for which to calculate a base-10 logarithm;log10(10)?1?log10(100)?2
math:pi();;pi()?3.141592653589793
math:pow(double, double);double?number to be raised?double?value of the power;pow(2,2)?4?pow(3,2)?9
math:sin(double);double?value to calculate sine for;sin(0)?0?sin(1)?0.8414709848078965
math:sqrt(double);double?value to calculate square root for;sqrt(9)?3?sqrt(1)?1.4142135623730951
math:tan(double);double?value to calculate tangent for;tan(0)?0?tan(1)?1.5574077246549023
!Loop / Conditional
fn:for-each(sequence*, function);sequence?sequence to run the function for?function?function to be perfomed on each element of sequence;for-each((1,2,3,4,5),function($a) { $a*$a })?1 4 9 16 25
fn:for-each-pair(sequence*, sequence*, function);sequence1?sequence to run the function for?sequenc2?sequence to run the function for?function?function to be perfomed on each element of sequence;for-each-pair((1,2,3,4,5), (1,2,3,4,5),function($a, $b) { $a+$b })?2 4 6 8 10
fn:fold-left(sequence*, baseValue, function);sequence?sequence to run the function for?item?a starting value for function?function?the function to be run for each consecutive element;fold-left((1,2,3), 0,function($a, $b) { ($a)-($b) })?-6
fn:fold-right();sequence?sequence to run the function for?item?a starting value for function?function?the function to be run for each consecutive element;fold-right((1,2,3), 0,function($a, $b) { ($a)-($b) })?2
fn:filter(sequence*, function);sequence?the sequence to be filtered?function?function to be used as filter;filter((1,2, 3, 4, 5),function($a) { ($a) > 3 })?4 5
fn:analyze-string(input, pattern);string?the string that is to be analized?string?regex?analyze-string("Word and whitespace", "\w+")?<analyze-string-result xmlns="http://www.w3.org/2005/xpath-functions"><br><match>Word</match><br><non-match> </non-match><br><match>and</match><non-match> </non-match><br><match>whitespace</match></analyze-string-result>
fn:available-environment-variables();;available-environment-variables()?PATH INVOCATION_ID XAUTHORITY LC_MEASUREMENT LC_TELEPHONE
fn:doc-available(uri);uri?the document to be checked
fn:element-with-id();;
fn:encode-for-uri(uri-part);string?string containing character to be escaped for uri
fn:environment-variable(name);string?the name of enviroment variable to return;environment-variable("GJS_DEBUG_OUTPUT")?stderr
fn:escape-html-uri(uri);https://www.w3.org/TR/xpath-functions-30/#func-escape-html-uri;Escapes a URI in the same way that HTML user agents handle attribute values expected to contain URIs
fn:format-date(value, pattern);date?value to be formated?pattern?pattern to format the date in (also refered to as picture);format-date(xs:date("2021-03-31+02:00"), "[D]-[M]-[Y]")?31-3-2021
fn:format-dateTime(value, pattern);dateTime?value to be formated?pattern?pattern to format the dateTime in (also refered to as picture);format-dateTime(xs:dateTime("2021-03-31T17:55:54.004666+02:00"), "[D]-[M]-[Y] [H]:[m01]")?31-3-2021 17:55
fn:format-integer(value, pattern);integer?value to be formated?pattern?pattern to format the integer in (also refered to as picture);
fn:format-number(value, pattern);number?value to be formated?pattern?pattern to format the number in (also refered to as picture);
fn:format-time(value, pattern);time?value to be formated?pattern?pattern to format the time in (also refered to as picture);format-time(xs:time("17:57:07.473366+02:00"), "[H]:[m01]")
fn:function-arity(function);function?function for which to check number of parameters
fn:function-lookup(name, arity);https://www.w3.org/TR/xpath-functions-30/#func-function-lookup;Returns the function having a given name and arity, if there is one.
fn:function-name();https://www.w3.org/TR/xpath-functions-30/#func-function-name;Returns the name of the function identified by a function item
fn:has-children(node);node?node to be checked if has any children;NONE
fn:head(sequence);sequence?sequence from which the first element is to be retrieved;head((1, 2, 3))?1
fn:innermost(node);NONE
fn:iri-to-uri(iri);https://www.w3.org/TR/xpath-functions-30/#func-iri-to-uri;Converts a string containing an IRI into a URI
fn:NOTATION-equal();;
fn:parse-xml(string);https://www.w3.org/TR/xpath-functions-30/#func-parse-xml;Converts xml from string to document node
fn:parse-xml-fragment(string);https://www.w3.org/TR/xpath-functions-30/#func-parse-xml-fragment;Converts xml fragment from string to document node
fn:path();https://www.w3.org/TR/xpath-functions-30/#func-path;Returns node path relative to its root
fn:prefix-from-QName(QName);https://www.w3.org/TR/xpath-functions-30/#func-prefix-from-QName;Returns the prefix component of the supplied QName
fn:QName-equal(QName1, QName2);https://www.w3.org/TR/xpath-functions-30/#func-QName-equal;Returns true if two supplied QNames are equal (namespace URI and local part)
fn:serialize(item);https://www.w3.org/TR/xpath-functions-30/#func-serialize;Returns serialized representation
fn:tail(sequence);https://www.w3.org/TR/xpath-functions-30/#func-tail;Returns all but the first item in a sequence
fn:tokenize(input, separator);https://www.w3.org/TR/xpath-functions-30/#func-tokenize;Splits string wherever a separator is found
fn:unparsed-text(uri);https://www.w3.org/TR/xpath-functions-30/#func-unparsed-text;Returns text representation of external resource
fn:unparsed-text-available(uri);https://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-available;Checks if unparsed-text call would succeed
fn:unparsed-text-lines(uri);https://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-lines;Returns strings, one for each line of file
fn:uri-collection();https://www.w3.org/TR/xpath-functions-30/#func-uri-collection;Returns a sequence of xs:anyURI values representing the URIs in a resource collection

88
FunctionSet/XPath/xsltAll Normal file
View File

@@ -0,0 +1,88 @@
!Templates
xsl:template;1.0;https://www.w3.org/TR/xslt-10/#section-Defining-Template-Rules;defines a set of rules to be applied to specified node.
xsl:apply-templates;1.0;https://www.w3.org/TR/xslt-10/#section-Applying-Template-Rules;applies a template rule to the current element or to element's child nodes.
xsl:apply-imports;1.0;https://www.w3.org/TR/xslt-10/#apply-imports;Applies a template rule from an imported style sheet
xsl:apply-templates;1.0;https://www.w3.org/TR/xslt-10/#section-Applying-Template-Rules;Applies a template rule to the current element or to the current element's child nodes
xsl:call-template;1.0;https://www.w3.org/TR/xslt-10/#named-templates;Calls a named template
xsl:next-match;2.0;https://www.w3.org/TR/xslt20/#element-next-match;overrides another template rule (considers all other template rules of lower import precedence/priority)
xsl:mode;3.0;http://www.w3.org/TR/xslt-30/#element-mode;Allows properties of a mode to be defined
xsl:override;3.0;http://www.w3.org/TR/xslt-30/#element-override;Allows using package to override selected components from a used package
xsl:package;3.0;http://www.w3.org/TR/xslt-30/#element-package;Defines a set of stylesheet modules that can be compiled as a unit
xsl:accept;3.0;https://www.w3.org/TR/xslt-30/#element-accept;Allows a package to restrict the visibility of components exposed by a package
xsl:global-context-item;3.0;http://www.w3.org/TR/xslt-30/#element-global-context-item;Declares whether a global context item is required, and if so, to declare its required type
!Repetition and conditional processing
xsl:for-each;1.0;https://www.w3.org/TR/xslt-10/#for-each;Loops through each node in a specified node set
xsl:if;1.0;https://www.w3.org/TR/xslt-10/#section-Conditional-Processing;Contains a template that will be applied only if a specified condition is true
xsl:choose;1.0;https://www.w3.org/TR/xslt-10/#section-Conditional-Processing-with-xsl:choose;Used in conjunction with &lt;when&gt; and &lt;otherwise&gt; to express multiple conditional tests
xsl:when;1.0;https://www.w3.org/TR/xslt-10/#section-Conditional-Processing-with-xsl:choose;Specifies an action for the &lt;choose&gt; element
xsl:otherwise;1.0;https://www.w3.org/TR/xslt-10/#section-Conditional-Processing-with-xsl:choose;Specifies a default action for the &lt;choose&gt; element
xsl:for-each-group;2.0;https://www.w3.org/TR/xslt20/#element-for-each-group;Groups elements and performs operations once for each group
xsl:iterate;3.0;http://www.w3.org/TR/xslt-30/#element-iterate;Used to iterate over a sequence, with the option to set parameters for use in the next iteration
xsl:break;3.0;http://www.w3.org/TR/xslt-30/#element-break;Causes premature completion before the entire input sequence has been processed
xsl:next-iteration;3.0;http://www.w3.org/TR/xslt-30/#element-next-iteration;The contents are a set of xsl:with-param elements defining the values of the iteration parameters to be used on the next iteration
xsl:on-completion;3.0;http://www.w3.org/TR/xslt-30/#element-on-completion;Defines processing to be carried out when the input sequence is exhausted
xsl:fork;3.0;http://www.w3.org/TR/xslt-30/#element-fork;The result of the xsl:fork instruction is the sequence formed by concatenating the results of evaluating each of its contained instructions, in order
xsl:on-empty;3.0;http://www.w3.org/TR/xslt-30/#element-on-empty;Outputs the enclosed content only if the containing sequence generates no "ordinary" content
xsl:on-non-empty;3.0;http://www.w3.org/TR/xslt-30/#element-on-non-empty;Outputs the enclosed content only if the containing sequence also generates "ordinary" content
xsl:try;3.0;http://www.w3.org/TR/xslt-30/#element-try;Allows recovery from dynamic errors occurring within the expression it wraps
xsl:catch;3.0;http://www.w3.org/TR/xslt-30/#element-catchIn conjunction with xsl:try, handles dynamic errors
xsl:context-item;3.0;http://www.w3.org/TR/xslt-30/#element-context-item;Used to declare the initial context item for a template
!Creating result tree
xsl:attribute;1.0;https://www.w3.org/TR/xslt-10/#creating-attributes;Adds an attribute
xsl:attribute-set;1.0;https://www.w3.org/TR/xslt-10/#attribute-sets;Defines a named set of attributes
xsl:copy;1.0;https://www.w3.org/TR/xslt-10/#copying;Creates a copy of the current node (without child nodes and attributes)
xsl:number;1.0;https://www.w3.org/TR/xslt-10/#number;Determines the integer position of the current node and formats a number
xsl:value-of;1.0;https://www.w3.org/TR/xslt-10/#value-of;Extracts the value of a selected node
xsl:text;1.0;https://www.w3.org/TR/xslt-10/#section-Creating-Text;Writes literal text to the output
xsl:comment;1.0;https://www.w3.org/TR/xslt-10/#section-Creating-Comments;Creates a comment node in the result tree
xsl:processing-instruction;1.0;https://www.w3.org/TR/xslt-10/#section-Creating-Processing-Instructions;Writes a processing instruction to the output
xsl:key;1.0;https://www.w3.org/TR/xslt-10/#key;Declares a named key that can be used in the style sheet with the key() function
xsl:decimal-format;1.0;https://www.w3.org/TR/xslt-10/#format-number;Defines the characters and symbols to be used when converting numbers into strings, with the format-number() function
xsl:preserve-space;1.0;https://www.w3.org/TR/xslt-10/#strip;Defines the elements for which white space should be preserved
xsl:strip-space;1.0;https://www.w3.org/TR/xslt-10/#strip;Defines the elements for which white space should be removed
xsl:sort;1.0;https://www.w3.org/TR/xslt-10/#sorting;Sorts the output
xsl:output;1.0;https://www.w3.org/TR/xslt-10/#output;Defines the format of the output document
xsl:for-each-group;2.0;https://www.w3.org/TR/xslt20/#element-perform-sort;Sorts given sequence
xsl:result-document;2.0;https://www.w3.org/TR/xslt20/#element-result-document;Creates a final result tree
xsl:character-map;2.0;https://www.w3.org/TR/xslt20/#element-character-map;Allows a specific character appearing in the final result tree to be substituted by a specified string of characters
xsl:output-character;2.0;https://www.w3.org/TR/xslt20/#element-character-map;Defines characters and their replacements to be used by character-map
xsl:merge;3.0;http://www.w3.org/TR/xslt-30/#element-merge;Merges two or more pre-sorted input files
xsl:merge-action;3.0;http://www.w3.org/TR/xslt-30/#element-merge-action;Defines action to be carried out on each merged group
xsl:merge-key;3.0;http://www.w3.org/TR/xslt-30/#element-merge-key;Used to define the merge keys on which the input sequences are sorted
xsl:merge-source;3.0;http://www.w3.org/TR/xslt-30/#element-merge-source;Describes the input source for an xsl:merge instruction
!Stylesheet structure
xsl:stylesheet;1.0;https://www.w3.org/TR/xslt-10/#stylesheet-element;Defines the root element of a style sheet
xsl:transform;1.0;https://www.w3.org/TR/xslt-10/#stylesheet-element;Defines the root element of a style sheet
xsl:import;1.0;https://www.w3.org/TR/xslt-10/#import;Imports the contents of one style sheet into another. Note: An imported style sheet has lower precedence than the importing style sheet
xsl:include;1.0;https://www.w3.org/TR/xslt-10/#include;Includes the contents of one style sheet into another. Note: An included style sheet has the same precedence as the including style sheet
xsl:namespace-alias;1.0;https://www.w3.org/TR/xslt-10/#literal-result-element;Replaces a namespace in the style sheet to a different namespace in the output
xsl:element;1.0;https://www.w3.org/TR/xslt-10/#section-Creating-Elements-with-xsl:element;Creates an element node in the output document
!Variables and parameters
xsl:param;1.0;https://www.w3.org/TR/xslt-10/#variables;Declares a local or global parameter
xsl:variable;1.0;https://www.w3.org/TR/xslt-10/#variables;Declares a local or global variable
xsl:with-param;1.0;https://www.w3.org/TR/xslt-10/#section-Passing-Parameters-to-Templates;Defines the value of a parameter to be passed into a template
xsl:copy-of;1.0;https://www.w3.org/TR/xslt-10/#copy-of;Creates a copy of the current node (with child nodes and attributes)
xsl:document;2.0;https://www.w3.org/TR/xslt20/#element-document;Creates a new document node
xsl:namespace;2.0;https://www.w3.org/TR/xslt20/#element-namespace;Creates a namespace node
xsl:namespace-alias;2.0;https://www.w3.org/TR/xslt20/#element-namespace-alias;Declares that a literal namespace URI is being used as an alias for a target namespace URI
xsl:sequence;2.0;https://www.w3.org/TR/xslt20/#element-sequence;Constructs a sequence of nodes and/or atomic values
!Regular expressions;2.0
xsl:analyze-string;2.0;https://www.w3.org/TR/xslt20/#element-analyze-string;Identifies substrings that match given regex
xsl:matching-substring;2.0;https://www.w3.org/TR/xslt20/#element-analyze-string;Used in conjunction with analize-string, returns matching substrings
xsl:non-matching-substring;2.0;https://www.w3.org/TR/xslt20/#element-analyze-string;Used in conjunction with analize-string, returns substrings that didn't match the regex
!Callable;2.0
xsl:function;2.0;https://www.w3.org/TR/xslt20/#element-function;Declares a function that can be called from any XPath expression in the stylesheet
xsl:evaluate;3.0;http://www.w3.org/TR/xslt-30/#element-evaluate;Allows dynamic evaluation of XPath expressions from a string
xsl:assert;3.0;http://www.w3.org/TR/xslt-30/#element-assert;Asserts a XPath expression, optionally throwing a dynamic error
!Other elements
xsl:message;1.0;https://www.w3.org/TR/xslt-10/#message;Writes a message to the output (used to report errors)
xsl:fallback;1.0;https://www.w3.org/TR/xslt-10/#fallback;Specifies an alternate code to run if the processor does not support an XSLT element
xsl:map;3.0;http://www.w3.org/TR/xslt-30/#element-map;Used to construct a new map
xsl:map-entry;3.0;http://www.w3.org/TR/xslt-30/#element-map-entry;Used to construct a singleton map (one key and one value)
xsl:expose;3.0;http://www.w3.org/TR/xslt-30/#element-expose;Used to modify the visibility of selected components within a package
xsl:accumulator;3.0;http://www.w3.org/TR/xslt-30/#element-accumulator;Defines a rule that is to be applied while the document is being sequentially processed
xsl:accumulator-rule;3.0;http://www.w3.org/TR/xslt-30/#element-accumulator-rule;Defines a rule for an xsl:accumulator
xsl:source-document;3.0;http://www.w3.org/TR/xslt-30/#element-source-document;Initiates streamed or unstreamed processing of a source document
xsl:use-package;3.0;http://www.w3.org/TR/xslt-30/#element-use-package;
xsl:where-populated;3.0;http://www.w3.org/TR/xslt-30/#element-where-populated;Allows conditional content construction to be made streamable
xsl:accept;3.0;https://www.w3.org/TR/xslt-30/#element-accept;Allows a package to restrict the visibility of components exposed by a package that it uses