Copyright 2010-2017 Obihai Technology, Inc.
134
the named variable refers to a tree of variables, called a
var-tree
, defined
in the XML document downloaded from the given URL.
For example:
<setvar name=
"
test
"
value=
"
my name
"
/>
sets the variable
$test
to the string “my name”. But
in
<setvar name=
"
cid
"
value=
"
http://abc.com/cid-strings.xml
"
/>
$cid represents a tree of variables
derived from the structure of the document cid-strings.xml. A valid var-
tree XML must have the underlying variable name as the root element. For
the last example, it would look something like this:
<cid value=
"
1
"
>
<org value=
"
ABCD Publishing, Inc.
"
>
<title value=
"
VP, Sales
"
/>
</org>
<name value=
"
Joe Smith
"
/>
<pic
value=
"
http://abcd.com/pics/small/joe.smith.png
"
/>
</cid>
A child variable name at each level is formed by concatenating the XML
tag-
names of all the ancestors with a ‘.’. The variables and corresponding
(string) values defined in the above XML are therefore:
$cid =
1
$cid.org =
ABCD Publishing, Inc.
$cid.org.title =
VP, Sales
$cid.name =
Joe Smith
$cid.pic =
http://abcd.com/pics/small/joe.smith.png
Note that the
value
attributes in a var-tree are optional. Note also that giving the
root element a simple value “1” would make it easy to test in the <Scree
nItem> if
the $cid object is defined or not, as can be used for example in the following block:
<span display="$cid"
> … </span>
When it is required to have the value interpreted literally and not as a http URL to
fetch a var tree, use the value2 attribute instead of the value attribute.
<time>
Required: format
Optional: align, valign,
width, height, xpos,
ypos, size, font,
textcolor, shadow
Renders a time string of the current local time in the given format
<date>
Required: format
Optional: align, valign,
width, height, xpos,
ypos, size, font,
textcolor, shadow
Renders a date string of the current local date in the given format
Attributes in a <ScreenItem> XML
Attribute
Elements
Description
height
<ScreenItem>, <span>,
<text>, <img>
Height of the it
em’s bounding rectangle in pixels
height2
<ScreenItem>
The height of the item’s bounding rectangle in pixels, when the number of
items is greater than 1. If the value is not specified, the value of the
“height” attribute
is used for any number of items.
width
<span>, <text>, <img>
Width of the bounding rectangle in pixels
xpos
<span>, <text>, <img>
x-offset from the upper left corner of the parent bounding rectangle in
pixels
ypos
<span>, <text>, <img>
y-offset from the upper left corner of the parent bounding rectangle in