BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi there,

I'm a little confused as to the proper file type (extension) to use when using the FRAME= option in combination with non-HTML tagsets like CSV and XML. For example:

ODS destination: Markup
Markup tagset: tagset = CSV
FRAME= option: frame = myframe.htm? or myframe.csv?
CONTENTS= option: contents = mycontents.htm? or mycontents.csv?
PAGE= option: page = mypage.htm? or page = mypage.csv?

ODS destination: Markup
Markup tagset: tagset = XML
FRAME= option: frame = myframe.htm? or myframe.xml?
CONTENTS= option: contents = mycontents.htm? or mycontents.xml?
PAGE= option: page = mypage.htm? or page = mypage.xml?

I thought the frame= option always implies an HTML output. However, the documentation says the output could be an XML file containing a DTD (Document Type Definition)! Since setting the FRAME= option also requires setting the CONTENTS= option, the PAGE= option, or both, does it mean SAS is generating a "contents.xml" file for the contents and "page.xml" for the page output?

Thanks for your clarification.

Regards, Audi
4 REPLIES 4
deleted_user
Not applicable
One correction -- using a FRAME= option for an XML tagset generates a DTD (*.dtd) output, not a *.xml file as I incorrectly stated.

I saw a SAS sample for a FRAME= option and yet didn't use the CONTENTS= option and/or the PAGE= option -- contrary to what the documentation says.

Sample:
http://support.sas.com/onlinedoc/913/getDoc/en/odsug.hlp/a002217090.htm#a002588764

Documentation:
"If you specify the FRAME= option, then you must also specify the CONTENTS= option, the PAGE= option, or both."

http://support.sas.com/onlinedoc/913/getDoc/en/odsug.hlp/a002217090.htm#a003076973

Still confused.

Audi
deleted_user
Not applicable
I think this whole ODS "architecture" is pretty messed up. For one thing, that FRAME= option can't be all for the various tagsets under the MARKUP destination! For another, to use it to refer to a DTD file for an XML tagset is simply ridiculous.

If I may suggest, use the FRAME= option exclusively for HTML output. Use another option name for a DTD output.

Regards, Audi
Cynthia_sas
SAS Super FREQ
Audi:
I understand your frustration, but if you consider that the FRAME= file adds or imposes structure on the HTML frame navigation pages, then it makes sense -- to me at least -- that FRAME= with XML output creates a DTD -- which is one way of imposing or defining the structure (allowed tags) for an XML file.

To extrapolate further. There is no additional structure that can be added to a CSV file by a FRAME= file. In fact, if you do this: [pre]
ods csv file='main.csv'
contents='some_c.csv'
frame='some_f.csv';
[/pre]
Then MAIN.CSV has the csv output and SOME_C.CSV and SOME_F.CSV are created, but they are empty files.

FRAME= was originally introduced in SAS 7 for creating the standard set of files needed for HTML frame navigation. When XML came down the road, FRAME= got reused as a valid option for XML markup.

If you use similar code for LaTeX markup, then [pre]
ods latex file='lmain.txt'
contents='lsome_c.txt'
frame='lsome_f.txt';
[/pre]
Then LMAIN.TXT has LaTeX output and LSOME_C.TXT has LaTeX output for contents, but LSOME_F.TXT is empty -- which means that there is no further structure that can be supplied by ODS MARKUP for the LaTeX set of output.

Just a few other thoughts on the subject,
cynthia
deleted_user
Not applicable
Hi Cynthia,

Many thanks for the clarification! Now I can see things much clearer.

SAS needs to fix the documentation for the FRAME= option ASAP, especially on the RESTRICTION portion which states that if you use the FRAME= option, you also need to set the CONTENTS= option, the PAGE= option, or both. Specifying this restriction only to generate blank documents for them doesn't make sense.

A FRAME implies a "structure" while a DTD "defines a structure" -- two different animals. The latter is a tool you use to validate XML documents. From my point of view as a user, SAS' decision to "reuse" the FRAME= option for its XML tagset is a poor architectural judgement.

Thanks for your very informative response -- you're the best!

Regards, Audi

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 907 views
  • 0 likes
  • 2 in conversation