Hi, Daniele:
So does that mean you want to have this:
<th id="xxx">Hdr1</th>
generated by your XHTML tagset instead of a simple:
<th>Hdr1</th> ???
One way to insert an ID= string into your Markup Language output tags is to use the HTMLID= style attribute. However, the tagset that you're modifying or creating must have a DEFINE EVENT block for putting the HTMLID= value in the output file.
For example, the HTML3 destination automatically puts the HTMLID value into the HTML output file as an ID= option in order to link the ID= value to a style attribute or a Javascript action. (see the output from the code below. Note that you must view the HTML source in Notepad to see the ID= value.)
So if you were going to generate a custom tagset to get ID= into your output, you might look at the way PROC TABULATE syntax and PROC PRINT syntax inserts the HTMLID= value into this form of HTML output. Perhaps this will give you a way to decide how you're going to further change the event in your custom tagset template to get the ID= option that you want into your output file.
If you are planning to use JavaScript with your eventual XHTML output file, you might find this topic of interest:
http://support.sas.com/rnd/base/ods/templateFAQ/jscript.html (please note that this topic is discussing the insertion of JavaScript via the use of a STYLE template and not a TAGSET template.)
For more help and some examples of modifying a TAGSET template, refer to this site:
http://support.sas.com/documentation/cdl/en/odsug/59523/HTML/default/a002565723.htm
If you are dealing with Regulation 508 accessibility requirements, then this site might be helpful:
http://support.sas.com/kb/24/312.html
cynthia
[pre]
*** the code to test;
*** although this doesn't show ID= with XHTML, it does;
*** show how you specify HTMLID= and where each syntax change affects;
*** the HTML file. By examining this default HTML output you will get;
*** some idea of how/where you need to make changes in your XHTML;
*** tagset template to surface HTMLID= in your XHTML output file.;
ods html3 file='testid_ht3.html' style=sasweb;
proc tabulate data=sashelp.class
style={htmlid="ethel"};
title 'tabulate title';
class age / style={htmlid="xxx"};
classlev age /style={htmlid="ricky"};
var height / style={htmlid="yyy"};
table age all,
height*(mean n*f=3.)
/ style={htmlid="lucy"};
run;
proc print data=sashelp.class
style(table)={htmlid="lucy"}
style(obsheader)={htmlid="oh"}
style(obs)={htmlid="xxx"}
style(header)={htmlid="yyy"}
style(data)={htmlid="fred"};
title 'print title';
var name ;
var age height/
style(header)={htmlid="ricky"}
style(data)={htmlid="ethel"};
run;
ods _all_ close;
[/pre]