The SAS Output Delivery System and reporting techniques

problematic <A Name="IDX"> tag in ODS output

Posts: 43

problematic <A Name="IDX"> tag in ODS output

 I am trying to use Proc Report to create an HTML table with as less ballast as possible, with the intention to use it within another HTML page. By using the CHTML destination and the NO_TOP_MATTER and NO_BOTTOM_MATTER options I got close. 


But there still are <p> ... </p> tags around the table (not really a problem), and there is <a name="IDX"> tag in front of that. 


And this is causing problems. The page using this HTML gets confused because there is no </A> tag. It assumes there must be such a tag after the table, and that makes the whole table act as a link (without a href attribute).


I am not sure if having an <A> tag without a closing </A> is actually allowed in HTML. But I am sure that in HTML5 the name= attribute is not supported. Anchors should be created with an id= attribute on the object itself (in this case the table object.


Is this somethings others have had problems with? Any work arounds? 

Can you consider this a bug?

Super User
Super User
Posts: 8,798

Re: problematic <A Name="IDX"> tag in ODS output

Posted in reply to FrankPoppe

Should just be a matter of finding the tagset that is being used to create the output, and modifying that to remove the string you don't want.   Now in desktop SAS you could access tagsets via the Results window, right click on results and select templates, then navigate to it, the Excel base one starts like:

proc template;                                                                
   define tagset Tagsets.ExcelBase / store = SASUSER.TEMPLAT;                 
      mvar embedded_titles embedded_footers frozen_headers frozen_rowheaders  
         autofilter width_points width_fudge default_column_width formulas    
         convert_percentages orientation override_sheetname;                  
      define event changes;                                                   

Basically that defines everything which is written out using that tagsets, so you can just inherit and alter that.

Posts: 43

Re: problematic <A Name="IDX"> tag in ODS output

Thanks for the reaction.

Yes, I know that I can create a tagset that changes this behaviour. But it seemed to me that this should not be needed. That was the background of my question.


And having an own tagset for this makes the whole governance of the application more complex.

Posts: 9,108

Re: problematic <A Name="IDX"> tag in ODS output

Posted in reply to FrankPoppe
CHTML is one of the older HTML destinations. you could try some other HTML destinations to see if you can find one that supplies the missing </A> tag. Possibilities are PHTML, HTML3 and HTML5 and if you use style=minimal, you should come very close to CHTML.

Ask a Question
Discussion stats
  • 3 replies
  • 3 in conversation