Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-2040

space before & does not collapse

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.7.0, 2.8.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Windows, AIX

      Description

      I have an XSD with typed definition as:
      <xs:simpleType name="CustomText">
      <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="100"/>
      <xs:whiteSpace value="collapse"/>
      <xs:pattern value="\S+.*"/>
      </xs:restriction>
      </xs:simpleType>

      I have an XML with the following tag:
      <FreeText> &</FreeText>
      Note there is a space before &
      FreeText is of type CustomText.
      The parser should remove the initial space and leave only & but instead I get the following error:
      Message: Datatype error: Type:InvalidDatatypeValueException, Message:Value ' <' does not match regular expression facet '\S+.*'.

      Does anyone know what could be the problem? Is there a workaround for that bug? Does Xerces 3.1 solve that problem?

      Regards

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              darkos Darko Ć kerl
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified