swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax   Related Concepts  
built-in entity  

#schema

 
 

Syntax

external-text-entity #schema
OR
(when | unless) entity is #schema


Purpose

You can use #schema to retrieve a schema for an XML document or to test if an external text entity represents an XML Schema.

To retrieve an XML schema that is referenced by an XML document, you can use #schema as an argument to an external-text-entity rule:

  external-text-entity #schema 
     output file "%eq"

The code above will retrieve the URI of the schema (as "%eq") and attempt to open a file with that name. The contents of the file is then sent to the parser. (The parser is the default output scope in an external-text-entity rule.) If the URI is not a local file name, then you must take the approriate steps to interpret the URI and locate the schema.

To test if an external text entity is a schema, you can use the entity-is-schema test:

  external-text-entity #implied
     do when entity is #schema
      output file "%eq"
    else
      ...
    done
  
   

    Related Syntax
   external-text-entity
   #charset
   #document
   #dtd
   #syntax
 
Related Concepts
   Entities, external
   Integer data type
 
 

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

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:33:48 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.