Understanding and Using Tagsets for the XML Engine

SAS Tagsets

SAS provides tagset definitions for a variety of markup language output. SAS supplies several tagsets for XML output. That is, when you specify the format type with XMLTYPE=, the XML engine uses a specific tagset for the XML output. For example, XMLTYPE=GENERIC uses Tagsets.Sasxmog.

You can override the default tagset that is used for a format type by using the TAGSET= option and specifying a tagset. There are several SAS tagsets that are associated with the XML engine. Currently, the tagset names that begin with SAS are associated with the XML engine:

Tagsets.Sasxmacc2002

supports the Microsoft Access 2002 database.

Tagsets.Sasxmacc2003

supports the Microsoft Access 2003 database.

Tagsets.Sasxmiss

produces an empty element start tag and end tag for a missing value.

Tagsets.Sasxmnmis

does not generate element tags for a missing value. That is, if a variable contains a missing value, the XML engine does not generate an element occurrence.

Tagsets.Sasxmnsp

does not pad PCDATA with blanks. For an example, see Using a SAS Tagset to Remove White Spaces in Output XML Markup.

Tagsets.Sasxmog

produces XML markup that is similar to the Oracle8iXML implementation used by Oracle but is more generic. This is the tagset used by the GENERIC format type.

Tagsets.Sasxmoh

produces very simple HTML markup. This is the tagset used by the HTML format type.

Tagsets.Sasxmor

produces XML markup that is equivalent to the Oracle8iXML implementation, which is used by Oracle. This is the tagset used by the ORACLE format type.

Tagsets.sasFMT

produces XML markup for FORMAT and INFORMAT metadata generation.

Tagsets.sasxmdtd

for export only, produces an embedded DTD (Document Type Definition) in the body of the data markup. Note that DTDs are obsolete and XML Schema will be the only fully supported form in future releases.

Tagsets.sasxmxsd

for exporting only, produces an embedded XSD (W3C XML Schema) in the body of the data markup.

To get a current list of tagsets, issue the following SAS statements:

proc template;
   list tagsets;

To view the definition for a tagset, issue the following SAS statements:

proc template;
   source tagset-name;

CAUTION:
Use the XML engine tagsets outside of the engine with caution.

Even though you can specify the tagsets that are associated with the XML engine for ODS output, those tagsets were designed specifically for the XML engine. The results of specifying them for ODS MARKUP output might not be suitable.   [cautionend]

space
Previous Page | Next Page | Top of Page