[ 
https://issues.apache.org/jira/browse/XERCESJ-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16747676#comment-16747676
 ] 

Mukul Gandhi edited comment on XERCESJ-1705 at 1/21/19 6:22 AM:
----------------------------------------------------------------

Few other minor points.

1) You write in your XSD as following,

<xsd:sequence maxOccurs="unbounded">
     <xsd:element name="A">

...

I'd suggest following (I believe, this is more commonly followed),

<xsd:sequence>
     <xsd:element name="A" maxOccurs="unbounded">

...

2) In your file, NEW_PROBLEM.xml you write

<root xmlns="NAMESPACE"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
          xsi:schemaLocation="NAMESPACE PROBLEM.xsd">

...

I guess, it should be

<root xmlns="NAMESPACE"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
          xsi:schemaLocation="NAMESPACE NEW_PROBLEM.xsd">

....

(NEW_PROBLEM.xsd instead of PROBLEM.xsd)

Looks like this is a typo within your file.


was (Author: mukul_gandhi):
Few other minor points.

1) you write in your XSD as following,

<xsd:sequence maxOccurs="unbounded">
    <xsd:element name="A">

...

I'd suggest following (I believe, this is more commonly followed),

<xsd:sequence>
    <xsd:element name="A" maxOccurs="unbounded">

...

2) In your file, NEW_PROBLEM.xml you write

<root xmlns="NAMESPACE"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="NAMESPACE PROBLEM.xsd">

...

I guess, it should be

<root xmlns="NAMESPACE"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="NAMESPACE NEW_PROBLEM.xsd">

....

(NEW_PROBLEM.xsd instead of PROBLEM.xsd)

Looks like this is a typo within your file.

> Validation against asserts (1.1) is slow and takes up a lot of memory for 
> larger files.
> ---------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1705
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1705
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema 1.1 Structures
>    Affects Versions: 2.12.0
>            Reporter: Gerben Abbink
>            Priority: Major
>         Attachments: Java Heap Dump.png, NEW_PROBLEM.xml, NEW_PROBLEM.xsd, 
> PROBLEM.xml, PROBLEM.xsd, SaxonEETester.java, SaxonOutput.txt, 
> XercesOutput.txt, XercesTester.java, new_prob_mukul.xml, new_prob_mukul.xsd
>
>
> The validation of xml against asserts in XMLSchema 1.1 is slow and takes up a 
> lot of memory for larger xml files. I have created a simple test xml file 
> with lots of repetition and a corresponding xml schema to show the problem.
> It takes 20 sec. to validate the xml against the xml schema. When i remove 
> the asserts in the xml schema it takes just 1 second to validate. Testing was 
> done from the command prompt on a modern Windows machine with 8GByte memory.
> To compare, i have also validated the xml file against the xml schema in 
> XMLSpy. With asserts it takes 2 sec., without the asserts 1 sec. (XMLSpy does 
> not uses Xerces.)
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to