[ https://issues.apache.org/jira/browse/JAXME-94?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jose Luis Huertas updated JAXME-94: ----------------------------------- Attachment: Jaxme94-SolutionB-0.6-SNAPSHOT.diff Jaxme94-SolutionB-0.5.3-SNAPSHOT.diff Jaxme94-SolutionB-0.5.2.diff Finally I haven't been able to find a replacement for the method Matcher.hitEnd() that worked in JDK 1.4 and that was the key stone of the solution so I have had to change my strategy again :( Basically I maintain a couple of arrays with the elements associated to each state, their minOccurs, maxOccurs and current occurs during the parsing process. The length of the generated class is similar to my previous solution (the one that used regular expressions), aprox. 4.000 lines for a sequence of 250 elements against aprox. 290.000 lines that generates the current code. In addition, it also solves the problem with multiplicities other than 0..required for minOccurs and 1..unbounded for maxOccurs. I attach three patches, one suitable to apply to 0.5.2 version (Jaxme94-SolutionB-0.5.2.diff), another for the current 0.5 branch (Jaxme\Jaxme94-SolutionB-0.5.3-SNAPSHOT.diff) and another for the current head (Jaxme\Jaxme94-SolutionB-0.6-SNAPSHOT.diff), so it is up to you to decide the more appropiate one. BTW, I have tried to make the arrays static for performance, as Jochen pointed out in his previous comments, but I haven't been able since sometimes the classes are generated as inner ones inside an outer element, and it seems that inner classes cannot have static members :( Please have a look at it and if you have any problem or comments I will be happy to make the changes needed. > startElement method larger than 64KB when using a large amount of > complexType's > ------------------------------------------------------------------------------- > > Key: JAXME-94 > URL: https://issues.apache.org/jira/browse/JAXME-94 > Project: JaxMe > Issue Type: Improvement > Components: JaxMe Core > Affects Versions: 0.5, 0.6 > Environment: All > Reporter: Robert Eric Reeves > Assignee: Jochen Wiedmann > Priority: Critical > Fix For: 0.5, 0.6 > > Attachments: Jaxme94-SolutionB-0.5.2.diff, > Jaxme94-SolutionB-0.5.3-SNAPSHOT.diff, Jaxme94-SolutionB-0.6-SNAPSHOT.diff, > test.xsd, veryLongSequences-patch-0.5.2.diff, > veryLongSequences-patch-0.6-SNAPSHOT.diff, > veryLongSequences-refactor-patch-0.5.2.diff > > > Using an XSD that has a complexType with ~50 child complexTypes in a > sequence, the generate Java code has a method startElement that is too large > for javac. > Jose Luis Huertas Fernández has created a patch to fix this error. I will be > attaching it to this issue. There are two patches. One for 5.2 and the other > for 6.0. -- 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]