Page last modified 11:14, 29 May 2018 by villes

.hasValue() Redirected from User Guides/myXML/5: OCL Rules/Available methods for OCL base types/.hasValue()

    Table of contents

    Description of the method

     

    Description: .hasValue() method checks if the element has a value.
    Available for: any
    Parameters: -
    Return type: boolean

     

    Example

    Context: HeaderType1
    OCL: self.Dt.hasValue()
    Description: The example rule checks if the element <Dt> has a value.

     

    The XML snippet below would pass this check.

    <Dt>2018-05-28</Dt>

    Again, the XML snippet below would pass this check.

    <Dt></Dt>

    However, if <Dt> has not been given at all, it would not pass this check.

    Menu