Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-683

Validator throws InvalidDatatypeValueException - The unary operation node had a binary node type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 2.1.0
    • 2.2.0
    • None
    • Operating System: Windows NT/2K
      Platform: PC
    • 13708

    Description

      Xerces C++ validating parser throws following error message -

      Error at file C:\xerces-c-src2_1_0\Build\Win32\VC6\Debug\schema.xml, line 8, cha
      r 28
      Message: Datatype error: Type:InvalidDatatypeValueException, Message:The unary
      operation node had a binary node type.

      Note : if it helps - the exception was thrown from BooleanDatatypeValidator.cpp
      when I ran it in debugger.

      The same xml file gets parsed fine with XercesJava 1.4 and TIBCO Extensibility
      parsers.

      I'm using SAX2Print example in XercexC++ samples to recreate the problem.

      I'm inlining the xml and xsd file in this mail as I'm not sure how to send
      attachments with this.

      Pl. feel free to contact me if you need any more information.
      Also let me know if there is something wrong with the way I'm doing things here.

      Note: I've simplified both the xml and xsd to demonstrate the problem, it is
      part of more complex structure, but the behavior is same in either case.

      Thanx a lot,
      Sandeep Desale

      ------------- XML file schema.xml – Starts Here

      <?xml version = "1.0" encoding = "UTF-8"?>
      <ns:CrossPlatform xsi:type = "ns:CrossPlatform" xmlns:xsi =
      "http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd =
      "http://www.w3.org/2001/XMLSchema" xmlns:ns =
      "http://www.tibco.com/xmlns/ae2xsd/2002/05/ae/test/cross/XPschema"
      xsi:schemaLocation =
      "http://www.tibco.com/xmlns/ae2xsd/2002/05/ae/test/cross/XPschema s1.xsd">
      <a_seqseq_any>
      <item>
      <item xsi:type="xsd:boolean">1</item>
      </item>
      </a_seqseq_any>
      <a_i4>-1000111000</a_i4>
      </ns:CrossPlatform>

      ------------- XML file schema.xml – Ends Here

      ------------- XSD file s1.xsd --------- Starts Here

      <?xml version = "1.0" encoding = "UTF-8"?>
      <!--Generated by Turbo XML 2.3.0.100. Conforms to w3c
      http://www.w3.org/2001/XMLSchema-->
      <schema xmlns = "http://www.w3.org/2001/XMLSchema"
      targetNamespace =
      "http://www.tibco.com/xmlns/ae2xsd/2002/05/ae/test/cross/XPschema"
      xmlns:tns =
      "http://www.tibco.com/xmlns/ae2xsd/2002/05/ae/test/cross/XPschema"
      xmlns:xsd = "http://www.w3.org/2001/XMLSchema"
      elementFormDefault = "unqualified"
      attributeFormDefault = "unqualified">
      <complexType name = "CrossPlatform" >
      <sequence>
      <element name = "a_seqseq_any" minOccurs = "0">
      <complexType>
      <sequence>
      <element name = "item"
      minOccurs = "0" maxOccurs = "unbounded">
      <complexType>
      <sequence>
      <element
      name = "item" type = "anyType" minOccurs = "0" maxOccurs = "unbounded"/>
      </sequence>
      </complexType>
      </element>
      </sequence>
      </complexType>
      </element>
      <element name = "a__i4" type = "xsd:int" nillable =
      "true" minOccurs = "0"/>
      </sequence>
      </complexType>
      <element name = "CrossPlatform" type = "tns:CrossPlatform"/>
      </schema>

      ------------- XSD file s1.xsd --------- Ends Here

      Attachments

        Activity

          People

            Unassigned Unassigned
            sdesale@hotmail.com Sandeep Desale
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: