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

  • To: <xml-dev@l...>
  • Subject: Type of an Element
  • From: "rajac" <rajac@n...>
  • Date: Tue, 12 Feb 2002 22:42:52 +0530

Hi,
  
    This is a sample DTD.
<!ELEMENT foo (bar)*>
<!ELEMENT name (foo)>
<!ELEMENT bar (#PCDATA)>
 
The corresponding XML.
<?xml version="1.0"?>
<!DOCTYPE foo SYSTEM "foo.dtd">
  <foo>
     <bar> test </bar>
     <bar> test1 </bar>
     <name>
         <bar> test </bar>
         <bar> test </bar>
     </name>
  </foo>

I Wanted to use the DTD in the above way. ie I wanted to have an element's type to be of another element. How this can be achieved?. But if i use the above document, the parser will definitely will throw error.
 
Regards,
Raja

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