You may use and modify this program and source code freely, for both commercial and non-commercial use. NO WARRANTY IS IMPLIED. Scala, Scala Multimedia & Lingua are © & TM of Scala, Inc. NO ASSOCIATION IS IMPLIED.
Note that this distribution includes AElfred, the SAX XML parser produced by, and is copyright © 1998, Microstar, Ltd, and is redistributed with their permission. This program also uses Dave Megginson's SAX drivers.
ScXML is a Java application. You will need a version 1.1 or later JVM to run it. Of course, you'll also need a full copy of Scala Multimedia 200 to view the scripts.
There are no special install procedures; just unzip the files in a directory and go, making sure to extract all the directories. ScXML comes with two DOS batch files that generate test files: sctest.bat
is for regular Java implementations, and sctestie.bat
is for MSIE.
When either batch file is executed, you will have three files, SATV3
, a program schedule script for SATV channel 3, SATV15
, a script for SATV channel 15, and SATVCHANNEL
, a script for both channels 3 and 15 combined.
java ScXML <inputXMLfile> <templatefile>
<outputscript> -singleoutput
inputXML
is the TVSCHEDULE XML file,
templatefile
contains the Scala template script and
outputscalascript
is the Scala Lingua script file to be generated. If the -singleoutput
flag is used,
all output goes to outputscript
Otherwise, all
output goes to several files of the form outputscript+channel number"
, depending on
how many program channels are listed in the original file.
For MSIE, use the following command line from within
the directory you unzipped the files:
jview /cp:a ScXML.jar;aelfred.jar ScXML <inputXMLfile> <templatefile>
<outputscript> -singleoutput
ScXML reads templates, actual Scala Lingua scripts
produced by Scala Multimedia MM300 , templates that contain keywords like <BANNER>
or <SCHEDULE>
that are replaced with data from the TVSCHEDULE XML file
Currently, the following keywords are recognized and replaced with data. Note that nn represents a name or channel number:
<DATE>
<PAGENUM>
<BANNERnn>
<SCHEDULEnn>
<HOLIDAYnn>
<TIME>
<TITLE>
<DESCRIPTION>
The following keywords are defined but presently unused. They may (will) be used in future versions.
<RATING>
<LANGUAGE>
<NEWSHOW>
<LIVESHOW>
The following script excerpt should serve as reference when
designing your own templates. Note that all Lingua STYLE
, FONT
, COLOR
and ATTRIBUTES
commands have been removed for clarity.
EVENT "BANNER3 SATV Schedule Banner Channel 3" PICTURE Work:ScalaMM3.0/Backgrounds/Theme001 TEXT 60 44 "Salem Access TV\t\\t\Channel 3" TEXT 233 161 "<BANNER>" PAUSE 15 END EVENT "HOLIDAY3 <DATE> Holiday Page" PICTURE Work:ScalaMM3.0/Backgrounds/Theme001 TEXT 60 44 "Salem Access TV\t\\t\Channel 3" TEXT 248 82 "<DATE>" TEXT 256 207 "<HOLIDAY>" TEXT 352 210 "" TEXT 173 256 "NO PROGRAMMING" PAUSE 15 END EVENT "SCHEDULE3 <DATE> <PAGENUM>" PICTURE Work:ScalaMM3.0/Backgrounds/Theme001 TEXT 64 48 "Salem Access TV\t\\t\\t\Channel 3" TEXT 248 85 "<DATE>" TEXT 0 150 "<TIME>" TEXT 181 150 "<TITLE>" TEXT 181 191 "<DESCRIPTION>" TEXT 0 223 "<TIME>" TEXT 181 224 "<TITLE>" TEXT 181 264 "<DESCRIPTION>" TEXT 0 298 "<TIME>" TEXT 177 298 "<TITLE>" TEXT 182 340 "<DESCRIPTION>" END
The preceding script example may be used as a basic template A sample template and TVSCHEDULE file are included in this distribution. Here are some pointers to keep in mind:
<TIME>
and, <TITLE>
in place of program information. Design your page just as you would design a regular one-off schedule page.<TIME>
, <TITLE>
& <DESCRIPTION>
must be present in that order. In other words, when you edit in Scala and select the Line menu, <TIME>
, <TITLE>
and <DESCRIPTION>
must follow one another in that order.BANNERnn
, HOLIDAYnn
and SCHEDULEnn
, where nn is the channel number or channel name ("3", "15", "16" or "PUB", "EDU", "GOV", for example.)SCHEDULE
event, there must be TIME
, TITLE
and DESCRIPTION
keywords, in that order. There is room for three times and programs and their descriptions in each SCHEDULE event.In the archive, source code is contained in the root directory, dmoisan/text
and dmoisan/xml/tvschedule
directories, as required by Java package conventions. The documentation--standard Javadoc 1.1--can be found in the docs
directory in the archive.
As noted earlier, ScXML is a prototype. While I believe it's reasonably stable, it has some compromises that limit its functionality. Notably:
LINESEP
static variable in ScalaScript and recompiling. If you try this with Scala for Windows, or InfoChannel, let me know.
Thanks to Microstar, Dave Megginson (for SAX) and Salem Access TV for helping to make this program possible. If you are using XML to automate your public-access or commercial TV facility, mail me!
David Moisan
July 1999