swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
  Related Syntax    
operator   last content is    

Return type: Boolean
Returns:       

True if the last content of the element was one of the specified elements or #DATA, and false otherwise. Replacing is with isnt will reverse the results.



Syntax
  last proper? content element-qualifier (is | isnt)
     (#DATA | element-name | content-identifier-list)


Purpose

An element test that returns "true" in two cases:

The test returns "false" otherwise. Replacing is with isnt will reverse these results.

When the keyword proper is specified, the last content is test ignores included elements. If all the subelements of the referenced element have been included elements, and if there was no data content in the element, the test fails.

Note that at the start of an element rule, there is no last content of that element, so any test for it will fail.

The test last content is #data is true in a data-content rule only if the data content is immediately preceded by either an external data entity reference or one or more processing instructions, which are in turn preceded either by data content or by an external data entity reference. It never applies to the content processed by the data-content rule.

The following is an example of a data-content rule that uses the last content is test:

  data-content
     output "%c"
     output " (again) " when last content is #data

    Related Syntax
   data-content
   element
 
 
----  

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

Generated: August 11, 2000 at 3:07:27 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com

Copyright © OmniMark Technologies Corporation, 1988-2000.