• 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

Can we define an extra Misc element in DTD??

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,
In our project, the managers are planning using XML technologies and are designing the DTDs. According to the plan, all the feilds are being added. But there is not scope for a Misc data. Now if this goes live, they would use XSL so display the data. I think based on the way they want to display and the DTD there are slight differences and thought may be they could add a Misc element so that if at all the XSL needs any help to display they could send it through this element. They could use parameters from the program to set some values but this XML should be sent to some other depts and the same XSL would be used to display the data.
Is it a right practice? Any suggestions would be greatly appreciated.
Adithi.
 
Author
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by adithi gudipudi:
Hello All,
In our project, the managers are planning using XML technologies and are designing the DTDs. According to the plan, all the feilds are being added. But there is not scope for a Misc data. Now if this goes live, they would use XSL so display the data. I think based on the way they want to display and the DTD there are slight differences and thought may be they could add a Misc element so that if at all the XSL needs any help to display they could send it through this element. They could use parameters from the program to set some values but this XML should be sent to some other depts and the same XSL would be used to display the data.
Is it a right practice? Any suggestions would be greatly appreciated.


Extending your schema based on real-world markup practice is certainly possible, and in many cases unavoidable. Ideally, you should upgrade both your schema(s) and your stylesheet(s) at once, so that they remain in sync. If you don't control all the places where your XML is used, take extra care to ensure that your extensions are backwards-compatible and will not break things for those who use old versions of the stylesheets or other software.
If however some of the users will have old schemas trying to validate new XML and if those schemas are DTDs, then you're likely to have validation problems. This is another reason not to use DTDs in favor of more modern and flexible schema languages, where a schema may be designed with a good amount of extensibility built in and not require changing in responce to each new element or attribute you add.
reply
    Bookmark Topic Watch Topic
  • New Topic