You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org> on 2007/02/23 19:23:05 UTC

[jira] Resolved: (XERCESJ-206) Stack overflow when using a schema validation.

     [ https://issues.apache.org/jira/browse/XERCESJ-206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich resolved XERCESJ-206.
------------------------------------------

    Resolution: Fixed

I've just committed an improvement to code in SVN which covers a number of common cases. We now build a representation of large minOccurs/maxOccurs in constant time and memory (which uses a counter during validation) for element and wildcard particles when each model group particle in the content model:

* has minOccurs/maxOccurs == 1; or
* contains only one element/wildcard particle with minOccurs/maxOccurs == 1

Handling sequences, choices and nested minOccurs/maxOccurs is somewhat tricker.  We would need a more general solution than the one implemented for elements and wildcards to process those gracefully.  I've opened a new JIRA issue [1] for tracking that.

[1] http://issues.apache.org/jira/browse/XERCESJ-1227

> Stack overflow when using a schema validation.
> ----------------------------------------------
>
>                 Key: XERCESJ-206
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-206
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema Structures
>    Affects Versions: 2.0.0
>         Environment: Operating System: Windows NT/2K
> Platform: PC
>            Reporter: Tapani Saarinen
>         Assigned To: Michael Glavassevich
>
> Stack overflow when using a schema validation. If all lines except the first and last lines 
> (<xsd:schema...>) from the schema file are removed the overflow does not 
> occur.
> java.lang.StackOverflowError
>         at 
> org.apache.xerces.validators.common.Grammar.buildSyntaxTree(Grammar.java:856)
>         at 
> org.apache.xerces.validators.common.Grammar.buildSyntaxTree(Grammar.java:856)
>         at 
> org.apache.xerces.validators.common.Grammar.buildSyntaxTree(Grammar.java:856)
>         at 
> org.apache.xerces.validators.common.Grammar.buildSyntaxTree(Grammar.java:856)
>         at 
> org.apache.xerces.validators.common.Grammar.buildSyntaxTree(Grammar.java:856)
>         at 
> org.apache.xerces.validators.common.Grammar.buildSyntaxTree(Grammar.java:856)
>         at 
> org.apache.xerces.validators.common.Grammar.buildSyntaxTree(Grammar.java:856)
>         at 
> org.apache.xerces.validators.common.Grammar.buildSyntaxTree(Grammar.java:856)
>         at 
> org.apache.xerces.validators.common.Grammar.buildSyntaxTree(Grammar.java:856)

-- 
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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org