This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Expression Utility Objects | |
Besides these basic objects, Thymeleaf will offer us a set of utility objects that will help us perform common tasks in our expressions. | |
#dates: utility methods for java.util.Date objects: formatting, component extraction, etc. | |
#calendars: analogous to #dates, but for java.util.Calendar objects. | |
#numbers: utility methods for formatting numeric objects. | |
#strings: utility methods for String objects: contains, startsWith, prepending/appending, etc. | |
#objects: utility methods for objects in general. | |
#bools: utility methods for boolean evaluation. | |
#arrays: utility methods for arrays. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "3.1"; | |
(:~ | |
: This module generates the function documentation for the xQuery modules, in the context of eXist-db. | |
: | |
: @author Duncan Paterson | |
: @version 0.7 | |
: | |
: @return func-doc.md:) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$a | self::node()[$a] | |
can stay for: | |
<xsl:choose> | |
<xsl:when test="$a"> | |
<xsl:value-of select="$a"/> | |
</xsl:when> | |
<xsl:otherwise> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:template name="split"> | |
<xsl:param name="text"/> | |
<xsl:param name="by"/> | |
<xsl:param name="normalize" select="false()"/> | |
<xsl:variable name="l" select="substring-before($string, $by)"/> | |
<xsl:variable name="r" select="substring-after($string, $by)"/> | |
<xsl:choose> | |
<xsl:when test="$l and $normalize"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output indent="yes"/> | |
<xsl:include href="identity.xsl"/> | |
<xsl:template match="/*/child"/> | |
<xsl:template match="/*/parent"> | |
<xsl:variable name="A" | |
select=" | |
following-sibling::parent[1]/preceding-sibling::* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output omit-xml-declaration="yes" indent="yes"/> | |
<xsl:strip-space elements="*"/> | |
<xsl:template match="@*|node()[not(self::*)]"> | |
<xsl:copy/> | |
</xsl:template> | |
<xsl:template match="*"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:ns1="http://s1"> | |
<xsl:output omit-xml-declaration="yes" indent="yes"/> | |
<xsl:strip-space elements="*"/> | |
<xsl:template match="node()|@*"> | |
<xsl:copy> | |
<xsl:apply-templates select="node()|@*"/> | |
</xsl:copy> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output omit-xml-declaration="yes" indent="yes"/> | |
<xsl:strip-space elements="*"/> | |
<!--processes all *elements* by copying them, and can be overridden for individual elements --> | |
<xsl:template match="*"> | |
<xsl:copy> | |
<xsl:copy-of select="@*"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<root> | |
<varlist>a.a.a b.b.b c.c.c</varlist> | |
</root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Production steps of ECMA-262, Edition 5, 15.4.4.18 | |
// Reference: http://es5.github.io/#x15.4.4.18 | |
if (!Array.prototype.forEach) { | |
Array.prototype.forEach = function(callback, thisArg) { | |
var T, k; | |
if (this == null) { | |
throw new TypeError(' this is null or not defined'); |
NewerOlder