swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Topics   Other Library Functions  
function  

split-external-text-entities

 
 

Library: Markup utilities (OMMARKUPUTILITIES)
Import: ommarkuputilities.xmd
Return type: markup sink

Returns: a markup sink to be split


Declaration

export markup sink function
   split-external-text-entities (value markup sink entity-markup,
                                 value markup sink other-markup)
    


Purpose

Use split-external-text-entities to split a markup stream in two, one containing only external text entity references and the other everything else.

Example

In this example we parse an SGML file and split the resulting #content markup stream using split-external-text-entities. The external text entity markup events are sent to markup sink function resolve-entities and the remaining markup to function process-markup.

  import "ommarkuputilities.xmd" unprefixed
  
  define markup sink function
     resolve-entities
  as
     using group "resolve entities"
     do markup-parse #current-input
        output "%c"
     done
  
  define markup sink function
     process-markup
  as
     using group "process markup"
        using output as file "output.txt"
        do markup-parse #current-input
           output "%c"
        done
  
  process
     do sgml-parse document scan file "input.sgml"
        using output as split-external-text-entities (resolve-entities, process-markup)
           output #content
     done
  
  group "resolve entities"
  external-text-entity #implied
     output file "%eq"
  
  group "process markup"
  element #implied
     output "%c"
            

    Related Topics
 
Other Library Functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.