[Nml-wg] XML syntax for NML relations

Jason Zurawski zurawski at internet2.edu
Fri Aug 26 08:46:02 CDT 2011


Hi Jeroen/All;

On 8/25/11 10:42 AM, thus spake Jeroen van der Ham:
> Hi all,
>
> I've discussed with Freek yesterday, and I think the main issue here
> is that there are different positions regarding validation and
> parsing of XML files.
>
> Jason has the position of a programmer using some XML library to
> parse XML files, create objects and general data out of it. The idea
> is that you take an XML file handed to the program, process it and
> make the best of it. There is no explicit validation. This seems
> reasonably similar to how browsers process HTML files for example.
>
> Freek on the other hand was thinking of how XML is handled in the
> SOAP/WSDL/Webservices world. There you have strict typing, explicit
> validation, code generation, et cetera. Everything has to adhere to
> reasonably strict schemas, otherwise most WS stacks refuse to work.
>
> While I understand that most of the NML files for monitoring will be
> processed by PerfSONAR and similar tools, I would prefer that the
> eventual schema would also be useful for WSDL style operations. I
> know that the datatypes used there are reasonably strict, does anyone
> know whether the current proposed XML schema is compatible with that
> context as well?

To some extent.  Certain fields can be typed, others it won't make sense 
to do.  The major objection (at least in prior mails) appears to be 
'relation' being a generic chunk of XML that is hard to decode simply by 
syntactic validation.  The only way you can deference this is via a self 
enumerated list of possible 'types'.

The type string would dictate what/how many of specific elements could 
be in there.  I can imagine a situation where you can get _limited_ 
syntactic checking, but the tradeoff is that you would need to 
pre-define lots of these beforehand.  Let me self-assign an action to 
send a schema that describes this in some way.  I am not sure it walk 
calm the entire discussion, but it will be a good exercise.

Regarding WSDL, recall that there are different 'styles' of 
communication in web services world.  Here is a good intro:

http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/

perfSONAR/NMC/NM are 'document literal', e.g. basically a complete XML 
document that contains meaning that we will decode on our own (in the 
processing code).  This makes it very hard to strongly type things to 
the same level that RPC varieties would.  Typically the RPC varieties 
lend themselves to automatic stub generation and the like.

Thanks;

-jason


More information about the nml-wg mailing list