create-processing-instruction-event

operator

Return type:
markup-point-event
Returns:
A markup-point-event representing a processing instruction with the given string.
Syntax
create-processing-instruction-event string
    


Purpose

The operator create-processing-instruction-event is used to create a new processing instruction event that contains the given argument string.

The operator always succeeds; it does not attempt to enforce the processing instruction to conform to XML or SGML. The string argument does not need to begin with the <? delimiter. It should contain the actual processing instruction value only. For example, the output of the following program will be <?my processing instruction?>, because xml.writer adds the required XML delimiters:

  import "omxmlwrite.xmd" prefixed by xml.
  
  process
     using output as xml.writer into #main-output
        signal throw #markup-point create-processing-instruction-event "my processing instruction"
          

The returned markup-point-event is not contained in any element nor associated with any other context. To add the missing context, process the generated stream of events through a do markup-parse.