swirl
Guide to OmniMark 9   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
 
Related Concepts
 
 

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

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:51:21 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.