Page 1 of 1

XML parse with validation. Is assertion supported?

PostPosted: Wed Apr 13, 2016 2:23 pm
by Wilsy
Hi guys

I tried to run this statement

xsdosrg -v -o FMSTR.osr -l XSDLIST.txt;

in the USS area to generate a COBOL compatible XSD.
I am using COBOL version 4.2

I get the following errors
ERROR: http://www.w3.org/TR/xml-schema-1 - s4s-elt-invalid-content.1
Element 'assert' is invalid, misplaced, or occurs too often.


The URL links to an invalid page.
The closest information I can find (which is not related specifically to COBOL) is here
http://stackoverflow.com/questions/3451 ... -too-often

It suggests that version 1.0 of XML does not support the assert statement.
Does anyone know if the xsdosrg utility supports XML 1.1 syntax e.g. the "assert" verb or if we are limited to XML 1.0?

Thanks
Wilsy

Re: XML parse with validation. Is assertion supported?

PostPosted: Wed Apr 13, 2016 5:08 pm
by BillyBoyo
The URL is perhaps https://www.w3.org/TR/xmlschema-1/

The 1.1, in two parts, is like this (for Part One) https://www.w3.org/TR/xmlschema11-1/

I can't find anything explicit. What z/OS are you on?

Re: XML parse with validation. Is assertion supported?

PostPosted: Wed Apr 13, 2016 5:49 pm
by Wilsy
Hi Billy

OPERATING SYSTEM LEVEL: z/OS 02.01.00 HBB7790

Cheers
Wilsy

Re: XML parse with validation. Is assertion supported?

PostPosted: Wed Apr 13, 2016 8:25 pm
by BillyBoyo
Thanks. That rules out one potential issue.

XML System Services User's Guide and Reference indicates support for XML 1.1 and documents xsdosrg (in Appendix C) but isn't explicit about what xsdosrg supports.

I'd guess the "more flexible" would support 1.1, but don't know.

I've just had a look for an IBM Developerworks XML forum, but they seem to be full of spam.

Perhaps a PMR to IBM? Perhaps a question on the IBM-MAIN mailing list, there was some talk there on OSR recently.

Re: XML parse with validation. Is assertion supported?

PostPosted: Wed Apr 13, 2016 10:04 pm
by Wilsy
Thanks Billy
I think we might have to contact IBM for advice.
We could code the assertions into the application and remove them from the xsd but it would be a shame if we had to do that.

Cheers
Wilsy