jochen 2005/07/19 14:02:47
Modified: src/jaxme/org/apache/ws/jaxme/generator/sg/impl/ccsg Tag:
v0_4 GroupHandlerSG.java
. Tag: v0_4 status.xml
Log:
A sequence was always treated as required, even if all particles were
optional.
Revision Changes Path
No revision
No revision
1.4.2.3 +16 -2
ws-jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/ccsg/GroupHandlerSG.java
Index: GroupHandlerSG.java
===================================================================
RCS file:
/home/cvs/ws-jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/ccsg/GroupHandlerSG.java,v
retrieving revision 1.4.2.2
retrieving revision 1.4.2.3
diff -u -r1.4.2.2 -r1.4.2.3
--- GroupHandlerSG.java 8 Jul 2005 20:44:34 -0000 1.4.2.2
+++ GroupHandlerSG.java 19 Jul 2005 21:02:47 -0000 1.4.2.3
@@ -150,8 +150,22 @@
}
}
- protected boolean isRequiredParticle(ParticleSG particleSG) {
- return particleSG.getMinOccurs() > 0;
+ protected boolean isRequiredParticle(ParticleSG particleSG) throws
SAXException {
+ if (particleSG.getMinOccurs() == 0) {
+ return false;
+ } else {
+ if (particleSG.isGroup()) {
+ ParticleSG[] particles =
particleSG.getGroupSG().getParticles();
+ for (int i = 0; i < particles.length; i++) {
+ if (isRequiredParticle(particles[i])) {
+ return true;
+ }
+ }
+ return false;
+ } else {
+ return true;
+ }
+ }
}
protected void handleStartOfChildElement(Object pUnmarshallerHandler,
No revision
No revision
1.45.2.17 +4 -0 ws-jaxme/status.xml
Index: status.xml
===================================================================
RCS file: /home/cvs/ws-jaxme/status.xml,v
retrieving revision 1.45.2.16
retrieving revision 1.45.2.17
diff -u -r1.45.2.16 -r1.45.2.17
--- status.xml 19 Jul 2005 19:55:02 -0000 1.45.2.16
+++ status.xml 19 Jul 2005 21:02:47 -0000 1.45.2.17
@@ -60,6 +60,10 @@
whether an exception is already declared.
(Frederic Ahring, [EMAIL PROTECTED])
</action>
+ <action dev="JW" type="fix" context="generator">
+ A sequence was always treated as a required group,
+ even if all particles were optional.
+ </action>
</release>
<release version="0.4" date="2005-May-19">
<action dev="JW" type="fix" context="xs">
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]