oasis.catalog-type

data type

Library: OASIS catalogs (OMOASISCATALOGS)
Import : omoasiscatalogs.xmd


Purpose

The oasis.catalog-type is an extension of entity-resolver.

An instance of this type can be obtained from function oasis.compile-catalog-resource, which compiles an OASIS catalog file. This instance can then be used to resolve external text entities in the same way the standard entity-resolver instance would be used.

If entity resolution fails, resolution-failure will be thrown.

Using an OASIS catalog

The following example compiles an OASIS catalog from file catalog.xml and uses it to resolve all external entity references present in the main XML input to the program.

  import "omoasiscatalogs.xmd" prefixed by oasis.
  
  process
     local oasis.catalog-type catalog
  
     set catalog to oasis.compile-catalog-resource "catalog.xml"
     do xml-parse document scan #main-input
        do markup-parse oasis.external-entities-resolved #content via catalog
           output "%c"
        done
     done