====== Kurs XML - Zadanie 9. ====== ===== Treść ===== Consider a toy variant of XHTML named ToyXHTML whose syntax may be described as follows: *The root element named doc contains a sequence of p and h1 elements. *An h1 element may contain character data but no subelements. *Each p element contains text (character data) that may be marked up with em and a elements. *Every a element has either a name attribute or an href attribute (not both!), and the value of the latter must be a URI. Formalize the syntax of ToyXHTML using your favorite schema language. ===== Rozwiązanie ===== datatypes xs = "http://www.w3.org/2001/XMLSchema-datatypes" element doc { ( element p { ( text | element em { text } | element a { (attribute name { text } | attribute href { xs:anyURI }), text } )* } | element h1 { text } )* } {{tag>[listy_zadan]}}