The SAS Output Delivery System and reporting techniques

ODS Markup destination and Frame= option

Reply
N/A
Posts: 0

ODS Markup destination and Frame= option

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
N/A
Posts: 0

Re: ODS Markup destination and Frame= option

Posted in reply to deleted_user
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
N/A
Posts: 0

Re: ODS Markup destination and Frame= option

Posted in reply to deleted_user
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
SAS Super FREQ
Posts: 8,861

Re: ODS Markup destination and Frame= option

Posted in reply to deleted_user
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
N/A
Posts: 0

Re: ODS Markup destination and Frame= option

Posted in reply to deleted_user
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
Ask a Question
Discussion stats
  • 4 replies
  • 178 views
  • 0 likes
  • 2 in conversation