swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax    
operator  

last content is

 
 

Return type: Switch
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 ] [ 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.