Posted: Mon May 03, 2010 12:20 pm Post subject: Validation Error
Centurion
Joined: 12 Jun 2004 Posts: 128 Location: Chicago, IL
Hi,
We are using V7. I am trying to do a simple validation of XML message. I am creating an XML message and Validating it later against Validate node. Within the message structure I have couple of Float Elements and I am setting them to null using below Statement
SET OutputRoot.XMLNSC.xzy:abc.uvw:efg VALUE = NULL;
I am able to see empty tags but at the Validate node its failing with error:
"ParserException BIP5026E: XML schema validation error: 'cvc-datatype-valid.1.2: The value "" is not a valid value for the "float" datatype."
I do not understand how to resolve this. I am trying to generate empty tags for float elements in an XML message.
This is not a message broker issue. Your message flow is generating an XML message that does not conform to the rules in the XML schema (xsd).
The following facts might help you to resolve the problem:
- If the schema type is xs:float then the empty string is not a valid value for the element/attribute. See XML Schema Part 2 - Data types for more information.
- You are not setting this element to the empty string - you are setting its value to NULL, which is not the same thing at all. Having said that, you may well be better off adding an attribute xsi:nil="true" to these tags. That's the normal way to indicate an invalid value for XML data types which do not allow the empty string. If you do decide to do this, make sure the the element declaration in the xsd has xsi:nillable="true".
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum