Uploaded image for project: 'Configuration Persistence Service'
  1. Configuration Persistence Service
  2. CPS-1273

Add >,< operaters to CPS Path

XMLWordPrintable

      To bring support for <,>,>=,<= operators to CPS Path:

      //categories[@code=2]/book[@price>260] Select price nodes with price>260
      //categories[@code=2]/book[@price<300] selects price nodes with price<300
      //books[@price<10 or @lang="German"]{} selects price nodes with price <10 or lang=german
      //books[@price>15 and @lang="english"]{} selects price nodes with price >15 and lang=english

      Error Scenarios:

      If the leaf type queried is not a numerical value, then an error should be thrown.
      "This operation is not supported on leaf types which are not numerical values"

      A/C:

      The >,< operations are implemented in CPS Path conforming to the implementation which is used in xpath 2.0.
      Demo
      CPS Path documentation updates

       

      NOTE: We can add limit to above examples as a query parameter

            anupriya63 Rudrangi Anupriya
            anupriya63 Rudrangi Anupriya
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: