[Home] [By Thread] [By Date] [Recent Entries]

  • From: "Hanson, Jon" <jhanson@l...>
  • To: 'Pramod Rao Pesara' <ppesara@c...>
  • Date: Fri, 03 Nov 2000 16:16:16 +0000

assuming your grammar is BNF so valid sentences would be e.g.:-

(lambda fred xyz)

(lambda a234 adf)
etc

then such expressions would not be valid xml,  so you can't really write a
DTD for them.
an XML equivalent of what you appear to be attempting might be something
like:-

<lambda>
	<name>fred</name>
	<body>xyz</body>
</lambda>

for which the DTD would look like:-

<!ELEMENT lambda  (name , body )> 
<!ELEMENT name  (#PCDATA )> 
<!ELEMENT body  (#PCDATA )>  

jon

> -----Original Message-----
> From:	Pramod Rao Pesara [SMTP:ppesara@c...]
> Sent:	Friday, November 03, 2000 3:55 PM
> To:	xml-dev@l...
> Subject:	Writing a DTD
> 
>  Hi,
>     I new to XMl and just learning to write DTDs. Could anyone please help
> 
> me in writing a DTD for the following Grammar. Here "lamda", "(" and
> ,")" are keywords and text1 and test2 can be any character data.
>     
>     Expression  ::=  "(" "lambda" text1 text2 ")"
>     
> Thank You.
> Pramod 

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member