HiThanks for your latest email.Is it the case that none of the XML files in 
your latest test-cases has as many as 40 lines of XML constructs? (The 
significance of the number 40 for me is that it was the first line at which I 
observed the erratic behaviour that I reported. I suspect that, if I had 
truncated my XML files to have fewer than 40 lines, I would not have observed 
any problems. Or have I missed the point that you were making?)Best 
regards,John.Sent from my Samsung device

-------- Original message --------
From: Mukul Gandhi <muk...@apache.org> 
Date: 30/08/2020  12:44  (GMT+00:00) 
To: j-users@xerces.apache.org 
Subject: Re: Re: Possible Bug: Xerces 2.12.1 for XML Validation with XSD 1.1 
Schema under Java - Plain Text 

I just played around, with this kind of XSD validation, but using somewhat 
simple XSD and XML input documents. Below are mentioned my XSD and XML input 
documents,XSD document,<?xml version="1.0"?><xs:schema 
xmlns:xs="http://www.w3.org/2001/XMLSchema"                    
elementFormDefault="qualified">               <xs:element name="X">       
<xs:complexType>           <xs:sequence>               <xs:element 
name="fileName" type="FileName" maxOccurs="unbounded"/>           
</xs:sequence>       </xs:complexType>    </xs:element>        <xs:complexType 
name="FileName">       <xs:simpleContent>          <xs:extension 
base="xs:string">             <xs:attribute name="att1" type="xs:string"/>      
       <xs:assert test="if (./text()[matches(., 'a[0-9]')]) then @att1 else 
true()"/>          </xs:extension>       </xs:simpleContent>    
</xs:complexType>    </xs:schema>XML input document (which is found as valid 
with above mentioned schema document),<?xml version="1.0"?><X>  
<fileName>a</fileName>  <fileName>b</fileName>  <!-- comment ... -->  <fileName 
att1="az">a0</fileName>  <!-- comment ... -->  <fileName>c</fileName>  
<fileName att1="az">a5</fileName></X>When I remove comments from above 
mentioned XML input document, I still see the XML input document as valid.The 
following XML input documents are found as invalid,<?xml version="1.0"?><X>  
<fileName>a</fileName>  <fileName>b</fileName>  <!-- comment ... -->  
<fileName>a0</fileName>  <!-- comment ... -->  <fileName>c</fileName>  
<fileName att1="az">a5</fileName></X><?xml version="1.0"?><X>  
<fileName>a</fileName>  <fileName>b</fileName>  <!-- comment ... -->  
<fileName>a0</fileName>  <!-- comment ... -->  <fileName>c</fileName>  
<fileName>a5</fileName></X>Therefore, fundamentally I don't see a bug with 
Xerces-J with the kind of XSD and XML input documents discussed within this 
thread & the Jira issue (those that are provided by John). -- Regards,Mukul 
Gandhi

Reply via email to