Sample
;
; Copyright, (C) 1998 by OmniMark Technologies Corporation
; All Rights Reserved
;
; socatex1.xom -- parse a document using input specified in SGML Open Catalog
;
; Description:
;
; Omnimark checks structure of input document and reports any errors.
;
; Run this program with one of the commands:
;
; omnimark -d socat yourcatalog -s socatex1.xom
process ; SGML input
include "socatete.xin"
;Input function for sgml-parse
; output sends the data directly to the SGML parser.
; If you want to apply find rules to the text, you would use submit
; instead of output.
define function get-document(value stream file-name)
as
do
local stream decl
set decl to socat-resolve-sgmldecl()
do when file-name != "" and file file-name exists
do when decl != "" and file decl exists
output file decl
done
else
put #error "No file: " || file-name || "%n"
done
output file file-name
done
process-start
do sgml-parse document
scan input get-document(socat-resolve-document())
suppress
done
halt
element #IMPLIED ; For all elements (in the DTD)
suppress ; Do nothing
Generated: April 21, 1999 at 2:01:45 pm
If you have any comments about this section of the documentation, send email to [email protected]
Copyright © OmniMark Technologies Corporation, 1988-1999.