pattern causes the parser to hang
---------------------------------

                 Key: XERCESJ-1357
                 URL: https://issues.apache.org/jira/browse/XERCESJ-1357
             Project: Xerces2-J
          Issue Type: Bug
          Components: SAX
    Affects Versions: 2.9.1
         Environment: Windows XP
            Reporter: Navaneet Kumar
            Priority: Critical


I have a pattern in my Schema:
 <xsd:simpleType name="ElsterString">
   <xsd:annotation>
     <xsd:documentation> Alphanumeric and ".", "-", "_".
     </xsd:documentation>
   </xsd:annotation>
   <xsd:restriction base="xsd:string">
       <xsd:pattern value="(([A-Za-z0-9]|\-|\.|_)+(( 
)*([A-Za-z0-9]|\-|\.|_)+)*)?"/>
   </xsd:restriction>
 </xsd:simpleType>

Th pattern is trying to force this rule:
  no characters other than letters and numbers and -, . and _. And no white 
spaces at the end. White space is allowed in the middle.

When I try and parse it against a document, the parser hangs some times. Longer 
strings appear to cause the hang more frequently.
I was validating this string:

Name="aPipeTest_LANPerformance  sksksk sksksk sksksk  "

This string caused the parser to hang. I can use longer strings and get the 
parser to hang at will.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to