XML validation pubschemavalidate

Hi All,
I have an XSD and XML and validating the xml against XSD.
When I use pub.schema.validate, it does not seem to validate the xml correctly,atleast according to XML spy.flowservice says it is true but it fails if I validate in XML spy.(Please see TEST_INDEX in xml which has balnk spaces padded)
Please find the attachments.
Help please.

testschema.xsd (1.3 k)

testxml.xml (0.2 k)


What are the different params you are setting in the validate service?
basically IS validates depends on the input you,check the documentation if you are not clear.


Thanks for taking time to look into that.
Actually ,I need to more clear ,the service is
1)xmlstringtoxmlnode;assign xmlstring with above xml.
xmlstring is :<test><test_index>1</test_index> <test_id>111</test_id><material_id>test</material_id><product_part_number>111</product_part_number></test>

2)validate:inputs are
map node to object
confirmsto:absolutepathofschema.(pleaseimport schema into directory)
run the service ,we get isValid =true even if we have spaces .

Along with setting conformsTo,also explicitly set the validate=true and ignoreContent=false,failifinvalid=true and play with these params various possible ways.you will see some effect in validation.


We did the following settings
confirmsTo: xsd(pathofxsd)
maxerrors=-1(puts more than one error in the errors object-pipeline out)
ignoreContent=false(default is false.I cannot put true because It need to validate the value which has got blank spaces in it with field defined as positiveInteger in XSD)
failInvalid:true(It raises exception if it fails in validation,but it is not failing in this case).

When we validate the same xml against the same XSD with XMLSPY then it fails and clearly shows as field containing spaces but not positiveIntegrer.

I believe IS is ignoring the xs:positiveInteger which i am not sure about this behaviour,but as far i know IS6.x strictly validates against the schema than in IS4.6.

If possible try to change in your schema and include the this way and load into IS and validate it.see attachment.

Change in Schema
change.txt (0.1 k)

Also check this link http://www.w3schools.com/schema/schema_complex_empty.asp

Sorry i am so extensive guy in XSD world.