![]() |
ScroogeXHTML for Delphi
7.1
|
The base class for ScroogeXHTML. More...
Public Member Functions | |
TSxBase () | |
Create a new TSxBase instance. | |
TSxBase (TComponent AOwner) | |
Create a new TSxBase instance. | |
~TSxBase () | |
Destroy TSxBase instance. | |
VerifySettings () | |
Checks properties for invalid settings. More... | |
string | GetCloseEmptyElement () |
returns ' />' or '>' depending on DOCTYPE | |
string | GetEmptyParagraph () |
returns an empty paragraph | |
string | GetParOpen () |
returns the opening tag for a paragraph without ">" | |
string | GetOrderedListTag () |
get the opening tag for an ordered list | |
string | GetUnorderedListTag () |
get the opening tag for an unordered list | |
string | GetElementClassParam (const string ElementName) |
returns the class parameter for the given element | |
string | GetElementStyleParam (const string ElementName) |
returns the style="..." parameter for the given element | |
string | GetElementStyle (const string ElementName) |
returns the CSS style for the given element | |
string | GetLineBreakTag () |
returns the line break element | |
Log (const TLogLevel ALogLevel, const string ALogText) | |
call the log event handler and pass the log level and message | |
ReplaceFont (string &FontName) | |
replace a font name | |
ReplaceHyperlink (const ISimpleDomTextNode TextElement) | |
replace a hyperlink | |
string | TextElementToXHTML (const ISimpleDomTextNode TextElement) |
convert a text element to HTML / XHTML. More... | |
Public Attributes | |
TSxBase public properties | |
These properties are not visible in the Object Inspector, except OptionsHead and OptionsOptimize. | |
Boolean | AbortConversion |
set this property to True to abort the conversion More... | |
ISxFormatter | Formatter |
The formatter. More... | |
IPictureAdapter | PictureAdapter |
The picture adapter. More... | |
Boolean | RtfEnd |
True -> end of document or conversion aborted. More... | |
ISxTranslator | Translator |
The HTML / XHTML Translator. More... | |
TSxBase published properties | |
These properties are visible in the Object Inspector. | |
Boolean | ConvertAnchors |
Activates support for anchor conversion. More... | |
Boolean | ConvertEmptyParagraphs |
Set this property to True to replace empty paragraphs (where the opening <p> tag is followed by the closing </p> tag) by a line break tag (<br />). More... | |
Boolean | ConvertFields |
Activates support for field conversion. More... | |
Boolean | ConvertHyperlinks |
Set this property to True to activate hyperlink support. More... | |
Boolean | ConvertIndent |
Set this property to True if You want to activate support for left and right paragraph indent. More... | |
Boolean | ConvertLanguage |
Activates support for language conversion. More... | |
Boolean | ConvertPictures |
Activates support for picture conversion. More... | |
Boolean | ConvertSpaces |
If two or more spaces are found in sequence, they will be converted to . More... | |
Boolean | ConvertToPlainText |
Convert to plain text. More... | |
Boolean | ConvertUsingPrettyIndents |
ScroogeXHTML generates output documents with 'pretty printed' formatting by default. More... | |
string | DefaultLanguage |
Use this property to set the default language of the document. More... | |
TDocumentType | DocumentType |
The document type. More... | |
TStrings | ElementClasses |
A list of name-value pairs which defines the class="..." parameter for the elements 'p', 'br', 'ol', 'ul' and 'li'. More... | |
TStrings | ElementStyles |
A list of name-value pairs which defines the style="..." parameter for the elements 'p', 'br', 'ol', 'ul' and 'li'. More... | |
TFontConversionOptions | FontConversionOptions |
Set these options to control which character properties are converted. More... | |
TFontSizeScale | FontSizeScale |
Use this option to set the font size scale. More... | |
TStrings | HyperlinkList |
In this list of name value pairs, the visible link text for all known target addresses is associated with an URL. More... | |
THyperlinkOptions | HyperlinkOptions |
This property controls additional options for the hyperlink conversion. More... | |
Boolean | IncludeDocType |
Include DOCTYPE at the beginning of the document. More... | |
Boolean | IncludeXMLDeclaration |
Includes the XML declaration line at the beginning of the document. More... | |
TLogLevel | LogLevel |
This property can be used to control the detail level of the logging procedure. More... | |
TStrings | ReplaceFonts |
Font names which will be replaced. More... | |
string | TabString |
the HTML representation of a TAB charcter More... | |
string | Version |
the ScroogeXHTML version More... | |
TSxOptionsHead | OptionsHead |
TSxOptionsOptimize | OptionsOptimize |
TSxBase events | |
TNotifyEvent | OnAfterConvert |
This event handler will be called after the conversion. More... | |
TEncodingEvent | OnAfterEncode |
Event handler which will be called after the encoding. More... | |
TNotifyEvent | OnBeforeConvert |
Event handler which will be called before the conversion. More... | |
TEncodingEvent | OnBeforeEncode |
Event handler which will be called before the encoding. More... | |
THyperlinkEvent | OnHyperlink |
This event handler will be called if a hyperlink is detected. More... | |
TLogEvent | OnLog |
Event handler for log messages. More... | |
TProgressEvent | OnProgress |
This event is called periodically during the conversion. More... | |
TReplaceFontEvent | OnReplaceFont |
This event handler can be used to define a font substition. More... | |
The base class for ScroogeXHTML.
string TSxBase::TextElementToXHTML | ( | const ISimpleDomTextNode | TextElement | ) |
convert a text element to HTML / XHTML.
This function receives a block of text and its attributes, packaged in a ISimpleDomTextNode object. It will then
TSxBase::VerifySettings | ( | ) |
Checks properties for invalid settings.
Will throw an Exception to indicate bad values.
Boolean TSxBase::AbortConversion |
set this property to True to abort the conversion
Boolean TSxBase::ConvertAnchors |
Activates support for anchor conversion.
Boolean TSxBase::ConvertEmptyParagraphs |
Set this property to True to replace empty paragraphs (where the opening <p> tag is followed by the closing </p> tag) by a line break tag (<br />).
Default: false
Boolean TSxBase::ConvertFields |
Activates support for field conversion.
Boolean TSxBase::ConvertHyperlinks |
Set this property to True to activate hyperlink support.
Default: false
Boolean TSxBase::ConvertIndent |
Set this property to True if You want to activate support for left and right paragraph indent.
Default: false
Boolean TSxBase::ConvertLanguage |
Activates support for language conversion.
Boolean TSxBase::ConvertPictures |
Activates support for picture conversion.
Boolean TSxBase::ConvertSpaces |
If two or more spaces are found in sequence, they will be converted to .
Boolean TSxBase::ConvertToPlainText |
Convert to plain text.
Boolean TSxBase::ConvertUsingPrettyIndents |
ScroogeXHTML generates output documents with 'pretty printed' formatting by default.
Some web browsers however have problems with line breaks between html tags, which cause rendering errors. To provide support for more web browsers, the ConvertUsingPrettyIndents property should be set to false. Default: True for backward compatibility
string TSxBase::DefaultLanguage |
Use this property to set the default language of the document.
TDocumentType TSxBase::DocumentType |
The document type.
For the selected document type, the component will instantiate an object which implements the ISxTranslator interface and assign it to the public Translator property.
TStrings TSxBase::ElementClasses |
A list of name-value pairs which defines the class="..." parameter for the elements 'p', 'br', 'ol', 'ul' and 'li'.
TStrings TSxBase::ElementStyles |
A list of name-value pairs which defines the style="..." parameter for the elements 'p', 'br', 'ol', 'ul' and 'li'.
TFontConversionOptions TSxBase::FontConversionOptions |
Set these options to control which character properties are converted.
TFontSizeScale TSxBase::FontSizeScale |
Use this option to set the font size scale.
The following units are supported:
TSxBase::Formatter |
The formatter.
TStrings TSxBase::HyperlinkList |
In this list of name value pairs, the visible link text for all known target addresses is associated with an URL.
THyperlinkOptions TSxBase::HyperlinkOptions |
This property controls additional options for the hyperlink conversion.
Boolean TSxBase::IncludeDocType |
Include DOCTYPE at the beginning of the document.
Default: True.
Boolean TSxBase::IncludeXMLDeclaration |
Includes the XML declaration line at the beginning of the document.
Default: False
* <?xml version="1.0"?>
TLogLevel TSxBase::LogLevel |
This property can be used to control the detail level of the logging procedure.
Default: logInfo
TNotifyEvent TSxBase::OnAfterConvert |
This event handler will be called after the conversion.
TEncodingEvent TSxBase::OnAfterEncode |
Event handler which will be called after the encoding.
TNotifyEvent TSxBase::OnBeforeConvert |
Event handler which will be called before the conversion.
TEncodingEvent TSxBase::OnBeforeEncode |
Event handler which will be called before the encoding.
THyperlinkEvent TSxBase::OnHyperlink |
This event handler will be called if a hyperlink is detected.
It can be used to modify the hyperlink text.
TLogEvent TSxBase::OnLog |
Event handler for log messages.
TProgressEvent TSxBase::OnProgress |
This event is called periodically during the conversion.
It can be used to display the conversion progress.
TReplaceFontEvent TSxBase::OnReplaceFont |
This event handler can be used to define a font substition.
TSxOptionsHead TSxBase::OptionsHead |
TSxOptionsOptimize TSxBase::OptionsOptimize |
IPictureAdapter TSxBase::PictureAdapter |
The picture adapter.
TSxBase::ReplaceFonts |
Font names which will be replaced.
Boolean TSxBase::RtfEnd |
True -> end of document or conversion aborted.
string TSxBase::TabString |
the HTML representation of a TAB charcter
ISxTranslator TSxBase::Translator |
The HTML / XHTML Translator.
string TSxBase::Version |
the ScroogeXHTML version