You can specify attributes
and parameters in ODS to override default values in Java and ActiveX.
No attributes or parameters are required. SAS provides workable defaults
in most cases.
Attributes
can be any HTML name/value pair that is valid inside the initial (opening)
OBJECT tag. Parameters are values that appear in the body of the OBJECT
tag, to configure the appearance or functionality of a Java applet
or the ActiveX control.
Attributes and parameters
are specified as options of one of the available ODS statements, such
as ODS HTML:
ODS HTML
<ATTRIBUTES=("attr-name"="attr-value")>
<PARAMETERS=("param-name"="param-value")>
<other-options>;
The preceding syntax
applies to all applicable ODS statements, such as HTML, MARKUP, PDF,
PS, and RTF.
You can specify more
than one name/value pair (separated by blank spaces) inside the parenthesis
of an ATTRIBUTES= or PARAMETERS= option. You can also specify multiple
ATTRIBUTES= and PARAMETERS= options in a single ODS statement. These
options can be specified in any order in the ODS statement.
You can remove a parameter
tag by specifying a $ for its value, or by setting it to None using
the menu of the applet or control. This removes the data and axis
label that would otherwise be included in the graph.
You can also append
,n
to tags that reference variables whose values are
URLs. Normally, the substitution string is URL-encoded for browsers
that do not support embedded white space in URL strings. Use
,n
to prevent this encoding.
No intervening white
space should be added between the primary tag and the appended
,f
or
,n
characters.
Note: Using
,n
is not the same as using the applet parameter PATTERNSTRIP. The
PATTERNSTRIP parameter removes blank spaces from data values before
those values are applied to substitution strings.
Most of the examples
in the following topics specify parameters:
For information about
other ODS statement options, see the
SAS Output Delivery System: User's Guide.
In HTML output that
runs an applet or a control, all values of the ATTRIBUTES= option
appear in the opening OBJECT tag. For example, a
SAS/GRAPH program can specify the WIDTH attribute
as follows:
ods html file="C:\sashtml\piechart.htm"
attributes=("width"="720");
In
the HTML output file, the WIDTH attribute appears inside the beginning
OBJECT tag as shown in the following:
<script language="javascript" type="text/javascript">
<!--
document.writeln("<OBJECT");
document.writeln('style=" width: 720px; height: 480px;
background-color: #4E5056; border-width: 0px;"');
document.writeln("ALIGN=\"baseline\" class=\"Graph\"");
.
.
.
//-->
</script>
Valid attribute names
are those that are enabled for the OBJECT tag in HTML. Valid attributes
must also be specified as required by JAVA or ACTIVEX device drivers
that run in the operating environment.
All of the name/value
pairs that are specified in the ODS statement option PARAMETERS= appear
in the body of the OBJECT tag. For example, a SAS program can disable
the data tips and set the background color for a graph as follows:
ods html file="test.html" parameters=("tips"="none"
"backdropcolor"="CXff0000");