cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist ...@wrinkledog.com>
Subject Re: [RT] Improved matching & selecting
Date Sat, 09 Dec 2006 04:14:24 GMT

On Dec 8, 2006, at 2:39 PM, Alfred Nathaniel wrote:

> Could you try to write a Relax NG schema sniplet (preferable in compact
> notation) for validating your proposed syntax?

OK, I think this is it.  Just a first swipe at it, I haven't tried 
validating anything against it, I've just run it through trang and 
that's all so far.  Not much to it, huh? :-)

Cheers,
—ml—

sitemap-matcher-engine.rnc
===================


grammar {

     start = Match

     MatchType =
           "exact"
         | "contains"
         | "path"
         | "regexp"

     Match =
         element match {
             attribute value { text }
             & (
                 Matchspec
                 | Alternative +
               )
         }

     Matchspec =
         InlineMatchspec
         | Branch +

     InlineMatchspec =
         attribute MatchType { text }

     Branch =
         element MatchType { text }

     Alternative =
         element when { Matchspec }

}

=============================


Mime
View raw message