![](https://secure.gravatar.com/avatar/c1921bc356229c4a803b8ad10b76077e.jpg?s=120&d=mm&r=g)
While we're at it… Any idea why the following gives an error saying "restriction on string sequences violated"? # Hacked together from the RELAX NG Schema for iCalendar in XML default namespace = "urn:ietf:params:xml:ns:icalendar-2.0-hack" type-weekday = ( "SU" | "MO" | "TU" | "WE" | "TH" | "FR" | "SA" ) type-byday = element byday { xsd:integer?, type-weekday } start = element icalendar { type-byday+ } thanks again, Cyrus On Mar 6, 2012, at 10:20 AM, David Lichteblau wrote:
Quoting Cyrus Harmon (ch-lisp@bobobeach.com):
Is the former invalid RNC or is cxml-rng's parser barfing where it shouldn't? A complete, minimal-ish example is shown below and attempting to parse it gives:
The RNC is invalid:
| There is no notion of operator precedence. It is an error for patterns | to combine the |, &, , and - operators without using parentheses to | make the grouping explicit. For example, foo | bar, baz is not allowed; | instead, either (foo | bar), baz or foo | (bar, baz) must be used. A | similar restriction applies to name classes and the use of the | and - | operators.
The fun part: The spec has not one but two BNFs.
The first BNF is incorrect and you're supposed to basically ignore it. The second BNF correct but much less readable:
| These restrictions are not expressed in the above EBNF but | they are made explicit in the BNF in Section 1.
d.