You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlbeans-dev@xml.apache.org by ji...@apache.org on 2004/05/12 20:24:59 UTC

[jira] Created: (XMLBEANS-35) OutOfMemoryError with this schema

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XMLBEANS-35

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XMLBEANS-35
    Summary: OutOfMemoryError with this schema
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: XMLBeans
 Components: 
             Compiler
   Versions:
             Version 1

   Assignee: 
   Reporter: d

    Created: Wed, 12 May 2004 11:24 AM
    Updated: Wed, 12 May 2004 11:24 AM

Description:
When I try to compile schema below, using XmlBeans.compileXsd as per javadoc for SchemaTypeSystem, I get an OutOfMemoryError.  

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.orbeon.com/oxf/pipeline" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:p="http://www.orbeon.com/oxf/pipeline" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
    <xs:element name="config">
        <xs:annotation>
            <xs:documentation>XPL root element</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="param" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:attribute name="name" type="xs:string" use="required"/>
                        <xs:attribute name="type" type="xs:string" use="required"/>
                        <xs:attributeGroup ref="p:debug-schema-attributes"/>
                    </xs:complexType>
                </xs:element>
                <xs:group ref="p:statements"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:group name="statement">
        <xs:sequence>
            <xs:choice>
                <xs:element name="processor">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="input" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:any processContents="lax" minOccurs="0"/>
                                    </xs:sequence>
                                    <xs:attribute name="name" type="xs:string" use="required"/>
                                    <xs:attribute name="href" type="xs:string" use="optional"/>
                                    <xs:attributeGroup ref="p:debug-schema-attributes"/>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="output" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:any processContents="lax" minOccurs="0"/>
                                    </xs:sequence>
                                    <xs:attribute name="name" type="xs:string" use="required"/>
                                    <xs:attribute name="id" type="xs:string" use="optional"/>
                                    <xs:attribute name="ref" type="xs:string" use="optional"/>
                                    <xs:attributeGroup ref="p:debug-schema-attributes"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute name="uri" type="xs:anyURI" use="optional"/>
                        <xs:attribute name="name" type="xs:anyURI" use="optional"/>
                        <xs:attribute name="encapsulation" type="xs:string" use="optional"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="choose">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="when" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:group ref="p:statements"/>
                                    <xs:attribute name="test" type="xs:string" use="required"/>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="otherwise" minOccurs="0">
                                <xs:complexType>
                                    <xs:group ref="p:statements"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute name="href" type="xs:string" use="required"/>
                        <xs:attributeGroup ref="p:debug-schema-attributes"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="for-each">
                    <xs:complexType>
                        <xs:group ref="p:statements"/>
                        <xs:attribute name="href" type="xs:string" use="required"/>
                        <xs:attribute name="select" type="xs:string" use="required"/>
                        <xs:attribute name="id" type="xs:QName" use="required"/>
                        <xs:attribute name="root" type="xs:QName" use="required"/>
                    </xs:complexType>
                </xs:element>
            </xs:choice>
        </xs:sequence>
    </xs:group>
    <xs:group name="statements">
        <xs:sequence>
            <xs:group ref="p:statement" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:group>
    <xs:attributeGroup name="debug-schema-attributes">
        <xs:attribute name="debug" type="xs:string" use="optional"/>
        <xs:attribute name="schema-href" type="xs:anyURI" use="optional"/>
        <xs:attribute name="schema-uri" type="xs:anyURI" use="optional"/>
    </xs:attributeGroup>
</xs:schema>



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


[jira] Closed: (XMLBEANS-35) OutOfMemoryError with this schema

Posted by "Jacob Danner (JIRA)" <xm...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XMLBEANS-35?page=all ]
     
Jacob Danner closed XMLBEANS-35:
--------------------------------

    Assign To:     (was: Radu Preotiuc-Pietro)

Fix Verified, closing

> OutOfMemoryError with this schema
> ---------------------------------
>
>          Key: XMLBEANS-35
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-35
>      Project: XMLBeans
>         Type: Bug
>   Components: Compiler
>     Versions: Version 1, Version 2
>     Reporter: d
>      Fix For: Version 2 Beta 1, Version 2 Beta 2, Version 2

>
> When I try to compile schema below, using XmlBeans.compileXsd as per javadoc for SchemaTypeSystem, I get an OutOfMemoryError.  
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema targetNamespace="http://www.orbeon.com/oxf/pipeline" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:p="http://www.orbeon.com/oxf/pipeline" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
>     <xs:element name="config">
>         <xs:annotation>
>             <xs:documentation>XPL root element</xs:documentation>
>         </xs:annotation>
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element name="param" minOccurs="0" maxOccurs="unbounded">
>                     <xs:complexType>
>                         <xs:attribute name="name" type="xs:string" use="required"/>
>                         <xs:attribute name="type" type="xs:string" use="required"/>
>                         <xs:attributeGroup ref="p:debug-schema-attributes"/>
>                     </xs:complexType>
>                 </xs:element>
>                 <xs:group ref="p:statements"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
>     <xs:group name="statement">
>         <xs:sequence>
>             <xs:choice>
>                 <xs:element name="processor">
>                     <xs:complexType>
>                         <xs:sequence>
>                             <xs:element name="input" minOccurs="0" maxOccurs="unbounded">
>                                 <xs:complexType>
>                                     <xs:sequence>
>                                         <xs:any processContents="lax" minOccurs="0"/>
>                                     </xs:sequence>
>                                     <xs:attribute name="name" type="xs:string" use="required"/>
>                                     <xs:attribute name="href" type="xs:string" use="optional"/>
>                                     <xs:attributeGroup ref="p:debug-schema-attributes"/>
>                                 </xs:complexType>
>                             </xs:element>
>                             <xs:element name="output" minOccurs="0" maxOccurs="unbounded">
>                                 <xs:complexType>
>                                     <xs:sequence>
>                                         <xs:any processContents="lax" minOccurs="0"/>
>                                     </xs:sequence>
>                                     <xs:attribute name="name" type="xs:string" use="required"/>
>                                     <xs:attribute name="id" type="xs:string" use="optional"/>
>                                     <xs:attribute name="ref" type="xs:string" use="optional"/>
>                                     <xs:attributeGroup ref="p:debug-schema-attributes"/>
>                                 </xs:complexType>
>                             </xs:element>
>                         </xs:sequence>
>                         <xs:attribute name="uri" type="xs:anyURI" use="optional"/>
>                         <xs:attribute name="name" type="xs:anyURI" use="optional"/>
>                         <xs:attribute name="encapsulation" type="xs:string" use="optional"/>
>                     </xs:complexType>
>                 </xs:element>
>                 <xs:element name="choose">
>                     <xs:complexType>
>                         <xs:sequence>
>                             <xs:element name="when" maxOccurs="unbounded">
>                                 <xs:complexType>
>                                     <xs:group ref="p:statements"/>
>                                     <xs:attribute name="test" type="xs:string" use="required"/>
>                                 </xs:complexType>
>                             </xs:element>
>                             <xs:element name="otherwise" minOccurs="0">
>                                 <xs:complexType>
>                                     <xs:group ref="p:statements"/>
>                                 </xs:complexType>
>                             </xs:element>
>                         </xs:sequence>
>                         <xs:attribute name="href" type="xs:string" use="required"/>
>                         <xs:attributeGroup ref="p:debug-schema-attributes"/>
>                     </xs:complexType>
>                 </xs:element>
>                 <xs:element name="for-each">
>                     <xs:complexType>
>                         <xs:group ref="p:statements"/>
>                         <xs:attribute name="href" type="xs:string" use="required"/>
>                         <xs:attribute name="select" type="xs:string" use="required"/>
>                         <xs:attribute name="id" type="xs:QName" use="required"/>
>                         <xs:attribute name="root" type="xs:QName" use="required"/>
>                     </xs:complexType>
>                 </xs:element>
>             </xs:choice>
>         </xs:sequence>
>     </xs:group>
>     <xs:group name="statements">
>         <xs:sequence>
>             <xs:group ref="p:statement" minOccurs="0" maxOccurs="unbounded"/>
>         </xs:sequence>
>     </xs:group>
>     <xs:attributeGroup name="debug-schema-attributes">
>         <xs:attribute name="debug" type="xs:string" use="optional"/>
>         <xs:attribute name="schema-href" type="xs:anyURI" use="optional"/>
>         <xs:attribute name="schema-uri" type="xs:anyURI" use="optional"/>
>     </xs:attributeGroup>
> </xs:schema>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Resolved: (XMLBEANS-35) OutOfMemoryError with this schema

Posted by "Radu Preotiuc-Pietro (JIRA)" <xm...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XMLBEANS-35?page=history ]
     
Radu Preotiuc-Pietro resolved XMLBEANS-35:
------------------------------------------

     Resolution: Fixed
    Fix Version: Version 2 Beta 1
                 Version 2 Beta 2
                 Version 2

Fix at SVN 149295

> OutOfMemoryError with this schema
> ---------------------------------
>
>          Key: XMLBEANS-35
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-35
>      Project: XMLBeans
>         Type: Bug
>   Components: Compiler
>     Versions: Version 1, Version 2
>     Reporter: d
>     Assignee: Radu Preotiuc-Pietro
>      Fix For: Version 2 Beta 1, Version 2 Beta 2, Version 2

>
> When I try to compile schema below, using XmlBeans.compileXsd as per javadoc for SchemaTypeSystem, I get an OutOfMemoryError.  
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema targetNamespace="http://www.orbeon.com/oxf/pipeline" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:p="http://www.orbeon.com/oxf/pipeline" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
>     <xs:element name="config">
>         <xs:annotation>
>             <xs:documentation>XPL root element</xs:documentation>
>         </xs:annotation>
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element name="param" minOccurs="0" maxOccurs="unbounded">
>                     <xs:complexType>
>                         <xs:attribute name="name" type="xs:string" use="required"/>
>                         <xs:attribute name="type" type="xs:string" use="required"/>
>                         <xs:attributeGroup ref="p:debug-schema-attributes"/>
>                     </xs:complexType>
>                 </xs:element>
>                 <xs:group ref="p:statements"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
>     <xs:group name="statement">
>         <xs:sequence>
>             <xs:choice>
>                 <xs:element name="processor">
>                     <xs:complexType>
>                         <xs:sequence>
>                             <xs:element name="input" minOccurs="0" maxOccurs="unbounded">
>                                 <xs:complexType>
>                                     <xs:sequence>
>                                         <xs:any processContents="lax" minOccurs="0"/>
>                                     </xs:sequence>
>                                     <xs:attribute name="name" type="xs:string" use="required"/>
>                                     <xs:attribute name="href" type="xs:string" use="optional"/>
>                                     <xs:attributeGroup ref="p:debug-schema-attributes"/>
>                                 </xs:complexType>
>                             </xs:element>
>                             <xs:element name="output" minOccurs="0" maxOccurs="unbounded">
>                                 <xs:complexType>
>                                     <xs:sequence>
>                                         <xs:any processContents="lax" minOccurs="0"/>
>                                     </xs:sequence>
>                                     <xs:attribute name="name" type="xs:string" use="required"/>
>                                     <xs:attribute name="id" type="xs:string" use="optional"/>
>                                     <xs:attribute name="ref" type="xs:string" use="optional"/>
>                                     <xs:attributeGroup ref="p:debug-schema-attributes"/>
>                                 </xs:complexType>
>                             </xs:element>
>                         </xs:sequence>
>                         <xs:attribute name="uri" type="xs:anyURI" use="optional"/>
>                         <xs:attribute name="name" type="xs:anyURI" use="optional"/>
>                         <xs:attribute name="encapsulation" type="xs:string" use="optional"/>
>                     </xs:complexType>
>                 </xs:element>
>                 <xs:element name="choose">
>                     <xs:complexType>
>                         <xs:sequence>
>                             <xs:element name="when" maxOccurs="unbounded">
>                                 <xs:complexType>
>                                     <xs:group ref="p:statements"/>
>                                     <xs:attribute name="test" type="xs:string" use="required"/>
>                                 </xs:complexType>
>                             </xs:element>
>                             <xs:element name="otherwise" minOccurs="0">
>                                 <xs:complexType>
>                                     <xs:group ref="p:statements"/>
>                                 </xs:complexType>
>                             </xs:element>
>                         </xs:sequence>
>                         <xs:attribute name="href" type="xs:string" use="required"/>
>                         <xs:attributeGroup ref="p:debug-schema-attributes"/>
>                     </xs:complexType>
>                 </xs:element>
>                 <xs:element name="for-each">
>                     <xs:complexType>
>                         <xs:group ref="p:statements"/>
>                         <xs:attribute name="href" type="xs:string" use="required"/>
>                         <xs:attribute name="select" type="xs:string" use="required"/>
>                         <xs:attribute name="id" type="xs:QName" use="required"/>
>                         <xs:attribute name="root" type="xs:QName" use="required"/>
>                     </xs:complexType>
>                 </xs:element>
>             </xs:choice>
>         </xs:sequence>
>     </xs:group>
>     <xs:group name="statements">
>         <xs:sequence>
>             <xs:group ref="p:statement" minOccurs="0" maxOccurs="unbounded"/>
>         </xs:sequence>
>     </xs:group>
>     <xs:attributeGroup name="debug-schema-attributes">
>         <xs:attribute name="debug" type="xs:string" use="optional"/>
>         <xs:attribute name="schema-href" type="xs:anyURI" use="optional"/>
>         <xs:attribute name="schema-uri" type="xs:anyURI" use="optional"/>
>     </xs:attributeGroup>
> </xs:schema>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Updated: (XMLBEANS-35) OutOfMemoryError with this schema

Posted by xm...@xml.apache.org.
The following issue has been updated:

    Updater: Dave Remy (mailto:david.remy@bea.com)
       Date: Fri, 17 Sep 2004 11:34 AM
    Changes:
             Version changed to Version 2
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/XMLBEANS-35?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XMLBEANS-35

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XMLBEANS-35
    Summary: OutOfMemoryError with this schema
       Type: Bug

     Status: Open
   Priority: Major

    Project: XMLBeans
 Components: 
             Compiler
   Versions:
             Version 1
             Version 2

   Assignee: Radu Preotiuc-Pietro
   Reporter: d

    Created: Wed, 12 May 2004 11:24 AM
    Updated: Fri, 17 Sep 2004 11:34 AM

Description:
When I try to compile schema below, using XmlBeans.compileXsd as per javadoc for SchemaTypeSystem, I get an OutOfMemoryError.  

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.orbeon.com/oxf/pipeline" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:p="http://www.orbeon.com/oxf/pipeline" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
    <xs:element name="config">
        <xs:annotation>
            <xs:documentation>XPL root element</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="param" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:attribute name="name" type="xs:string" use="required"/>
                        <xs:attribute name="type" type="xs:string" use="required"/>
                        <xs:attributeGroup ref="p:debug-schema-attributes"/>
                    </xs:complexType>
                </xs:element>
                <xs:group ref="p:statements"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:group name="statement">
        <xs:sequence>
            <xs:choice>
                <xs:element name="processor">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="input" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:any processContents="lax" minOccurs="0"/>
                                    </xs:sequence>
                                    <xs:attribute name="name" type="xs:string" use="required"/>
                                    <xs:attribute name="href" type="xs:string" use="optional"/>
                                    <xs:attributeGroup ref="p:debug-schema-attributes"/>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="output" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:any processContents="lax" minOccurs="0"/>
                                    </xs:sequence>
                                    <xs:attribute name="name" type="xs:string" use="required"/>
                                    <xs:attribute name="id" type="xs:string" use="optional"/>
                                    <xs:attribute name="ref" type="xs:string" use="optional"/>
                                    <xs:attributeGroup ref="p:debug-schema-attributes"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute name="uri" type="xs:anyURI" use="optional"/>
                        <xs:attribute name="name" type="xs:anyURI" use="optional"/>
                        <xs:attribute name="encapsulation" type="xs:string" use="optional"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="choose">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="when" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:group ref="p:statements"/>
                                    <xs:attribute name="test" type="xs:string" use="required"/>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="otherwise" minOccurs="0">
                                <xs:complexType>
                                    <xs:group ref="p:statements"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute name="href" type="xs:string" use="required"/>
                        <xs:attributeGroup ref="p:debug-schema-attributes"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="for-each">
                    <xs:complexType>
                        <xs:group ref="p:statements"/>
                        <xs:attribute name="href" type="xs:string" use="required"/>
                        <xs:attribute name="select" type="xs:string" use="required"/>
                        <xs:attribute name="id" type="xs:QName" use="required"/>
                        <xs:attribute name="root" type="xs:QName" use="required"/>
                    </xs:complexType>
                </xs:element>
            </xs:choice>
        </xs:sequence>
    </xs:group>
    <xs:group name="statements">
        <xs:sequence>
            <xs:group ref="p:statement" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:group>
    <xs:attributeGroup name="debug-schema-attributes">
        <xs:attribute name="debug" type="xs:string" use="optional"/>
        <xs:attribute name="schema-href" type="xs:anyURI" use="optional"/>
        <xs:attribute name="schema-uri" type="xs:anyURI" use="optional"/>
    </xs:attributeGroup>
</xs:schema>



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-35) OutOfMemoryError with this schema

Posted by "Radu Preotiuc-Pietro (JIRA)" <xm...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XMLBEANS-35?page=comments#action_58134 ]
     
Radu Preotiuc-Pietro commented on XMLBEANS-35:
----------------------------------------------

I have looked over that thread but I am still not convinced at all, the arguments the posters use are based on their intuition and common sense, and not backed anywhere by the spec. I think that this is actually a bug in the spec allowing something like this to exist in the current context.
On the other hand, OOM is not acceptable either, so I will try to patch the code to allow for the behavior described in that thread.


> OutOfMemoryError with this schema
> ---------------------------------
>
>          Key: XMLBEANS-35
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-35
>      Project: XMLBeans
>         Type: Bug
>   Components: Compiler
>     Versions: Version 1, Version 2
>     Reporter: d
>     Assignee: Radu Preotiuc-Pietro

>
> When I try to compile schema below, using XmlBeans.compileXsd as per javadoc for SchemaTypeSystem, I get an OutOfMemoryError.  
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema targetNamespace="http://www.orbeon.com/oxf/pipeline" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:p="http://www.orbeon.com/oxf/pipeline" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
>     <xs:element name="config">
>         <xs:annotation>
>             <xs:documentation>XPL root element</xs:documentation>
>         </xs:annotation>
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element name="param" minOccurs="0" maxOccurs="unbounded">
>                     <xs:complexType>
>                         <xs:attribute name="name" type="xs:string" use="required"/>
>                         <xs:attribute name="type" type="xs:string" use="required"/>
>                         <xs:attributeGroup ref="p:debug-schema-attributes"/>
>                     </xs:complexType>
>                 </xs:element>
>                 <xs:group ref="p:statements"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
>     <xs:group name="statement">
>         <xs:sequence>
>             <xs:choice>
>                 <xs:element name="processor">
>                     <xs:complexType>
>                         <xs:sequence>
>                             <xs:element name="input" minOccurs="0" maxOccurs="unbounded">
>                                 <xs:complexType>
>                                     <xs:sequence>
>                                         <xs:any processContents="lax" minOccurs="0"/>
>                                     </xs:sequence>
>                                     <xs:attribute name="name" type="xs:string" use="required"/>
>                                     <xs:attribute name="href" type="xs:string" use="optional"/>
>                                     <xs:attributeGroup ref="p:debug-schema-attributes"/>
>                                 </xs:complexType>
>                             </xs:element>
>                             <xs:element name="output" minOccurs="0" maxOccurs="unbounded">
>                                 <xs:complexType>
>                                     <xs:sequence>
>                                         <xs:any processContents="lax" minOccurs="0"/>
>                                     </xs:sequence>
>                                     <xs:attribute name="name" type="xs:string" use="required"/>
>                                     <xs:attribute name="id" type="xs:string" use="optional"/>
>                                     <xs:attribute name="ref" type="xs:string" use="optional"/>
>                                     <xs:attributeGroup ref="p:debug-schema-attributes"/>
>                                 </xs:complexType>
>                             </xs:element>
>                         </xs:sequence>
>                         <xs:attribute name="uri" type="xs:anyURI" use="optional"/>
>                         <xs:attribute name="name" type="xs:anyURI" use="optional"/>
>                         <xs:attribute name="encapsulation" type="xs:string" use="optional"/>
>                     </xs:complexType>
>                 </xs:element>
>                 <xs:element name="choose">
>                     <xs:complexType>
>                         <xs:sequence>
>                             <xs:element name="when" maxOccurs="unbounded">
>                                 <xs:complexType>
>                                     <xs:group ref="p:statements"/>
>                                     <xs:attribute name="test" type="xs:string" use="required"/>
>                                 </xs:complexType>
>                             </xs:element>
>                             <xs:element name="otherwise" minOccurs="0">
>                                 <xs:complexType>
>                                     <xs:group ref="p:statements"/>
>                                 </xs:complexType>
>                             </xs:element>
>                         </xs:sequence>
>                         <xs:attribute name="href" type="xs:string" use="required"/>
>                         <xs:attributeGroup ref="p:debug-schema-attributes"/>
>                     </xs:complexType>
>                 </xs:element>
>                 <xs:element name="for-each">
>                     <xs:complexType>
>                         <xs:group ref="p:statements"/>
>                         <xs:attribute name="href" type="xs:string" use="required"/>
>                         <xs:attribute name="select" type="xs:string" use="required"/>
>                         <xs:attribute name="id" type="xs:QName" use="required"/>
>                         <xs:attribute name="root" type="xs:QName" use="required"/>
>                     </xs:complexType>
>                 </xs:element>
>             </xs:choice>
>         </xs:sequence>
>     </xs:group>
>     <xs:group name="statements">
>         <xs:sequence>
>             <xs:group ref="p:statement" minOccurs="0" maxOccurs="unbounded"/>
>         </xs:sequence>
>     </xs:group>
>     <xs:attributeGroup name="debug-schema-attributes">
>         <xs:attribute name="debug" type="xs:string" use="optional"/>
>         <xs:attribute name="schema-href" type="xs:anyURI" use="optional"/>
>         <xs:attribute name="schema-uri" type="xs:anyURI" use="optional"/>
>     </xs:attributeGroup>
> </xs:schema>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-35) OutOfMemoryError with this schema

Posted by ji...@apache.org.
The following comment has been added to this issue:

     Author: Kevin Krouse
    Created: Wed, 12 May 2004 6:49 PM
       Body:
At first I thought this was an illegal schema (model groups can't be self referencing as per the section 3.8.6 of the XMLSchema spec), but it turns out that rule doesn't apply here.  Below is a quote from a posting on xmlschema-dev:

http://lists.w3.org/Archives/Public/xmlschema-dev/2002May/0008.html

=====================
<xs:group name="error">
  <xs:sequence>
    ...
    <xs:element name="error">
      <xs:complexType>
        <xs:group ref="ms:error" />
      </xs:complexType>
    </xs:element>
  </xs:sequence>
</xs:group>

The circularity constraint on model groups states that the particles
of the group, at any depth, cannot include the group itself. In the
case above, the particles of the ms:error group are a sequence,
various other things, and an error element. The particles that are
part of the content type of the error element aren't particles of the
group -- as far as a validator is concerned, the element declaration
is a black box.

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XMLBEANS-35?page=comments#action_35514

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XMLBEANS-35

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XMLBEANS-35
    Summary: OutOfMemoryError with this schema
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: XMLBeans
 Components: 
             Compiler
   Versions:
             Version 1

   Assignee: 
   Reporter: d

    Created: Wed, 12 May 2004 11:24 AM
    Updated: Wed, 12 May 2004 6:49 PM

Description:
When I try to compile schema below, using XmlBeans.compileXsd as per javadoc for SchemaTypeSystem, I get an OutOfMemoryError.  

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.orbeon.com/oxf/pipeline" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:p="http://www.orbeon.com/oxf/pipeline" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
    <xs:element name="config">
        <xs:annotation>
            <xs:documentation>XPL root element</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="param" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:attribute name="name" type="xs:string" use="required"/>
                        <xs:attribute name="type" type="xs:string" use="required"/>
                        <xs:attributeGroup ref="p:debug-schema-attributes"/>
                    </xs:complexType>
                </xs:element>
                <xs:group ref="p:statements"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:group name="statement">
        <xs:sequence>
            <xs:choice>
                <xs:element name="processor">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="input" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:any processContents="lax" minOccurs="0"/>
                                    </xs:sequence>
                                    <xs:attribute name="name" type="xs:string" use="required"/>
                                    <xs:attribute name="href" type="xs:string" use="optional"/>
                                    <xs:attributeGroup ref="p:debug-schema-attributes"/>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="output" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:any processContents="lax" minOccurs="0"/>
                                    </xs:sequence>
                                    <xs:attribute name="name" type="xs:string" use="required"/>
                                    <xs:attribute name="id" type="xs:string" use="optional"/>
                                    <xs:attribute name="ref" type="xs:string" use="optional"/>
                                    <xs:attributeGroup ref="p:debug-schema-attributes"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute name="uri" type="xs:anyURI" use="optional"/>
                        <xs:attribute name="name" type="xs:anyURI" use="optional"/>
                        <xs:attribute name="encapsulation" type="xs:string" use="optional"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="choose">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="when" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:group ref="p:statements"/>
                                    <xs:attribute name="test" type="xs:string" use="required"/>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="otherwise" minOccurs="0">
                                <xs:complexType>
                                    <xs:group ref="p:statements"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute name="href" type="xs:string" use="required"/>
                        <xs:attributeGroup ref="p:debug-schema-attributes"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="for-each">
                    <xs:complexType>
                        <xs:group ref="p:statements"/>
                        <xs:attribute name="href" type="xs:string" use="required"/>
                        <xs:attribute name="select" type="xs:string" use="required"/>
                        <xs:attribute name="id" type="xs:QName" use="required"/>
                        <xs:attribute name="root" type="xs:QName" use="required"/>
                    </xs:complexType>
                </xs:element>
            </xs:choice>
        </xs:sequence>
    </xs:group>
    <xs:group name="statements">
        <xs:sequence>
            <xs:group ref="p:statement" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:group>
    <xs:attributeGroup name="debug-schema-attributes">
        <xs:attribute name="debug" type="xs:string" use="optional"/>
        <xs:attribute name="schema-href" type="xs:anyURI" use="optional"/>
        <xs:attribute name="schema-uri" type="xs:anyURI" use="optional"/>
    </xs:attributeGroup>
</xs:schema>



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


[jira] Commented: (XMLBEANS-35) OutOfMemoryError with this schema

Posted by ji...@apache.org.
The following comment has been added to this issue:

     Author: d
    Created: Tue, 15 Jun 2004 6:30 PM
       Body:
Diffs below provide a hack-around for this issue

cvs server: Diffing .
Index: SchemaTypeImpl.java
===================================================================
RCS file: /home/cvspublic/xml-xmlbeans/v1/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java,v
retrieving revision 1.7
diff -b -r1.7 SchemaTypeImpl.java
931,932c931,934
<         SchemaType[] result = new SchemaType[_anonymousTyperefs.length];
<         for (int i = 0; i < result.length; i++)
---
>         final int size = _anonymousTyperefs == null
>                          ? 0 : _anonymousTyperefs.length;
>         SchemaType[] result = new SchemaType[ size ];
>         for (int i = 0; i < size; i++)
Index: StscTranslator.java
===================================================================
RCS file: /home/cvspublic/xml-xmlbeans/v1/src/typeimpl/org/apache/xmlbeans/impl/schema/StscTranslator.java,v
retrieving revision 1.4
diff -b -r1.4 StscTranslator.java
615a616,637
>             boolean newAnon = true;
>             if ( outerType instanceof SchemaTypeImpl )
>             {
>                 SchemaType outerOuter = outerType.getOuterType();
>                 while ( outerOuter != null )
>                 {
>                     final SchemaType[] anonTypes = outerOuter.getAnonymousTypes();
>                     for ( int i = 0; newAnon && i < anonTypes.length; i++ )
>                     {
>                         SchemaTypeImpl anImpl = ( SchemaTypeImpl )anonTypes[ i ];
>                         final XmlObject obj = anImpl.getParseObject();
>                         if ( obj != null && obj.equals( typedef ) )
>                         {
>                             sType = anImpl;
>                             newAnon = false;
>                         }
>                     }
>                     outerOuter = outerOuter.getOuterType();
>                 }
>             }
>             if ( newAnon )
>             {
623a646
>             }

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XMLBEANS-35?page=comments#action_36189

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XMLBEANS-35

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XMLBEANS-35
    Summary: OutOfMemoryError with this schema
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: XMLBeans
 Components: 
             Compiler
   Versions:
             Version 1

   Assignee: 
   Reporter: d

    Created: Wed, 12 May 2004 11:24 AM
    Updated: Tue, 15 Jun 2004 6:30 PM

Description:
When I try to compile schema below, using XmlBeans.compileXsd as per javadoc for SchemaTypeSystem, I get an OutOfMemoryError.  

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.orbeon.com/oxf/pipeline" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:p="http://www.orbeon.com/oxf/pipeline" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
    <xs:element name="config">
        <xs:annotation>
            <xs:documentation>XPL root element</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="param" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:attribute name="name" type="xs:string" use="required"/>
                        <xs:attribute name="type" type="xs:string" use="required"/>
                        <xs:attributeGroup ref="p:debug-schema-attributes"/>
                    </xs:complexType>
                </xs:element>
                <xs:group ref="p:statements"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:group name="statement">
        <xs:sequence>
            <xs:choice>
                <xs:element name="processor">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="input" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:any processContents="lax" minOccurs="0"/>
                                    </xs:sequence>
                                    <xs:attribute name="name" type="xs:string" use="required"/>
                                    <xs:attribute name="href" type="xs:string" use="optional"/>
                                    <xs:attributeGroup ref="p:debug-schema-attributes"/>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="output" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:any processContents="lax" minOccurs="0"/>
                                    </xs:sequence>
                                    <xs:attribute name="name" type="xs:string" use="required"/>
                                    <xs:attribute name="id" type="xs:string" use="optional"/>
                                    <xs:attribute name="ref" type="xs:string" use="optional"/>
                                    <xs:attributeGroup ref="p:debug-schema-attributes"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute name="uri" type="xs:anyURI" use="optional"/>
                        <xs:attribute name="name" type="xs:anyURI" use="optional"/>
                        <xs:attribute name="encapsulation" type="xs:string" use="optional"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="choose">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="when" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:group ref="p:statements"/>
                                    <xs:attribute name="test" type="xs:string" use="required"/>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="otherwise" minOccurs="0">
                                <xs:complexType>
                                    <xs:group ref="p:statements"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute name="href" type="xs:string" use="required"/>
                        <xs:attributeGroup ref="p:debug-schema-attributes"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="for-each">
                    <xs:complexType>
                        <xs:group ref="p:statements"/>
                        <xs:attribute name="href" type="xs:string" use="required"/>
                        <xs:attribute name="select" type="xs:string" use="required"/>
                        <xs:attribute name="id" type="xs:QName" use="required"/>
                        <xs:attribute name="root" type="xs:QName" use="required"/>
                    </xs:complexType>
                </xs:element>
            </xs:choice>
        </xs:sequence>
    </xs:group>
    <xs:group name="statements">
        <xs:sequence>
            <xs:group ref="p:statement" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:group>
    <xs:attributeGroup name="debug-schema-attributes">
        <xs:attribute name="debug" type="xs:string" use="optional"/>
        <xs:attribute name="schema-href" type="xs:anyURI" use="optional"/>
        <xs:attribute name="schema-uri" type="xs:anyURI" use="optional"/>
    </xs:attributeGroup>
</xs:schema>



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


[jira] Commented: (XMLBEANS-35) OutOfMemoryError with this schema

Posted by ji...@apache.org.
The following comment has been added to this issue:

     Author: d
    Created: Tue, 15 Jun 2004 6:30 PM
       Body:
Diffs below provide a hack-around for this issue

cvs server: Diffing .
Index: SchemaTypeImpl.java
===================================================================
RCS file: /home/cvspublic/xml-xmlbeans/v1/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java,v
retrieving revision 1.7
diff -b -r1.7 SchemaTypeImpl.java
931,932c931,934
<         SchemaType[] result = new SchemaType[_anonymousTyperefs.length];
<         for (int i = 0; i < result.length; i++)
---
>         final int size = _anonymousTyperefs == null
>                          ? 0 : _anonymousTyperefs.length;
>         SchemaType[] result = new SchemaType[ size ];
>         for (int i = 0; i < size; i++)
Index: StscTranslator.java
===================================================================
RCS file: /home/cvspublic/xml-xmlbeans/v1/src/typeimpl/org/apache/xmlbeans/impl/schema/StscTranslator.java,v
retrieving revision 1.4
diff -b -r1.4 StscTranslator.java
615a616,637
>             boolean newAnon = true;
>             if ( outerType instanceof SchemaTypeImpl )
>             {
>                 SchemaType outerOuter = outerType.getOuterType();
>                 while ( outerOuter != null )
>                 {
>                     final SchemaType[] anonTypes = outerOuter.getAnonymousTypes();
>                     for ( int i = 0; newAnon && i < anonTypes.length; i++ )
>                     {
>                         SchemaTypeImpl anImpl = ( SchemaTypeImpl )anonTypes[ i ];
>                         final XmlObject obj = anImpl.getParseObject();
>                         if ( obj != null && obj.equals( typedef ) )
>                         {
>                             sType = anImpl;
>                             newAnon = false;
>                         }
>                     }
>                     outerOuter = outerOuter.getOuterType();
>                 }
>             }
>             if ( newAnon )
>             {
623a646
>             }

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XMLBEANS-35?page=comments#action_36189

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XMLBEANS-35

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XMLBEANS-35
    Summary: OutOfMemoryError with this schema
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: XMLBeans
 Components: 
             Compiler
   Versions:
             Version 1

   Assignee: 
   Reporter: d

    Created: Wed, 12 May 2004 11:24 AM
    Updated: Tue, 15 Jun 2004 6:30 PM

Description:
When I try to compile schema below, using XmlBeans.compileXsd as per javadoc for SchemaTypeSystem, I get an OutOfMemoryError.  

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.orbeon.com/oxf/pipeline" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:p="http://www.orbeon.com/oxf/pipeline" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
    <xs:element name="config">
        <xs:annotation>
            <xs:documentation>XPL root element</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="param" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:attribute name="name" type="xs:string" use="required"/>
                        <xs:attribute name="type" type="xs:string" use="required"/>
                        <xs:attributeGroup ref="p:debug-schema-attributes"/>
                    </xs:complexType>
                </xs:element>
                <xs:group ref="p:statements"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:group name="statement">
        <xs:sequence>
            <xs:choice>
                <xs:element name="processor">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="input" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:any processContents="lax" minOccurs="0"/>
                                    </xs:sequence>
                                    <xs:attribute name="name" type="xs:string" use="required"/>
                                    <xs:attribute name="href" type="xs:string" use="optional"/>
                                    <xs:attributeGroup ref="p:debug-schema-attributes"/>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="output" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:any processContents="lax" minOccurs="0"/>
                                    </xs:sequence>
                                    <xs:attribute name="name" type="xs:string" use="required"/>
                                    <xs:attribute name="id" type="xs:string" use="optional"/>
                                    <xs:attribute name="ref" type="xs:string" use="optional"/>
                                    <xs:attributeGroup ref="p:debug-schema-attributes"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute name="uri" type="xs:anyURI" use="optional"/>
                        <xs:attribute name="name" type="xs:anyURI" use="optional"/>
                        <xs:attribute name="encapsulation" type="xs:string" use="optional"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="choose">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="when" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:group ref="p:statements"/>
                                    <xs:attribute name="test" type="xs:string" use="required"/>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="otherwise" minOccurs="0">
                                <xs:complexType>
                                    <xs:group ref="p:statements"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute name="href" type="xs:string" use="required"/>
                        <xs:attributeGroup ref="p:debug-schema-attributes"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="for-each">
                    <xs:complexType>
                        <xs:group ref="p:statements"/>
                        <xs:attribute name="href" type="xs:string" use="required"/>
                        <xs:attribute name="select" type="xs:string" use="required"/>
                        <xs:attribute name="id" type="xs:QName" use="required"/>
                        <xs:attribute name="root" type="xs:QName" use="required"/>
                    </xs:complexType>
                </xs:element>
            </xs:choice>
        </xs:sequence>
    </xs:group>
    <xs:group name="statements">
        <xs:sequence>
            <xs:group ref="p:statement" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:group>
    <xs:attributeGroup name="debug-schema-attributes">
        <xs:attribute name="debug" type="xs:string" use="optional"/>
        <xs:attribute name="schema-href" type="xs:anyURI" use="optional"/>
        <xs:attribute name="schema-uri" type="xs:anyURI" use="optional"/>
    </xs:attributeGroup>
</xs:schema>



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


[jira] Commented: (XMLBEANS-35) OutOfMemoryError with this schema

Posted by ji...@apache.org.
The following comment has been added to this issue:

     Author: Kevin Krouse
    Created: Wed, 12 May 2004 6:49 PM
       Body:
At first I thought this was an illegal schema (model groups can't be self referencing as per the section 3.8.6 of the XMLSchema spec), but it turns out that rule doesn't apply here.  Below is a quote from a posting on xmlschema-dev:

http://lists.w3.org/Archives/Public/xmlschema-dev/2002May/0008.html

=====================
<xs:group name="error">
  <xs:sequence>
    ...
    <xs:element name="error">
      <xs:complexType>
        <xs:group ref="ms:error" />
      </xs:complexType>
    </xs:element>
  </xs:sequence>
</xs:group>

The circularity constraint on model groups states that the particles
of the group, at any depth, cannot include the group itself. In the
case above, the particles of the ms:error group are a sequence,
various other things, and an error element. The particles that are
part of the content type of the error element aren't particles of the
group -- as far as a validator is concerned, the element declaration
is a black box.

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XMLBEANS-35?page=comments#action_35514

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XMLBEANS-35

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XMLBEANS-35
    Summary: OutOfMemoryError with this schema
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: XMLBeans
 Components: 
             Compiler
   Versions:
             Version 1

   Assignee: 
   Reporter: d

    Created: Wed, 12 May 2004 11:24 AM
    Updated: Wed, 12 May 2004 6:49 PM

Description:
When I try to compile schema below, using XmlBeans.compileXsd as per javadoc for SchemaTypeSystem, I get an OutOfMemoryError.  

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.orbeon.com/oxf/pipeline" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:p="http://www.orbeon.com/oxf/pipeline" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
    <xs:element name="config">
        <xs:annotation>
            <xs:documentation>XPL root element</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="param" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:attribute name="name" type="xs:string" use="required"/>
                        <xs:attribute name="type" type="xs:string" use="required"/>
                        <xs:attributeGroup ref="p:debug-schema-attributes"/>
                    </xs:complexType>
                </xs:element>
                <xs:group ref="p:statements"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:group name="statement">
        <xs:sequence>
            <xs:choice>
                <xs:element name="processor">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="input" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:any processContents="lax" minOccurs="0"/>
                                    </xs:sequence>
                                    <xs:attribute name="name" type="xs:string" use="required"/>
                                    <xs:attribute name="href" type="xs:string" use="optional"/>
                                    <xs:attributeGroup ref="p:debug-schema-attributes"/>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="output" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:any processContents="lax" minOccurs="0"/>
                                    </xs:sequence>
                                    <xs:attribute name="name" type="xs:string" use="required"/>
                                    <xs:attribute name="id" type="xs:string" use="optional"/>
                                    <xs:attribute name="ref" type="xs:string" use="optional"/>
                                    <xs:attributeGroup ref="p:debug-schema-attributes"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute name="uri" type="xs:anyURI" use="optional"/>
                        <xs:attribute name="name" type="xs:anyURI" use="optional"/>
                        <xs:attribute name="encapsulation" type="xs:string" use="optional"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="choose">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="when" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:group ref="p:statements"/>
                                    <xs:attribute name="test" type="xs:string" use="required"/>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="otherwise" minOccurs="0">
                                <xs:complexType>
                                    <xs:group ref="p:statements"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute name="href" type="xs:string" use="required"/>
                        <xs:attributeGroup ref="p:debug-schema-attributes"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="for-each">
                    <xs:complexType>
                        <xs:group ref="p:statements"/>
                        <xs:attribute name="href" type="xs:string" use="required"/>
                        <xs:attribute name="select" type="xs:string" use="required"/>
                        <xs:attribute name="id" type="xs:QName" use="required"/>
                        <xs:attribute name="root" type="xs:QName" use="required"/>
                    </xs:complexType>
                </xs:element>
            </xs:choice>
        </xs:sequence>
    </xs:group>
    <xs:group name="statements">
        <xs:sequence>
            <xs:group ref="p:statement" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:group>
    <xs:attributeGroup name="debug-schema-attributes">
        <xs:attribute name="debug" type="xs:string" use="optional"/>
        <xs:attribute name="schema-href" type="xs:anyURI" use="optional"/>
        <xs:attribute name="schema-uri" type="xs:anyURI" use="optional"/>
    </xs:attributeGroup>
</xs:schema>



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/