OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Writing a DTD

[ Lists Home | Date Index | Thread Index ]
  • From: Ramesh Gupta <ramesh@eNode.com>
  • To: xml-dev@lists.xml.org
  • Date: Fri, 03 Nov 2000 09:09:44 -0800

Use character entity references of the form &#n; where n is a decimal value
in the range '0' to '255' to represent a character from the extended ASCII
set, ISO 8859/1. So, for example, "(" can be written as &#40; and is
equivalent to the built-in text entity reference &lpar;

I also suggest that you get an XML primer and do some independent research.
The XML dev list is a great resource, but it is not a substitute for a good
book, of which there are plenty available now.

Ramesh


on 11/3/00 8:44 AM, Pramod Rao Pesara at ppesara@cs.nmsu.edu wrote:

> 
> thanks a lot. But is there a way to represent special characters like "(",
> ")" and "/" in a DTD?
> Pramod.
> 
> 
> 
> 
> 
> On Fri, 3 Nov 2000, Hanson, Jon wrote:
> 
>> 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@cs.nmsu.edu]
>>> Sent:    Friday, November 03, 2000 3:55 PM
>>> To:    xml-dev@lists.xml.org
>>> 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 
>> 
> 
> 


  • Follow-Ups:



 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS