From 2e0c84ed6023c61ade78aadf5fa630c6b8423bec Mon Sep 17 00:00:00 2001 From: Bartosz Kuzma Date: Wed, 11 Jan 2023 08:25:15 +0100 Subject: [PATCH] Migrate https://phabricator.release11.com/diffusion/CZOPW/czopw.git to release11-tools-web --- .gitignore | 9 + FunctionSet/3.0-3.1_changes | 12 + FunctionSet/XPath/1+2+3Examples | 167 + FunctionSet/XPath/1+2Examples | 121 + FunctionSet/XPath/10 | 39 + FunctionSet/XPath/10+20 | 130 + FunctionSet/XPath/10+20+30 | 128 + FunctionSet/XPath/10_examples | 39 + FunctionSet/XPath/20 | 109 + FunctionSet/XPath/20_examples | 74 + FunctionSet/XPath/20_examples_done | 82 + FunctionSet/XPath/30 | 223 ++ FunctionSet/XPath/30_unique | 134 + FunctionSet/XPath/30_unique_examples | 62 + FunctionSet/XPath/xsltAll | 88 + Homepage/Dockerfile | 8 + Homepage/Frontend/jquery-3.6.0.slim.min.js | 2 + Homepage/Frontend/new_css/drytest.html | 25 + Homepage/Frontend/new_css/font/fontello.eot | Bin 0 -> 5964 bytes Homepage/Frontend/new_css/font/fontello.svg | 14 + Homepage/Frontend/new_css/font/fontello.ttf | Bin 0 -> 5796 bytes Homepage/Frontend/new_css/font/fontello.woff | Bin 0 -> 3256 bytes Homepage/Frontend/new_css/font/fontello.woff2 | Bin 0 -> 2584 bytes Homepage/Frontend/new_css/fontello.css | 59 + Homepage/Frontend/new_css/main.css | 3 + Homepage/Frontend/new_css/r11form.css | 484 +++ Homepage/Frontend/sample_data/sample_xml.xml | 33 + Homepage/Frontend/scripts.js | 156 + Homepage/Frontend/styles.css | 100 + Homepage/Frontend/xpath (copy).html | 1094 ++++++ Homepage/Frontend/xpath.html | 3208 +++++++++++++++++ Homepage/Frontend/xsd.html | 171 + Homepage/Frontend/xslt (copy).html | 540 +++ Homepage/Frontend/xslt.html | 1227 +++++++ Homepage/common.css | 101 + Homepage/favicon.ico | Bin 0 -> 9662 bytes Homepage/index.html | 35 + Homepage/logo.png | Bin 0 -> 3760 bytes Homepage/styles.css | 87 + Jenkinsfile | 11 + REST_XSLT/Dockerfile | 21 + REST_XSLT/pom.xml | 134 + REST_XSLT/src/main/java/Main.java | 220 ++ .../java/processors/NewNamespaceResolver.java | 54 + REST_XSLT/src/main/java/processors/Saxon.java | 53 + REST_XSLT/src/main/java/processors/Xalan.java | 91 + .../processors/XalanNamespaceResolver.java | 121 + REST_XSLT/src/main/resources/log4j.properties | 9 + SampleData/book.xml | 105 + SampleData/bookNS.xml | 105 + SampleData/functions20 | 129 + SampleData/sampleXML.xslt | 33 + SampleData/transform.xslt | 9 + docker-compose.yml | 16 + 54 files changed, 9875 insertions(+) create mode 100644 .gitignore create mode 100644 FunctionSet/3.0-3.1_changes create mode 100644 FunctionSet/XPath/1+2+3Examples create mode 100644 FunctionSet/XPath/1+2Examples create mode 100644 FunctionSet/XPath/10 create mode 100644 FunctionSet/XPath/10+20 create mode 100644 FunctionSet/XPath/10+20+30 create mode 100644 FunctionSet/XPath/10_examples create mode 100644 FunctionSet/XPath/20 create mode 100644 FunctionSet/XPath/20_examples create mode 100644 FunctionSet/XPath/20_examples_done create mode 100644 FunctionSet/XPath/30 create mode 100644 FunctionSet/XPath/30_unique create mode 100644 FunctionSet/XPath/30_unique_examples create mode 100644 FunctionSet/XPath/xsltAll create mode 100644 Homepage/Dockerfile create mode 100644 Homepage/Frontend/jquery-3.6.0.slim.min.js create mode 100644 Homepage/Frontend/new_css/drytest.html create mode 100644 Homepage/Frontend/new_css/font/fontello.eot create mode 100644 Homepage/Frontend/new_css/font/fontello.svg create mode 100644 Homepage/Frontend/new_css/font/fontello.ttf create mode 100644 Homepage/Frontend/new_css/font/fontello.woff create mode 100644 Homepage/Frontend/new_css/font/fontello.woff2 create mode 100644 Homepage/Frontend/new_css/fontello.css create mode 100644 Homepage/Frontend/new_css/main.css create mode 100644 Homepage/Frontend/new_css/r11form.css create mode 100644 Homepage/Frontend/sample_data/sample_xml.xml create mode 100644 Homepage/Frontend/scripts.js create mode 100644 Homepage/Frontend/styles.css create mode 100644 Homepage/Frontend/xpath (copy).html create mode 100644 Homepage/Frontend/xpath.html create mode 100644 Homepage/Frontend/xsd.html create mode 100644 Homepage/Frontend/xslt (copy).html create mode 100644 Homepage/Frontend/xslt.html create mode 100644 Homepage/common.css create mode 100644 Homepage/favicon.ico create mode 100644 Homepage/index.html create mode 100644 Homepage/logo.png create mode 100644 Homepage/styles.css create mode 100644 Jenkinsfile create mode 100644 REST_XSLT/Dockerfile create mode 100644 REST_XSLT/pom.xml create mode 100644 REST_XSLT/src/main/java/Main.java create mode 100644 REST_XSLT/src/main/java/processors/NewNamespaceResolver.java create mode 100644 REST_XSLT/src/main/java/processors/Saxon.java create mode 100644 REST_XSLT/src/main/java/processors/Xalan.java create mode 100644 REST_XSLT/src/main/java/processors/XalanNamespaceResolver.java create mode 100644 REST_XSLT/src/main/resources/log4j.properties create mode 100644 SampleData/book.xml create mode 100644 SampleData/bookNS.xml create mode 100644 SampleData/functions20 create mode 100644 SampleData/sampleXML.xslt create mode 100644 SampleData/transform.xslt create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ab3e096 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +*.iml +.classpath +.idea/ +.project +.settings +.settings/ +.vscode +nbactions.xml +target/ diff --git a/FunctionSet/3.0-3.1_changes b/FunctionSet/3.0-3.1_changes new file mode 100644 index 0000000..3142d81 --- /dev/null +++ b/FunctionSet/3.0-3.1_changes @@ -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 - '=>' \ No newline at end of file diff --git a/FunctionSet/XPath/1+2+3Examples b/FunctionSet/XPath/1+2+3Examples new file mode 100644 index 0000000..ed4cf71 --- /dev/null +++ b/FunctionSet/XPath/1+2+3Examples @@ -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: ): lang('en')?true?(context: ): lang('en')?true?(context: ): 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+")?
Word

and
whitespace
+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);; \ No newline at end of file diff --git a/FunctionSet/XPath/1+2Examples b/FunctionSet/XPath/1+2Examples new file mode 100644 index 0000000..25a90a3 --- /dev/null +++ b/FunctionSet/XPath/1+2Examples @@ -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: ): lang('en')?true?(context: ): lang('en')?true?(context: ): 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); + diff --git a/FunctionSet/XPath/10 b/FunctionSet/XPath/10 new file mode 100644 index 0000000..c7d4613 --- /dev/null +++ b/FunctionSet/XPath/10 @@ -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 \ No newline at end of file diff --git a/FunctionSet/XPath/10+20 b/FunctionSet/XPath/10+20 new file mode 100644 index 0000000..a901703 --- /dev/null +++ b/FunctionSet/XPath/10+20 @@ -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 \ No newline at end of file diff --git a/FunctionSet/XPath/10+20+30 b/FunctionSet/XPath/10+20+30 new file mode 100644 index 0000000..940c0c4 --- /dev/null +++ b/FunctionSet/XPath/10+20+30 @@ -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 \ No newline at end of file diff --git a/FunctionSet/XPath/10_examples b/FunctionSet/XPath/10_examples new file mode 100644 index 0000000..ff00ff3 --- /dev/null +++ b/FunctionSet/XPath/10_examples @@ -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: ): lang('en')?true?(context: ): lang('en')?true?(context: ): 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 \ No newline at end of file diff --git a/FunctionSet/XPath/20 b/FunctionSet/XPath/20 new file mode 100644 index 0000000..afa5873 --- /dev/null +++ b/FunctionSet/XPath/20 @@ -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 diff --git a/FunctionSet/XPath/20_examples b/FunctionSet/XPath/20_examples new file mode 100644 index 0000000..40767b6 --- /dev/null +++ b/FunctionSet/XPath/20_examples @@ -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 \ No newline at end of file diff --git a/FunctionSet/XPath/20_examples_done b/FunctionSet/XPath/20_examples_done new file mode 100644 index 0000000..22e3853 --- /dev/null +++ b/FunctionSet/XPath/20_examples_done @@ -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); + diff --git a/FunctionSet/XPath/30 b/FunctionSet/XPath/30 new file mode 100644 index 0000000..041453a --- /dev/null +++ b/FunctionSet/XPath/30 @@ -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 \ No newline at end of file diff --git a/FunctionSet/XPath/30_unique b/FunctionSet/XPath/30_unique new file mode 100644 index 0000000..4afb1c6 --- /dev/null +++ b/FunctionSet/XPath/30_unique @@ -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;; \ No newline at end of file diff --git a/FunctionSet/XPath/30_unique_examples b/FunctionSet/XPath/30_unique_examples new file mode 100644 index 0000000..f281d77 --- /dev/null +++ b/FunctionSet/XPath/30_unique_examples @@ -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+")?
Word

and
whitespace
+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 \ No newline at end of file diff --git a/FunctionSet/XPath/xsltAll b/FunctionSet/XPath/xsltAll new file mode 100644 index 0000000..784cc52 --- /dev/null +++ b/FunctionSet/XPath/xsltAll @@ -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 <when> and <otherwise> 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 <choose> element +xsl:otherwise;1.0;https://www.w3.org/TR/xslt-10/#section-Conditional-Processing-with-xsl:choose;Specifies a default action for the <choose> 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 \ No newline at end of file diff --git a/Homepage/Dockerfile b/Homepage/Dockerfile new file mode 100644 index 0000000..489b45b --- /dev/null +++ b/Homepage/Dockerfile @@ -0,0 +1,8 @@ +FROM nginx:stable-alpine + +COPY ./Frontend/ /usr/share/nginx/html/Frontend/ +COPY ./index.html /usr/share/nginx/html +COPY ./logo.png /usr/share/nginx/html +COPY ./styles.css /usr/share/nginx/html +COPY ./common.css /usr/share/nginx/html +COPY ./favicon.ico /usr/share/nginx/html \ No newline at end of file diff --git a/Homepage/Frontend/jquery-3.6.0.slim.min.js b/Homepage/Frontend/jquery-3.6.0.slim.min.js new file mode 100644 index 0000000..7556941 --- /dev/null +++ b/Homepage/Frontend/jquery-3.6.0.slim.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 -ajax,-ajax/jsonp,-ajax/load,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-deprecated/ajax-event-alias,-effects,-effects/Tween,-effects/animatedSelector | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(g,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,v=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),m={},b=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},w=g.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function C(e,t,n){var r,i,o=(n=n||w).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function T(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0 -ajax,-ajax/jsonp,-ajax/load,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-deprecated/ajax-event-alias,-effects,-effects/Tween,-effects/animatedSelector",E=function(e,t){return new E.fn.init(e,t)};function d(e){var t=!!e&&"length"in e&&e.length,n=T(e);return!b(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+R+")"+R+"*"),U=new RegExp(R+"|>"),V=new RegExp(W),X=new RegExp("^"+B+"$"),Q={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),TAG:new RegExp("^("+B+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+I+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,G=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){C()},ae=xe(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{O.apply(t=P.call(d.childNodes),d.childNodes),t[d.childNodes.length].nodeType}catch(e){O={apply:t.length?function(e,t){q.apply(e,P.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,d=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==d&&9!==d&&11!==d)return n;if(!r&&(C(e),e=e||T,E)){if(11!==d&&(u=Z.exec(t)))if(i=u[1]){if(9===d){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return O.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&p.getElementsByClassName&&e.getElementsByClassName)return O.apply(n,e.getElementsByClassName(i)),n}if(p.qsa&&!k[t+" "]&&(!v||!v.test(t))&&(1!==d||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===d&&(U.test(t)||_.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&p.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=A)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+be(l[o]);c=l.join(",")}try{return O.apply(n,f.querySelectorAll(c)),n}catch(e){k(t,!0)}finally{s===A&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>x.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[A]=!0,e}function ce(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)x.attrHandle[n[r]]=t}function de(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function pe(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in p=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},C=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:d;return r!=T&&9===r.nodeType&&r.documentElement&&(a=(T=r).documentElement,E=!i(T),d!=T&&(n=T.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),p.scope=ce(function(e){return a.appendChild(e).appendChild(T.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),p.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),p.getElementsByTagName=ce(function(e){return e.appendChild(T.createComment("")),!e.getElementsByTagName("*").length}),p.getElementsByClassName=J.test(T.getElementsByClassName),p.getById=ce(function(e){return a.appendChild(e).id=A,!T.getElementsByName||!T.getElementsByName(A).length}),p.getById?(x.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},x.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(x.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},x.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),x.find.TAG=p.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):p.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},x.find.CLASS=p.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(p.qsa=J.test(T.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+R+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+R+"*(?:value|"+I+")"),e.querySelectorAll("[id~="+A+"-]").length||v.push("~="),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+R+"*name"+R+"*="+R+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+A+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=T.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+R+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(p.matchesSelector=J.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){p.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",W)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=J.test(a.compareDocumentPosition),y=t||J.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!p.sortDetached&&t.compareDocumentPosition(e)===n?e==T||e.ownerDocument==d&&y(d,e)?-1:t==T||t.ownerDocument==d&&y(d,t)?1:u?H(u,e)-H(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==T?-1:t==T?1:i?-1:o?1:u?H(u,e)-H(u,t):0;if(i===o)return de(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?de(a[r],s[r]):a[r]==d?-1:s[r]==d?1:0}),T},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(C(e),p.matchesSelector&&E&&!k[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||p.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){k(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+R+")"+e+"("+R+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return b(n)?E.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?E.grep(e,function(e){return e===n!==r}):"string"!=typeof n?E.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||L,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:j.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:w,!0)),k.test(r[1])&&E.isPlainObject(t))for(r in t)b(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=w.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):b(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,L=E(w);var q=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,pe=/^$|^module$|\/(?:java|ecma)script/i;le=w.createDocumentFragment().appendChild(w.createElement("div")),(ce=w.createElement("input")).setAttribute("type","radio"),ce.setAttribute("checked","checked"),ce.setAttribute("name","t"),le.appendChild(ce),m.checkClone=le.cloneNode(!0).cloneNode(!0).lastChild.checked,le.innerHTML="",m.noCloneChecked=!!le.cloneNode(!0).lastChild.defaultValue,le.innerHTML="",m.option=!!le.lastChild;var he={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ge(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&S(e,t)?E.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var ye=/<|&#?\w+;/;function me(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),d=[],p=0,h=e.length;p\s*$/g;function ke(e,t){return S(e,"table")&&S(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Le(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function je(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n
",2===lt.childNodes.length),E.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(m.createHTMLDocument?((r=(t=w.implementation.createHTMLDocument("")).createElement("base")).href=w.location.href,t.head.appendChild(r)):t=w),o=!n&&[],(i=k.exec(e))?[t.createElement(i[1])]:(i=me([e],t,o),o&&o.length&&E(o).remove(),E.merge([],i.childNodes)));var r,i,o},E.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=E.css(e,"position"),c=E(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=E.css(e,"top"),u=E.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),b(t)&&(t=t.call(e,n,E.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){E.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===E.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===E.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=E(e).offset()).top+=E.css(e,"borderTopWidth",!0),i.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-E.css(r,"marginTop",!0),left:t.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===E.css(e,"position"))e=e.offsetParent;return e||re})}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;E.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),E.each(["top","left"],function(e,n){E.cssHooks[n]=Me(m.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?E(e).position()[n]+"px":t})}),E.each({Height:"height",Width:"width"},function(a,s){E.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){E.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?E.css(e,t,i):E.style(e,t,n,i)},s,n?e:void 0,n)}})}),E.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){E.fn[n]=function(e,t){return 0 + + + + + + + + + +
+ +
+ [1.0] fn:last() +
+ Returns the position of the last node in the context list
+ Link do dokumentacji W3C: Node-Set-Functions +
+
+
+ + + + + \ No newline at end of file diff --git a/Homepage/Frontend/new_css/font/fontello.eot b/Homepage/Frontend/new_css/font/fontello.eot new file mode 100644 index 0000000000000000000000000000000000000000..8eb876254bf40f2702d4398804dd26ede72d892c GIT binary patch literal 5964 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 literal 0 HcmV?d00001 diff --git a/Homepage/Frontend/new_css/font/fontello.svg b/Homepage/Frontend/new_css/font/fontello.svg new file mode 100644 index 0000000..66886e8 --- /dev/null +++ b/Homepage/Frontend/new_css/font/fontello.svg @@ -0,0 +1,14 @@ + + + +Copyright (C) 2021 by original authors @ fontello.com + + + + + + + + + + \ No newline at end of file diff --git a/Homepage/Frontend/new_css/font/fontello.ttf b/Homepage/Frontend/new_css/font/fontello.ttf new file mode 100644 index 0000000000000000000000000000000000000000..a6a2ea27f9d30977bf801ed88595d942b038ac12 GIT binary patch literal 5796 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 Lp2IJ)0Kk6$Wj?nB literal 0 HcmV?d00001 diff --git a/Homepage/Frontend/new_css/font/fontello.woff2 b/Homepage/Frontend/new_css/font/fontello.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..b1c349be122e72d99908b59525af47d16d8a31b3 GIT binary patch literal 2584 zcmV+z3g`8APew8T0RR91016lY4*&oF02ZVG013hX0RR9100000000000000000000 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 literal 0 HcmV?d00001 diff --git a/Homepage/Frontend/new_css/fontello.css b/Homepage/Frontend/new_css/fontello.css new file mode 100644 index 0000000..28bc34a --- /dev/null +++ b/Homepage/Frontend/new_css/fontello.css @@ -0,0 +1,59 @@ +@font-face { + font-family: 'fontello'; + src: url('font/fontello.eot?49304387'); + src: url('font/fontello.eot?49304387#iefix') format('embedded-opentype'), + url('font/fontello.woff2?49304387') format('woff2'), + url('font/fontello.woff?49304387') format('woff'), + url('font/fontello.ttf?49304387') format('truetype'), + url('font/fontello.svg?49304387#fontello') format('svg'); + font-weight: normal; + font-style: normal; + } + /* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ + /* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ + /* + @media screen and (-webkit-min-device-pixel-ratio:0) { + @font-face { + font-family: 'fontello'; + src: url('../font/fontello.svg?49304387#fontello') format('svg'); + } + } + */ + + [class^="icon-"]:before, [class*=" icon-"]:before { + font-family: "fontello"; + font-style: normal; + font-weight: normal; + speak: never; + + display: inline-block; + text-decoration: inherit; + width: 1em; + margin-right: .2em; + text-align: center; + /* opacity: .8; */ + + /* For safety - reset parent styles, that can break glyph codes*/ + font-variant: normal; + text-transform: none; + + /* fix buttons height, for twitter bootstrap */ + line-height: 1em; + + /* Animation center compensation - margins should be symmetric */ + /* remove if not needed */ + margin-left: .2em; + + /* you can be more comfortable with increased icons size */ + /* font-size: 120%; */ + + /* Font smoothing. That was taken from TWBS */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + + /* Uncomment for 3D effect */ + /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ + } + + .icon-plus:before { content: '\e801'; } /* '' */ + .icon-cancel:before { content: '\e802'; } /* '' */ \ No newline at end of file diff --git a/Homepage/Frontend/new_css/main.css b/Homepage/Frontend/new_css/main.css new file mode 100644 index 0000000..cc1237d --- /dev/null +++ b/Homepage/Frontend/new_css/main.css @@ -0,0 +1,3 @@ +.container { + +} \ No newline at end of file diff --git a/Homepage/Frontend/new_css/r11form.css b/Homepage/Frontend/new_css/r11form.css new file mode 100644 index 0000000..d7e87f5 --- /dev/null +++ b/Homepage/Frontend/new_css/r11form.css @@ -0,0 +1,484 @@ +@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;700&display=swap'); +@import url('https://necolas.github.io/normalize.css/8.0.1/normalize.css'); +@import url('fontello.css'); + + +.hyperlink, .hyperlink:visited, .hyperlink:active { + color: rgb(47, 125, 146); + cursor: pointer; +} + +.hyperlink:hover { + filter: brightness(120%); +} + +.tooltip-window { + position: fixed; + right: 0; + filter: drop-shadow(-2px 0px 2px darkgray); + background: #e8f3f7; + padding: 15px 30px; + font-family: 'Nunito', sans-serif; + width: 40%; + height: 100%; + overflow: scroll; +} + +.tooltip-window.lite { + width: 30%; +} +/* .hyperlink.collapseTrigger::before{ + content: "▼"; +} */ + +.tooltip-window .tip { +} + +.bordered-field { + border: 2px solid rgba(93, 99, 96, 0.705); + border-radius: 5px; + padding: 8px; + +} + +.bordered-field:focus { + outline: none; + box-shadow: 0 0 5px rgba(81, 203, 238); + border: 2px solid #00000070; +} + +.bordered-field:disabled { + background: #eeeeeed2; +} + +.vertically-resizeable { + resize: vertical; +} + +.container { + font-family: 'Nunito', sans-serif; + display: flex; + justify-content: left; + width: 100%; +} + +.tool { + width: 55%; + display: flex; + justify-content: space-evenly; +} + +.tool.extended { + width: 65%; +} + +.tool .tool-context { + width: 90%; +} + +.tool.extended .tool-context { + width: 75%; +} + +.tool.extended .tool-extention { + width: 20%; + padding-top: 2%; + display: block; +} + +.tool .tool-extention { + display: none; +} + +.tool-extention { + opacity: 0; + pointer-events: none; +} + +.tool-extention.active { + opacity: 100%; + pointer-events: all; +} + +.clickable-text { + padding: 0; + outline: none; + background: none; + border: none; + font-weight: 300; + cursor: pointer; +} + +.clickable-text.highlight:hover { + color: #3bc4f1; +} + +.modification-button { + padding: 0; + outline: none; + background: none; + border: none; + font-weight: 300; +} + +.modification-button.btn-add { + font-size: 16px; + color: #00000030; + margin: auto 0 auto 0; +} + +.modification-button.btn-add:hover { + color:#58ac43; +} + +.modification-button.btn-tile:hover { + color: #ca1111; +} + +.modification-button.btn-hashmap { + font-size: 16px; + color: #00000030; + margin: auto 0 auto 0; +} + +.modification-button.btn-hashmap:hover { + color: #ca1111; +} + +.modification-button.btn-tile { + width: 10%; + margin: 20% 0 0 0; + font-size: 14px; + color: #00000020 +} + +.tile { + width: 90%; + padding-top: 40%; + border: 1px solid gray; + border-radius: 3px; + position: relative; + background: #f0f0f095; + margin-bottom: 10px; + cursor: default; +} + +.tile:hover { + filter: brightness(110%); +} + +.tile.active { + background: #00000070; + color: white; + filter: none; +} + +.tile .content { + position: absolute; + left: 0; + top: 0; + bottom: 0; + right: 0; + padding: 0 2% 0 7%; + display: flex; +} + +.text-aligned-to-right { + text-align: right; +} + +.centered-vertically { + margin-top: auto; + margin-bottom: auto; +} + +.display-space-between { + width: 100%; + display: flex; + justify-content: space-between; +} + +.content p { + margin: 0; + padding: 0; +} + + +.float-left { + display: flex; + justify-content: left; + width: 100%; +} + +.version-span { + font-size: 13px; + font-weight: 400; + color: rgba(85,85,85,0.555); +} + +.block-display { + display: block; +} + +.block-label { + display: block; + margin: 0 0 0 5px; +} + +.tabmenu { + display: flex; + flex-direction: row; + text-align: center; + border-bottom: 1px solid rgba(185, 185, 185, 0.5); +} + +.tabitem { + flex-grow: 1; + cursor: pointer; + padding: 5px 0; +} + +.tabitem:hover { + font-weight: 700; +} + +.tabitem.active { + background: rgba(33, 34, 34, 0.705); + color: white; + font-weight: 700; + cursor:default; + flex-grow: 1; +} + +.big-font { + font-size: 20px; +} + +.action-button.active { + background: #3bc4f1; + border: 1px solid #7ed0eb; + cursor: pointer; +} + +.action-button.active:hover { + filter: brightness(110%); +} + +.action-button { + background: rgba(155, 165, 160, 0.507); + border:1px solid rgba(186, 197, 191, 0.507); + color: white; + padding: 10px 20px; + font-weight: 700; + margin: 3px 0; +} + +.quater-width { + width: 25%; +} + +.half-width { + width: 50%; +} + +.half-width.with-padding { + width: 45%; +} + +.max-width { + width: 100%; +} + +.max-width.with-padding { + width: 94%; +} + +.max-height { + height: 100%; +} + +.height-300 { + height: 300px; +} + +.max-height.with-padding { + height: 90%; +} + +.small-margins { + margin: 3%; +} + +.small-vertical-margin { + margin-top: 10px; + margin-bottom: 10px; +} + +.medium-vertical-margin { + margin-top: 30px; + margin-bottom: 30px; +} + +.large-vertical-margin { + margin-top: 50px; + margin-bottom: 50px; +} + +.textarea-300 { + height: 300px; +} + +.centered-content { + display: flex; + justify-content: center; +} + +.table-map { + width: 60%; +} + +.table-map input{ + font-size: 16px; + padding: 7px; + border: 1px solid rgba(145, 146, 146, 0.849); + border-radius: 5px; +} + +.table-map input.key { + background: #f0f0f0; +} + +.table-default { + width: 80%; + border-collapse: collapse; + border-spacing: 0; +} + +.table-default tr { + background: #f0f0f02d; +} + +.table-default tr.bottom-border { + border-bottom: 1px solid black; +} + +.table-default th { + background: #ffffff; +} + +.table-default tr.even { + background: #f0f0f0; +} + +.tip { + display: none; +} + +.tip.active { + display: block; +} + +.tabcontent { + display: none; +} + +.tabcontent.active { + display: flex; + justify-content: center; +} + +.section-button { + width: 100%; + padding: 15px 0; + font-size: 18px; + background: #b4b4b4c5; + cursor: pointer; + border-bottom: darkgray 2px solid !important; +} + +.section-button:hover { + /* border-bottom: #3bc4f1 2px solid; */ + backdrop-filter: brightness(110%); +} + +.section-button .active { + background: #00000030; +} + +.List .collapsibleContent { + /* display: none; */ + border-left: #bdc5c9 2px solid; + + /* max-height: 0px; */ + /* border-left: #ededed solid 1px; */ + overflow: hidden; + background: #ffffff50; +} + +.section{ + padding: 10px 0px 20px 0px ; +} + +.content { + padding: 0px 15px 0px 15px ; + text-align: justify; + overflow: hidden; + transition: max-height .2s ease-out; + max-height: 0px; + border-left: #c0c2c3 2px solid; + +} + +.collapsibleMini::before{ + content: "►"; +} + +.collapsibleMini.active::before{ + content: "▼"; +} + +.content.active{ + +} + +.hiddable { + display: none; +} + +.hiddable.active { + display: inherit; +} + +/* In case of collision with classes that use 'active' */ +.hidden { + display: none; +} + +button:hover{ + filter: brightness(110%); +} + +.table-doc td, .table-doc th{ + border-spacing: 0px; + padding: 0px 10px; +} + +.table-doc td { + background-color: rgba(155, 165, 160, 0.342); +} + +.table-doc th { + background-color: #3bc4f1; + text-align: left; + color: white; +} + +textarea { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +code{ + line-height: 150%; +} \ No newline at end of file diff --git a/Homepage/Frontend/sample_data/sample_xml.xml b/Homepage/Frontend/sample_data/sample_xml.xml new file mode 100644 index 0000000..cd89168 --- /dev/null +++ b/Homepage/Frontend/sample_data/sample_xml.xml @@ -0,0 +1,33 @@ + + + City library + 345123 + + + 7321 + Adam + Choke + + + 5123 + Lauren + Wong + + + + + 6422 + Harry Potter + 7542 + + + 1234 + Macbeth + 5123 + + + 9556 + Romeo and Juliet + + + \ No newline at end of file diff --git a/Homepage/Frontend/scripts.js b/Homepage/Frontend/scripts.js new file mode 100644 index 0000000..981ae40 --- /dev/null +++ b/Homepage/Frontend/scripts.js @@ -0,0 +1,156 @@ +var defaultStrings = []; +const color_grey = "#6b6b6b"; +const color_red = "#ff8f8f"; + +//Remove default text and set color to black +function clearDefaultContent(element, text) { + if (element.value == text) { + element.value = ""; + element.style.color = "#000000"; + element.style.backgroundColor = "#ffffff"; + } +} + +//Set default text in grey +function setDefaultContent(element, text) { + if (element.value == "") { + var id = element.getAttribute('id'); + if (!defaultStrings.includes(text)) { + defaultStrings.push(text); + } + if (id == "xmlArea") { + element.style.color = color_grey; + element.value = text; + } + if (id == "transformArea") { + element.style.color = color_grey; + element.value = text; + } + } +} + +function hideList(collList) { + for (i = 0; i < collList.length; i++) { + if (collList[i].nextElementSibling !== null) { + collList[i].nextElementSibling.style.maxHeight = null; + collList[i].nextElementSibling.classList.toggle("collapsibleDataExpanded", false); + } + collList[i].style.display = 'none'; + collList[i].classList.remove("collapsibleActive"); + } +} + +function checkDefault(text){ + return defaultStrings.includes(text); +} + +function showList(collList) { + for (i = 0; i < collList.length; i++) { + collList[i].style.display = 'block'; + } +} + +function smoothFoldElement(element, toogleState, toggleParrent){ + if (toogleState) { + console.log("DUPA"); + if(toggleParrent){ + element.parentElement.style.maxHeight = "0px"; + } + + element.classList.toggle("active", false); + var subLists = collapsibleData.getElementsByClassName("collapsibleData"); + for (j = 0; j < subLists.length; j++) { + subLists[j].style.maxHeight = null; + } + } else { + collapsibleData.parentElement.style.maxHeight = (collapsibleData.parentElement.scrollHeight) + "px"; + collapsibleData.classList.toggle("active", true); + if (collapsibleData.parentElement.classList.contains("collapsibleData") && collapsibleData.parentElement.classList.contains("active")) { + collapsibleData.parentElement.style.maxHeight = (collapsibleData.parentElement.scrollHeight + collapsibleData.scrollHeight) + "px"; + } + } +} + +//Set tooltip info, function is called by onClick handlers +function refreshTooltip() { + var resizeList = document.getElementsByClassName("collapsibleData"); + console.log("collDataList: " + resizeList.length) + document.getElementById("processorTooltipInfo").innerText = procInfo; + document.getElementById("xsltelementsheader").innerText = XSLTheader; +} + +function performRequest(text, checkXML, checkTransform){ + var xmlData = document.getElementById("xmlArea").value.trim(); + var transformData = document.getElementById("transformArea").value.trim(); + + var empty = false; + if (defaultStrings.includes(xmlData) && checkXML) { + document.getElementById("xmlArea").style.backgroundColor = color_red; + xmlData = ""; + empty = true; + } + if (defaultStrings.includes(transformData) && checkTransform) { + document.getElementById("transformArea").style.backgroundColor = color_red; + empty = true; + } + if (!empty) { + restRequest(text); + }else{ + document.getElementById("resultArea").value = "No data provided!"; + return false; + } + +} + +//Form REST request, send, receive and display in resultArea +async function restRequest(text) { + const escapeChar = "specialEscapeChar"; + // const addr = "http://localhost:8081/" + text; + const addr = "http://gordon.zipper.release11.com:8081/" + text; + + var xmlData = document.getElementById("xmlArea").value.trim(); + var transformData = document.getElementById("transformArea").value.trim(); + + if(defaultStrings.includes(xmlData)){ + xmlData = ""; + } + + // var data = xmlData.concat(escapeChar, transformData); + + // const url = addr.concat("?escapechar=", escapeChar, "&processor=", getProcInfo()); + + var jsonData = JSON.stringify({ + "data" : xmlData, + "process" : transformData, + "processor" : getProcessor(), + "version" : getVersion() + }); + // console.log(jsonData); + var init = { + headers: new Headers({ + }), + body: jsonData, + // body: data, + method: "POST" + }; + var request = new Request(addr, init); + + + + await fetch(request).then(response => { + console.log(response.status); + response.text().then(function (text) { + console.log(text); + var result = JSON.parse(text); + document.getElementById("resultArea").value = result.result; + document.getElementById("procinfo").innerText = ' Computed using '.concat(" ", result.processor); + if (response.ok) { + document.getElementById("procinfo").innerText = document.getElementById("procinfo").innerText.concat(" in ", result.time, "ms"); + procinfo.style.color = "#30aa58"; + } else { + procinfo.style.color = "#aa3030"; + } + }); + + }); +} \ No newline at end of file diff --git a/Homepage/Frontend/styles.css b/Homepage/Frontend/styles.css new file mode 100644 index 0000000..0d1426e --- /dev/null +++ b/Homepage/Frontend/styles.css @@ -0,0 +1,100 @@ +html, body { + margin: 0px; + height: 100%; + min-height: 100%; + font-family: 'Nunito', sans-serif; +} + +select { + font-size: 16px; +} + +button#requestButton { + width: 100%; +} + +div#content { + width: 100%; + min-height: 100%; + display: flex; +} + +div#fields { + float: left; + width: 55%; + margin-left: 8px; + margin-right: 8px; + height: 100%; + margin-bottom: 60px; +} + +p { + margin: 1 +} + +label { + font-size: 20px; + color: rgb(44, 44, 44); +} + +textarea { + width: 99.4%; + resize: vertical; + color: #6b6b6b; +} + +textarea#resultArea { + width: 99.4%; + resize: vertical; +} + +span#procinfo { + color: #30aa58; +} + +p#tooltipText { + width: 200px; + height: 150px; +} + +div#tooltip { + margin-top: 160px; + float: right; + width: 40%; + height: 100%; +} + +.collapsible { + width: 100%; +} + +.collapsible.active { + background-color: rgb(129, 129, 129) !important; +} + +.collapsibleData { + transition: max-height .2s ease-out; + max-height: 0px; +} + +.docTable td, .docTable th{ + border-spacing: 0px; + padding: 0px 10px; +} + +.docTable td { + background-color: rgba(155, 165, 160, 0.342); +} + +.docTable th { + background-color: #3bc4f1; + text-align: left; + color: white; +} + +.collapsibleDataMini{ + /* border-radius: 10px; */ + border: solid rgba(137, 146, 142, 0.267); + border-width: 0px 0px 0px 3px; + margin-left: 10px; +} \ No newline at end of file diff --git a/Homepage/Frontend/xpath (copy).html b/Homepage/Frontend/xpath (copy).html new file mode 100644 index 0000000..7532031 --- /dev/null +++ b/Homepage/Frontend/xpath (copy).html @@ -0,0 +1,1094 @@ + + + + + + + + + + + +

+
+

Online XPath tester v: 0.015

+ + + + + + +

+ + +

+ + +
+ +

+ + +
+
+

What is XPath?

+

XPath is a querry language used for selecting nodes from XML and processing them.
+ It may perform operations on strings, numbers and boolean values.

+ + + +
+

XPath 2.0 introduced many new features XQuery-cośtam:
+ - Added support for all XML simple types
+ - Many new functions (trippled instruction count)
+ - All expressions evaluate to sequence
+ - Introduces conditional expressions and for-loops
+

+

XPath 3.0
+ - Dynamic function collapsible
+ - Inline functions
+ - Support for union types
+ - Introduced maps +

+ +
+ + +

XPath 1.0 functions

+ + + + + +
+ [1.0] fn:last() - Returns the position of the + last node in the context list +
+ + Link do dokumentacji W3C: Node-Set-Functions +
+ + [1.0] fn:position() - Returns the position of the + current context node +
+ + Link do dokumentacji W3C: Node-Set-Functions +
+ + [1.0] fn:count(node-set) - Returns the number of + nodes in the node-set +
+ Arguments and return type + + + + + + + + + +
TypeDescription
node-setNode-set to count nodes in
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
count(//b:book)5
count(//person[@id>5])17
+ Link do dokumentacji W3C: Node-Set-Functions +
+ + [1.0] fn:id(object) - Returns the element + specified by it's unique id, requires DTD +
+ + Link do dokumentacji W3C: Node-Set-Functions +
+ + [1.0] fn:local-name(node-set) - Returns the + local-name for the first node in the node-set +
+ Arguments and return type + + + + + + + + + +
TypeDescription
node-setExtract first node and return its local name
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
local-name(//b:books)b:book
local-name(//b:book)b:title
+ Link do dokumentacji W3C: Node-Set-Functions +
+ + [1.0] fn:local-name() - Returns the local-name + for the context node +
+ + Link do dokumentacji W3C: Node-Set-Functions +
+ + [1.0] fn:namespace-uri(node-set) - Returns the + namespace-uri for the first node in the node-set +
+ Arguments and return type + + + + + + + + + +
TypeDescription
node-setExtract first node and return the namespace URI
Examples:
+ + + + + + + + + +
ExpressionResult
namespace-uri(//b:book)http://www.book.com
+ Link do dokumentacji W3C: Node-Set-Functions +
+ + [1.0] fn:namespace-uri() - Returns the + namespace-uri for the context node +
+ + Link do dokumentacji W3C: Node-Set-Functions +
+ + [1.0] fn:name(node-set) - Returns the name for + the first node in the node-set +
+ Arguments and return type + + + + + + + + + +
TypeDescription
node-setExtract first node and return QName
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
name(//b:books/*)b:book
name(//b:book/*)b:title
+ Link do dokumentacji W3C: Node-Set-Functions +
+ + [1.0] fn:name() - Returns the name for the + context node +
+ Examples:
+ + + + + + + + + +
ExpressionResult
current context nodeExtract first node and return QName
+ Link do dokumentacji W3C: Node-Set-Functions +
+ + +
+
+ [1.0] fn:string(object) - Returns the string + representation of the object argument +
+ Arguments and return type + + + + + + + + + +
TypeDescription
stringThe object to convert to a string
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
string((1<0))false
string(.11)0.11
+ Link do dokumentacji W3C: String-Functions +
+ + [1.0] fn:string() - Returns a string value + representation of the context node +
+ + Link do dokumentacji W3C: String-Functions +
+ + [1.0] fn:concat(string, string, string*) - + Returns the concatenation of its arguments +
+ Arguments and return type + + + + + + + + + + + + + + + + + +
TypeDescription
stringString to be merged
stringString to be merged
string*any number of strings
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
concat("aa","bb")aabb
concat("aa", 123)aa123
+ Link do dokumentacji W3C: String-Functions +
+ + [1.0] fn:starts-with(string, string) - Returns + true if the first string starts with the second string +
+ Arguments and return type + + + + + + + + + + + + + +
TypeDescription
stringString to be searched
stringString to be found
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
starts-with("aabb", "aa")true
starts-with("aabb", "cc")false
+ Link do dokumentacji W3C: String-Functions +
+ + [1.0] fn:contains(string, string) - Returns true + if the first string contains the second string +
+ Arguments and return type + + + + + + + + + + + + + +
TypeDescription
stringString to be searched
stringString to be found
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
contains("abc", "c")true
contains("abc", "1")false
+ Link do dokumentacji W3C: String-Functions +
+ + [1.0] fn:substring-before(string, string) - + Returns the substring found before the first occurrence of the second argument +
+ Arguments and return type + + + + + + + + + + + + + +
TypeDescription
stringString to be searched
stringString to be used to split
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
substring-before("aabbcc","bb")aa
substring-before("aabbcc","c")aabb
+ Link do dokumentacji W3C: String-Functions +
+ + [1.0] fn:substring-after(string, string) - + Returns the substring found after the first occurrence of the second argument +
+ Arguments and return type + + + + + + + + + + + + + +
TypeDescription
stringString to be searched
stringString to be used to split
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
substring-after("aabbcc","bb")cc
substring-after("aabbcc","a")abbcc
+ Link do dokumentacji W3C: String-Functions +
+ + [1.0] fn:substring(string, number, number) - + Returns the substring starting at second argument with lenght of third argument +
+ Arguments and return type + + + + + + + + + + + + + + + + + +
TypeDescription
stringString to be cut
integerStarting position
integerLength of the substring
Examples:
+ + + + + + + + + +
ExpressionResult
substring("aabbcc", 1, 2)aa
+ Link do dokumentacji W3C: String-Functions +
+ + [1.0] fn:substring(string, number) - Returns the + substring of the first argument from the position specified by the second argument +
+ Arguments and return type + + + + + + + + + + + + + +
TypeDescription
stringString to be cut
integerStarting position
Examples:
+ + + + + + + + + +
ExpressionResult
substring("aabbcc", 3)bbcc
+ Link do dokumentacji W3C: String-Functions +
+ + [1.0] fn:string-length(string) - Returns the + length of the string specified by the argument +
+ Arguments and return type + + + + + + + + + +
TypeDescription
stringString of which length should be returned
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
string-length("aabbcc")6
string-length("aa bb cc")8
+ Link do dokumentacji W3C: String-Functions +
+ + [1.0] fn:string-length() - Returns the length of + the string specified by the context node +
+ + Link do dokumentacji W3C: String-Functions +
+ + [1.0] fn:normalize-space(string) - Returns a + white-space normalized string +
+ Arguments and return type + + + + + + + + + +
TypeDescription
stringString to be normalized
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
normalize-space("aa bb cc")aa bb cc
normalize-space("aa bb cc")aa bb cc
+ Link do dokumentacji W3C: String-Functions +
+ + [1.0] fn:normalize-space() - Returns a + white-space normalized string specified by the context-node +
+ + Link do dokumentacji W3C: String-Functions +
+ + [1.0] fn:translate(string, string, string) - + Replaces characters specified by the second argument using those from the third argument +
+ Arguments and return type + + + + + + + + + + + + + + + + + +
TypeDescription
stringString to be edited
stringsequence of characters to be replaced
stringsequence of character to be used in replacement
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
translate("aabbcc", "ab","xz")xxzzcc
translate("Test sequence", "e","z")Tzst szquzncz
+ Link do dokumentacji W3C: String-Functions +
+ + +
+
+ [1.0] fn:boolean(object) - Returns the boolean + representation of the object argument +
+ Arguments and return type + + + + + + + + + +
TypeDescription
expressionThe expression to be evaluated
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
boolean(1>2)false
boolean("a"="a")true
+ Link do dokumentacji W3C: Boolean-Functions +
+ + [1.0] fn:not(boolean) - Returns a boolean with + the opposite value of its argument +
+ Arguments and return type + + + + + + + + + +
TypeDescription
booleanBoolean value to be inverted
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
not("a"="a")false
not(true)false
+ Link do dokumentacji W3C: Boolean-Functions +
+ + [1.0] fn:true() - Returns a boolean with the + value of true +
+ Arguments and return type + + + + + + + + + +
TypeDescription
Returns boolean value true
Examples:
+ + + + + + + + + +
ExpressionResult
true()true
+ Link do dokumentacji W3C: Boolean-Functions +
+ + [1.0] fn:false() - Returns a boolean with the + value of false +
+ Arguments and return type + + + + + + + + + +
TypeDescription
Returns boolean value false
Examples:
+ + + + + + + + + +
ExpressionResult
false()false
+ Link do dokumentacji W3C: Boolean-Functions +
+ + [1.0] fn:lang(string) - Returns true if the + language of the context node is the same as the languag specified by the argument +
+ Arguments and return type + + + + + + + + + +
TypeDescription
stringChecks if the context node matches given language
Examples:
+ + + + + + + + + + + + + + + + + +
ExpressionResult
(context: ): lang('en')true
(context: ): lang('en')true
(context: ): lang('en')false
+ Link do dokumentacji W3C: Boolean-Functions +
+ + +
+
+ [1.0] fn:number(object) - Returns the number + representation of the object argument +
+ Arguments and return type + + + + + + + + + +
TypeDescription
objectConverts given object to a number
Examples:
+ + + + + + + + + + + + + + + + + + + + + +
ExpressionResult
number(true())1
number(false())0
number("55")55
number(" 55 ")55
+ Link do dokumentacji W3C: Number-Functions +
+ + [1.0] fn:number() - Returns the number + representation of the context node +
+ Arguments and return type + + + + + + + + + +
TypeDescription
current context nodeConverts current context node to a number
Examples:
+ + + + + + + + + + + + + + + + + + + + + +
ExpressionResult
number(true())1
number(false())0
number("55")55
number(" 55 ")55
+ Link do dokumentacji W3C: Number-Functions +
+ + [1.0] fn:sum(node-set) - Returns the sum of all + nodes in the node-set +
+ Arguments and return type + + + + + + + + + +
TypeDescription
node-setSumms each node from the set passed through number() function
+ Link do dokumentacji W3C: Number-Functions +
+ + [1.0] fn:floor(number) - Returns the largest + integer value not greater than the argument +
+ Arguments and return type + + + + + + + + + +
TypeDescription
numberDecimal number to be converted to integer
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
floor(3.1)3
floor(3.99)3
+ Link do dokumentacji W3C: Number-Functions +
+ + [1.0] fn:ceiling(number) - Returns the smallest + integer value not less than the argument +
+ Arguments and return type + + + + + + + + + +
TypeDescription
numberDecimal number to be converted to integer
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
ceiling(3.1)4
ceiling(3.99)4
+ Link do dokumentacji W3C: Number-Functions +
+ + [1.0] fn:round(number) - Returns the integer + value closest to the argument +
+ Arguments and return type + + + + + + + + + +
TypeDescription
numberDecimal number to be converted to integer
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
round(3.1)3
round(3.6)4
+ Link do dokumentacji W3C: Number-Functions +
+ +
+ +
+
+ + + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/Homepage/Frontend/xpath.html b/Homepage/Frontend/xpath.html new file mode 100644 index 0000000..769490e --- /dev/null +++ b/Homepage/Frontend/xpath.html @@ -0,0 +1,3208 @@ + + + + + + + + + + + + + + +
+
+
+
+

Online XPath tester v0.4

+
+ +
+
+ + + + +
+ +
+ + + +

+ + +
+ +

+ + + +
+
+
+

What is XPath?

+

XPath is a querry language used for selecting nodes from XML and processing them.
+ It may perform operations on strings, numbers and boolean values.

+ + +
+ +
+

XPath 2.0 introduced many new features XQuery-cośtam:
+ - Added support for all XML simple types
+ - Many new functions (trippled instruction count)
+ - All expressions evaluate to sequence
+ - Introduces conditional expressions and for-loops
+

+

XPath 3.0
+ - Dynamic function calls (function may be called without being referenced by name (find + function in collection and call)
+ - Inline functions
+ - Namespace literals - Namespace may be embeded into function name
+ - Support for union types - collections containing elements of different types
+ - Mapping operator - '!' performs evaluation for each element in sequence and + concatenates results
+ - Introduced maps
+

+

XPath 3.1
+ - New operator for function chaing '=>'
+ - Introduced maps that store data in pair 'key:value' - 'map{ key : value, key : value + }'
+ - Introduced arrays - they differ from sequences in that they can be nested 'array{1, 5, 7, + (10 to 20)}'
+ +

+
+
+ +

XPath 1.0 & 2.0 functions

+ + + + + +
+ +
+ + + [1.0] fn:last() +
+
+ Returns the position of the last node in the context list
+
+ W3C Documentation reference: Node-Set-Functions +
+
+ + + + [1.0] fn:position() +
+
+ Returns the position of the current context node
+
+ W3C Documentation reference: Node-Set-Functions +
+
+ + + + [1.0] fn:count(node-set) +
+
+ Returns the number of nodes in the node-set
+ Arguments and return type: + + + + + + + + + +
TypeDescription
node-setNode-set to count nodes in
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
count(//b:book)5
count(//person[@id>5])17

+ W3C Documentation reference: Node-Set-Functions +
+
+ + + + [1.0] fn:id(object) +
+
+ Returns the element specified by it's unique id, requires DTD
+
+ W3C Documentation reference: Node-Set-Functions +
+
+ + + + [1.0] fn:local-name(node-set) +
+
+ Returns the local-name for the first node in the node-set
+ Arguments and return type: + + + + + + + + + +
TypeDescription
node-setExtract first node and return its local name
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
local-name(//b:books)b:book
local-name(//b:book)b:title

+ W3C Documentation reference: Node-Set-Functions +
+
+ + + + [1.0] fn:local-name() +
+
+ Returns the local-name for the context node
+
+ W3C Documentation reference: Node-Set-Functions +
+
+ + + + [1.0] fn:namespace-uri(node-set) +
+
+ Returns the namespace-uri for the first node in the node-set
+ Arguments and return type: + + + + + + + + + +
TypeDescription
node-setExtract first node and return the namespace URI
Examples:
+ + + + + + + + + +
ExpressionResult
namespace-uri(//b:book)http://www.book.com

+ W3C Documentation reference: Node-Set-Functions +
+
+ + + + [1.0] fn:namespace-uri() +
+
+ Returns the namespace-uri for the context node
+
+ W3C Documentation reference: Node-Set-Functions +
+
+ + + + [1.0] fn:name(node-set) +
+
+ Returns the name for the first node in the node-set
+ Arguments and return type: + + + + + + + + + +
TypeDescription
node-setExtract first node and return QName
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
name(//b:books/*)b:book
name(//b:book/*)b:title

+ W3C Documentation reference: Node-Set-Functions +
+
+ + + + [1.0] fn:name() +
+
+ Returns the name for the context node
+ Examples:
+ + + + + + + + + +
ExpressionResult
current context nodeExtract first node and return QName

+ W3C Documentation reference: Node-Set-Functions +
+
+ + + +
+
+
+ +
+ + + [1.0] fn:string(object) +
+
+ Returns the string representation of the object argument
+ Arguments and return type: + + + + + + + + + +
TypeDescription
stringThe object to convert to a string
Examples:
+ + + + + + + + + + + + +
ExpressionResult
string((1<0))< /td> + false
string(.11)0.11

+ W3C Documentation reference: String-Functions +
+
+ + + + [1.0] fn:string() +
+
+ Returns a string value representation of the context node
+
+ W3C Documentation reference: String-Functions +
+
+ + + + [1.0] fn:concat(string, string, string*) +
+
+ Returns the concatenation of its arguments
+ Arguments and return type: + + + + + + + + + + + + + + + + + +
TypeDescription
stringString to be merged
stringString to be merged
string*any number of strings
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
concat("aa","bb")aabb
concat("aa", 123)aa123

+ W3C Documentation reference: String-Functions +
+
+ + + + [1.0] fn:starts-with(string, string) +
+
+ Returns true if the first string starts with the second string
+ Arguments and return type: + + + + + + + + + + + + + +
TypeDescription
stringString to be searched
stringString to be found
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
starts-with("aabb", "aa")true
starts-with("aabb", "cc")false

+ W3C Documentation reference: String-Functions +
+
+ + + + [1.0] fn:contains(string, string) +
+
+ Returns true if the first string contains the second string
+ Arguments and return type: + + + + + + + + + + + + + +
TypeDescription
stringString to be searched
stringString to be found
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
contains("abc", "c")true
contains("abc", "1")false

+ W3C Documentation reference: String-Functions +
+
+ + + + [1.0] fn:substring-before(string, string) +
+
+ Returns the substring found before the first occurrence of the second argument
+ Arguments and return type: + + + + + + + + + + + + + +
TypeDescription
stringString to be searched
stringString to be used to split
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
substring-before("aabbcc","bb")aa
substring-before("aabbcc","c")aabb

+ W3C Documentation reference: String-Functions +
+
+ + + + [1.0] fn:substring-after(string, string) +
+
+ Returns the substring found after the first occurrence of the second argument
+ Arguments and return type: + + + + + + + + + + + + + +
TypeDescription
stringString to be searched
stringString to be used to split
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
substring-after("aabbcc","bb")cc
substring-after("aabbcc","a")abbcc

+ W3C Documentation reference: String-Functions +
+
+ + + + [1.0] fn:substring(string, number, number) +
+
+ Returns the substring starting at second argument with lenght of third argument
+ Arguments and return type: + + + + + + + + + + + + + + + + + +
TypeDescription
stringString to be cut
integerStarting position
integerLength of the substring
Examples:
+ + + + + + + + + +
ExpressionResult
substring("aabbcc", 1, 2)aa

+ W3C Documentation reference: String-Functions +
+
+ + + + [1.0] fn:substring(string, number) +
+
+ Returns the substring of the first argument from the position specified by the second + argument
+ Arguments and return type: + + + + + + + + + + + + + +
TypeDescription
stringString to be cut
integerStarting position
Examples:
+ + + + + + + + + +
ExpressionResult
substring("aabbcc", 3)bbcc

+ W3C Documentation reference: String-Functions +
+
+ + + + [1.0] fn:string-length(string) +
+
+ Returns the length of the string specified by the argument
+ Arguments and return type: + + + + + + + + + +
TypeDescription
stringString of which length should be returned
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
string-length("aabbcc")6
string-length("aa bb cc")8

+ W3C Documentation reference: String-Functions +
+
+ + + + [1.0] fn:string-length() +
+
+ Returns the length of the string specified by the context node
+
+ W3C Documentation reference: String-Functions +
+
+ + + + [1.0] fn:normalize-space(string) +
+
+ Returns a white-space normalized string
+ Arguments and return type: + + + + + + + + + +
TypeDescription
stringString to be normalized
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
normalize-space("aa bb cc")aa bb cc
normalize-space("aa bb cc")aa bb cc

+ W3C Documentation reference: String-Functions +
+
+ + + + [1.0] fn:normalize-space() +
+
+ Returns a white-space normalized string specified by the context-node
+
+ W3C Documentation reference: String-Functions +
+
+ + + + [1.0] fn:translate(string, string, string) +
+
+ Replaces characters specified by the second argument using those from the third argument +
+ Arguments and return type: + + + + + + + + + + + + + + + + + +
TypeDescription
stringString to be edited
stringsequence of characters to be replaced
stringsequence of character to be used in replacement
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
translate("aabbcc", "ab","xz")xxzzcc
translate("Test sequence", "e","z")Tzst szquzncz

+ W3C Documentation reference: String-Functions +
+
+ + + + [2.0] fn:string-join((string,string,...),sep) +
+
+ Returns a string created by concatenating the string arguments and using the sep + argument as the separator
+ Arguments and return type: + + + + + + + + + + + + + +
TypeDescription
string*string sequence to be joined
stringseparator to be used
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
string-join(('fox', 'jumps', 'over', 'dog'), ' ')' fox jumps over dog '
string-join(('fox', 'jumps', 'over', 'dog'))'joxjumpsoverdog'

+ W3C Documentation reference: #func-string-join +
+
+
+ + + [3.0] fn:string-to-codepoints(string) +
+
+ Returns sequence of unicode codepoint representing the provided string
+ Arguments and return type: + + + + + + + + + +
TypeDescription
stringstring to be coverted to list of unicode values
Examples:
+ + + + + + + + + +
ExpressionResult
string-to-codepoints("test")(116, 101, 115, 116)

+ W3C Documentation reference: #func-string-to-codepoints +
+
+
+ + + [2.0] fn:compare(comp1,comp2) +
+
+ 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)
+ Arguments and return type: + + + + + + + + + + + + + +
TypeDescription
stringfirst parameter to be compared
stringsecond parameter to be compared
Examples:
+ + + + + + + + + + + + + + + + + + + + + +
ExpressionResult
compare('abc', 'abc')0
compare('abc', 'abd')-1
compare('abc1', 'abd')-1
compare("abc1","abc")1

+ W3C Documentation reference: #func-compare +
+
+
+ + + [2.0] fn:compare(comp1,comp2,collation) +
+
+ 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)
+ Arguments and return type: + + + + + + + + + + + + + + + + + +
TypeDescription
stringfirst parameter to be compared
stringsecond parameter to be compared
stringcollation to be used in comparison(letter weight may differ between + languages)
Examples:
+ + + + + + + + + +
ExpressionResult
compare('ghi', 'ghi')0

+ W3C Documentation reference: #func-compare +
+
+
+ + + [2.0] fn:codepoints-to-string((int,int,...)) +
+
+ Creates a string from a sequence of the Unicode Standard code points
+ Arguments and return type: + + + + + + + + + +
TypeDescription
int*int sequence to be converted to string
Examples:
+ + + + + + + + + +
ExpressionResult
codepoints-to-string((116, 101, 115, 116))'test'

+ W3C Documentation reference: #func-codepoints-to-string +
+
+
+ + + [2.0] fn:codepoint-equal(comp1,comp2) +
+
+ 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
+ Arguments and return type: + + + + + + + + + + + + + +
TypeDescription
intunicode codepoint
intunicode codepoint
Examples:
+ + + + + + + + + + + + + + + + + +
ExpressionResult
codepoint-equal(111, 111)true
codepoint-equal(111, 112)false
codepoint-equal("111F", "111F")true

+ W3C Documentation reference: #func-codepoint-equal +
+
+
+ + + [2.0] fn:normalize-unicode() +
+
+ NONE
+
+ W3C Documentation reference: #func-normalize-unicode +
+
+
+ + + [2.0] fn:upper-case(string) +
+
+ Converts the string argument to upper-case
+ Arguments and return type: + + + + + + + + + +
TypeDescription
stringstring to be converted to upper case
Examples:
+ + + + + + + + + +
ExpressionResult
upper-case('aabbCC')'AABBCC'

+ W3C Documentation reference: #func-upper-case +
+
+
+ + + [2.0] fn:lower-case(string) +
+
+ Converts the string argument to lower-case
+ Arguments and return type: + + + + + + + + + +
TypeDescription
stringstring to be converted to upper case
Examples:
+ + + + + + + + + +
ExpressionResult
lower-case('aabbCC')'aabbcc'

+ W3C Documentation reference: #func-lower-case +
+
+
+ + + [2.0] fn:escape-uri(stringURI,esc-res) +
+
+ https://www.w3.org/TR/xpath-functions/#func-escape-uri
+
+ W3C Documentation reference: #func-escape-uri +
+
+
+ + + [2.0] fn:tokenize(string,pattern) +
+
+ https://www.w3.org/TR/xpath-functions/#func-tokenize
+ Arguments and return type: + + + + + + + + + + + + + +
TypeDescription
stringstring to be tokenized
stringstring to be used to split the first argument
Examples:
+ + + + + + + + + +
ExpressionResult
tokenize("fox jumps over dog", "s+")("fox", "jumps", "over", "dog")

+ W3C Documentation reference: #func-tokenize +
+
+
+ + + [2.0] fn:matches(string,pattern) +
+
+ Returns true if the string argument matches the pattern, otherwise, it returns false +
+ Arguments and return type: + + + + + + + + + + + + + +
TypeDescription
stringstring to search in
stringpattern to be found
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
matches("Xpath", "pat")true
matches("Xpath", "abc")false

+ W3C Documentation reference: #func-matches +
+
+
+ + + [2.0] fn:replace(string,pattern,replace) +
+
+ Returns a string that is created by replacing the given pattern with the replace + argument
+
+ W3C Documentation reference: #func-replace +
+
+
+ + + [2.0] fn:ends-with(string1,string2) +
+
+ Returns true if string1 ends with string2, otherwise it returns false
+
+ W3C Documentation reference: #func-ends-with +
+
+
+ + +
+
+
+ +
+ + + [2.0] fn:avg((arg,arg,...)) +
+
+ Returns the average of the argument values
+ Arguments and return type: + + + + + + + + + +
TypeDescription
sequence*returns average value of provided elements
Examples:
+ + + + + + + + + +
ExpressionResult
avg((1,2,3))2

+ W3C Documentation reference: #func-avg +
+
+
+ + + [2.0] fn:exactly-one(item,item,...) +
+
+ Returns the argument if it contains exactly one item, otherwise it raises an error +
+ Arguments and return type: + + + + + + + + + +
TypeDescription
sequencesequence to check
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
exactly-one((1))1
exactly-one((1,1))fn:exactly-one called with a sequence containing zero or more than one + item.

+ W3C Documentation reference: #func-exactly-one +
+
+
+ + + [2.0] fn:zero-or-one(item,item,...) +
+
+ Returns the argument if it contains zero or one items, otherwise it raises an error +
+
+ W3C Documentation reference: #func-zero-or-one +
+
+
+ + + [2.0] fn:index-of((item,item,...),searchitem) +
+
+ Returns the positions within the sequence of items that are equal to the searchitem + argument
+
+ W3C Documentation reference: #func-index-of +
+
+
+ + + [2.0] fn:reverse((item,item,...)) +
+
+ Returns the reversed order of the items specified
+ Arguments and return type: + + + + + + + + + +
TypeDescription
sequence*sequence of elements to have its order reversed
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
reverse(("ab", "cd", "ef"))("ef", "cd", "ab")
reverse(("ab"))("ab")

+ W3C Documentation reference: #func-reverse +
+
+
+ + + [2.0] fn:one-or-more(item,item,...) +
+
+ Returns the argument if it contains one or more items, otherwise it raises an error +
+ Arguments and return type: + + + + + + + + + +
TypeDescription
sequencesequence to check
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
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()

+ W3C Documentation reference: #func-one-or-more +
+
+
+ + + [2.0] fn:distinct-values((item,item,...),collation) +
+
+ Returns only distinct (different) values
+ Arguments and return type: + + + + + + + + + +
TypeDescription
sequencesequence to extract distinct values from
Examples:
+ + + + + + + + + +
ExpressionResult
distinct-values((1, 2, 3, 1, 2))(1, 2, 3)

+ W3C Documentation reference: #func-distinct-values +
+
+
+ + + [2.0] fn:exists(item,item,...) +
+
+ Returns true if the value of the arguments IS NOT an empty sequence, otherwise it + returns false
+
+ W3C Documentation reference: #func-exists +
+
+
+ + + [2.0] 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
+
+ W3C Documentation reference: #func-subsequence +
+
+
+ + + [2.0] fn:empty(item,item,...) +
+
+ Returns true if the value of the arguments IS an empty sequence, otherwise it + returns false
+
+ W3C Documentation reference: #func-empty +
+
+
+ + + [2.0] fn:insert-before((item,item,...),pos,inserts) +
+
+ Returns a new sequence constructed from the value of the item arguments
+
+ W3C Documentation reference: #func-insert-before +
+
+
+ + + [2.0] fn:remove((item,item,...),position) +
+
+ Returns a new sequence constructed from the value of the item arguments
+ Arguments and return type: + + + + + + + + + + + + + +
TypeDescription
sequence*sequence to be modified
integerposition to insert element from
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
remove(("a","b","c"), 1)b c
remove(("a","b","c"), 0)a b c

+ W3C Documentation reference: #func-remove +
+
+
+ + + [2.0] fn:unordered((item,item,...)) +
+
+ Returns the items in an implementation dependent order
+
+ W3C Documentation reference: #func-unordered +
+
+
+ + + [2.0] fn:data(item.item,...) +
+
+ Takes a sequence of items and returns a sequence of atomic values
+ Arguments and return type: + + + + + + + + + +
TypeDescription
sequence*sequence to be split to atomic values
Examples:
+ + + + + + + + + +
ExpressionResult
data((1,2,23, "test"))1 2 23 test

+ W3C Documentation reference: #func-data +
+
+
+ + + [2.0] fn:collection() +
+
+ NONE
+
+ W3C Documentation reference: #func-collection +
+
+
+ + + [2.0] fn:collection(string) +
+
+ NONE
+
+ W3C Documentation reference: #func-collection +
+
+
+ + + [2.0] fn:min((arg,arg,...)) +
+
+ Returns the argument that is less than the others
+ Arguments and return type: + + + + + + + + + +
TypeDescription
sequence*sequence to select minimum from
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
min((1,2,3))1
min(('a', 'k'))'a'

+ W3C Documentation reference: #func-min +
+
+
+ + + [2.0] fn:max((arg,arg,...)) +
+
+ Returns the argument that is greater than the others
+ Arguments and return type: + + + + + + + + + +
TypeDescription
sequence*sequence to select maximum from
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
max((1,2,3))3
max(('a', 'k'))'k'

+ W3C Documentation reference: #func-max +
+
+
+ + + [2.0] fn:deep-equal(param1,param2,collation) +
+
+ Returns true if param1 and param2 are deep-equal to each other, otherwise it returns + false
+
+ W3C Documentation reference: #func-deep-equal +
+
+
+ + +
+
+
+ +
+ + + [2.0] fn:adjust-date-to-timezone(date,timezone) +
+
+ If the timezone argument is empty, it returns a date without a timezone. Otherwise, + it returns a date with a timezone
+ Arguments and return type: + + + + + + + + + + + + + +
TypeDescription
datedate to be adjusted
timezonetimezone to be imposed into date
Examples:
+ + + + + + + + + +
ExpressionResult
adjust-date-to-timezone(xs:date('2011-11-15'), + xs:dayTimeDuration("PT10H"))2011-11-15+10:00

+ W3C Documentation reference: #func-adjust-date-to-timezone +
+
+
+ + + [2.0] fn:adjust-time-to-timezone(time,timezone) +
+
+ If the timezone argument is empty, it returns a time without a timezone. Otherwise, + it returns a time with a timezone
+
+ W3C Documentation reference: #func-adjust-time-to-timezone +
+
+
+ + + [2.0] fn:implicit-timezone() +
+
+ Returns the value of the implicit timezone
+ Examples:
+ + + + + + + + + +
ExpressionResult
implicit-timezone()PT1H

+ W3C Documentation reference: #func-implicit-timezone +
+
+
+ + + [2.0] fn:dateTime(date,time) +
+
+ Converts the arguments to a date and a time
+ Arguments and return type: + + + + + + + + + + + + + +
TypeDescription
datedate to be merged into dateTime
timetime to be merged into dateTime
Examples:
+ + + + + + + + + +
ExpressionResult
dateTime(xs:date("2011-11-15"), xs:time("10:22:00"))2011-11-15T10:22:00

+ W3C Documentation reference: #func-dateTime +
+
+
+ + + [2.0] fn:current-time() +
+
+ Returns the current time (with timezone)
+ Examples:
+ + + + + + + + + +
ExpressionResult
current-time()11:48:04.393361+01:00

+ W3C Documentation reference: #func-current-time +
+
+
+ + + [2.0] fn:timezone-from-time(time) +
+
+ Returns the time zone component of the argument if any
+ Arguments and return type: + + + + + + + + + +
TypeDescription
timetime to extract timezone infromation from
Examples:
+ + + + + + + + + +
ExpressionResult
timezone-from-time(xs:time("10:22:00+10:00"))PT10H

+ W3C Documentation reference: #func-timezone-from-time +
+
+
+ + + [2.0] fn:hours-from-time(time) +
+
+ Returns an integer that represents the hours component in the localized value of the + argument
+ Arguments and return type: + + + + + + + + + +
TypeDescription
timetime to extact hours component from
Examples:
+ + + + + + + + + +
ExpressionResult
hours-from-time(xs:time("10:22:00"))10

+ W3C Documentation reference: #func-hours-from-time +
+
+
+ + + [2.0] fn:minutes-from-time(time) +
+
+ Returns an integer that represents the minutes component in the localized value of + the argument
+ Arguments and return type: + + + + + + + + + +
TypeDescription
timetime to extract minutes component from
Examples:
+ + + + + + + + + +
ExpressionResult
minutes-from-time(xs:time("10:22:00"))22

+ W3C Documentation reference: #func-minutes-from-time +
+
+
+ + + [2.0] fn:seconds-from-time(time) +
+
+ Returns an integer that represents the seconds component in the localized value of + the argument
+ Arguments and return type: + + + + + + + + + +
TypeDescription
timeTime to convert to seconds
Examples:
+ + + + + + + + + +
ExpressionResult
seconds-from-time(xs:time("10:22:00"))0

+ W3C Documentation reference: #func-seconds-from-time +
+
+
+ + + [2.0] fn:years-from-duration(datetimedur) +
+
+ Returns an integer that represents the years component in the canonical lexical + representation of the value of the argument
+ Arguments and return type: + + + + + + + + + +
TypeDescription
datetimedurdatetimedur to extract years component from
Examples:
+ + + + + + + + + +
ExpressionResult
years-from-duration(xs:duration("P5Y2DT10H59M"))5

+ W3C Documentation reference: #func-years-from-duration +
+
+
+ + + [2.0] fn:months-from-duration(datetimedur) +
+
+ Returns an integer that represents the months component in the canonical lexical + representation of the value of the argument
+ Arguments and return type: + + + + + + + + + +
TypeDescription
datetimedurdatetimedur to extract months component from
Examples:
+ + + + + + + + + +
ExpressionResult
months-from-duration(xs:duration("P5Y10M2DT10H59M"))10

+ W3C Documentation reference: #func-years-from-duration +
+
+
+ + + [2.0] fn:days-from-duration(datetimedur) +
+
+ Returns an integer that represents the days component in the canonical lexical + representation of the value of the argument
+ Arguments and return type: + + + + + + + + + +
TypeDescription
datetimedurdatetimedur to extract days component from
Examples:
+ + + + + + + + + +
ExpressionResult
days-from-duration(xs:duration("P5Y2DT10H59M"))2

+ W3C Documentation reference: #func-days-from-duration +
+
+
+ + + [2.0] fn:hours-from-duration(datetimedur) +
+
+ Returns an integer that represents the hours component in the canonical lexical + representation of the value of the argument
+ Arguments and return type: + + + + + + + + + +
TypeDescription
datetimedurdatetimedur to extract hours component from
Examples:
+ + + + + + + + + +
ExpressionResult
hours-from-duration(xs:duration("P5Y2DT10H59M"))10

+ W3C Documentation reference: #func-hours-from-duration +
+
+
+ + + [2.0] fn:minutes-from-duration(datetimedur) +
+
+ Returns an integer that represents the minutes component in the canonical lexical + representation of the value of the argument
+ Arguments and return type: + + + + + + + + + +
TypeDescription
datetimedurdatetimedur to extract minute component from
Examples:
+ + + + + + + + + +
ExpressionResult
years-from-duration(xs:duration("P5Y2DT10H59M"))59

+ W3C Documentation reference: #func-minutes-from-duration +
+
+
+ + + [2.0] fn:seconds-from-duration(datetimedur) +
+
+ Returns a decimal that represents the seconds component in the canonical lexical + representation of the value of the argument
+ Arguments and return type: + + + + + + + + + +
TypeDescription
datetimedurdatetimedur to extract seconds component from
Examples:
+ + + + + + + + + +
ExpressionResult
days-from-duration(xs:duration("P5Y2DT10H59M40S"))40

+ W3C Documentation reference: #func-seconds-from-duration +
+
+
+ + + [2.0] fn:current-date() +
+
+ Returns the current date (with timezone)
+
+ W3C Documentation reference: #func-current-date +
+
+
+ + + [2.0] fn:timezone-from-date(date) +
+
+ Returns the time zone component of the argument if any
+ Arguments and return type: + + + + + + + + + +
TypeDescription
datedate to extract timezone information from
Examples:
+ + + + + + + + + + + + + +
ExpressionResult
timezone-from-date(xs:date("2011-11-15+11:00"))PT1H
timezone-from-date(xs:date("2011-11-15+11:00"))PT11H

+ W3C Documentation reference: #func-timezone-from-date +
+
+
+ + + [2.0] fn:year-from-date(date) +
+
+ Returns an integer that represents the year in the localized value of the argument +
+ Arguments and return type: + + + + + + + + + +
TypeDescription
datedate to extract years component from
Examples:
+ + + + + + + + + +
ExpressionResult
year-from-date(xs:date("2011-11-15"))2011

+ W3C Documentation reference: #func-year-from-date +
+
+
+ + + [2.0] fn:month-from-date(date) +
+
+ Returns an integer that represents the month in the localized value of the argument +
+ Arguments and return type: + + + + + + + + + +
TypeDescription
dateDate to extrat the month from
Examples:
+ + + + + + + + + +
ExpressionResult
month-from-date(xs:date("2011-11-15"))11

+ W3C Documentation reference: #func-month-from-date +
+
+
+ + + [2.0] fn:day-from-date(date) +
+
+ Returns an integer that represents the day in the localized value of the argument +
+ Arguments and return type: + + + + + + + + + +
TypeDescription
datedate to extact day component from
Examples:
+ + + + + + + + + +
ExpressionResult
day-from-date(xs:date("2011-04-23"))23

+ W3C Documentation reference: #func-day-from-date +
+
+
+ + + [2.0] fn:current-dateTime() +
+
+ Returns the current dateTime (with timezone)
+ Examples:
+ + + + + + + + + +
ExpressionResult
current-dateTime()2021-03-24T18:15:09.808+01:00

+ W3C Documentation reference: #func-current-dateTime +
+
+
+ + + [2.0] fn:timezone-from-dateTime(datetime) +
+
+ Returns the time zone component of the argument if any
+ Arguments and return type: + + + + + + + + + +
TypeDescription
datetimeDateTime to extract fimezone information from
Examples:
+ + + + + + + + + +
ExpressionResult
timezone-from-dateTime(xs:dateTime("2021-01-15T12:10:00-03:00"))-PT3H

+ W3C Documentation reference: #func-timezone-from-dateTime +
+
+
+ + + [2.0] fn:year-from-dateTime(datetime) +
+
+ Returns an integer that represents the year component in the localized value of the + argument
+ Arguments and return type: + + + + + + + + + +
TypeDescription
datetimedatetime to extract years component from
Examples:
+ + + + + + + + + +
ExpressionResult
year-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))2011

+ W3C Documentation reference: #func-year-from-dateTime +
+
+
+ + + [2.0] fn:month-from-dateTime(datetime) +
+
+ Returns an integer that represents the month component in the localized value of the + argument
+ Arguments and return type: + + + + + + + + + +
TypeDescription
datetimedatetime to extract month component from
Examples:
+ + + + + + + + + +
ExpressionResult
month-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))11

+ W3C Documentation reference: #func-month-from-dateTime +
+
+
+ + + [2.0] fn:day-from-dateTime(datetime) +
+
+ Returns an integer that represents the day component in the localized value of the + argument
+ Arguments and return type: + + + + + + + + + +
TypeDescription
datetimedatetime to extract day component from
Examples:
+ + + + + + + + + +
ExpressionResult
day-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))15

+ W3C Documentation reference: #func-day-from-dateTime +
+
+
+ + + [2.0] fn:hours-from-dateTime(datetime) +
+
+ Returns an integer that represents the hours component in the localized value of the + argument
+ Arguments and return type: + + + + + + + + + +
TypeDescription
datetimedatetime to extract hours component from
Examples:
+ + + + + + + + + +
ExpressionResult
hours-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))12

+ W3C Documentation reference: #func-hours-from-dateTime +
+
+
+ + + [2.0] fn:minutes-from-dateTime(datetime) +
+
+ Returns an integer that represents the minutes component in the localized value of + the argument
+ Arguments and return type: + + + + + + + + + +
TypeDescription
datetimedatetime to extract minutes component from
Examples:
+ + + + + + + + + +
ExpressionResult
minutes-from-dateTime(xs:dateTime("2011-11-15T12:30-04:10"))30

+ W3C Documentation reference: #func-minutes-from-dateTime +
+
+
+ + + [2.0] fn:seconds-from-dateTime(datetime) +
+
+ Returns a decimal that represents the seconds component in the localized value of + the argument
+ Arguments and return type: + + + + + + + + + +
TypeDescription
datetimedatetime to extract seconds component from
Examples:
+ + + + + + + + + +
ExpressionResult
seconds-from-dateTime(xs:dateTime("2011-11-15T12:30:00-04:10"))0

+ W3C Documentation reference: #func-seconds-from-dateTime +
+
+
+ + + [2.0] fn:adjust-dateTime-to-timezone(datetime,timezone) +
+
+ If the timezone argument is empty, it returns a dateTime without a timezone. + Otherwise, it returns a dateTime with a timezone
+ Arguments and return type: + + + + + + + + + + + + + +
TypeDescription
datetimedatetime to be adjusted
timezonetimezone to be used in provided date
Examples:
+ + + + + + + + + +
ExpressionResult
adjust-dateTime-to-timezone(xs:dateTime('2011-11-15T12:30:00-04:10'), + xs:dayTimeDuration("PT10H"))2011-11-16T02:40:00+10:00

+ W3C Documentation reference: #func-adjust-dateTime-to-timezone +
+
+
+ + +
+
+
+ +
+ + + [2.0] fn:error() +
+
+ https://www.w3.org/TR/xpath-functions/#func-error
+
+ W3C Documentation reference: #func-error +
+
+
+ + + [2.0] fn:error(error) +
+
+ https://www.w3.org/TR/xpath-functions/#func-error
+
+ W3C Documentation reference: #func-error +
+
+
+ + + [2.0] fn:error(error,description) +
+
+ https://www.w3.org/TR/xpath-functions/#func-error
+
+ W3C Documentation reference: #func-error +
+
+
+ + + [2.0] fn:error(error,description,error-object) +
+
+ https://www.w3.org/TR/xpath-functions/#func-error
+
+ W3C Documentation reference: #func-error +
+
+
+ + + [2.0] fn:trace(value,label) +
+
+ Used to debug queries
+
+ W3C Documentation reference: #func-trace +
+
+
+ + +
+
+
+ +
+ + + [2.0] fn:nilled(node) +
+
+ Returns a Boolean value indicating whether the argument node is nilled
+
+ W3C Documentation reference: #func-nilled +
+
+
+ + + [2.0] fn:namespace-uri-from-QName() +
+
+ NONE
+
+ W3C Documentation reference: #func-namespace-uri-from-QName +
+
+
+ + + [2.0] fn:base-uri() +
+
+ Returns the value of the base-uri property of the current or specified node
+
+ W3C Documentation reference: #func-base-uri +
+
+
+ + + [2.0] fn:base-uri(node) +
+
+ Returns the value of the base-uri property of the current or specified node
+
+ W3C Documentation reference: #func-base-uri +
+
+
+ + + [2.0] fn:static-base-uri() +
+
+ Returns the value of the base-uri
+ Examples:
+ + + + + + + + + +
ExpressionResult
default-collation()http://www.w3.org/2005/xpath-functions/collation/codepoint

+ W3C Documentation reference: #func-static-base-uri +
+
+
+ + + [2.0] fn:doc-available(URI) +
+
+ Returns true if the doc() function returns a document node, otherwise it returns + false
+
+ W3C Documentation reference: #func-doc-available +
+
+
+ + + [2.0] fn:resolve-QName() +
+
+ NONE
+
+ W3C Documentation reference: #func-resolve-QName +
+
+
+ + + [2.0] fn:node-name(node) +
+
+ Returns the node-name of the argument node
+
+ W3C Documentation reference: #func-node-name +
+
+
+ + + [2.0] fn:default-collation() +
+
+ Returns the value of the default collation
+
+ W3C Documentation reference: #func-default-collation +
+
+
+ + + [2.0] 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
+
+ W3C Documentation reference: #func-idref +
+
+
+ + + [2.0] fn:document-uri(node) +
+
+ Returns the value of the document-uri property for the specified node
+
+ W3C Documentation reference: #func-document-uri +
+
+
+ + + [2.0] fn:local-name-from-QName() +
+
+ NONE
+
+ W3C Documentation reference: #func-local-name-from-QName +
+
+
+ + + [2.0] fn:in-scope-prefixes() +
+
+ NONE
+
+ W3C Documentation reference: #func-in-scope-prefixes +
+
+
+ + + [2.0] fn:namespace-uri-for-prefix() +
+
+ NONE
+
+ W3C Documentation reference: #func-namespace-uri-for-prefix +
+
+
+ + + [2.0] fn:QName() +
+
+ NONE
+
+ W3C Documentation reference: #func-QName +
+
+
+ + + [2.0] 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
+
+ W3C Documentation reference: #func-root +
+
+
+ + + [2.0] fn:doc(URI) +
+
+ NONE
+
+ W3C Documentation reference: #func-doc +
+
+
+ + + [2.0] fn:resolve-uri(relative,base) +
+
+ NONE
+
+ W3C Documentation reference: #func-resolve-uri +
+
+
+ + + [3.0] fn:available-environment-variables() +
+
+ Returns a list of environment variable names
+
+ W3C Documentation reference: #func-available-environment-variables +
+
+
+ + + [3.0] fn:doc-available(uri) +
+
+ The function returns true the function call fn:doc(uri) would return a document node +
+
+ W3C Documentation reference: #func-doc-available +
+
+
+ + + [3.0] fn:element-with-id() +
+
+ https://www.w3.org/TR/xpath-functions-31/#func-element-with-id
+
+ W3C Documentation reference: #func-element-with-id +
+
+
+ + + [3.0] fn:encode-for-uri(uri-part) +
+
+ Encodes reserved characters in a string that is intended to be used in the path + segment of a URI.
+
+ W3C Documentation reference: #func-encode-for-uri +
+
+
+ + + [3.0] fn:environment-variable(name) +
+
+ Returns the value of a system environment variable, if it exists
+
+ W3C Documentation reference: #func-environment-variable +
+
+
+ + + [3.0] fn:escape-html-uri(uri) +
+
+ Escapes a URI in the same way that HTML user agents handle attribute values expected + to contain URIs
+
+ W3C Documentation reference: #func-escape-html-uri +
+
+
+ + + [3.0] fn:iri-to-uri(iri) +
+
+ Converts a string containing an IRI into a URI
+
+ W3C Documentation reference: #func-iri-to-uri +
+
+
+ + +
+
+
+ +
+ + + [3.0] fn:for-each(sequence*, function) +
+
+ Applies function item to every element in sequence
+
+ W3C Documentation reference: #func-for-each +
+
+
+ + + [3.0] fn:for-each-pair(sequence*, sequence*, function) +
+
+ Applies the function to consecutive pairs of elements taken from sequences
+
+ W3C Documentation reference: #func-for-each-pair +
+
+
+ + + [3.0] fn:fold-left(sequence*, baseValue, function) +
+
+ Applies function item to every element in sequence, accumulating value
+
+ W3C Documentation reference: #func-fold-left +
+
+
+ + + [3.0] fn:fold-right() +
+
+ Applies function item to every element in sequence, accumulating value
+
+ W3C Documentation reference: #func-fold-right +
+
+
+ + + [3.0] fn:filter(sequence*, function) +
+
+ Returns those items from the sequence for which the supplied function returns true
+
+ W3C Documentation reference: #func-filter +
+
+
+ +
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Homepage/Frontend/xsd.html b/Homepage/Frontend/xsd.html new file mode 100644 index 0000000..670eb95 --- /dev/null +++ b/Homepage/Frontend/xsd.html @@ -0,0 +1,171 @@ + + + + + + + + + + + +
+
+
+
+

Online XSD tester v0.4 BETA +

+
+ + + +
+ + + +

+ + + +
+ +

+ + + + +
+
+
+

What is XSD?

+

XSD is a W3C recomedation that specifies how to describe the elements in XML document

+

XSD specifies data types, order and arity of elements in XML file.
+ Main components of XSD file are:
+ - Element declaration - declares properties of elements (names and namespaces)
+ - Attribute declarations - declares properties of attributes
+ - Simple and complex types:
+ - - XSD provides 19 simple data types
+ - - More complex types are declared using simple types and relationships
+

+
+ + + +
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Homepage/Frontend/xslt (copy).html b/Homepage/Frontend/xslt (copy).html new file mode 100644 index 0000000..876e79f --- /dev/null +++ b/Homepage/Frontend/xslt (copy).html @@ -0,0 +1,540 @@ + + + + + + + + + + +
+
+
+
+

Online XSLT tester v0.4

+
+ + + procInfo
+
+ + + +

+ + + +
+ +

+ + + + +
+
+
+

What is XSLT?

+

XSLT is a language for transforming XML documents into other documents such as XML, HTML and many + other.

+ +
+ +
+

XSLT 2.0 introduced a host of new features:
+ - Strong typing and all XSD types
+ - The ability to define and write own functions
+ - node-set() - replaces XSLT's 1.0 Result Tree Fragment, creating fully functional tree
+ - New functions and operators:
+ - - XPath 2.0
+ - - String processing and regular expressions
+ - - Grouping (for-each-group function) + - - String processing
+ - - Sequence type
+

+

XSLT 3.0 further improved the formula:
+ - Streaming tranformations (previously file had to be loaded to memory to be processed)
+ - Packages - improve the modularity of large stylesheets
+ - Improved error handling (for example <xsl:try>)
+ - Support for maps and arrays, enabling XSLT to handle JSON as well as XML
+ - Functions can now be arguments to other (higher-order) functions +

+
+
+ +

XSLT 1.0, 2.0 & 3.0 functions

+
+ +
+ + [v1.0] <xsl:template> - defines a set of rules to be + applied to + specified node.
+ [v1.0] <xsl:apply-templates> - applies a template rule to + the + current element or to element's child nodes.
+ [v1.0] <xsl:apply-imports> - Applies a template rule from + an + imported style sheet
+ [v1.0] <xsl:apply-templates> - Applies a template rule to + the + current element or to the current element's child nodes
+ [v1.0] <xsl:call-template> - Calls a named template + [v2.0] <xsl:next-match> - overrides another template + rule + (considers all other template rules of lower import precedence/priority)
+ [v3.0] <xsl:mode> - Allows properties of a mode to be + defined
+ [v3.0] <xsl:override> - Allows using package to + override + selected components from a used package
+ [v3.0] <xsl:package> - Defines a set of stylesheet + modules + that can be compiled as a unit
+ [v3.0] <xsl:accept> - Allows a package to restrict the + visibility of components exposed by a package
+ [v3.0] <xsl:global-context-item> - Declares whether a + global context item is required, and if so, to declare its required type +
+
+
+ +
+ [v1.0] <xsl:for-each> - Loops through each node in a + specified + node set
+ [v1.0] <xsl:if> - Contains a template that will be applied + only if a specified condition is true
+ [v1.0] <xsl:choose> - Used in conjunction with <when> + and + <otherwise> to express multiple conditional tests
+ [v1.0] <xsl:when> - Specifies an action for the + <choose> element
+ [v1.0] <xsl:otherwise> - Specifies a default + action for the <choose> element
+ [v2.0] <xsl:for-each-group> - Groups + elements and performs operations once for each group
+ [v3.0] <xsl:iterate> - Used to iterate + over a sequence, with the option to set parameters for use in the next + iteration
+ [v3.0] <xsl:break> - Causes premature + completion before the entire input sequence has been processed
+ [v3.0] <xsl: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
+ [v3.0] <xsl:on-completion> - Defines + processing to be carried out when the input sequence is exhausted
+ [v3.0] <xsl: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
+ [v3.0] <xsl:on-empty> - Outputs the + enclosed content only if the containing sequence generates no "ordinary" + content
+ [v3.0] <xsl:on-non-empty> - Outputs the + enclosed content only if the containing sequence also generates "ordinary" + content
+ [v3.0] <xsl:try> - Allows recovery from + dynamic errors occurring within the expression it wraps
+ [v3.0] <xsl:catch> - In conjunction + with + xsl:try, handles dynamic errors
+ [v3.0] <xsl:context-item> - Used to + declare + the initial context item for a template
+
+
+
+ +
+ [v1.0] <xsl:attribute> - Adds an attribute
+ [v1.0] <xsl:attribute-set> - Defines a named set of + attributes
+ [v1.0] <xsl:copy> - Creates a copy of the current node + (without + child nodes and attributes)
+ [v1.0] <xsl:number> - Determines the integer position of + the + current node and formats a number
+ [v1.0] <xsl:value-of> - Extracts the value of a selected + node
+ [v1.0] <xsl:text> - Writes literal text to the output
+ [v1.0] <xsl:comment> - Creates a comment node in the result + tree
+ [v1.0] <xsl:processing-instruction> - Writes a processing + instruction to the output
+ [v1.0] <xsl:key> - + Declares a named key that can be used in the + style sheet with the key() function
+ [v1.0] <xsl:decimal-format> - Defines the characters and + symbols to be used when converting numbers into strings, with the format-number() function
+ [v1.0] <xsl:preserve-space> - Defines the elements for + which + white space should be preserved
+ [v1.0] <xsl:strip-space> - Defines the elements for which + white + space should be removed
+ [v1.0] <xsl:sort> - Sorts the output
+ [v1.0] <xsl:output> - Defines the format of the output + document
+ [v2.0] <xsl:for-each-group> - Sorts given + sequence
+ [v2.0] <xsl:result-document> - Creates a final result + tree
+ [v2.0] <xsl:character-map> - Allows a specific + character + appearing in the final result tree to be substituted by a specified string of + characters
+ [v2.0] <xsl:output-character> - Defines characters and + their replacements to be used by character-map
+ [v3.0] <xsl:merge> - Merges two or more pre-sorted + input + files
+ [v3.0] <xsl:merge-action> - Defines action to be + carried + out on each merged group
+ [v3.0] <xsl:merge-key> - Used to define the merge keys + on + which the input sequences are sorted
+ [v3.0] <xsl:merge-source> - Describes the input source + for + an xsl:merge instruction
+ + +
+
+
+ +
+ [v1.0] <xsl:stylesheet> - Defines the root element of a + style + sheet
+ [v1.0] <xsl:transform> - Defines the root element of a + style + sheet
+ [v1.0] <xsl:import> - Imports the contents of one style + sheet + into another. Note: An imported style sheet has lower precedence than the importing style + sheet
+ [v1.0] <xsl:include> - Includes the contents of one style + sheet + into another. Note: An included style sheet has the same precedence as the including style + sheet
+ [v1.0] <xsl:namespace-alias> - Replaces a namespace in the + style sheet to a different namespace in the output
+ [v1.0] <xsl:element> - Creates an element node in the + output + document
+
+
+
+ +
+ [v1.0] <xsl:param> - Declares a local or global + parameter
+ [v1.0] <xsl:variable> - Declares a local or global + variable
+ [v1.0] <xsl:with-param> - Defines the value of a parameter + to + be passed into a template
+ [v1.0] <xsl:copy-of> - Creates a copy of the current node + (with + child nodes and attributes)
+ [v2.0] <xsl:document> - Creates a new document + node
+ [v2.0] <xsl:namespace> - Creates a namespace + node
+ [v2.0] <xsl:namespace-alias> - Declares that a literal + namespace URI is being used as an alias for a target namespace URI
+ [v2.0] <xsl:sequence> - Constructs a sequence of nodes + and/or atomic values
+
+
+ +
+ +
+ [v2.0] <xsl:analyze-string> - Identifies substrings + that + match + given regex
+ [v2.0] <xsl:matching-substring> - Used in conjunction + with + analize-string, returns matching substrings
+ [v2.0] <xsl:non-matching-substring> - Used in + conjunction + with + analize-string, returns substrings that didn't match the regex +
+
+
+ +
+ +
+ [v2.0] <xsl:function> - Declares a function that + can be + called from any XPath expression in the stylesheet
+ [v3.0] <xsl:evaluate> - Allows dynamic evaluation + of + XPath + expressions from a string
+ [v3.0] <xsl:assert> - Asserts a XPath expression, + optionally throwing a dynamic error
+ +
+
+
+
+ +
+ [v1.0] <xsl:message> - Writes a message to the output (used + to + report errors)
+ [v1.0] <xsl:fallback> - Specifies an alternate code to run + if + the processor does not support an XSLT element
+ [v3.0] <xsl:map> - Used to construct a new + map
+ [v3.0] <xsl:map-entry> - Used to construct a singleton + map + (one key and one value)
+ + [v3.0] <xsl:expose> - Used to modify the visibility of + selected components within a package
+ [v3.0] <xsl:accumulator> - Defines a rule that is to be + applied while the document is being sequentially processed
+ [v3.0] <xsl:accumulator-rule> - Defines a rule for an + xsl:accumulator
+ Streaming: (not usable on this website!) + [v3.0] <xsl:source-document> - Initiates streamed or + unstreamed processing of a source document
+ [v3.0] <xsl:use-package> -
+ [v3.0] <xsl:where-populated> - Allows conditional + content + construction to be made streamable
+ Packages: (not usable on this website!) + [v3.0] <xsl:accept> - Allows a package to restrict the + visibility of components exposed by a package that it uses
+ + + + + +
+
+
+ +
+ +
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Homepage/Frontend/xslt.html b/Homepage/Frontend/xslt.html new file mode 100644 index 0000000..e01ce64 --- /dev/null +++ b/Homepage/Frontend/xslt.html @@ -0,0 +1,1227 @@ + + + + + + + + + + + +
+
+
+
+

Online XSLT tester v0.4

+
+ + + procInfo
+
+ + + +

+ + + +
+ +

+ + + + +
+
+
+

What is XSLT?

+

XSLT is a language for transforming XML documents into other documents such as XML, HTML and many + other.

+ +
+ +
+

XSLT 2.0 introduced a host of new features:
+ - Strong typing and all XSD types
+ - The ability to define and write own functions
+ - node-set() - replaces XSLT's 1.0 Result Tree Fragment, creating fully functional tree
+ - New functions and operators:
+ - - XPath 2.0
+ - - String processing and regular expressions
+ - - Grouping (for-each-group function) + - - String processing
+ - - Sequence type
+

+

XSLT 3.0 further improved the formula:
+ - Streaming tranformations (previously file had to be loaded to memory to be processed)
+ - Packages - improve the modularity of large stylesheets
+ - Improved error handling (for example <xsl:try>)
+ - Support for maps and arrays, enabling XSLT to handle JSON as well as XML
+ - Functions can now be arguments to other (higher-order) functions +

+
+
+ +

XSLT 1.0, 2.0 & 3.0 functions

+ + + +
+ +
+ + + [1.0] xsl:template +
+
+ defines a set of rules to be applied to specified node.
+
+ W3C Documentation reference: Defining-Template-Rules +
+
+ + + + [1.0] xsl:apply-templates +
+
+ applies a template rule to the current element or to element's child nodes.
+
+ W3C Documentation reference: Applying-Template-Rules +
+
+ + + + [1.0] xsl:apply-imports +
+
+ Applies a template rule from an imported style sheet
+
+ W3C Documentation reference: #apply-imports +
+
+ + + + [1.0] xsl:apply-templates +
+
+ Applies a template rule to the current element or to the current element's child nodes +
+
+ W3C Documentation reference: Applying-Template-Rules +
+
+ + + + [1.0] xsl:call-template +
+
+ Calls a named template
+
+ W3C Documentation reference: #named-templates +
+
+ + + + [2.0] xsl:next-match +
+
+ overrides another template rule (considers all other template rules of lower import + precedence/priority)
+
+ W3C Documentation reference: #element-next-match +
+
+
+ + + [3.0] xsl:mode +
+
+ Allows properties of a mode to be defined
+
+ W3C Documentation reference: #element-mode +
+
+
+ + + [3.0] xsl:override +
+
+ Allows using package to override selected components from a used package
+
+ W3C Documentation reference: #element-override +
+
+
+ + + [3.0] xsl:package +
+
+ Defines a set of stylesheet modules that can be compiled as a unit
+
+ W3C Documentation reference: #element-package +
+
+
+ + + [3.0] xsl:accept +
+
+ Allows a package to restrict the visibility of components exposed by a package
+
+ W3C Documentation reference: #element-accept +
+
+
+ + + [3.0] xsl:global-context-item +
+
+ Declares whether a global context item is required, and if so, to declare its + required type
+
+ W3C Documentation reference: #element-global-context-item +
+
+
+ + +
+
+
+ +
+ + + [1.0] xsl:for-each +
+
+ Loops through each node in a specified node set
+
+ W3C Documentation reference: #for-each +
+
+ + + + [1.0] xsl:if +
+
+ Contains a template that will be applied only if a specified condition is true
+
+ W3C Documentation reference: Conditional-Processing +
+
+ + + + [1.0] xsl:choose +
+
+ Used in conjunction with <
+
+ W3C Documentation reference: Conditional-Processing-with-xsl:choose +
+
+ + + + [1.0] xsl:when +
+
+ Specifies an action for the <
+
+ W3C Documentation reference: Conditional-Processing-with-xsl:choose +
+
+ + + + [1.0] xsl:otherwise +
+
+ Specifies a default action for the <
+
+ W3C Documentation reference: Conditional-Processing-with-xsl:choose +
+
+ + + + [2.0] xsl:for-each-group +
+
+ Groups elements and performs operations once for each group
+
+ W3C Documentation reference: #element-for-each-group +
+
+
+ + + [3.0] xsl:iterate +
+
+ Used to iterate over a sequence, with the option to set parameters for use in the + next iteration
+
+ W3C Documentation reference: #element-iterate +
+
+
+ + + [3.0] xsl:break +
+
+ Causes premature completion before the entire input sequence has been processed
+
+ W3C Documentation reference: #element-break +
+
+
+ + + [3.0] xsl: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
+
+ W3C Documentation reference: #element-next-iteration +
+
+
+ + + [3.0] xsl:on-completion +
+
+ Defines processing to be carried out when the input sequence is exhausted
+
+ W3C Documentation reference: #element-on-completion +
+
+
+ + + [3.0] xsl: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
+
+ W3C Documentation reference: #element-fork +
+
+
+ + + [3.0] xsl:on-empty +
+
+ Outputs the enclosed content only if the containing sequence generates no "ordinary" + content
+
+ W3C Documentation reference: #element-on-empty +
+
+
+ + + [3.0] xsl:on-non-empty +
+
+ Outputs the enclosed content only if the containing sequence also generates + "ordinary" content
+
+ W3C Documentation reference: #element-on-non-empty +
+
+
+ + + [3.0] xsl:try +
+
+ Allows recovery from dynamic errors occurring within the expression it wraps
+
+ W3C Documentation reference: #element-try +
+
+
+ + + [3.0] xsl:catch +
+
+ http://www.w3.org/TR/xslt-30/#element-catchIn conjunction with xsl:try, handles + dynamic errors
+
+ W3C Documentation reference: #element-catchIn conjunction with xsl:try, handles dynamic errors +
+
+
+ + + [3.0] xsl:context-item +
+
+ Used to declare the initial context item for a template
+
+ W3C Documentation reference: #element-context-item +
+
+
+ + +
+
+
+ +
+ + + [1.0] xsl:attribute +
+
+ Adds an attribute
+
+ W3C Documentation reference: #creating-attributes +
+
+ + + + [1.0] xsl:attribute-set +
+
+ Defines a named set of attributes
+
+ W3C Documentation reference: #attribute-sets +
+
+ + + + [1.0] xsl:copy +
+
+ Creates a copy of the current node (without child nodes and attributes)
+
+ W3C Documentation reference: #copying +
+
+ + + + [1.0] xsl:number +
+
+ Determines the integer position of the current node and formats a number
+
+ W3C Documentation reference: #number +
+
+ + + + [1.0] xsl:value-of +
+
+ Extracts the value of a selected node
+
+ W3C Documentation reference: #value-of +
+
+ + + + [1.0] xsl:text +
+
+ Writes literal text to the output
+
+ W3C Documentation reference: Creating-Text +
+
+ + + + [1.0] xsl:comment +
+
+ Creates a comment node in the result tree
+
+ W3C Documentation reference: Creating-Comments +
+
+ + + + [1.0] xsl:processing-instruction +
+
+ Writes a processing instruction to the output
+
+ W3C Documentation reference: Creating-Processing-Instructions +
+
+ + + + [1.0] xsl:key +
+
+ Declares a named key that can be used in the style sheet with the key() function
+
+ W3C Documentation reference: #key +
+
+ + + + [1.0] xsl:decimal-format +
+
+ Defines the characters and symbols to be used when converting numbers into strings, with + the format-number() function
+
+ W3C Documentation reference: #format-number +
+
+ + + + [1.0] xsl:preserve-space +
+
+ Defines the elements for which white space should be preserved
+
+ W3C Documentation reference: #strip +
+
+ + + + [1.0] xsl:strip-space +
+
+ Defines the elements for which white space should be removed
+
+ W3C Documentation reference: #strip +
+
+ + + + [1.0] xsl:sort +
+
+ Sorts the output
+
+ W3C Documentation reference: #sorting +
+
+ + + + [1.0] xsl:output +
+
+ Defines the format of the output document
+
+ W3C Documentation reference: #output +
+
+ + + + [2.0] xsl:for-each-group +
+
+ Sorts given sequence
+
+ W3C Documentation reference: #element-perform-sort +
+
+
+ + + [2.0] xsl:result-document +
+
+ Creates a final result tree
+
+ W3C Documentation reference: #element-result-document +
+
+
+ + + [2.0] xsl:character-map +
+
+ Allows a specific character appearing in the final result tree to be substituted by + a specified string of characters
+
+ W3C Documentation reference: #element-character-map +
+
+
+ + + [2.0] xsl:output-character +
+
+ Defines characters and their replacements to be used by character-map
+
+ W3C Documentation reference: #element-character-map +
+
+
+ + + [3.0] xsl:merge +
+
+ Merges two or more pre-sorted input files
+
+ W3C Documentation reference: #element-merge +
+
+
+ + + [3.0] xsl:merge-action +
+
+ Defines action to be carried out on each merged group
+
+ W3C Documentation reference: #element-merge-action +
+
+
+ + + [3.0] xsl:merge-key +
+
+ Used to define the merge keys on which the input sequences are sorted
+
+ W3C Documentation reference: #element-merge-key +
+
+
+ + + [3.0] xsl:merge-source +
+
+ Describes the input source for an xsl:merge instruction
+
+ W3C Documentation reference: #element-merge-source +
+
+
+ + +
+
+
+ +
+ + + [1.0] xsl:stylesheet +
+
+ Defines the root element of a style sheet
+
+ W3C Documentation reference: #stylesheet-element +
+
+ + + + [1.0] xsl:transform +
+
+ Defines the root element of a style sheet
+
+ W3C Documentation reference: #stylesheet-element +
+
+ + + + [1.0] xsl:import +
+
+ Imports the contents of one style sheet into another. Note: An imported style sheet has + lower precedence than the importing style sheet
+
+ W3C Documentation reference: #import +
+
+ + + + [1.0] xsl:include +
+
+ Includes the contents of one style sheet into another. Note: An included style sheet has + the same precedence as the including style sheet
+
+ W3C Documentation reference: #include +
+
+ + + + [1.0] xsl:namespace-alias +
+
+ Replaces a namespace in the style sheet to a different namespace in the output
+
+ W3C Documentation reference: #literal-result-element +
+
+ + + + [1.0] xsl:element +
+
+ Creates an element node in the output document
+
+ W3C Documentation reference: Creating-Elements-with-xsl:element +
+
+ + + +
+
+
+ +
+ + + [1.0] xsl:param +
+
+ Declares a local or global parameter
+
+ W3C Documentation reference: #variables +
+
+ + + + [1.0] xsl:variable +
+
+ Declares a local or global variable
+
+ W3C Documentation reference: #variables +
+
+ + + + [1.0] xsl:with-param +
+
+ Defines the value of a parameter to be passed into a template
+
+ W3C Documentation reference: Passing-Parameters-to-Templates +
+
+ + + + [1.0] xsl:copy-of +
+
+ Creates a copy of the current node (with child nodes and attributes)
+
+ W3C Documentation reference: #copy-of +
+
+ + + + [2.0] xsl:document +
+
+ Creates a new document node
+
+ W3C Documentation reference: #element-document +
+
+
+ + + [2.0] xsl:namespace +
+
+ Creates a namespace node
+
+ W3C Documentation reference: #element-namespace +
+
+
+ + + [2.0] xsl:namespace-alias +
+
+ Declares that a literal namespace URI is being used as an alias for a target + namespace URI
+
+ W3C Documentation reference: #element-namespace-alias +
+
+
+ + + [2.0] xsl:sequence +
+
+ Constructs a sequence of nodes and/or atomic values
+
+ W3C Documentation reference: #element-sequence +
+
+
+ + +
+
+ +
+ +
+ + + [2.0] xsl:analyze-string +
+
+ Identifies substrings that match given regex
+
+ W3C Documentation reference: #element-analyze-string +
+
+
+ + + [2.0] xsl:matching-substring +
+
+ Used in conjunction with analize-string, returns matching substrings
+
+ W3C Documentation reference: #element-analyze-string +
+
+
+ + + [2.0] xsl:non-matching-substring +
+
+ Used in conjunction with analize-string, returns substrings that didn't match the regex
+
+ W3C Documentation reference: #element-analyze-string +
+
+
+ + +
+
+ +
+ +
+ + + [2.0] xsl:function +
+
+ Declares a function that can be called from any XPath expression in the stylesheet
+
+ W3C Documentation reference: #element-function +
+
+
+ + + [3.0] xsl:evaluate +
+
+ Allows dynamic evaluation of XPath expressions from a string
+
+ W3C Documentation reference: #element-evaluate +
+
+
+ + + [3.0] xsl:assert +
+
+ Asserts a XPath expression, optionally throwing a dynamic error
+
+ W3C Documentation reference: #element-assert +
+
+
+ + +
+
+
+ +
+ + + [1.0] xsl:message +
+
+ Writes a message to the output (used to report errors)
+
+ W3C Documentation reference: #message +
+
+ + + + [1.0] xsl:fallback +
+
+ Specifies an alternate code to run if the processor does not support an XSLT element
+
+ W3C Documentation reference: #fallback +
+
+ + + + [3.0] xsl:map +
+
+ Used to construct a new map
+
+ W3C Documentation reference: #element-map +
+
+
+ + + [3.0] xsl:map-entry +
+
+ Used to construct a singleton map (one key and one value)
+
+ W3C Documentation reference: #element-map-entry +
+
+
+ + + [3.0] xsl:expose +
+
+ Used to modify the visibility of selected components within a package
+
+ W3C Documentation reference: #element-expose +
+
+
+ + + [3.0] xsl:accumulator +
+
+ Defines a rule that is to be applied while the document is being sequentially processed
+
+ W3C Documentation reference: #element-accumulator +
+
+
+ + + [3.0] xsl:accumulator-rule +
+
+ Defines a rule for an xsl:accumulator
+
+ W3C Documentation reference: #element-accumulator-rule +
+
+
+ + + [3.0] xsl:source-document +
+
+ Initiates streamed or unstreamed processing of a source document
+
+ W3C Documentation reference: #element-source-document +
+
+
+ + + [3.0] xsl:use-package +
+
+ http://www.w3.org/TR/xslt-30/#element-use-package
+
+ W3C Documentation reference: #element-use-package +
+
+
+ + + [3.0] xsl:where-populated +
+
+ Allows conditional content construction to be made streamable
+
+ W3C Documentation reference: #element-where-populated +
+
+
+ + + [3.0] xsl:accept +
+
+ Allows a package to restrict the visibility of components exposed by a package that it uses
+
+ W3C Documentation reference: #element-accept +
+
+
+
+ + +
+ +
+ +
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Homepage/common.css b/Homepage/common.css new file mode 100644 index 0000000..b5c1801 --- /dev/null +++ b/Homepage/common.css @@ -0,0 +1,101 @@ +/* TODO Ogarnac czcionke!! */ +@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@200&display=swap'); + +body { + font-family: 'Nunito', sans-serif; + color: #2e3133; + font-weight: normal; + margin: 0px; +} + +textarea:focus { + box-shadow: 0 0 5px rgba(81, 203, 238); + outline: none; +} + +.tooltip{ + border: 2px solid rgba(155, 165, 160, 0.507); + border-radius: 15px; + padding: 20px; +} + +a, a:visited, a:active { + color: rgb(47, 125, 146); +} + +a:hover{ + filter: brightness(120%); +} + +.field { + border: 2px solid rgba(56, 59, 58, 0.507); + border-radius: 5px; +} + +button { + font-size: 20px; + text-align: center; + cursor: pointer; + border: none; + text-decoration: none; +} + +input { + border-radius: 5px; + border: 1px solid rgba(155, 165, 160, 0.507); +} + +button:hover{ + filter: brightness(110%); + /* TODO Insert animation here! */ +} + +.tooltip h1{ + margin: 0px; + font-size: 24px; + font-weight: bold; +} + +.tooltip button{ + background-color: rgba(155, 165, 160, 0.507); + color: rgb(44, 44, 44); + border-bottom: 2px solid rgba(99, 99, 99, 0.507); + padding: 14px; +} + +.btn-action { + background-color: #3bc4f1; + color: white; + padding: 15px 32px; + display: inline-block; +} + +.versionInfo { + color: rgba(85, 85, 85, 0.555); + font-size: 13px; +} + +.resizeVertical { + resize: vertical; +} + +.resizeNone { + resize: none; +} + +table{ + border: none; +} + +.collapsibleData { + padding: 0 18px; + /* max-height: 0; */ + overflow: hidden; + /* transition: height 0.2s ease-out; */ + /* transition: max-height 0.2s ease-out; */ + background-color: #f1f1f1; +} + +.textField-key{ + background-color: #e6e6e6; +} \ No newline at end of file diff --git a/Homepage/favicon.ico b/Homepage/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a9ccec0f42b14e1ce8465bfde833227371b0b9ae GIT binary patch literal 9662 zcmd^ETWB0r7(UGkLSG^X1;G+u1O*=orD!`G>J>_}jIM;r~7Ci+dT{!5F&_KUA?-@uT|x<5S2R%vpGsJ2@lcZ5;dla8wov#0wqmOa-uSBy1MO5B(@dKM%865MXhhIG|hQ&4H{|jdm_d0F-BM;LV zC=5@jtZo0fw>AMk&Y*dNQd^M^_Kg0xbC)iDy3l`wN|Y5r6IMNr4}6Y`>H1!+CCe9X~4Q4|zL?kGN-nr!{eu^yn`Ymzm!E%b!<_Jr%|+%V@JJ_~jjl^cd;J?;&9D z&z8xQat6IPt1L5jWrUg7H>zVO4~CrA%qi$`E>N$)8(6Ua^hvy73R_*R!LN)tD4)(M zN0CRl$td2KqmS0&6!ROA)2k=XKbH)KamzCBf7LwvJ)H7?l((@E_to#|K|6%r{XEJA zi8oB)Kc6-YKjk}+ zT%4b$O~~EF@(RcYe)#_-i8oBiUYLVP3wzzh=7I1ZM9%MfA;Li{_W5c0dsrvm{$Gc2 zhs%`n#aeL1zJoFPa{>IYfwz_utSJ`+yL@7e_iRiL!jJDjVZ3o=^xbLCy#f5??+jsk z#Fh#FVoarn9+Z4@F#1)O=&mY8C8qmoxV!?1K0#;z3}oM$N5n|K%zN z{Ws70f%Ld+WuC0>%anst{B{C8j)?QE_(oM{etrD5KI+;L6j!mAEs59~3b2Ur1*% zvDcCwIPZ~eN#o+$-CHws_P#-P_R1P3{5T`WjoD~DeFugQoUx{k2|eJ~v3EUHS(uBI zgS)ht-*5Ne+xa`2hF@Y5aXfEa)cqzb$461j#csOO(Kpwq_N`Dyxlfvpt$Q9j6BL9g?Yp#O0GG1cQ)DN|mh{{jolM3Vpj literal 0 HcmV?d00001 diff --git a/Homepage/index.html b/Homepage/index.html new file mode 100644 index 0000000..59ef461 --- /dev/null +++ b/Homepage/index.html @@ -0,0 +1,35 @@ + + + + + + + + + + + + + +
+
+ + +
+ +
+ + + + \ No newline at end of file diff --git a/Homepage/logo.png b/Homepage/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..dca29bc19d1278ddb75d1bbc259f4e3f6aeb8a2c GIT binary patch literal 3760 zcmV;h4o~rkP)-$00009a7bBm000id z000id0mpBsWB>pTVo5|nRCwC$TX|R%*RrqEGd-;C;UOxb0kbJrG$^9RU{G-Z6PHM? zOWa6Qe6I1uh(H7sO*BT6$dW`M3b=a#LD2{aqceaCs31!~P+SmUP-bPir~AA=0yx0* z3^4HC%?-cr>yK}ys_UGt^XsZQbp{{-kt84l-RMRqf&c)528_F1(G4#2A2q?|y+Zto zJ{{ZntCx;XEFRtXnGXO=x9hsW0V|i33J>6u$K3OpXjW( zp1BwRavF)ncKfdzEip3UvX{WdE|J%(FCdbH7q`UC0+5ZzhXZ=P?RKWuJ6^6Vr2)Q|9B-fd4kc(yk?Gz?cMty32s(7&vqBf&r@nA_aq9?TsmQ!?y?+`EvjOFazlA zB&?YN7)~S71XxPdpn?D^<)EDk|Dy=g7BrHnGfDMVC+X;;VjH%;Uf9ERvI8Smz)MmA zAVdJGkgG?AUz#TvWPb+nO`w&_5dx;J_OD5-#>HzOQcE)7mc%iZAT1+YTgduX&3xt~ z#@=Gp^}xs#t)&P-)v<5Cbh>)~UAji0(*QyQP?h(avLC;rZ~Olt(B+gAlc^paHoAli z!%%!a|8Zvxru}?>mo(YKcG!I25!?&FCxB-q0LpY-FJ8PzZjasWo?UDF*Q`Y*m}UU8ENCQEb*R*2m5zM@JW~qje8Ls9ha&sY8E#e<7WQvNw~kl<(t=#3OKPlt=S6Gp-2P5G#@lOWZUBG{002V)=}3hD z_re0d0f66H*0b8gq8S>xBx3z1p*ym@1WN$`K!H9TjZ_U7;H=Jw73l9Ta2WO)AGh$S zsi`S^wR;zxbNdbr0O0O6nXt7TO1OOS(*59FA#p7SyqDh_4ibq3)^FUf;Y4hl#g@-D7YrXh{L@+% zY@B!K?%e}Em^%j|!@`1jd_IpLctFz>46?ONa~d`3w?p53&pwyd{TLJdORcYZ-bKN76NODO)yas(l03b*W?b~xnKz&F+JrICJ%+aIn`iQ0V2>c^I{cOz8I4>_hhzDRn0^&Ci76Aaeo0~ilSB;Ywy{!XSkxGq8VX#?cC{JS69~|d$Erx>>`#oBaPFMbc4ilI&!s{ z4nYEHQvttV!GdpRd3ugEq<1kn84nydXq+)AEqLcnr{qg1LK?6P11S3R?Mt=gzO2kF zdb!U^qw0wfBZdd=-M8;K4Ol}1W@x}Tct=p6^BCt&saHZmLTa=={%ov0D=RB_^7wI6 z*Ye>0{ZqDn@x_&%J$rUqjir86Zdj-Ce)H}F4Or6_;~y_uMjFz=7<){gIa8-hQd0xM zbfGr@5OFcFe1s5MFmL{zn>TOj)So(S+KB)5^_^|7uw+>R0AT){xd~%k#&Xt{kr5GJ z003ccZ{NFj@7`~G;OX^UNlA%L<&B#+H$CgVufIkCUj_zo8NMnM?)>zVPsskSSn&}; z#FB*z`Gaf*tObr=jW~@O1q{Pj6crVfktDZEcZGz6j2->9m5D&GWdGj1pJR+UYc!W} z;{ank6aZkAukSe?kEc_QQmYe}EL`-~#pDb8)2B}H5khGHzHjasB(K-}?ajX6^ILW1 zdpf&?akiZFr9wlvnl4mx$*QZX_3p6J($aL^r&g=W0RWPdlHTF6{qW(#qH)e+26D+6 zMr#k;0EZz%8y}o7bl*F!t^`ffJ1B|@s;{pPRw2lNspL7>*9xs-?)XCA{VJo-UHRE1;!=h5D z1fftUqSfjPQke|g-Q86Q|BBzgcg2`Y90G0*1rV=!gN{5oe zyB~C@c*hvC#YIK2Lv8JJ#_xpq_>H&=5Pm2uB{4pJlD^`-Rw5bM6=OH+YteKF%d#&h ziZa@6T59TG002!pc5J$!(P(gSQ4u9fPw&<6k`@{}x23n0*#37J{<^FlQ!K_ZskBw} zbh-Qx58rzVyId%DeQos)!@)@(vC7NJ^j2_Uv3PS=EbjB#+BAKsP$H4!VvI+0#n_SI z;R*l%nM~HHb{mPcCp5HE46`hY^YZd-N=r(Owk4%m%(i~PCTp*?0KnW3m)hKUFD@#+ zt55!{s;Wym)xG=lF*rw!M$;t+%O5RVXsT2yv8AOYr%ru+J!FW*@Jm!QFd9wJwX0VH z*REc(L#0yH8M6O{pI;A0M@OGuqM|5@qB=ZJgb?(ww75$%8rs-r?!iZ`4s~3|jA`~2 z1)wx!r_D8%$BgMB0U{8_Sm$wv>-h1vx$dp2tIIkXeRPhQnVC+KAcC701cB7n*4A(8 z?^*{#P>Aj_N~uuPBqSt`RLB)N4#ECh6fRJdnporOTfwE+3r<>duGMMQ*7de;pc z|KZ4K$8N}wKKXfhoWv?EEp_`X?YB~->nu=@|1B)c;pvm7HSHy6Gh!JEIT&N2p(_pm zz-SZ9+S)o7a~!XknVGrFnKx(Xj({&S4@VzqI)<1uVImTWu3@oAT&2-y6s<``;QYKh zPXNGA-@K}yRTpu|%*@UErChu?{b_u6p`34-m4@*_x3^2>Vyb) zYBw}?-nVbt7Ot-bxp(hg-nDDj0v7*s;nv8Ah=ACbn9{1MD!rvk%U4(O*L3R-@0|Hzg#Yt8&Ipbo|U!h;I{|;e~F6n%f5N@2FtPrHybof z>ub4Jm6w+v3)vCmx6s@B^V-_l&&$ipi!>Sy=MCA}+20#oQ)Gz5KeUHfx+0*YrY55^ z3Q~q)a6&@D+y=rLB-ZlPpAyGoV>_+D_F1uFQ)GAq(G{D5ODQRX1GaBp)`=$B6UR@i zYIwnBs8p&>F-p^P?mRCq(r98CXg9QlSa9y_SzcOdYNjy{B$vza;h%o`pwVVqBG$`u z%11vNO)4Lsrut~@>NWlyYz2hq5eonSb_51?3Ij?@N)l#!dN%d)HmzGXA7d;v#%4}- z&TWjb@ud2*8JH2JXRN)A=}*_+mIw{mIsK|on8p|g-`XfDEX0Kc1?w$MOqz9ZFJ4G~ zk26;)6xFS2h9gmvrFC_O+T+Ol{Cu32ni>EAjyjHw#{TigA8oR8<;oR|F?MaZk1G{o z03ZPXR7&MPPMe!b0{#Z|_SB=FVeI|LfchL$;2`#JE;g zR=Q7ea}!uuSz$m3D2jsO!XkF6$F#KNOFpLKPMyr`;8fqbnx5V(Gc#-A8*jd0?l5c^ zVQyvyfd1Ua$rW-ayI00$ip8Yo?Ab} + + 4.0.0 + + r11.mltx + REST_XSLT + 1.0-SNAPSHOT + + + 11 + 11 + UTF-8 + + + + + + + + + + + + + + + + + + + + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + + + + + maven-assembly-plugin + 3.3.0 + + + + + true + lib/ + Main + + + + jar-with-dependencies + + + + + + make-assembly + package + + single + + + + + + + + + + + + com.fasterxml.jackson.core + jackson-core + 2.11.0 + + + com.fasterxml.jackson.core + jackson-databind + 2.11.0 + + + com.sparkjava + spark-core + 2.9.3 + + + org.slf4j + slf4j-simple + 1.6.2 + test + + + + net.sf.saxon + Saxon-HE + 10.3 + + + xalan + xalan + 2.7.2 + + + + org.slf4j + jcl-over-slf4j + 1.7.0 + runtime + + + org.slf4j + slf4j-api + 1.7.0 + runtime + + + org.slf4j + slf4j-log4j12 + 1.7.0 + runtime + + + log4j + log4j + 1.2.14 + + + + + \ No newline at end of file diff --git a/REST_XSLT/src/main/java/Main.java b/REST_XSLT/src/main/java/Main.java new file mode 100644 index 0000000..d5b1a22 --- /dev/null +++ b/REST_XSLT/src/main/java/Main.java @@ -0,0 +1,220 @@ +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import processors.Saxon; +import processors.Xalan; +import spark.*; + +import java.util.HashMap; +import java.util.Map; + +public class Main { + public static void main(String[] args) { + Spark.port(8081); + + Spark.after((Filter) (request, response) -> { + response.header("Access-Control-Allow-Origin", "*"); + response.header("access-control-allow-headers", "*"); + response.header("access-control-expose-headers", "*"); + response.header("Access-Control-Allow-Methods", "POST"); + }); + + Spark.post("/xsltpost", xsltHandler); + Spark.post("/xpathpost", xpathHandler); + Spark.post("/xsdpost", xsdHandler); + Spark.get("/procinfo", procinfoHandler); + System.out.println("Server is online"); + } + + static Route procinfoHandler = (Request req, Response resp) -> { + try { +// req.session().id + resp.header("processor", "Saxon " + Saxon.getVersion() + " over s9api"); + return Saxon.getVersion(); + } catch (Exception ex) { + return ex.getMessage(); + } + }; + + static Route xsdHandler = (Request req, Response resp) -> { + String body = req.body(); + System.out.println("Request: " + body); + ObjectMapper mapper = new ObjectMapper(); + Map requestMap = null; + Map responseMap = new HashMap<>(); + try { + requestMap = mapper.readValue(body, Map.class); + } catch (JsonMappingException ex) { + ex.printStackTrace(); + } + + String data = requestMap.get("data"); + String xsd = requestMap.get("process"); + String processor = requestMap.get("processor"); + String version = requestMap.get("version"); + + resp.header("processor", Xalan.getVersion()); + long timeStart = System.currentTimeMillis(); + String tmp = ""; + try { + tmp = Xalan.validate(data, xsd).trim(); + responseMap.put("result", tmp); + responseMap.put("status", "OK"); + } catch (Exception ex) { + System.out.println("Exception: "+ex.getMessage()); + responseMap.put("result", ex.getMessage()); + responseMap.put("status", "ERR"); + resp.status(400); + } + long duration = System.currentTimeMillis() - timeStart; + responseMap.put("processor", Xalan.getVersion()); + responseMap.put("time", "" + duration); + resp.body(mapper.writeValueAsString(responseMap)); + return resp; + }; + + static Route xpathHandler = (Request req, Response resp) -> { + + String body = req.body(); + System.out.println("Request: " + body); + ObjectMapper mapper = new ObjectMapper(); + Map requestMap = null; + Map responseMap = new HashMap<>(); + try { + requestMap = mapper.readValue(body, Map.class); + } catch (JsonMappingException ex) { + ex.printStackTrace(); + } + + String data = requestMap.get("data"); + String query = requestMap.get("process"); + String processor = requestMap.get("processor"); + String version = requestMap.get("version"); + + String tmp = ""; + long timeStart = 0; + long duration = 0; + + if (processor == null) { + return "saxon, xalan"; + } + try { + switch (processor) { + case "saxon": + resp.header("processor", "Saxon " + Saxon.getVersion() + " " + version + " over s9api"); + System.out.print("Processing start..."); + timeStart = System.currentTimeMillis(); + try { + tmp = Saxon.processXPath(data, query, version).trim(); + responseMap.put("result", tmp); + responseMap.put("status", "OK"); + } catch (Exception ex) { + responseMap.put("result", ex.getMessage()); + responseMap.put("status", "ERR"); + resp.status(400); + } + duration = System.currentTimeMillis() - timeStart; + System.out.println("end(" + duration + ")"); + responseMap.put("processor", "Saxon " + Saxon.getVersion() + " " + version + " over s9api"); + responseMap.put("time", "" + duration); + resp.body(mapper.writeValueAsString(responseMap)); + return resp; + + case "xalan": + resp.header("processor", Xalan.getVersion()); + timeStart = System.currentTimeMillis(); + try { + tmp = Xalan.processXPath(data, query).trim(); + responseMap.put("result", tmp); + responseMap.put("status", "OK"); + } catch (Exception ex) { + responseMap.put("result", ex.getMessage()); + responseMap.put("status", "ERR"); + resp.status(400); + } + duration = System.currentTimeMillis() - timeStart; + responseMap.put("processor", Xalan.getVersion()); + responseMap.put("result", tmp); + responseMap.put("time", "" + duration); + resp.body(mapper.writeValueAsString(responseMap)); + return resp; + + default: + return "saxon, xalan"; + } + + } catch (Exception ex) { + ex.printStackTrace(); + return ex.getMessage(); + } + }; + + static Route xsltHandler = (Request req, Response resp) -> { + String body = req.body(); + ObjectMapper mapper = new ObjectMapper(); + Map jsonMap = null; + Map responseMap = new HashMap<>(); + try { + jsonMap = mapper.readValue(body, Map.class); + System.out.println(jsonMap); + } catch (JsonMappingException ex) { + ex.printStackTrace(); + } + String data = jsonMap.get("data"); + String query = jsonMap.get("process"); + String processor = jsonMap.get("processor"); + String version = jsonMap.get("version"); + + if (processor == null) { + return "saxon, xalan"; + } + try { + String tmp = ""; + long timeStart = 0; + long duration = 0; + switch (processor) { + case "saxon": +// resp.header("processor", "Saxon " + Saxon.getVersion()); + timeStart = System.currentTimeMillis(); + try { + tmp = Saxon.processXSLT(data, query); + responseMap.put("result", tmp); + responseMap.put("status", "OK"); + } catch (Exception ex) { + responseMap.put("result", ex.getMessage()); + responseMap.put("status", "ERR"); + resp.status(400); + } + + + duration = System.currentTimeMillis() - timeStart; + responseMap.put("processor", "Saxon " + Saxon.getVersion() + " " + version); + responseMap.put("time", "" + duration); + resp.body(mapper.writeValueAsString(responseMap)); + return resp; + + case "xalan": + timeStart = System.currentTimeMillis(); + try { + tmp = Xalan.processXSLT(data, query); + responseMap.put("result", tmp); + responseMap.put("status", "OK"); + } catch (Exception ex) { + responseMap.put("result", ex.getMessage()); + responseMap.put("status", "ERR"); + resp.status(400); + } + duration = System.currentTimeMillis() - timeStart; + responseMap.put("processor", Xalan.getVersion()); + responseMap.put("time", "" + duration); + resp.body(mapper.writeValueAsString(responseMap)); + return resp; + + default: + return "saxon, xalan"; + } + } catch (Exception ex) { + return ex.getMessage(); + } + + }; +} diff --git a/REST_XSLT/src/main/java/processors/NewNamespaceResolver.java b/REST_XSLT/src/main/java/processors/NewNamespaceResolver.java new file mode 100644 index 0000000..83f80cf --- /dev/null +++ b/REST_XSLT/src/main/java/processors/NewNamespaceResolver.java @@ -0,0 +1,54 @@ +package processors; + +import net.sf.saxon.om.NamespaceBinding; +import net.sf.saxon.om.NamespaceMap; +import net.sf.saxon.s9api.XPathCompiler; +import net.sf.saxon.s9api.XdmNode; + +import java.util.Iterator; + +public class NewNamespaceResolver { + + private NamespaceMap namespaceMap; + + public NamespaceMap process(XdmNode doc) { + namespaceMap = NamespaceMap.emptyMap(); + Iterator it = doc.children().iterator(); + + while (it.hasNext()) { + XdmNode tmp = it.next(); + extractNamespace(tmp); + } + return namespaceMap; + } + + public void exportNamespaces(XPathCompiler compiler){ + Iterator it = namespaceMap.iterator(); + while(it.hasNext()){ + System.out.println(it.next()); + } + namespaceMap.forEach(namespaceBinding -> compiler.declareNamespace(namespaceBinding.getPrefix(), namespaceBinding.getURI())); + } + + private void extractNamespace(XdmNode node) { + NamespaceMap tmp; + if ((tmp = node.getUnderlyingNode().getAllNamespaces()) != null) { + namespaceMap = namespaceMap.putAll(tmp); + } + if (node.children().iterator().hasNext()) { + + Iterator it = node.children().iterator(); + while (it.hasNext()) { + XdmNode rNode = it.next(); + if(rNode.getUnderlyingNode().getPrefix().isEmpty() && !rNode.getParent().getUnderlyingNode().getPrefix().isEmpty()){ + + System.out.println("prefix missing, parent has "+rNode.getParent().getUnderlyingNode().getPrefix() + ", but child has none"); + + NamespaceMap nsTMP= rNode.getUnderlyingNode().getAllNamespaces(); + System.out.println(); + } + extractNamespace(rNode); + } + } + } +} diff --git a/REST_XSLT/src/main/java/processors/Saxon.java b/REST_XSLT/src/main/java/processors/Saxon.java new file mode 100644 index 0000000..5f2f83e --- /dev/null +++ b/REST_XSLT/src/main/java/processors/Saxon.java @@ -0,0 +1,53 @@ +package processors; + +import net.sf.saxon.om.NamespaceMap; +import net.sf.saxon.s9api.*; +import javax.xml.transform.stream.StreamSource; +import java.io.StringReader; +import java.io.StringWriter; + +public class Saxon { + public static String processXSLT(String data, String transform) throws SaxonApiException { + Processor processor = new Processor(false); + XsltCompiler compiler = processor.newXsltCompiler(); + XsltExecutable stylesheet = compiler.compile(new StreamSource(new StringReader(transform))); + StringWriter sw = new StringWriter(); + Serializer out = processor.newSerializer(sw); + out.setOutputProperty(Serializer.Property.METHOD, "xml"); + out.setOutputProperty(Serializer.Property.INDENT, "yes"); + + Xslt30Transformer transformer = stylesheet.load30(); + transformer.transform(new StreamSource(new StringReader(data)), out); + return sw.toString(); + } + + public static String processXPath(String data, String query, String version) throws Exception { + Processor p = new Processor(false); + XPathCompiler compiler = p.newXPathCompiler(); + DocumentBuilder builder = p.newDocumentBuilder(); + XdmNode doc = builder.build(new StreamSource(new StringReader(data))); + +// System.out.println(version); + + compiler.setLanguageVersion(version); + + NewNamespaceResolver resolver = new NewNamespaceResolver(); + + NamespaceMap nsMa = resolver.process(doc); + + resolver.exportNamespaces(compiler); + + XdmValue result = compiler.evaluate(query, doc); + StringBuilder sb = new StringBuilder(); + for (XdmItem xdmItem : result) { + sb.append(xdmItem); + sb.append('\n'); + } + return sb.toString(); + + } + + public static String getVersion() { + return new Processor(false).getSaxonProductVersion(); + } +} diff --git a/REST_XSLT/src/main/java/processors/Xalan.java b/REST_XSLT/src/main/java/processors/Xalan.java new file mode 100644 index 0000000..0a56e5c --- /dev/null +++ b/REST_XSLT/src/main/java/processors/Xalan.java @@ -0,0 +1,91 @@ +package processors; + +import org.apache.xpath.domapi.XPathEvaluatorImpl; +import org.w3c.dom.Document; + +import javax.xml.XMLConstants; +import javax.xml.namespace.NamespaceContext; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.transform.*; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathConstants; +import javax.xml.xpath.XPathExpression; +import javax.xml.xpath.XPathFactory; +import java.io.IOException; +import java.io.StringReader; +import java.io.StringWriter; +import org.w3c.dom.NodeList; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + +public class Xalan { + + public static String processXSLT(String data, String transform) throws Exception{ + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + DocumentBuilder builder = factory.newDocumentBuilder(); + Document document = builder.parse(new InputSource(new StringReader(data))); + + + + StreamSource stylesource = new StreamSource(new StringReader(transform)); + + + + Transformer transformer = TransformerFactory.newInstance().newTransformer(stylesource); + transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); + transformer.setOutputProperty(OutputKeys.INDENT, "yes"); + Source source = new DOMSource(document); + StringWriter sw = new StringWriter(); + Result outputTarget = new StreamResult(sw); + transformer.transform(source, outputTarget); + + return sw.toString(); + } + + public static String processXPath(String data, String transform) throws Exception{ + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + DocumentBuilder builder = factory.newDocumentBuilder(); + + XPath xpath = XPathFactory.newInstance().newXPath(); + + xpath.setNamespaceContext(new XalanNamespaceResolver(builder.parse(new InputSource(new StringReader(data))), true)); + XPathExpression exp = xpath.compile(transform); + NodeList nodeList = (NodeList) exp.evaluate(new InputSource(new StringReader(data)), XPathConstants.NODESET); + String result = exp.evaluate(new InputSource(new StringReader(data))); + return result; + } + + + public static String getVersion(){ + return org.apache.xalan.Version.getVersion(); + } + + public static String validate(String data, String xsd) throws Exception{ + + + Source dataSource = new StreamSource(new StringReader(data)); + Source xsdSource = new StreamSource(new StringReader(xsd)); + SchemaFactory schemaFactory = SchemaFactory + .newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); +// try { + Schema schema = schemaFactory.newSchema(xsdSource); + Validator validator = schema.newValidator(); + validator.validate(dataSource); +// System.out.println(dataSource.getSystemId() + " is valid"); + return "XML file is valid"; +// } catch (SAXException e) { +// System.out.println("Invalid: "+e.getMessage()); +// return "XML file is NOT valid: " + e.getMessage(); +//// System.out.println(dataSource.getSystemId() + " is NOT valid reason:" + e); +// } catch (IOException e) { +// return "IO error: "+e.getMessage(); +// } + } +} diff --git a/REST_XSLT/src/main/java/processors/XalanNamespaceResolver.java b/REST_XSLT/src/main/java/processors/XalanNamespaceResolver.java new file mode 100644 index 0000000..4418087 --- /dev/null +++ b/REST_XSLT/src/main/java/processors/XalanNamespaceResolver.java @@ -0,0 +1,121 @@ +package processors; + +import org.w3c.dom.*; + +import javax.xml.XMLConstants; +import javax.xml.namespace.NamespaceContext; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +public class XalanNamespaceResolver implements NamespaceContext { + private static final String DEFAULT_NS = "DEFAULT"; + private Map prefix2Uri = new HashMap(); + private Map uri2Prefix = new HashMap(); + + /** + * This constructor parses the document and stores all namespaces it can + * find. If toplevelOnly is true, only namespaces in the root are used. + * + * @param document + * source document + * @param toplevelOnly + * restriction of the search to enhance performance + */ + public XalanNamespaceResolver(Document document, boolean toplevelOnly) { + examineNode(document.getFirstChild(), toplevelOnly); + System.out.println("The list of the cached namespaces:"); + for (String key : prefix2Uri.keySet()) { + System.out.println("prefix " + key + ": uri " + prefix2Uri.get(key)); + } + } + + /** + * A single node is read, the namespace attributes are extracted and stored. + * + * @param node + * to examine + * @param attributesOnly, + * if true no recursion happens + */ + private void examineNode(Node node, boolean attributesOnly) { + NamedNodeMap attributes = node.getAttributes(); + for (int i = 0; i < attributes.getLength(); i++) { + Node attribute = attributes.item(i); + storeAttribute((Attr) attribute); + } + + if (!attributesOnly) { + NodeList chields = node.getChildNodes(); + for (int i = 0; i < chields.getLength(); i++) { + Node chield = chields.item(i); + if (chield.getNodeType() == Node.ELEMENT_NODE){ + examineNode(chield, false); + } + + } + } + } + + /** + * This method looks at an attribute and stores it, if it is a namespace + * attribute. + * + * @param attribute + * to examine + */ + private void storeAttribute(Attr attribute) { + // examine the attributes in namespace xmlns + String uri = attribute.getNamespaceURI(); + String name = attribute.getLocalName(); + String name2 = attribute.getName(); + String value = attribute.getNodeValue(); + if (attribute.getNodeValue() != null + /*&& attribute.getNamespaceURI().equals( + XMLConstants.XMLNS_ATTRIBUTE_NS_URI)*/) { + // Default namespace xmlns="uri goes here" + if (attribute.getNodeName().equals(XMLConstants.XMLNS_ATTRIBUTE)) { + putInCache(DEFAULT_NS, attribute.getNodeValue()); + } else { + // The defined prefixes are stored here + putInCache(attribute.getName().replace("xmlns:", ""), attribute.getNodeValue()); + } + } + + } + + private void putInCache(String prefix, String uri) { + prefix2Uri.put(prefix, uri); + uri2Prefix.put(uri, prefix); + } + + /** + * This method is called by XPath. It returns the default namespace, if the + * prefix is null or "". + * + * @param prefix + * to search for + * @return uri + */ + public String getNamespaceURI(String prefix) { + if (prefix == null || prefix.equals(XMLConstants.DEFAULT_NS_PREFIX)) { + return prefix2Uri.get(DEFAULT_NS); + } else { + return prefix2Uri.get(prefix); + } + } + + /** + * This method is not needed in this context, but can be implemented in a + * similar way. + */ + public String getPrefix(String namespaceURI) { + return uri2Prefix.get(namespaceURI); + } + + public Iterator getPrefixes(String namespaceURI) { + // Not implemented + return null; + } + +} \ No newline at end of file diff --git a/REST_XSLT/src/main/resources/log4j.properties b/REST_XSLT/src/main/resources/log4j.properties new file mode 100644 index 0000000..0a185ad --- /dev/null +++ b/REST_XSLT/src/main/resources/log4j.properties @@ -0,0 +1,9 @@ +# Set root logger level to DEBUG and its only appender to A1. +log4j.rootLogger=ERROR, A1 + +# A1 is set to be a ConsoleAppender. +log4j.appender.A1=org.apache.log4j.ConsoleAppender + +# A1 uses PatternLayout. +log4j.appender.A1.layout=org.apache.log4j.PatternLayout +log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n \ No newline at end of file diff --git a/SampleData/book.xml b/SampleData/book.xml new file mode 100644 index 0000000..1c84681 --- /dev/null +++ b/SampleData/book.xml @@ -0,0 +1,105 @@ + + + + Hamlet + 2001-05-04 + 1 + false + + + Macbeth + 2000-12-13 + 1 + false + + + Harry Potter and the Sorcerer's Stone + 2005-04-29 + 2 + true + + + The Long Walk + 2018-07-01 + 4 + true + + + Misery + 2018-01-31 + 4 + true + + + Think and Grow Rich + 2004-09-10 + 6 + true + + + The Law of Success + 1982-05-09 + 6 + false + + + Patriot Games + 1995-10-21 + 5 + false + + + The Sum of All Fears + 1992-09-19 + 5 + false + + + The Alchemist + 2017-02-20 + 3 + false + + + Hamlet + 1994-06-01 + 1 + false + + + Measure for Measure + 1990-03-23 + 1 + false + + + Hamlet + 1989-05-05 + 1 + true + + + Hamlet + 1999-05-30 + 1 + true + + + The Law of Success + 2004-11-26 + 6 + true + + + Romeo and Juliet + 1997-02-08 + 1 + true + + + The Alchemist + 2009-08-21 + 3 + true + + diff --git a/SampleData/bookNS.xml b/SampleData/bookNS.xml new file mode 100644 index 0000000..17359ad --- /dev/null +++ b/SampleData/bookNS.xml @@ -0,0 +1,105 @@ + + + + Hamlet + 2001-05-04 + 1 + false + + + Macbeth + 2000-12-13 + 1 + false + + + Harry Potter and the Sorcerer's Stone + 2005-04-29 + 2 + true + + + The Long Walk + 2018-07-01 + 4 + true + + + Misery + 2018-01-31 + 4 + true + + + Think and Grow Rich + 2004-09-10 + 6 + true + + + The Law of Success + 1982-05-09 + 6 + false + + + Patriot Games + 1995-10-21 + 5 + false + + + The Sum of All Fears + 1992-09-19 + 5 + false + + + The Alchemist + 2017-02-20 + 3 + false + + + Hamlet + 1994-06-01 + 1 + false + + + Measure for Measure + 1990-03-23 + 1 + false + + + Hamlet + 1989-05-05 + 1 + true + + + Hamlet + 1999-05-30 + 1 + true + + + The Law of Success + 2004-11-26 + 6 + true + + + Romeo and Juliet + 1997-02-08 + 1 + true + + + The Alchemist + 2009-08-21 + 3 + true + + diff --git a/SampleData/functions20 b/SampleData/functions20 new file mode 100644 index 0000000..3cd39d2 --- /dev/null +++ b/SampleData/functions20 @@ -0,0 +1,129 @@ +abs( +adjust-dateTime-to-timezone( +adjust-date-to-timezone( +adjust-time-to-timezone( +avg( +base-uri( +boolean( +ceiling( +codepoints-to-string( +collection( +compare( +concat( +contains( +context-item( +count( +current( +current-date( +current-dateTime( +current-group( +current-grouping-key( +current-time( +data( +day-from-date( +day-from-dateTime( +days-from-dayTimeDuration( +deep-equal( +default-collation( +distinct-nodes( +distinct-values( +doc( +document( +document-uri( +element-available( +empty( +ends-with( +error( +escape-uri( +exactly-one( +exists( +expanded-QName( +false( +floor( +format-date( +format-dateTime( +format-number( +format-time( +function-available( +generate-id( +hours-from-dateTime( +hours-from-dayTimeDuration( +hours-from-time( +id( +idref( +implicit-timezone( +index-of( +input( +in-scope-prefixes( +insert-before( +item-at( +key( +lang( +last( +local-name( +local-name-from-QName( +lower-case( +matches( +max( +min( +minutes-from-dateTime( +minutes-from-dayTimeDuration( +minutes-from-time( +month-from-date( +month-from-dateTime( +months-from-yearMonthDuration( +name( +namespace-uri( +namespace-uri-for-prefix( +namespace-uri-from-QName( +node-kind( +node-name( +normalize-space( +normalize-unicode( +not( +number( +one-or-more( +position( +regex-group( +remove( +replace( +resolve-QName( +resolve-uri( +reverse( +root( +round( +round-half-to-even( +seconds-from-dateTime( +seconds-from-dayTimeDuration( +seconds-from-time( +sequence-node-identical( +starts-with( +string( +string-join( +string-length( +string-pad( +string-to-codepoints( +subsequence( +substring( +substring-after( +substring-before( +subtract-dateTimes-yielding-dayTimeDuration( +subtract-dateTimes-yielding-yearMonthDuration( +sum( +system-property( +timezone-from-date( +timezone-from-dateTime( +timezone-from-time( +tokenize( +trace( +translate( +true( +unordered( +unparsed-entity-public-id( +unparsed-entity-uri( +unparsed-text( +upper-case( +year-from-date( +year-from-dateTime( +years-from-yearMonthDuration( +zero-or-one( diff --git a/SampleData/sampleXML.xslt b/SampleData/sampleXML.xslt new file mode 100644 index 0000000..cd89168 --- /dev/null +++ b/SampleData/sampleXML.xslt @@ -0,0 +1,33 @@ + + + City library + 345123 + + + 7321 + Adam + Choke + + + 5123 + Lauren + Wong + + + + + 6422 + Harry Potter + 7542 + + + 1234 + Macbeth + 5123 + + + 9556 + Romeo and Juliet + + + \ No newline at end of file diff --git a/SampleData/transform.xslt b/SampleData/transform.xslt new file mode 100644 index 0000000..df9590a --- /dev/null +++ b/SampleData/transform.xslt @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..54fc72d --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +version: "3" + +services: + xmltools-frontend: + build: ./Homepage + container_name: xmltools-frontend + image: xmltools-frontend + ports: + - 8086:80 + + xmltools-backend: + build: ./REST_XSLT + container_name: xmltools-backend + image: xmltools-backend + ports: + - 8081:8081 \ No newline at end of file