1 |
4307
|
leinfelder
|
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
|
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
3 |
|
|
|
4 |
|
|
<!--
|
5 |
|
|
Description: Output a form for display of the cursor coordinates
|
6 |
|
|
Author: Mike Adair
|
7 |
|
|
Licence: LGPL as per: http://www.gnu.org/copyleft/lesser.html
|
8 |
|
|
|
9 |
|
|
$Id: CursorTrack.xsl 2576 2007-02-19 09:14:01Z gjvoosten $
|
10 |
|
|
-->
|
11 |
|
|
|
12 |
|
|
<xsl:output method="xml" encoding="utf-8" omit-xml-declaration="yes"/>
|
13 |
|
|
|
14 |
|
|
<!-- The common params set for all widgets -->
|
15 |
|
|
<xsl:param name="lang">en</xsl:param>
|
16 |
|
|
|
17 |
|
|
<!-- text value params -->
|
18 |
|
|
<xsl:param name="longitude">lon:</xsl:param>
|
19 |
|
|
<xsl:param name="latitude">lat:</xsl:param>
|
20 |
|
|
<xsl:param name="xcoord">x:</xsl:param>
|
21 |
|
|
<xsl:param name="ycoord">y:</xsl:param>
|
22 |
|
|
<xsl:param name="pixel">pixel:</xsl:param>
|
23 |
|
|
<xsl:param name="line">line:</xsl:param>
|
24 |
|
|
<xsl:param name="showXY">false</xsl:param>
|
25 |
|
|
<xsl:param name="showDMS">false</xsl:param>
|
26 |
|
|
<xsl:param name="showDM">false</xsl:param>
|
27 |
|
|
<xsl:param name="showMGRS">false</xsl:param>
|
28 |
|
|
<xsl:param name="showPx">false</xsl:param>
|
29 |
|
|
<xsl:param name="showLatLong">true</xsl:param>
|
30 |
|
|
|
31 |
|
|
<!-- The name of the form for coordinate output -->
|
32 |
|
|
<xsl:param name="formName"/>
|
33 |
|
|
|
34 |
|
|
<!-- Main html -->
|
35 |
|
|
<xsl:template match="/">
|
36 |
|
|
<div>
|
37 |
|
|
<form name="{$formName}" id="{$formName}">
|
38 |
|
|
<ul>
|
39 |
|
|
|
40 |
|
|
<xsl:if test="$showPx='true'">
|
41 |
|
|
<li>
|
42 |
|
|
<span class="cursorTrackLeft">
|
43 |
|
|
<xsl:value-of select="$pixel"/> <input name="px" type="text" size="8" readonly="readonly"/>
|
44 |
|
|
</span>
|
45 |
|
|
<span class="cursorTrackRight">
|
46 |
|
|
<xsl:value-of select="$line"/> <input name="py" type="text" size="8" readonly="readonly"/>
|
47 |
|
|
</span>
|
48 |
|
|
</li>
|
49 |
|
|
</xsl:if>
|
50 |
|
|
|
51 |
|
|
<xsl:if test="$showXY='true'">
|
52 |
|
|
<li>
|
53 |
|
|
<span class="cursorTrackLeft">
|
54 |
|
|
<xsl:value-of select="$xcoord"/> <input name="x" type="text" size="8" readonly="readonly"/>
|
55 |
|
|
</span>
|
56 |
|
|
<span class="cursorTrackRight">
|
57 |
|
|
<xsl:value-of select="$ycoord"/> <input name="y" type="text" size="8" readonly="readonly"/>
|
58 |
|
|
</span>
|
59 |
|
|
</li>
|
60 |
|
|
</xsl:if>
|
61 |
|
|
|
62 |
|
|
<xsl:if test="$showDMS='true'">
|
63 |
|
|
<li>
|
64 |
|
|
<span class="cursorTrackLeft">
|
65 |
|
|
<xsl:value-of select="$longitude"/>
|
66 |
|
|
<input name="longdeg" type="text" size="3" readonly="readonly"/>°
|
67 |
|
|
<input name="longmin" type="text" size="2" readonly="readonly"/>'
|
68 |
|
|
<input name="longsec" type="text" size="2" readonly="readonly"/>"
|
69 |
|
|
<input name="longH" type="text" size="1" readonly="readonly"/> 
|
70 |
|
|
</span>
|
71 |
|
|
<span class="cursorTrackRight">
|
72 |
|
|
<xsl:value-of select="$latitude"/>
|
73 |
|
|
<input name="latdeg" type="text" size="2" readonly="readonly"/>°
|
74 |
|
|
<input name="latmin" type="text" size="2" readonly="readonly"/>'
|
75 |
|
|
<input name="latsec" type="text" size="2" readonly="readonly"/>"
|
76 |
|
|
<input name="latH" type="text" size="1" readonly="readonly"/>
|
77 |
|
|
</span>
|
78 |
|
|
</li>
|
79 |
|
|
</xsl:if>
|
80 |
|
|
|
81 |
|
|
<xsl:if test="$showDM='true'">
|
82 |
|
|
<li>
|
83 |
|
|
<span class="cursorTrackLeft">
|
84 |
|
|
<xsl:value-of select="$longitude"/>
|
85 |
|
|
<input name="longDMdeg" type="text" size="3" readonly="readonly"/>°
|
86 |
|
|
<input name="longDMmin" type="text" size="6" readonly="readonly"/>'
|
87 |
|
|
<input name="longDMH" type="text" size="1" readonly="readonly"/> 
|
88 |
|
|
</span>
|
89 |
|
|
<span class="cursorTrackRight">
|
90 |
|
|
<xsl:value-of select="$latitude"/>
|
91 |
|
|
<input name="latDMdeg" type="text" size="2" readonly="readonly"/>°
|
92 |
|
|
<input name="latDMmin" type="text" size="6" readonly="readonly"/>'
|
93 |
|
|
<input name="latDMH" type="text" size="1" readonly="readonly"/>
|
94 |
|
|
</span>
|
95 |
|
|
</li>
|
96 |
|
|
</xsl:if>
|
97 |
|
|
|
98 |
|
|
<xsl:if test="$showLatLong='true'">
|
99 |
|
|
<li>
|
100 |
|
|
<span class="cursorTrackLeft">
|
101 |
|
|
<xsl:value-of select="$longitude"/> <input name="longitude" type="text" size="8" readonly="readonly"/>
|
102 |
|
|
</span>
|
103 |
|
|
<span class="cursorTrackRight">
|
104 |
|
|
<xsl:value-of select="$latitude"/> <input name="latitude" type="text" size="8" readonly="readonly"/>
|
105 |
|
|
</span>
|
106 |
|
|
</li>
|
107 |
|
|
</xsl:if>
|
108 |
|
|
|
109 |
|
|
<xsl:if test="$showMGRS='true'">
|
110 |
|
|
<li>
|
111 |
|
|
MGRS: <input name="mgrs" type="text" size="14" readonly="readonly"/>
|
112 |
|
|
</li>
|
113 |
|
|
</xsl:if>
|
114 |
|
|
|
115 |
|
|
</ul>
|
116 |
|
|
</form>
|
117 |
|
|
</div>
|
118 |
|
|
</xsl:template>
|
119 |
|
|
|
120 |
|
|
</xsl:stylesheet>
|