contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
operator   content is    
Sample Code   Related Syntax    

Summary   Boolean

True if the content is of the specified type; false otherwise. Using isnt rather than is will reverse the results

 

Syntax

  content element-qualifier* (is | isnt) (content-type | content-type-list)


Purpose

Tests an element's declared content type or content model type. It can also be used to determine if an element has a conref attribute, in which case the element is effectively EMPTY, no matter what its declared type is.

The content type can be:

A content-type-list is a list of content types separated by or or "|", or by and or "&".

If element qualifiers are specified, the test applies to the qualified element. Otherwise, the current element is tested.

The following down-translate program illustrates how content is tests can be used to provide an analysis of every element in a document:

  down-translate

  element #implied
     output "%n<%q>: "
     do when content is element
       output "element"
     else when content is any
       output "any"
     else when content is mixed
       output "mixed"
     else when content is cdata
       output  "cdata"
     else when content is rcdata
       output "rcdata"
     else when content is empty
       output "empty"
     done
     output " (conref)" when content is conref
     output "%n"

     ; Finally, process the content:
     output "%c"

Sample Code  
   Shelves: using the attributes shelf for normalization
 
Related Syntax
   any
   cdata
   is conref
   element
 
 
----  

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:01:02 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.