sgml.writer

function

Library: SGML serializer (OMSGMLWRITE)
Import : omsgmlwrite.xmd

Returns:


Declaration
export markup sink function
   writer      utf-8 value switch      utf-8-characters optional initial { false }
          into       value string sink destination
      

Argument definitions

destination
the string sink where the SGML representation of the input markup is written
utf-8-characters
indicates if the non-ASCII characters should be encoded as UTF-8 or as numerical character references


Purpose

The markup sink function sgml.writer converts its input markup stream into SGML, and writes that SGML into its destination argument. The following example demontrates how the function can be used to write an SGML file.

  import "omsgmlwrite.xmd" prefixed by sgml.
  
  process
     do sgml-parse document scan #main-input
        using output as sgml.writer into file "output.sgml"
           output #content
     done

Other Library Functions