[jira] [Updated] (XERCESC-1881) xsd sequence validation reporting errors too late
[ https://issues.apache.org/jira/browse/XERCESC-1881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Scott Cantor updated XERCESC-1881: -- Affects Version/s: 3.2.0 > xsd sequence validation reporting errors too late > - > > Key: XERCESC-1881 > URL: https://issues.apache.org/jira/browse/XERCESC-1881 > Project: Xerces-C++ > Issue Type: Bug > Components: Validating Parser (XML Schema) >Affects Versions: 3.0.0, 3.0.1, 3.1.0, 3.1.1, 3.1.2, 3.2.0, 3.1.3, 3.1.4 > Environment: Windows Visaa 32, Xerces 3.0.1 >Reporter: Brian Hoyt > Fix For: 3.2.0, 4.0.0 > > > Validation using the following xsd and xml results in two different results > between XercesJ and XercesC++. > For java I get the error reporting the sequence error right after the > processing of element because > cannot appear after . But for C++ the error is not reported until the > last element within has been > processed. This obviously isn't correct because by that time it is too late. > The way Java is reporting it seems to > be correct so that I can stop processing the xml file. > > > > > > maxOccurs='1'/> > maxOccurs='unbounded'/> > maxOccurs='unbounded'/> > maxOccurs='1'/> > > > > > > http://www.w3.org/2001/XMLSchema-instance; >xsi:noNamespaceSchemaLocation='foo.xsd'> > www.foo.com > Boss > ch...@foo.com > > > The output from running the XercesJ 2.9.1 Writer sample on the above xsd/xml > is: > > www.foo.com > [Error] foo.xml:5:11: cvc-complex-type.2.4.a: Invalid content was found > star > ting with element 'name'. One of '{url, link}' is expected. > Boss > ch...@foo.com > > > The output from running the XercesC++ 3.0.1 > > > www.foo.com > Boss > ch...@foo.com > > Error at file C:\xerces-3_0_1\bin/foo.xml, line 8, char 10 > Message: element 'name' is not allowed for content model > '((name,email,url),li > nk)' > -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: c-dev-h...@xerces.apache.org
[jira] [Updated] (XERCESC-1881) xsd sequence validation reporting errors too late
[ https://issues.apache.org/jira/browse/XERCESC-1881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Scott Cantor updated XERCESC-1881: -- Affects Version/s: 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 > xsd sequence validation reporting errors too late > - > > Key: XERCESC-1881 > URL: https://issues.apache.org/jira/browse/XERCESC-1881 > Project: Xerces-C++ > Issue Type: Bug > Components: Validating Parser (XML Schema) >Affects Versions: 3.0.0, 3.0.1, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4 > Environment: Windows Visaa 32, Xerces 3.0.1 >Reporter: Brian Hoyt > Fix For: 3.2.0, 4.0.0 > > > Validation using the following xsd and xml results in two different results > between XercesJ and XercesC++. > For java I get the error reporting the sequence error right after the > processing of element because > cannot appear after . But for C++ the error is not reported until the > last element within has been > processed. This obviously isn't correct because by that time it is too late. > The way Java is reporting it seems to > be correct so that I can stop processing the xml file. > > > > > > maxOccurs='1'/> > maxOccurs='unbounded'/> > maxOccurs='unbounded'/> > maxOccurs='1'/> > > > > > > http://www.w3.org/2001/XMLSchema-instance; >xsi:noNamespaceSchemaLocation='foo.xsd'> > www.foo.com > Boss > ch...@foo.com > > > The output from running the XercesJ 2.9.1 Writer sample on the above xsd/xml > is: > > www.foo.com > [Error] foo.xml:5:11: cvc-complex-type.2.4.a: Invalid content was found > star > ting with element 'name'. One of '{url, link}' is expected. > Boss > ch...@foo.com > > > The output from running the XercesC++ 3.0.1 > > > www.foo.com > Boss > ch...@foo.com > > Error at file C:\xerces-3_0_1\bin/foo.xml, line 8, char 10 > Message: element 'name' is not allowed for content model > '((name,email,url),li > nk)' > -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: c-dev-h...@xerces.apache.org
[jira] Updated: (XERCESC-1881) xsd sequence validation reporting errors too late
[ https://issues.apache.org/jira/browse/XERCESC-1881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Boris Kolpackov updated XERCESC-1881: - Fix Version/s: (was: 3.1.0) 4.0.0 3.2.0 Rescheduling to 3.2.0/4.0.0. xsd sequence validation reporting errors too late - Key: XERCESC-1881 URL: https://issues.apache.org/jira/browse/XERCESC-1881 Project: Xerces-C++ Issue Type: Bug Components: Validating Parser (XML Schema) Affects Versions: 3.0.1 Environment: Windows Visaa 32, Xerces 3.0.1 Reporter: Brian Hoyt Fix For: 3.2.0, 4.0.0 Validation using the following xsd and xml results in two different results between XercesJ and XercesC++. For java I get the error reporting the sequence error right after the processing of element url because name cannot appear after url. But for C++ the error is not reported until the last element within person has been processed. This obviously isn't correct because by that time it is too late. The way Java is reporting it seems to be correct so that I can stop processing the xml file. ?xml version=1.0 encoding=UTF-8? xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' xs:element name=person xs:complexType xs:sequence xs:element name=name type='xs:string' minOccurs='0' maxOccurs='1'/ xs:element name=email type='xs:string' minOccurs='0' maxOccurs='unbounded'/ xs:element name=urltype='xs:string' minOccurs='0' maxOccurs='unbounded'/ xs:element name=link type='xs:string' minOccurs='0' maxOccurs='1'/ /xs:sequence /xs:complexType /xs:element /xs:schema ?xml version=1.0 encoding=UTF-8? person xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:noNamespaceSchemaLocation='foo.xsd' urlwww.foo.com/url nameBoss/name emailch...@foo.com/email link/ /person The output from running the XercesJ 2.9.1 Writer sample on the above xsd/xml is: person xsi:noNamespaceSchemaLocation=foo.xsd urlwww.foo.com/url [Error] foo.xml:5:11: cvc-complex-type.2.4.a: Invalid content was found star ting with element 'name'. One of '{url, link}' is expected. nameBoss/name emailch...@foo.com/email link/link /person The output from running the XercesC++ 3.0.1 ?xml version=1.0 encoding=LATIN1? person xsi:noNamespaceSchemaLocation=foo.xsd urlwww.foo.com/url nameBoss/name emailch...@foo.com/email link/link Error at file C:\xerces-3_0_1\bin/foo.xml, line 8, char 10 Message: element 'name' is not allowed for content model '((name,email,url),li nk)' /person -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: c-dev-h...@xerces.apache.org
[jira] Updated: (XERCESC-1881) xsd sequence validation reporting errors too late
[ https://issues.apache.org/jira/browse/XERCESC-1881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Boris Kolpackov updated XERCESC-1881: - Component/s: (was: SAX/SAX2) Validating Parser (XML Schema) This is due to the way Xerces-C++ validates content. It builds up a model of the content and then runs a regex-like grammar (constructed from schema) on it to make sure it is valid. I agree this behavior is wrong but fixing it will require changing the way validation is performed. xsd sequence validation reporting errors too late - Key: XERCESC-1881 URL: https://issues.apache.org/jira/browse/XERCESC-1881 Project: Xerces-C++ Issue Type: Bug Components: Validating Parser (XML Schema) Affects Versions: 3.0.1 Environment: Windows Visaa 32, Xerces 3.0.1 Reporter: Brian Hoyt Validation using the following xsd and xml results in two different results between XercesJ and XercesC++. For java I get the error reporting the sequence error right after the processing of element url because name cannot appear after url. But for C++ the error is not reported until the last element within person has been processed. This obviously isn't correct because by that time it is too late. The way Java is reporting it seems to be correct so that I can stop processing the xml file. ?xml version=1.0 encoding=UTF-8? xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' xs:element name=person xs:complexType xs:sequence xs:element name=name type='xs:string' minOccurs='0' maxOccurs='1'/ xs:element name=email type='xs:string' minOccurs='0' maxOccurs='unbounded'/ xs:element name=urltype='xs:string' minOccurs='0' maxOccurs='unbounded'/ xs:element name=link type='xs:string' minOccurs='0' maxOccurs='1'/ /xs:sequence /xs:complexType /xs:element /xs:schema ?xml version=1.0 encoding=UTF-8? person xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:noNamespaceSchemaLocation='foo.xsd' urlwww.foo.com/url nameBoss/name emailch...@foo.com/email link/ /person The output from running the XercesJ 2.9.1 Writer sample on the above xsd/xml is: person xsi:noNamespaceSchemaLocation=foo.xsd urlwww.foo.com/url [Error] foo.xml:5:11: cvc-complex-type.2.4.a: Invalid content was found star ting with element 'name'. One of '{url, link}' is expected. nameBoss/name emailch...@foo.com/email link/link /person The output from running the XercesC++ 3.0.1 ?xml version=1.0 encoding=LATIN1? person xsi:noNamespaceSchemaLocation=foo.xsd urlwww.foo.com/url nameBoss/name emailch...@foo.com/email link/link Error at file C:\xerces-3_0_1\bin/foo.xml, line 8, char 10 Message: element 'name' is not allowed for content model '((name,email,url),li nk)' /person -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: c-dev-h...@xerces.apache.org
[jira] Updated: (XERCESC-1881) xsd sequence validation reporting errors too late
[ https://issues.apache.org/jira/browse/XERCESC-1881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Boris Kolpackov updated XERCESC-1881: - Fix Version/s: 3.1.0 Tentatively scheduling it for 3.1.0. xsd sequence validation reporting errors too late - Key: XERCESC-1881 URL: https://issues.apache.org/jira/browse/XERCESC-1881 Project: Xerces-C++ Issue Type: Bug Components: Validating Parser (XML Schema) Affects Versions: 3.0.1 Environment: Windows Visaa 32, Xerces 3.0.1 Reporter: Brian Hoyt Fix For: 3.1.0 Validation using the following xsd and xml results in two different results between XercesJ and XercesC++. For java I get the error reporting the sequence error right after the processing of element url because name cannot appear after url. But for C++ the error is not reported until the last element within person has been processed. This obviously isn't correct because by that time it is too late. The way Java is reporting it seems to be correct so that I can stop processing the xml file. ?xml version=1.0 encoding=UTF-8? xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' xs:element name=person xs:complexType xs:sequence xs:element name=name type='xs:string' minOccurs='0' maxOccurs='1'/ xs:element name=email type='xs:string' minOccurs='0' maxOccurs='unbounded'/ xs:element name=urltype='xs:string' minOccurs='0' maxOccurs='unbounded'/ xs:element name=link type='xs:string' minOccurs='0' maxOccurs='1'/ /xs:sequence /xs:complexType /xs:element /xs:schema ?xml version=1.0 encoding=UTF-8? person xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:noNamespaceSchemaLocation='foo.xsd' urlwww.foo.com/url nameBoss/name emailch...@foo.com/email link/ /person The output from running the XercesJ 2.9.1 Writer sample on the above xsd/xml is: person xsi:noNamespaceSchemaLocation=foo.xsd urlwww.foo.com/url [Error] foo.xml:5:11: cvc-complex-type.2.4.a: Invalid content was found star ting with element 'name'. One of '{url, link}' is expected. nameBoss/name emailch...@foo.com/email link/link /person The output from running the XercesC++ 3.0.1 ?xml version=1.0 encoding=LATIN1? person xsi:noNamespaceSchemaLocation=foo.xsd urlwww.foo.com/url nameBoss/name emailch...@foo.com/email link/link Error at file C:\xerces-3_0_1\bin/foo.xml, line 8, char 10 Message: element 'name' is not allowed for content model '((name,email,url),li nk)' /person -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: c-dev-h...@xerces.apache.org