external-entities-resolved

function

Library: Markup utilities (OMMARKUPUTILITIES)
Import : ommarkuputilities.xmd

Returns: the input markup stream with entity references resolved to their parsed values


Declaration
export markup source function
 external-entities-resolved value markup source origin
 via value entity-resolver resolver
 

Argument definitions

origin
the markup source containing the external text entity references to be resolved


Purpose

The markup source function external-entities-resolved resolves all external entity references it finds in origin and feeds their values to the markup parser. In place of the entity references, the function outputs the parsed content of the resolved external entities. If an entity cannot be resolved, this function will throw resolution-failure .

Example

This program uses external-entities-resolved to resolve all external entities, so it does not need external-text-entity rules any more.

 import "ommarkuputilities.xmd" unprefixed
 
 process
 do xml-parse document scan #main-input
 do markup-parse external-entities-resolved #content via new entity-resolver {}
 output "%c"
 done
 done
 

Related Topics
Other Library Functions

AltStyle によって変換されたページ (->オリジナル) /