Page last modified 14:38, 28 May 2018 by villes

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

    Table of contents

    Description of the method

     

    Description: .toString() method converts the given value to a string format.
    Available for: any
    Parameters: -
    Return type: string

     

    Example

    Context: HeaderType1
    OCL: self.Dt.toString() = '2018-05-28'
    Description: The example rule checks if the date of <Dt> matches the string '2018-05-28', when converted to a string.

     

    The XML snippet below would pass this check.

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

    The other snippet below however would not pass this check.

    <Dt>2017-04-27</Dt>

    Menu