[jira] [Updated] (XERCESC-1944) If an element is nil, child elements of this elements do not trigger a validation error
[ https://issues.apache.org/jira/browse/XERCESC-1944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Scott Cantor updated XERCESC-1944: -- Affects Version/s: 3.2.0 3.0.0 3.0.1 3.1.1 3.1.2 3.1.3 3.1.4 > If an element is nil, child elements of this elements do not trigger a > validation error > --- > > Key: XERCESC-1944 > URL: https://issues.apache.org/jira/browse/XERCESC-1944 > 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 XP, Microsoft Visual C++ 2008 >Reporter: Andreas Awenius > Fix For: 4.0.0 > > Attachments: shiporder.xml, shiporder.xsd > > > If an element is nil (xsi:nil="true") and this element has child elements, > Xercesc 3.1.0 does not report an error, although it should. > According to this link: > http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#cvc-elt > an element that is nil may not have any content and any child elements. > This behavior was also verified with Fujitsu's XWand XBRL Processor and > Altovas XMLSpy, which both issue this error. > It seems as if Xercesc tries to implement this behavior, given that the > comments in SchemaValidator.cpp, line 129 are a direct copy of the mentioned > web page: > // if nillable, it's an error to have value > // XML Schema REC: Validation Rule: Element Locally Valid (Element) > // 3.2.1 The element information item must have no > // character or element information item [children]. > // > However, no error is issued in such a constellation. > There is a related issue: > If the first child element of the nilled value (which is *not* nil) has > content, Xercesc issues the misguiding error message: > Message: element '' is nil and must be empty > It seems, as if the nil-flag of the parent element is incorrectly set for the > child element. > For the second and all other child elements this is not the case (no error is > reported). > Steps to reproduce: > Use the attached schema and instance document. > Invoke the DOMCount-sample from the Xercesc-distribution like this: > DOMCount.exe -v=always -s -n -f shiporder.xml -- 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-1944) If an element is nil, child elements of this elements do not trigger a validation error
[ https://issues.apache.org/jira/browse/XERCESC-1944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Scott Cantor updated XERCESC-1944: -- Fix Version/s: 4.0.0 > If an element is nil, child elements of this elements do not trigger a > validation error > --- > > Key: XERCESC-1944 > URL: https://issues.apache.org/jira/browse/XERCESC-1944 > 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 XP, Microsoft Visual C++ 2008 >Reporter: Andreas Awenius > Fix For: 4.0.0 > > Attachments: shiporder.xml, shiporder.xsd > > > If an element is nil (xsi:nil="true") and this element has child elements, > Xercesc 3.1.0 does not report an error, although it should. > According to this link: > http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#cvc-elt > an element that is nil may not have any content and any child elements. > This behavior was also verified with Fujitsu's XWand XBRL Processor and > Altovas XMLSpy, which both issue this error. > It seems as if Xercesc tries to implement this behavior, given that the > comments in SchemaValidator.cpp, line 129 are a direct copy of the mentioned > web page: > // if nillable, it's an error to have value > // XML Schema REC: Validation Rule: Element Locally Valid (Element) > // 3.2.1 The element information item must have no > // character or element information item [children]. > // > However, no error is issued in such a constellation. > There is a related issue: > If the first child element of the nilled value (which is *not* nil) has > content, Xercesc issues the misguiding error message: > Message: element '' is nil and must be empty > It seems, as if the nil-flag of the parent element is incorrectly set for the > child element. > For the second and all other child elements this is not the case (no error is > reported). > Steps to reproduce: > Use the attached schema and instance document. > Invoke the DOMCount-sample from the Xercesc-distribution like this: > DOMCount.exe -v=always -s -n -f shiporder.xml -- 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-1944) If an element is nil, child elements of this elements do not trigger a validation error
[ https://issues.apache.org/jira/browse/XERCESC-1944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Awenius updated XERCESC-1944: - Attachment: shiporder.xml shiporder.xsd If an element is nil, child elements of this elements do not trigger a validation error --- Key: XERCESC-1944 URL: https://issues.apache.org/jira/browse/XERCESC-1944 Project: Xerces-C++ Issue Type: Bug Components: Validating Parser (XML Schema) Affects Versions: 3.1.0 Environment: Windows XP, Microsoft Visual C++ 2008 Reporter: Andreas Awenius Attachments: shiporder.xml, shiporder.xsd If an element is nil (xsi:nil=true) and this element has child elements, Xercesc 3.1.0 does not report an error, although it should. According to this link: http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#cvc-elt an element that is nil may not have any content and any child elements. This behavior was also verified with Fujitsu's XWand XBRL Processor and Altovas XMLSpy, which both issue this error. It seems as if Xercesc tries to implement this behavior, given that the comments in SchemaValidator.cpp, line 129 are a direct copy of the mentioned web page: // if nillable, it's an error to have value // XML Schema REC: Validation Rule: Element Locally Valid (Element) // 3.2.1 The element information item must have no // character or element information item [children]. // However, no error is issued in such a constellation. There is a related issue: If the first child element of the nilled value (which is *not* nil) has content, Xercesc issues the misguiding error message: Message: element 'name' is nil and must be empty It seems, as if the nil-flag of the parent element is incorrectly set for the child element. For the second and all other child elements this is not the case (no error is reported). Steps to reproduce: Use the attached schema and instance document. Invoke the DOMCount-sample from the Xercesc-distribution like this: DOMCount.exe -v=always -s -n -f shiporder.xml -- 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