The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



Interface of SDL_HTMLSupport

const
{$IFDEF PAIDVERS}
  SDLVersionInfo = 'htmlsupport_r900_full';
  IsLightEd = false;
{$ELSE}
  SDLVersionInfo = 'htmlsupport_r900_lighted';
  IsLightEd = true;
{$ENDIF}
  Release = 900;

type
  TOnHTMLTagEvent = procedure (Sender: TObject; TagName: string; Params: string;
                            var Replacement: string) of object;

  THtmlProducer=
      class(TComponent)
      private
        FTemplate     : string;
        FOnHTMLTag    : TOnHtmlTagEvent;
        FSPos         : integer;
        FConvertedHTML: string;
        FStrStream    : TStringStream;
        procedure SetTemplate (value: string);
      public
        constructor Create (AOwner: TComponent); override;
        destructor  Destroy; override;
        function  Convert: string;
        property  ConvertedHTML: string read FConvertedHTML;
        function  ConvertedHTMLAsStream: TStream;
        procedure ReadTemplateFromFile (FName: string);
        procedure ReadTemplateFromStream (InStream: TStream);
        property  Template: string read FTemplate write SetTemplate;
        procedure WriteConvertedHTMLToFile (FName: string);
      published
        property OnHTMLTag: TOnHTMLTagEvent read FOnHTMLTag write FOnHTMLTag;
      end;

{procedures and functions}
  function AnsiToHTMLEntity
                 (cc : char)                             { character to encode }
                     : string;                     { corresponding HTML entity }
  function CountWordsHTML
           (InString : string;                         { string to be analyzed }
           NoNumbers : boolean;                    { TRUE: numbers not counted }
     var OpenHTMLTag : boolean){TRUE:the string ends with an unclosed HTML tag }
                     : integer;                         { word count of string }
  function ExtractHTTPPath
          (const URL : string)                                 { source string }
                     : string;                                   { path in URL }
  function HTMLEntityToAnsi
             (Entity : string)                         { HTML entity (Latin-1) }
                     : char;                         { corresponding character }
  function MakeStringHTMLCompatible
           (InString : string)                        { string to be converted }
                     : string;                        { HTML compatible string }
  function ResolveHTMLEntities
           (InString : string)                        { string to be converted }
                     : string;                 { string with entities resolved }






Last Update: 2007-Mai-15