Homework 1
- Look at the web page http://www.w3.org/TR/1999/REC-xml-names-19990114/
that describes the syntax for XML namespaces in a form of EBNF. Note that
some of the links take you to a page that describes general XML syntax. The
differences from the EBNF given in the book are as follows:
- the production symbol is ::=
- options are signified by a question mark instead of square brackets:
e.g. elem? instead of [elem]
- repetition is signified by an asterisk (for any number) or + (for one
or more) instead of braces: e.g. (elem1 elem2)* instead of {elem1 elem2}
- semantic constraints are noted in square brackets (nothing given in
the book - you can ignore these)
- comments are allowed thus: /* any text */ (not allowed in the book)
- Rewrite the rules 4, 6, 9, and 13 in original BNF notation using recursion
to replace iteration. Try to use as few additional rules as possible.
- Draw syntax diagrams for the original EBNF rules.
Assignment due: Monday, February 5th., in class.