JMRI: Displaying Panel File Contents
To show a Panel previously saved to disk in JMRI
on screen, use the "Open Panel..." item from the Panels
In contrast, this pages describes how to show the contents of the file itself, meaning the data used to draw the Panel, either on screen or on paper.
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.
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.
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.
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:
- Tell the browser to pick it up from a JMRI web server.
To do this, change the second line of the file to:
<?xml-stylesheet href="http://jmri.org/xml/XSLT/panelfile.xsl" type="text/xsl"?>
- Put the stylesheet file in the same place as your panel
file, and tell the browser to use it.
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 this link. 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:
<?xml-stylesheet href="panelfile.xsl" type="text/xsl"?>
Don't change the first line!
For technical information on this, see the JMRI XML page.