Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Infrastructure
iso19139.MERIDIAN
Commits
9b3e7943
Commit
9b3e7943
authored
Sep 27, 2019
by
Kim Mortimer
Browse files
Correct various typos
parent
e8bb004f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/plugin/iso19139.MERIDIAN/index-fields/index.xsl
View file @
9b3e7943
...
...
@@ -45,7 +45,19 @@
<xsl:import
href=
"fn.xsl"
/>
<xsl:import
href=
"inspire-constant.xsl"
/>
<xsl:function
name=
"MER:ByTupleEncloseWithBracket"
>
<xsl:param
name=
"items"
/>
<xsl:sequence
select=
"if (empty($items))
then ()
else (encloseWithBracket(($items[1],$items[2])),
ByTupleEncloseWithBracket($items[position()>2]) )"
/>
</xsl:function>
<xsl:function
name=
"MER:encloseWithBracket"
>
<xsl:param
name=
"items"
/>
<xsl:value-of
select=
"concat('[',string-join($items,','),']')"
/>
</xsl:function>
<xsl:output
method=
"xml"
indent=
"yes"
/>
<xsl:output
name=
"default-serialize-mode"
...
...
@@ -695,21 +707,19 @@
<xsl:when
test=
"./gml:exterior/gml:LinearRing/gml:posList"
>
<!--This is an unbroken list of coordinates so there is only one value to get -->
<xsl:variable
name=
"tokenizedPos"
as=
"xs:string*"
select=
"tokenize(gml:exterior/gml:LinearRing/gml:posList, '\s')"
/>
<xsl:template
name=
"fixListExt"
>
<xsl:value-of
select=
"
ByTupleEncloseWithBracket($tokenizedPos)
"
/>
</xsl:template>
MER:ByTupleEncloseWithBracket($tokenizedPos)
"
/>
<xsl:text>
,
</xsl:text>
<xsl:value-of
select=
"concat('[', $tokenizedPos[1],
'\s'),
', ', $tokenizedPos[2],
'\s'),
']')"
/>
<xsl:value-of
select=
"concat('[', $tokenizedPos[1], ', ', $tokenizedPos[2], ']')"
/>
</xsl:when>
<xsl:when
test=
"./gml:LinearRing/gml:coordinates"
>
<xsl:variable
name=
"tokenizedCoord"
as=
"xs:string*"
select=
"tokenize(gml:LinearRing/gml:coordinates, '\s')"
/>
<xsl:for-each
select=
"tokenizedCoord"
>
<xsl:value-of
select=
"concat('[', . , '],')"
/>
</xsl:for-each>
<xsl:value-of
select=
"concat('[', substring-before(tokenizedCoord[1], '\s'), ', ', substring-after(tokenizedCoord[1], '\s'), ']')"
/>
<xsl:value-of
select=
"concat('[', substring-before(
$
tokenizedCoord[1], '\s'), ', ', substring-after(
$
tokenizedCoord[1], '\s'), ']')"
/>
</xsl:when>
<xsl:otherwise>
<!-- insert new function here to handle coordinates, but posRep shouldn't work -->
...
...
@@ -745,14 +755,12 @@
<xsl:text>
],
[
</xsl:text>
<xsl:variable
name=
"tokenizedPos"
as=
"xs:string*"
select=
"tokenize(gml:LinearRing/gml:posList, '\s')"
/>
<xsl:template
name=
"fixListInt"
>
<xsl:value-of
select=
"
ByTupleEncloseWithBracket($tokenizedPos)
MER:
ByTupleEncloseWithBracket($tokenizedPos)
"
/>
</xsl:template>
<xsl:text>
,
</xsl:text>
<xsl:value-of
select=
"concat('[', $tokenizedPos[1],
'\s'),
', ', $tokenizedPos[2],
'\s'),
']')"
/>
<xsl:value-of
select=
"concat('[', $tokenizedPos[1], ', ', $tokenizedPos[2], ']')"
/>
<xsl:text>
]
</xsl:text>
</xsl:when>
<xsl:when
test=
"./gml:LinearRing/gml:coordinates"
>
...
...
@@ -762,7 +770,7 @@
<xsl:for-each
select=
"tokenizedCoord"
>
<xsl:value-of
select=
"concat('[', . , '],')"
/>
</xsl:for-each>
<xsl:value-of
select=
"concat('[', substring-before(tokenizedCoord[1], '\s'), ', ', substring-after(tokenizedCoord[1], '\s'), ']')"
/>
<xsl:value-of
select=
"concat('[', substring-before(
$
tokenizedCoord[1], '\s'), ', ', substring-after(
$
tokenizedCoord[1], '\s'), ']')"
/>
<xsl:text>
]
</xsl:text>
</xsl:when>
<xsl:otherwise>
...
...
@@ -1163,17 +1171,5 @@
</xsl:otherwise>
</xsl:choose>-->
</xsl:template>
<xsl:function
name=
"ByTupleEncloseWithBracket"
>
<xsl:param
name=
"items"
/>
<xsl:sequence
select=
"if (empty($items))
then ()
else (encloseWithBracket(($items[1],$items[2])),
ByTupleEncloseWithBracket($items[position()>2]) )"
/>
</xsl:function>
<xsl:function
name=
"encloseWithBracket"
>
<xsl:param
name=
"items"
/>
<xsl:value-of
select=
"concat('[',string-join($items,','),']')"
/>
</xsl:function>
</xsl:stylesheet>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment