Re: sparlx.rnc in CVS

On Thu, Mar 24, 2005 at 12:25:14PM +0000, Seaborne, Andy wrote:

> sparqlx.rnc defines something rather different - it does not seem to allow 
> the nesting of GRAPH and UNION for example.  Is there a reason for
> this?

My struggle to understand the grammar of sparql -- the only reason I
can think of.

> I 
> would assume it isn't a restriction due to the protocol

Absolutely not. I would have made that very clear if that were the
case.

> element query-pattern {
>       (element group-pattern
>          | element triple-pattern
>          | element optional-group { group-pattern }
>          | element dataset-constraint {
>              (uri | variable), group-pattern
>            }
>          | element union { group-pattern* }
>          | element constraint { ... }
>          | element group-pattern
>       )*
>     }

Ah, okay, I understand this better now. 

> [[Apologies for any incomprehensible RelaxNG - I haven't quite got round to 
> setting up some tools for it yet.]]

Mine isn't great either, but I think

     http://www.w3.org/2001/sw/DataAccess/sparqlx.rnc
     # $Id: sparqlx.rnc,v 1.3 2005/03/24 14:20:03 kclark Exp $

does what you're asking for (in a different way, but same thing, I
believe). The relevant section now reads:

group-pattern =
    element group-pattern {
        attribute optional { xsd:boolean }?,
        (group-pattern*, triple-pattern*, dataset-constraint*, union*, constraint?)
    }

I still have optional as an attribute; though I believe that to be
semantically equivalent to the optional-group element form you
suggested.

Kendall Clark

Received on Thursday, 24 March 2005 14:22:54 UTC