TEMPLATE Procedure: Managing Template Stores

Example 3: Viewing the Source of a Template

Features:

PATH statement

SOURCE statement

Details

This example displays the source code for the Xhtml tagset that SAS provides.

Program

proc template;
path sashelp.tmplmst;
source Tagsets.Xhtml;
run;

Program Description

Specify which locations to search for items that were created by PROC TEMPLATE. The PATH statement specifies to search for items that were created by PROC TEMPLATE in the Sashelp.Tmplmst item store.
proc template;
path sashelp.tmplmst;
Write the source code of the specified item. The SOURCE statement writes the source code for the tagset Xhtml that SAS provides. The source code is written to the SAS log.
source Tagsets.Xhtml;
run;

Source Code of the Template Tagset.Xhtml That Is Written to the SAS Log


  proc template;
 path sashelp.tmplmst;

    source Tagsets.Xhtml;
define tagset Tagsets.Xhtml;
   notes "XHTML 1.0";

   define event doc;
      start:
         set $empty_tag_suffix " /";
         set $doctype
               "";
         set $framedoctype
               "";
         put $doctype NL;
         put "" NL;

      finish:
         put "" NL;
   end;
   split = "";
   parent = tagsets.html4;
end;
NOTE: Path 'Tagsets.Xhtml' is in: SASHELP.TMPLMST.
  run;
NOTE: PROCEDURE TEMPLATE used (Total process time):
      real time           2.17 seconds
      cpu time            0.17 seconds