data type
Library: Markup utilities (OMMARKUPUTILITIES)
Import : ommarkuputilities.xmd |
export record parsed-entity-stack field string entity-paths variable initial { "." }
An instance of the parsed-entity-stack
record type, if passed to the
external-entity-resolver
function, will contain the URI paths of entities that are being parsed.
The following example shows how to use this type in error reporting:
import "ommarkuputilities.xmd" unprefixed global parsed-entity-stack entity-stack define markup sink function processor as do markup-parse #current-input put #main-output "%c%n" done process do xml-parse document scan #main-input using output as split-external-text-entities (external-entity-resolver via static-resolver stack entity-stack, processor) output #content done element #implied output "%c" markup-error log using output as #log repeat over reversed entity-stack:entity-paths as path output "in file %g(path)%n" again