Page last modified 13:39, 7 Aug 2015 by juhako


    Table of contents

    Description of the method


    Description: trim method returns a copy of the string for which the method is executed with leading and trailing white space removed.
    Available for: string
    Parameters:  -
    Return type: string



    Context: HeaderType1
    OCL: self.Id.trim() = "IdContent"
    Description: The example rule executes trim to the <Id> element and compares the result to a string "IdContent".


    The XML snippet below would pass this check. The example has some leading and trailing white space which gets removed and after that a string "IdContent" is left.

    <Id>   IdContent   </Id>

    The other snippet below however would not pass this check. The whitespace inside a string is left untouched.

    <Id>Id Content</Id>


    Attached you can find example schema and files which you can use for testing.