Main Page   Modules   Namespace List   Data Structures   File List   Data Fields   Examples  

HTML Extension
[SGML Parser]


Defines

#define SGML_EXTENSION_HTML_PARAM_FLAG   0x00000001
#define SGML_EXTENSION_HTML_PARAM_SETKNOWNTAGS   0x00000002
#define SGML_EXTENSION_HTML_FLAG_STRIPELEMENT   (1 << 0)
#define SGML_EXTENSION_HTML_FLAG_STRIPTEXT   (1 << 1)
#define SGML_EXTENSION_HTML_FLAG_STRIPCOMMENT   (1 << 2)
#define SGML_EXTENSION_HTML_FLAG_IGNOREBLANKLINES   (1 << 3)
#define SGML_EXTENSION_HTML_FLAG_ESCAPEUNKNOWNTAGS   (1 << 4)

Functions

void sgmlExtensionHtmlSetParam (SGML_PARSER *parser, void *extensionContext, unsigned long param, void *value)
void sgmlExtensionHtmlGetParam (SGML_PARSER *parser, void *extensionContext, unsigned long param, void *value)
DOM_DOCUMENT * sgmlExtensionHtmlGetDocument (SGML_PARSER *parser)

Define Documentation

#define SGML_EXTENSION_HTML_FLAG_ESCAPEUNKNOWNTAGS   (1 << 4)
 

Used in conjunction with the parameter SGML_EXTENSION_HTML_PARAM_FLAG, this flag specifies that unknown tags are to be escaped.

#define SGML_EXTENSION_HTML_FLAG_IGNOREBLANKLINES   (1 << 3)
 

Used in conjunction with the parameter SGML_EXTENSION_HTML_PARAM_FLAG, this flag specifies that text nodes with only white spaces are to be ignored.

#define SGML_EXTENSION_HTML_FLAG_STRIPCOMMENT   (1 << 2)
 

Used in conjunction with the parameter SGML_EXTENSION_HTML_PARAM_FLAG, this flag specifies that comments are to be ignored during parsing.

#define SGML_EXTENSION_HTML_FLAG_STRIPELEMENT   (1 << 0)
 

Used in conjunction with the parameter SGML_EXTENSION_HTML_PARAM_FLAG, this flag specifies that elements are to be ignored during parsing.

#define SGML_EXTENSION_HTML_FLAG_STRIPTEXT   (1 << 1)
 

Used in conjunction with the parameter SGML_EXTENSION_HTML_PARAM_FLAG, this flag specifies that text nodes are to be ignored during parsing.

#define SGML_EXTENSION_HTML_PARAM_FLAG   0x00000001
 

HTML extension parameter that allows for the setting of flags. Flags can be any of the following:

  • SGML_EXTENSION_HTML_FLAG_STRIPELEMENT Ignores element nodes.
  • SGML_EXTENSION_HTML_FLAG_STRIPTEXT Ignores text nodes.
  • SGML_EXTENSION_HTML_FLAG_STRIPCOMMENT Ignores comment nodes.
  • SGML_EXTENSION_HTML_FLAG_IGNOREBLANKLINES Ignores text nodes that only have whitespace characters.
  • SGML_EXTENSION_HTML_FLAG_ESCAPEUNKNOWNTAGS Used in conjunction with the SGML_EXTENSION_HTML_PARAM_SETKNOWNTAGS parameter, this allows for escaping unknown element tags.

#define SGML_EXTENSION_HTML_PARAM_SETKNOWNTAGS   0x00000002
 

HTML extension parameter for setting 'known tags'. Known tags are tags that will not be escaped when the document is serialized.


Function Documentation

DOM_DOCUMENT* sgmlExtensionHtmlGetDocument SGML_PARSER *    parser
 

Get the 'root' document node that was parsed in by the parser.

Returns:
The document node.
Examples:
testhtml.c.

void sgmlExtensionHtmlGetParam SGML_PARSER *    parser,
void *    extensionContext,
unsigned long    param,
void *    value
 

Gets the value of a given parameter on the HTML extension. See sgmlExtensionHtmlGetParam for a list of parameters.

Parameters:
parser [in] The SGML parser instance.
extensionContext [in] The HTML extension context.
param [in] An arbitrary parameter identifier.
value [out] The value to set the parameter to.

void sgmlExtensionHtmlSetParam SGML_PARSER *    parser,
void *    extensionContext,
unsigned long    param,
void *    value
 

Sets an arbitrary parameter on the HTML extension.

param can be any one of the following:

  • SGML_EXTENSION_HTML_PARAM_FLAG This is used to set bit vector flags on the extension for use when parsing.
  • SGML_EXTENSION_HTML_PARAM_SETKNOWNTAGS This is used to set the tags which will be "known" by the parser as being valid and thus will not be escaped. This value is only used if the 'SGML_EXTENSION_HTML_FLAG_ESCAPEUNKNOWNTAGS flag is set. The value for this parameter should be an array of null terminated strings, ending with a NULL element.
Parameters:
parser [in] The SGML parser instance.
extensionContext [in] The HTML extension context.
param [in] An arbitrary parameter identifier.
value [in] The value to set the parameter to.


Generated on Tue Mar 25 19:49:04 2003 for libsgml by doxygen1.3-rc3