[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    [jira] Resolved: (XMLBEANS-52) Validator loops when schema has certain conditions
From:       "Cezar Andrei (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date:       2004-10-25 20:22:49
Message-ID: 726975448.1098735769774.JavaMail.apache () nagoya
[Download RAW message or body]

     [ http://issues.apache.org/jira/browse/XMLBEANS-52?page=history ]
     
Cezar Andrei resolved XMLBEANS-52:
----------------------------------

    Resolution: Won't Fix

On my box this takes 16 miliseconds, I think this is acceptable. Indeed there is a \
big loop there because of the NFA, and most probably this big loop would get \
optimized if DFA would be used in running the validating state machine, but the \
automaton can get exponentialy bigger.

> Validator loops when schema has certain conditions
> --------------------------------------------------
> 
> Key: XMLBEANS-52
> URL: http://issues.apache.org/jira/browse/XMLBEANS-52
> Project: XMLBeans
> Type: Bug
> Components: Validator, XmlObject
> Versions: unspecified
> Environment: Windows XP, Windows 2000, but i think it is in all OS.
> Reporter: Claus Elkjaer
> Assignee: Cezar Andrei
> Attachments: xmlBeansValidatorError.zip
> 
> When the following schema is used to generate XmlBeans, and a valid file is \
> validated using the XmlObject.validate(), then it loops. After 2 to 10 minuts it \
> returns. I claims 100% cpu usage while it loops. Here are the schema:
> <?xml version="1.0"?>
> <xsd:schema targetNamespace="http://pfa.dk/dummy/errorInXmlBeansValidation.xsd" \
> xmlns:tns="http://pfa.dk/dummy/errorInXmlBeansValidation.xsd" \
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" \
> attributeFormDefault="unqualified">  <!-- this schema is valid, but the XmlBeans \
> validation can't handle an unbounded collection of unbounded elements. -->  \
> <xsd:element name="aList" type="tns:MyList"/>  <xsd:complexType name="MyList">
> 		<xsd:sequence maxOccurs="unbounded">
> 			<xsd:element name="myListEntry" type="tns:ListEntry"  minOccurs="0"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:complexType name="ListEntry">
> 		<xsd:sequence>
> 			<xsd:element name="HelloWorld" type="xsd:string" minOccurs="0"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> </xsd:schema>
> and here is a simple xml file:
> <?xml version="1.0" encoding="UTF-8"?>
> <!--Sample XML file generated by XMLSPY v5 rel. 4 U (http://www.xmlspy.com)-->
> <aList xmlns="http://pfa.dk/dummy/errorInXmlBeansValidation.xsd" \
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \
> xsi:schemaLocation="http://pfa.dk/dummy/errorInXmlBeansValidation.xsd \
> C:\pfa\techr3\TransformationWorkbench\schema\errorInXmlBeansValidation.xsd">  \
> <myListEntry>  <HelloWorld>Hello World</HelloWorld>
> 	</myListEntry>
> </aList>
> I can send you a working java project, which shows the bug.
> Best Regards 
> Claus Elkjær

-- 
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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic