swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  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 ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:24 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.