ScXML Instructions & Usage Notes

Contents

License & Disclaimer of Warranty

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.

Installing ScXML

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.

Running ScXML with Test 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.

ScXML command line

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.

Using ScXML under MSIE

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

About ScXML Templates and Output

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>
Date of current program or schedule page
<PAGENUM>
Event number in current script. Necessary because Scala Lingua does not accept duplicate event names that are possible when a programming day spans several pages (common)
<BANNERnn>
Text for schedule banner page
<SCHEDULEnn>
Denotes schedule page
<HOLIDAYnn>
Denotes holiday "no programming" page
<TIME>
Time of current program
<TITLE>
Program title
<DESCRIPTION>
Description

The following keywords are defined but presently unused. They may (will) be used in future versions.

<RATING>
Show rating (TV-13L, TV-G, etc.)
<LANGUAGE>
Program language (en Espanol?)
<NEWSHOW>
Indicates a new show
<LIVESHOW>
Indicates a live show

Example Template

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
 

How to Design Templates

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:

  1. The templates were laid out with Scala just as a regular schedule would be laid out, but with keywords like <TIME> and, <TITLE> in place of program information. Design your page just as you would design a regular one-off schedule page.
  2. Each keyword must be replaced in a given order--this is a limitation of the prototype. This is most important in program items. In the template, <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.
  3. There must be events (Scala's term for individual script pages) labelled BANNERnn, HOLIDAYnn and SCHEDULEnn, where nn is the channel number or channel name ("3", "15", "16" or "PUB", "EDU", "GOV", for example.)
  4. In the 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.

ScXML Source & API Documentation

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.

Limitations and Considerations

As noted earlier, ScXML is a prototype. While I believe it's reasonably stable, it has some compromises that limit its functionality. Notably:

Acknowledgements & Feedback

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



XML for Video Page
ScXML--Automating Video Bulletin Board Schedules
David Moisan's Computer Page
Dave Moisan's Home Page

David Moisan
dmoisan@davidmoisan.org

Copyright © 1999, 2003, David Moisan
Last updated on May 26th, 1999
http://www.davidmoisan.org//comp/xml/scxml/scxmltechnotes.html