Content handler implementing a link process.

Starts in a mode where received input events are echoed to nexthandler. Once a link process name is associated via set_link_process_name(), link attributes are generated and either included in the output, or used to apply template entities/notations. A link process name must be associated prior to the first start_element event (it's an error to attempt to associate a link process once a content token has passed).

Templates implied as link attributes (either via #CONREF-entities or DAFE notation attributes), are emitted as data entity references (while passing incoming data entity references unchanged). A subsequent handler (such as Outputhandler) is expected to serialize entity references from template applications into output streams or render otherwise.

The Markupdefinitions instance is used for link automaton metadata, for looking up recorded markup declarations to be implied for templates, and for writing these into a temporary directory/file. The context Docinfo object records the temporary directory location for template processing sub-contexts to lookup implied DTDs and system-specific entities in (see Platformbaseentitymanager).

For explicit link processing, a separate output validation context is maintained for informing Linkhandler about accepted result tokens at a given state; this is used to decide admissability of #IMPLIED result elements.

Implements DocumentHandler, DTDHandler, LexicalHandler.

Constructor

new Linkhandler(sgmldecl, errorhandler, locator, markupdefinitions, docinfo, result_docinfo, parent_docinfo, entitydefinitions, nexthandler, resolver)

Parameters

Name Type Description
sgmldecl Sgmldecl
errorhandler Errorhandler
locator Locator
markupdefinitions Markupdefinitions
docinfo Docinfo
result_docinfo Docinfo
parent_docinfo Docinfo
entitydefinitions Entitydefinitions
nexthandler DocumentHandler
resolver SystemSpecificEntityResolver

Name Description
configure Configuration method.
materialize_current_link_set_declarations Materializes a link process markup declaration at the current state.
reset Resets internal state.
set_debug_emit_ctx_token Sets the string printed as part of debugEmit messages.
set_link_process_name Associates a link process name with this linkhandler.

Member Details

configure(args)

Configuration method.

Parameters

Name Type Description
args Object.<string, string>

Map of configuration properties

Materializes a link process markup declaration at the current state.

Re-generates markup declarations for the current linkset at the context position into effective_link_processing_declarations for pickup by downstream subcontext invocations.

reset()

Resets internal state.

set_debug_emit_ctx_token()

Sets the string printed as part of debugEmit messages.

Associates a link process name with this linkhandler.

The link process must be declared in document, and no content events must have been sent prior to setting the link process.

Parameters

Name Type Description
name string