[Nml-wg] XML syntax for NML relations
Jason Zurawski
zurawski at internet2.edu
Wed Aug 31 05:13:54 CDT 2011
Hi Jeroen/All;
Just one note before I address your comments - remember that this is
only an example and wasn't meant to reflect the current reality of talks
on specific items or interactions. It really should not be used "as is".
On 8/31/11 5:19 AM, thus spake Jeroen van der Ham:
>
> On 30 Aug 2011, at 19:00, Jason Zurawski wrote:
>>
>> See the following minor chunk of (unverified/unchecked) schema:
>>
>>> namespace nml = "http://ogf.org/schema/nml/base/20110830/"
>>>
>>> NMLRelation = element nml:relation {
>>> (
>>> attribute type { "specifictype1" }&
>>> NMLLink&
>>> NMLLink
>>> ) |
>
>
> This definition doesn't seem to incorporate directionality, right?
No, its several lines if schema I wrote, from memory, didn't check via
automated tools, and probably won't save anywhere, to make a simple point.
> Or is this meant as a relation element that specifically takes a list of only two elements as argument?
Yes, its a minimalist way to get some semantics into the syntactic
checking step. I have never had to do this before, so I am sure it
could have been done in different ways. YMMV.
> Thinking about how we now define lists in a very implicit way, it seems to leave a lot of room for error in interpretation.
My point exactly - semantic checking is best handled by other means, not
the syntax parser.
> Once you have a relation, and their targets, the interpreter has to explicitly check how many arguments there are. If more than two, you have to check both for a "next" relation and make sure one points to the other.
It can be done this way, it is much harder and doesn't gain you much in
my opinion.
> Also, this way of defining lists makes it near impossible to extend this to lists within lists in the future.
I can't say, I haven't tried. I leave that as an exercise for others
who really want to see this idea pursued.
I stand by my earlier statements that semantic checking in the code is
much more efficient than something along these lines.
Thanks;
-jason
More information about the nml-wg
mailing list