-
Notifications
You must be signed in to change notification settings - Fork 331
/
ShowPanel.shtml
103 lines (85 loc) · 3.93 KB
/
ShowPanel.shtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 15.17), see www.w3.org">
<!-- Copyright Bob Jacobsen 2008 -->
<title>JMRI: Displaying JMRI Panel Files</title>
<!-- Style -->
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii">
<link rel="stylesheet" type="text/css" href="/css/default.css"
media="screen">
<link rel="stylesheet" type="text/css" href="/css/print.css"
media="print">
<link rel="icon" href="/images/jmri.ico" type="image/png">
<link rel="home" title="Home" href="/">
<!-- /Style -->
</head>
<body>
<!--#include virtual="/Header" -->
<div id="mBody">
<!--#include virtual="Sidebar" -->
<div id="mainContent">
<h1>JMRI: Displaying JMRI Panel Files</h1>
<p>JMRI panel and configuration information is stored in XML
files. These are text files that people can directly read,
but the format and structure information take a lot of
space.</p>
<p>JMRI provides a tool, called an "XSLT transform", to
convert the JMRI panel file into a more readable web page.
You open your panel file with a web browser, and can then
read it, print it, copy and paste into a file of another
form, etc.</p>
<img src="images/PanelFileView.png"
alt="screen shot of xml preview" align="right" width="462"
height="164" hspace="0" vspace="0">
<p>A large example of this is available as a <a href=
"http://jmri.org/community/examples/SPShastaConfigFile.pdf">PDF
file</a>. This is the configuration information, including
routes, Logix, etc, for the <a href=
"http://jmri.org/community/examples/SPShasta.shtml">SP Shasta
Route</a> layout.</p>
<p>To view your own panel file, just open it with a web
browser. With some computers and browsers, you drag the
file's icon onto the browser's icon. Others, you use entries
in the browser's "File" menu to find and open your file.</p>
<p>For this to work, your browser needs to be able to find
the "stylesheet" that does the formatting. If opening the
panel file doesn't work, particularly if it just opens a
blank window, or shows error messages about not being able to
load something, you may have to change the location listed
for the stylesheet. This location is in the 2nd line of your
panel file. Unfortunately, we can't give precise rules, as
different web browsers have different requirements. But there
are two things you can try:</p>
<ul>
<li>Tell the browser to pick it up from a JMRI web server.
<p>To do this, change the second line of the file to:</p>
<pre style="font-family: monospace;">
<?xml-stylesheet href="http://jmri.org/xml/XSLT/panelfile.xsl" type="text/xsl"?>
</pre>
</li>
<li>Put the stylesheet file in the same place as your panel
file, and tell the browser to use it.
<p>To do this, first find the "xml/XSLT/panelfile.xsl"
file in your JMRI distribution directory, or get the most
recent version from JMRI by downloading <a href=
"http://jmri.org/xml/XSLT/panelfile.xsl">this link</a>.
Put a copy of that file in the same directory as the
panel file you want to display. Then change the second
line of your panel file to:</p>
<pre style="font-family: monospace;">
<?xml-stylesheet href="panelfile.xsl" type="text/xsl"?>
</pre>
</li>
</ul>
<p>Don't change the first line!</p>
<p>For technical information on this, see the <a href=
"../../doc/Technical/XmlUsage.shtml">JMRI XML page</a>.</p>
<!--#include virtual="/Footer" -->
</div><!-- closes #mainContent-->
</div><!-- closes #mBody-->
</body>
</html>