rag_gupta wrote:What are those options? I wish validation from typed code or from url should give same validation results.
This should help (includes comments):
- Code: Select all
setFlag(1,65536,1); // CSEVALFLAG1XMLCOMPAT (65536)
setFlag(1,64,1); // CSEVALFLAG1REQUIREOPTIONALENDTAGS (64)
setFlag(1,262144,1); // CSEVALFLAG1REQUIREQUICKCLOSE (262144)
setFlag(1,131072,1); // CSEVALFLAG1REQUIREQUOTEDATTVALUES (131072)
setFlag(1,524288,1); // CSEVALFLAG1NOUPPERCASE (524288)
setFlag(1,1,1); // CSEVALFLAG1CHECKNESTING (1)
setFlag(1,4194304,1); // CSEVALFLAG1REQUIREATTVALUES (4194304)
setFlag(9,2,1); // CSEVALFLAG2MATCHATTVALUECASE (2)
setFlag(1,1048576,1); // CSEVALFLAG1XMLSPACEWARNING
You can pull those options out of the "if" statement and always execute the ones you want. A better way is to just set them in the
Validator Engine Options under the various option pages (hopefully you can figure out what is what!), but you can override the options set in the
Validator Engine Options with the setFlag() function in the start validation program.
By setting some options to be stricter, then you should be able to get more consistent results regardless of the DOCTYPE.