TEMPLATE Procedure: Creating Markup Language Tagsets |
PROC TEMPLATE features: |
DEFINE TAGSET statement:
|
DEFINE EVENT statement:
|
PUT statement |
|
PARENT=
attribute | | |
|
Other ODS features: |
ODS PATH statement |
ODS MARKUP statement |
|
This example defines a new tagset called TAGSETS.MYTAGS
that creates customized HTML output. The new tagset is created through inheritance.
Most of the required formatting is available in the tagset TAGSETS.CHTML,
which SAS supplies.
|
ods path sasuser.templat (update)
sashelp.tmplmst (read);
proc template;
define tagset tagsets.mytags /store=sasuser.templat;
parent=tagsets.chtml;
|
|
define event colspecs;
put 'These are my new colspecs' nl;
end;
define event table;
put '<p>' nl '<table>';
finish:
put '</table>';
end;
define event system_title;
end;
|
|
end;
run; |
|
ods tagsets.mytags body='custom-tagset-filename.html';
|
|
proc print data=sashelp.class;
run;
|
|
ods tagsets.mytags close; |
Generated Output: MYTAGS.CHTML (Viewed with Microsoft Internet Explorer)
|
ods markup type=tagsets.chtml body='default-tagset-filename.html';
proc print data=sashelp.class;
run;
ods markup close; |
A Display That Uses the Default CHTML Tagset (Viewed with Microsoft Internet Explorer)
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.