Re: online XML Schema validation service, python bindings
Mukul Gandhi <[email protected]> Sun, 24 May 2020 18:35:05 +0530
| Newsgroups | gmane.text.xml.schema.devel |
|---|---|
| Message-ID | <CABuuzNPQ3D5cssEpm0+SupNWL4r1g5xffcAMkYwh=mOc5tBssw@mail.gmail.com> |
--000000000000d70fec05a66483bc Content-Type: text/plain; charset="UTF-8" Thanks for your comments. More replies below. On Sun, May 24, 2020 at 4:31 PM Michael Kay <[email protected]> wrote: > (a) To allow schema validation to be invoked over HTTP, it would be a good > idea to define a standard XML vocabulary for the validation report. I > wouldn't expect two validators to produce exactly the same errors, but the > information in the errors (e.g. line number, constraint reference, etc) > could be delivered in the same way. > That's a good idea, and could be done. Currently, for innovation of my online XML Schema validation service from python, the python program invokes an API end-point on the server, and the server returns message strings (that could typically be error messages, or a validation success message) delimited by '\n'. For the web page of this 'online XML Schema validation service', where we upload the XML and XSD document(s) via the browser upload dialog, the server responds with HTML content (containing error & success messages). > (b) Also, I expect that in many cases you would want to validate many > input documents against the same schema. That means the online service > should have some kind of persistent store of registered schemas that can be > invoked by name, rather than uploading the schema on each request. > That's a good idea as well. To implement this, I guess following changes to 'online XML Schema validation service' might be needed, 1) Users would be required to register on the site, and shall get an API key to invoke the remote XML validation APIs via programs. 2) Users can do one time upload of specific XML schemas, and can bind the schema with a user specific name. Users would also need a way to edit these bindings, in case they wish to rectify mistakes. 3) To do the validation, users can then make API invocation via program, uploading an XML instance document and also mention the user specified name of the schema within the HTTP request. The combination of steps 2) & 3) could be an option, to how the site currently offers 'online XML Schema validation service' (i.e., upload the schema on each request). Overall, implementing above concepts, are significant modifications to this 'online XML Schema validation service'. Let's see if I might, implement above ideas in the future. -- Regards, Mukul Gandhi --000000000000d70fec05a66483bc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Thanks for your comments. More replies below.</div><b= r><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, = May 24, 2020 at 4:31 PM Michael Kay <<a href=3D"mailto:[email protected]= ">[email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_quot= e" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)= ;padding-left:1ex"><div style=3D"overflow-wrap: break-word;"><div>(a) To al= low schema validation to be invoked over HTTP, it would be a good idea to d= efine a standard XML vocabulary for the validation report. I wouldn't e= xpect two validators to produce exactly the same errors, but the informatio= n in the errors (e.g. line number, constraint reference, etc) could be deli= vered in the same way.</div></div></blockquote><div><br></div><div>That'= ;s a good idea, and could be done.</div><div><br></div><div>Currently, for = innovation=C2=A0of my online XML Schema validation service from python, the= python program invokes an API end-point on the server, and the server retu= rns message strings (that could typically be error messages, or a validatio= n success message) delimited by '\n'.</div><div><br></div><div>For = the web page of this 'online XML Schema validation service', where = we upload the XML and XSD document(s) via the browser upload dialog, the se= rver responds with HTML content (containing error & success messages).<= /div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px= 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><di= v style=3D"overflow-wrap: break-word;"><div>(b) Also, I expect that in many= cases you would want to validate many input documents against the same sch= ema. That means the online service should have some kind of persistent stor= e of registered schemas that can be invoked by name, rather than uploading = the schema on each request.</div></div></blockquote><div><br></div><div>Tha= t's a good idea as well. To implement this, I guess following changes t= o 'online XML Schema validation service' might be needed,</div><div= >1) Users would be required to register on the site, and shall get an API k= ey to invoke the remote XML validation APIs via programs.</div><div>2) User= s can do one time upload of specific XML schemas, and can bind the schema w= ith a user specific name. Users would also need a way to edit these binding= s, in case they wish to rectify mistakes.</div><div>3) To do the validation= , users can then make API invocation via program, uploading an XML instance= document and also mention the user specified name of the schema within the= HTTP request.</div><div>The combination of steps 2) & 3) could be an o= ption, to how the site currently offers 'online XML Schema validation s= ervice' (i.e., upload the schema on each request).</div><div><br></div>= <div>Overall, implementing above concepts, are significant modifications to= this 'online XML Schema validation service'. Let's see if I mi= ght, implement above ideas in the future.</div><div><br></div><div>=C2=A0</= div></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr" class=3D= "gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div dir=3D"ltr"><= div dir=3D"ltr"><div>Regards,<br>Mukul Gandhi</div></div></div></div></div>= </div></div></div> --000000000000d70fec05a66483bc--