Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-1640

Regex in asserts fails to validate.

    XMLWordPrintableJSON

Details

    Description

      I am quite certain this worked in a previous version.

      cvc-assertion: Assertion evaluation ('matches(DvString-dv, '[0-9]

      {3}-[0-9]{3}

      -[0-9]

      {4}

      ')') for element 'ccd:el-06bf2593-dd8a-4681-a6e5-0470134e632b' on schema type 'ct-06bf2593-dd8a-4681-a6e5-0470134e632b' did not succeed.
      Severity
      Error

      The above assert doesn't validate this string:
      <DvString-dv>111-111-1111</DvString-dv>

      SaxonEE does validate it. These are both the shipped validators with oXygen 16.0

      Interestingly this assert:
      <xs:assert test="matches(DvString-dv, '^\d

      {5}

      ([\-]?\d

      {3}

      )$')"/>

      does validate this string:
      <DvString-dv>99999-000</DvString-dv>

      There are other examples of these asserts here:
      https://github.com/mlhim/tb

      Attachments

        Activity

          People

            mukul_gandhi Mukul Gandhi
            twcook Timothy Cook
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: