XML parse with validation. Is assertion supported?



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

XML parse with validation. Is assertion supported?

Postby Wilsy » Wed Apr 13, 2016 2:23 pm

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
Wilsy
 
Posts: 3
Joined: Tue Feb 15, 2011 2:07 am
Has thanked: 0 time
Been thanked: 0 time

Re: XML parse with validation. Is assertion supported?

Postby BillyBoyo » Wed Apr 13, 2016 5:08 pm

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?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: XML parse with validation. Is assertion supported?

Postby Wilsy » Wed Apr 13, 2016 5:49 pm

Hi Billy

OPERATING SYSTEM LEVEL: z/OS 02.01.00 HBB7790

Cheers
Wilsy
Wilsy
 
Posts: 3
Joined: Tue Feb 15, 2011 2:07 am
Has thanked: 0 time
Been thanked: 0 time

Re: XML parse with validation. Is assertion supported?

Postby BillyBoyo » Wed Apr 13, 2016 8:25 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: XML parse with validation. Is assertion supported?

Postby Wilsy » Wed Apr 13, 2016 10:04 pm

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
Wilsy
 
Posts: 3
Joined: Tue Feb 15, 2011 2:07 am
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post