Skip to content

Commit

Permalink
ldh:parse-query-params function is back
Browse files Browse the repository at this point in the history
  • Loading branch information
namedgraph committed Dec 4, 2023
1 parent f3da95b commit a6f46d7
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,19 @@ exclude-result-prefixes="#all"
<xsl:sequence select="distinct-values($arg1[not(.=$arg2)])"/>
</xsl:function>

<xsl:function name="ldh:parse-query-params" as="map(xs:string, xs:string*)">
<xsl:param name="query-string" as="xs:string"/>

<xsl:sequence select="map:merge(
for $query in tokenize($query-string, '&amp;')
return
let $param := tokenize($query, '=')
return map:entry(head($param), tail($param))
,
map { 'duplicates': 'combine' }
)"/>
</xsl:function>

<!-- function stub so that Saxon-EE doesn't complain when compiling SEF -->
<xsl:function name="ldh:send-request" as="document-node()?" override-extension-function="no" cache="yes">
<xsl:param name="href" as="xs:anyURI"/>
Expand Down

0 comments on commit a6f46d7

Please sign in to comment.