Previous Page | Next Page

TEMPLATE Procedure: Creating Markup Language Tagsets

Example 1: Creating a Tagset through Inheritance


PROC TEMPLATE features:

DEFINE TAGSET statement:

DEFINE EVENT statement:

PUT statement

PARENT= attribute

Other ODS features:

ODS PATH statement

ODS MARKUP statement



Program Description

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.


Program

 Note about code
ods path sasuser.templat (update)
   sashelp.tmplmst (read);

proc template;
   define tagset tagsets.mytags /store=sasuser.templat;
      parent=tagsets.chtml;

         
 Note about code
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;
      
 Note about code
end;
run;

 Note about code
ods tagsets.mytags body='custom-tagset-filename.html';

   
 Note about code
proc print data=sashelp.class;
   run;

   
 Note about code
ods tagsets.mytags close;

Generated Output: MYTAGS.CHTML (Viewed with Microsoft Internet Explorer)

 Note about figure

[Generated Output: MYTAGS.CHTML (Viewed with Microsoft Internet Explorer)]

 Note about code
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)

 Note about figure

[A Display That Uses the Default CHTML Tagset (Viewed with Microsoft Internet Explorer)]

Previous Page | Next Page | Top of Page