Skip to content

Commit f77f2be

Browse files
committed
Replaced ldh:new with ixsl:new
1 parent 67004fc commit f77f2be

7 files changed

Lines changed: 27 additions & 24 deletions

File tree

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ exclude-result-prefixes="#all"
115115
</xsl:message>
116116
</xsl:if>
117117

118-
<xsl:variable name="chart" select="ldh:new($chart-class, [ id($canvas-id, ixsl:page()) ])"/>
118+
<xsl:variable name="chart" select="ixsl:new($chart-class, [ id($canvas-id, ixsl:page()) ])"/>
119119
<xsl:variable name="options" as="map(xs:string, item())">
120120
<xsl:map>
121121
<xsl:if test="exists($width)">

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/constructor.xsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ exclude-result-prefixes="#all"
592592
<!-- query NS ontology to retrieve the ontology URI from the $type class' rdfs:isDefinedBy value. Fallback to the assumed $type's namespace URI -->
593593
<xsl:variable name="request-uri" select="ac:build-uri(resolve-uri('ns', ldt:base()), map{ 'query': 'DESCRIBE &lt;' || $type || '&gt;', 'accept': 'application/rdf+xml' })" as="xs:anyURI"/>
594594
<xsl:variable name="ontology-uri" select="(key('resources', $type, document(ac:document-uri($request-uri)))/rdfs:isDefinedBy/@rdf:resource, $namespace)[1]" as="xs:anyURI"/>
595-
<xsl:variable name="form-data" select="ldh:new('URLSearchParams', [ ldh:new('FormData', []) ])"/>
595+
<xsl:variable name="form-data" select="ixsl:new('URLSearchParams', [ ixsl:new('FormData', []) ])"/>
596596
<xsl:sequence select="ixsl:call($form-data, 'append', [ 'uri', $ontology-uri ])[current-date() lt xs:date('2000-01-01')]"/>
597597

598598
<!-- clear this ontology first, then proceed to clear the namespace ontology -->
@@ -679,7 +679,7 @@ exclude-result-prefixes="#all"
679679

680680
<xsl:template name="ldh:ClearNamespace">
681681
<xsl:param name="ontology-uri" select="resolve-uri('ns#', ldt:base())" as="xs:anyURI"/>
682-
<xsl:variable name="form-data" select="ldh:new('URLSearchParams', [ ldh:new('FormData', []) ])"/>
682+
<xsl:variable name="form-data" select="ixsl:new('URLSearchParams', [ ixsl:new('FormData', []) ])"/>
683683
<xsl:sequence select="ixsl:call($form-data, 'append', [ 'uri', $ontology-uri ])[current-date() lt xs:date('2000-01-01')]"/>
684684

685685
<xsl:variable name="admin-base-uri" select="xs:anyURI(replace(ldt:base(), '^(https?://)', '$1admin.'))" as="xs:anyURI"/>

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/form.xsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ WHERE
618618
<xsl:choose>
619619
<!-- we need to handle multipart requests specially because of Saxon-JS 2 limitations: https://saxonica.plan.io/issues/4732 -->
620620
<xsl:when test="$enctype = 'multipart/form-data'">
621-
<xsl:variable name="form-data" select="ldh:new('FormData', [ $form ])"/> <!-- only for file uploads! XMLLiterals will not be canonicalized -->
621+
<xsl:variable name="form-data" select="ixsl:new('FormData', [ $form ])"/> <!-- only for file uploads! XMLLiterals will not be canonicalized -->
622622
<xsl:variable name="headers" select="ldh:new-object()"/>
623623
<ixsl:set-property name="Accept" select="$accept" object="$headers"/>
624624
<ixsl:set-property name="If-Match" select="$etag" object="$headers"/>

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/functions.xsl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,15 @@ exclude-result-prefixes="#all"
105105
<xsl:sequence select="ixsl:eval(string($js-statement/@statement))"/>
106106
</xsl:function>
107107

108+
<!-- Deprecated: use ixsl:new() instead (available in SaxonJS 3.0+) -->
109+
<!--
108110
<xsl:function name="ldh:new" as="item()">
109111
<xsl:param name="target" as="xs:string"/>
110112
<xsl:param name="arguments" as="array(*)"/>
111113
112114
<xsl:sequence select="ixsl:call(ixsl:window(), 'Reflect.construct', [ ixsl:get(ixsl:window(), $target), $arguments ] )"/>
113115
</xsl:function>
116+
-->
114117

115118
<!-- format URLs in DataTable as HTML links. !!! Saxon-JS cannot intercept Google Charts events, therefore set a full proxied URL !!! -->
116119
<xsl:template match="@rdf:about[starts-with(., 'http://')] | @rdf:about[starts-with(., 'https://')] | @rdf:resource[starts-with(., 'http://')] | @rdf:resource[starts-with(., 'https://')] | srx:uri[starts-with(., 'http://')] | srx:uri[starts-with(., 'https://')]" mode="ac:DataTable">
@@ -175,7 +178,7 @@ exclude-result-prefixes="#all"
175178
<xsl:param name="string" as="xs:string"/>
176179
<xsl:param name="mime-type" as="xs:string"/>
177180

178-
<xsl:sequence select="ixsl:call(ldh:new('DOMParser', []), 'parseFromString', [ $string, $mime-type ])"/>
181+
<xsl:sequence select="ixsl:call(ixsl:new('DOMParser', []), 'parseFromString', [ $string, $mime-type ])"/>
179182
</xsl:function>
180183

181184
<!-- parses RDF/POST inputs into a sequence of SPARQL.js triple maps (they need to be wrapped into <array key="triples">) -->

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/graph.xsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ exclude-result-prefixes="#all"
133133
<!-- add the mouse offset within the element which was stored in onmousedown -->
134134
<xsl:variable name="dom-x" select="ixsl:get(ixsl:event(), 'clientX') + $offset-x"/>
135135
<xsl:variable name="dom-y" select="ixsl:get(ixsl:event(), 'clientY') + $offset-y"/>
136-
<xsl:variable name="point" select="ldh:new('DOMPoint', [ $dom-x, $dom-y ])"/>
136+
<xsl:variable name="point" select="ixsl:new('DOMPoint', [ $dom-x, $dom-y ])"/>
137137
<xsl:variable name="ctm" select="ixsl:call(., 'getScreenCTM', [])"/>
138138
<xsl:variable name="svg-point" select="ixsl:call($point, 'matrixTransform', [ ixsl:call($ctm, 'inverse', []) ])"/>
139139
<xsl:variable name="svg-x" select="ixsl:get($svg-point, 'x')"/>

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/map.xsl

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ exclude-result-prefixes="#all"
4141
<xsl:param name="zoom" as="xs:integer?"/>
4242

4343
<xsl:variable name="tile-options" select="ldh:new-object()"/>
44-
<ixsl:set-property name="source" select="ldh:new('ol.source.OSM', [])" object="$tile-options"/>
45-
<xsl:variable name="tile" select="ldh:new('ol.layer.Tile', [ $tile-options ])"/>
44+
<ixsl:set-property name="source" select="ixsl:new('ol.source.OSM', [])" object="$tile-options"/>
45+
<xsl:variable name="tile" select="ixsl:new('ol.layer.Tile', [ $tile-options ])"/>
4646
<xsl:variable name="layers" select="[ $tile ]" as="array(*)"/>
4747

4848
<xsl:variable name="view-options" select="ldh:new-object()"/>
@@ -53,14 +53,14 @@ exclude-result-prefixes="#all"
5353
<xsl:if test="exists($zoom)">
5454
<ixsl:set-property name="zoom" select="$zoom" object="$view-options"/>
5555
</xsl:if>
56-
<xsl:variable name="view" select="ldh:new('ol.View', [ $view-options ])"/>
56+
<xsl:variable name="view" select="ixsl:new('ol.View', [ $view-options ])"/>
5757

5858
<xsl:variable name="map-options" select="ldh:new-object()"/>
5959
<ixsl:set-property name="target" select="$canvas-id" object="$map-options"/>
6060
<ixsl:set-property name="layers" select="$layers" object="$map-options"/>
6161
<ixsl:set-property name="view" select="$view" object="$map-options"/>
6262

63-
<xsl:variable name="map" select="ldh:new('ol.Map', [ $map-options ])"/>
63+
<xsl:variable name="map" select="ixsl:new('ol.Map', [ $map-options ])"/>
6464
<xsl:if test="exists($lat) and exists($lng)">
6565
<xsl:variable name="lon-lat" select="[ $lng, $lat ]" as="array(*)"/>
6666
<xsl:variable name="center" select="ixsl:call(ixsl:get(ixsl:window(), 'ol.proj'), 'fromLonLat', [ $lon-lat ])"/>
@@ -215,12 +215,12 @@ exclude-result-prefixes="#all"
215215
<!--<ixsl:set-property name="scale" select="0.2" object="$icon-options"/>-->
216216
<!-- icon has to have an initial src, otherwise the ol.style.Icon constructor will throw an assertion error -->
217217
<ixsl:set-property name="src" select="." object="$icon-options"/>
218-
<xsl:variable name="icon" select="ldh:new('ol.style.Icon', [ $icon-options ])"/>
218+
<xsl:variable name="icon" select="ixsl:new('ol.style.Icon', [ $icon-options ])"/>
219219
<xsl:sequence select="ixsl:call($icon, 'setAnchor', [ [0.5, 30] ])[current-date() lt xs:date('2000-01-01')]"/>
220220

221221
<xsl:variable name="icon-style-options" select="ldh:new-object()"/>
222222
<ixsl:set-property name="image" select="$icon" object="$icon-style-options"/>
223-
<xsl:sequence select="ldh:new('ol.style.Style', [ $icon-style-options ])"/>
223+
<xsl:sequence select="ixsl:new('ol.style.Style', [ $icon-style-options ])"/>
224224
</xsl:for-each>
225225
</xsl:param>
226226
<xsl:if test="count($icon-styles) = 0">
@@ -234,7 +234,7 @@ exclude-result-prefixes="#all"
234234
<xsl:variable name="geo-json" select="ixsl:call(ixsl:get(ixsl:window(), 'JSON'), 'parse', [ $geo-json-string ])"/>
235235
<xsl:variable name="geo-json-options" select="ldh:new-object()"/>
236236
<ixsl:set-property name="featureProjection" select="'EPSG:3857'" object="$geo-json-options"/>
237-
<xsl:variable name="geo-json-features" select="array{ ixsl:call(ldh:new('ol.format.GeoJSON', []), 'readFeatures', [ $geo-json, $geo-json-options ]) }"/>
237+
<xsl:variable name="geo-json-features" select="array{ ixsl:call(ixsl:new('ol.format.GeoJSON', []), 'readFeatures', [ $geo-json, $geo-json-options ]) }"/>
238238

239239
<!-- read WKT features from gs:asWKT properties -->
240240
<xsl:variable name="wkt-options" select="ldh:new-object()"/>
@@ -249,7 +249,7 @@ exclude-result-prefixes="#all"
249249
<xsl:sequence select="$features"/>
250250
</xsl:on-completion>
251251

252-
<xsl:variable name="feature" select="ixsl:call(ldh:new('ol.format.WKT', []), 'readFeature', [ string(gs:asWKT[@rdf:datatype = '&gs;wktLiteral']/text()), $wkt-options ])"/>
252+
<xsl:variable name="feature" select="ixsl:call(ixsl:new('ol.format.WKT', []), 'readFeature', [ string(gs:asWKT[@rdf:datatype = '&gs;wktLiteral']/text()), $wkt-options ])"/>
253253
<xsl:sequence select="ixsl:call($feature, 'setId', [ string((@rdf:about, @rdf:nodeID)[1]) ])[current-date() lt xs:date('2000-01-01')]"/>
254254
<xsl:sequence select="ixsl:call($feature, 'set', [ 'name', ac:label(.) ])[current-date() lt xs:date('2000-01-01')]"/>
255255
<xsl:sequence select="ixsl:call($feature, 'set', [ 'types', array{ rdf:type/@rdf:resource/string() } ])[current-date() lt xs:date('2000-01-01')]"/>
@@ -264,11 +264,11 @@ exclude-result-prefixes="#all"
264264
<ixsl:set-property name="font" select="'12px sans-serif'" object="$text-options"/>
265265
<ixsl:set-property name="offsetY" select="10" object="$text-options"/>
266266
<ixsl:set-property name="overflow" select="true()" object="$text-options"/>
267-
<xsl:variable name="text" select="ldh:new('ol.style.Text', [ $text-options ])"/>
267+
<xsl:variable name="text" select="ixsl:new('ol.style.Text', [ $text-options ])"/>
268268

269269
<xsl:variable name="label-style-options" select="ldh:new-object()"/>
270270
<ixsl:set-property name="text" select="$text" object="$label-style-options"/>
271-
<xsl:variable name="label-style" select="ldh:new('ol.style.Style', [ $label-style-options ])"/>
271+
<xsl:variable name="label-style" select="ixsl:new('ol.style.Style', [ $label-style-options ])"/>
272272

273273
<xsl:variable name="js-statement" as="xs:string">
274274
<![CDATA[
@@ -297,12 +297,12 @@ exclude-result-prefixes="#all"
297297
]]>
298298
</xsl:variable>
299299
<xsl:variable name="js-function" select="ixsl:eval(normalize-space($js-statement))"/> <!-- need normalize-space() due to Saxon-JS 2.4 bug: https://saxonica.plan.io/issues/5667 -->
300-
<xsl:variable name="js-function" select="ixsl:call($js-function, 'bind', [ (), $label-style, $icon-styles, ldh:new('Map', []) ])"/>
300+
<xsl:variable name="js-function" select="ixsl:call($js-function, 'bind', [ (), $label-style, $icon-styles, ixsl:new('Map', []) ])"/>
301301

302302
<xsl:variable name="source-options" select="ldh:new-object()"/>
303303
<!--<ixsl:set-property name="features" select="$geo-json-features" object="$source-options"/>-->
304-
<xsl:variable name="geo-json-source" select="ldh:new('ol.source.Vector', [ $source-options ])"/>
305-
<xsl:variable name="wkt-source" select="ldh:new('ol.source.Vector', [ $source-options ])"/>
304+
<xsl:variable name="geo-json-source" select="ixsl:new('ol.source.Vector', [ $source-options ])"/>
305+
<xsl:variable name="wkt-source" select="ixsl:new('ol.source.Vector', [ $source-options ])"/>
306306
<!--<ixsl:set-property name="loader" select="$loader-function" object="$source-options"/>-->
307307
<xsl:sequence select="ixsl:call($geo-json-source, 'addFeatures', [ $geo-json-features ])[current-date() lt xs:date('2000-01-01')]"/>
308308
<xsl:sequence select="ixsl:call($wkt-source, 'addFeatures', [ $wkt-features ])[current-date() lt xs:date('2000-01-01')]"/>
@@ -311,13 +311,13 @@ exclude-result-prefixes="#all"
311311
<ixsl:set-property name="declutter" select="true()" object="$geo-json-layer-options"/>
312312
<ixsl:set-property name="source" select="$geo-json-source" object="$geo-json-layer-options"/>
313313
<ixsl:set-property name="style" select="$js-function" object="$geo-json-layer-options"/>
314-
<xsl:variable name="geo-json-layer" select="ldh:new('ol.layer.Vector', [ $geo-json-layer-options ])"/>
314+
<xsl:variable name="geo-json-layer" select="ixsl:new('ol.layer.Vector', [ $geo-json-layer-options ])"/>
315315

316316
<xsl:variable name="wkt-layer-options" select="ldh:new-object()"/>
317317
<!--<ixsl:set-property name="declutter" select="true()" object="$wkt-layer-options"/>-->
318318
<ixsl:set-property name="source" select="$wkt-source" object="$wkt-layer-options"/>
319319
<ixsl:set-property name="style" select="$js-function" object="$wkt-layer-options"/>
320-
<xsl:variable name="wkt-layer" select="ldh:new('ol.layer.Vector', [ $wkt-layer-options ])"/>
320+
<xsl:variable name="wkt-layer" select="ixsl:new('ol.layer.Vector', [ $wkt-layer-options ])"/>
321321

322322
<xsl:sequence select="ixsl:call($map, 'addLayer', [ $geo-json-layer ])[current-date() lt xs:date('2000-01-01')]"/>
323323
<xsl:sequence select="ixsl:call($map, 'addLayer', [ $wkt-layer ])[current-date() lt xs:date('2000-01-01')]"/>
@@ -426,7 +426,7 @@ exclude-result-prefixes="#all"
426426
<ixsl:set-property name="positioning" select="'bottom-center'" object="$overlay-options"/>
427427
<!--<ixsl:set-property name="className" select="'ol-overlay-container ol-selectable'" object="$overlay-options"/>-->
428428
<!--<ixsl:set-property name="autoPanAnimation" select="" object="$overlay-options"/>-->
429-
<xsl:variable name="overlay" select="ldh:new('ol.Overlay', [ $overlay-options ])"/>
429+
<xsl:variable name="overlay" select="ixsl:new('ol.Overlay', [ $overlay-options ])"/>
430430
<xsl:sequence select="ixsl:call($overlay, 'setPosition', [ $coord ])[current-date() lt xs:date('2000-01-01')]"/>
431431

432432
<xsl:for-each select="$container">

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/modal.xsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ LIMIT 10
770770
<xsl:variable name="method" select="ixsl:get(., 'method')" as="xs:string"/>
771771
<xsl:variable name="action" select="ixsl:get(., 'action')" as="xs:anyURI"/>
772772
<xsl:variable name="enctype" select="ixsl:get(., 'enctype')" as="xs:string"/>
773-
<xsl:variable name="form-data" select="ldh:new('URLSearchParams', [ ldh:new('FormData', [ $form ]) ])"/>
773+
<xsl:variable name="form-data" select="ixsl:new('URLSearchParams', [ ixsl:new('FormData', [ $form ]) ])"/>
774774
<xsl:variable name="request-uri" select="ldh:href($action, map{})" as="xs:anyURI"/>
775775

776776
<xsl:variable name="request" as="item()*">
@@ -859,7 +859,7 @@ LIMIT 10
859859
<xsl:variable name="method" select="ixsl:get(., 'method')" as="xs:string"/>
860860
<xsl:variable name="action" select="ixsl:get(., 'action')" as="xs:anyURI"/>
861861
<xsl:variable name="enctype" select="ixsl:get(., 'enctype')" as="xs:string"/>
862-
<xsl:variable name="form-data" select="ldh:new('URLSearchParams', [ ldh:new('FormData', [ $form ]) ])"/>
862+
<xsl:variable name="form-data" select="ixsl:new('URLSearchParams', [ ixsl:new('FormData', [ $form ]) ])"/>
863863
<xsl:variable name="request-uri" select="ldh:href($action, map{})" as="xs:anyURI"/>
864864

865865
<xsl:variable name="request" as="item()*">

0 commit comments

Comments
 (0)