• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Extending DTD

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Can any one point me to some documents/examples or let me know how i can extend a DTD to add new elements and attributes?

Thanks,
Vijay V
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The best startup... - DTD tutorial
 
Vijay Venkat
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Balaji - Thanks for the Link.

I probably didn't phrase my question right.

I want to know how to Extend a DTD. If someone has already published a DTD and there are few place holders in the DTD where in certain elements allow its child to be of TYPE ANY. In this case i can add new elements there. But ANY in DTD means any element that is already defined in the DTD.
While ANY in schema means a new element, which need not be already declared in the scheam.

So if there is a DTD which has an element say CHEMICAL and has child by name CHEMICAL-EXTENSION which is of type ANY, now in this child element
CHEMICAL-EXTENSION - I want to add new elements which is not defined by the current DTD.

How can i do this. What is the recomended way to do it.

Thanks,
Vijay Venkat
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I haven't done this myself, ever, but I think you should look into the following approach:

1) Leave the existing DTD as it is.
2) Create a new DTD document where you define your new elements.
3) Add an ENTITY reference to the original DTD file...
<!ENTITY old SYSTEM "http://www.mydomain.com/old.dtd">
...and import it into the new DTD file:
&old;
 
Vijay Venkat
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Lasse Koskela,
I am back after a break.
Thanks a lot for your response. I will try and let you know how it works.

Regards,
Vijay Venkat
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic