September 27th, 2002, 02:56 PM
DTD Creation for medium size website
The question I have is very general although I'm sure responses will be very lengthy.
I've been tasked w/ redeveloping my company's corporate website in xml. The main reason for this is we need to share data across 'product segments' of our website but do not have access to a DB.
I'm still in the beginning phase of the project but need to have my DTD's defined w/ in the next couple of weeks.
I'm stumpped w/ how I should approach this. Is it recommended to use multiple DTD's or is it better practice to create one master DTD and go from there?
Is there a 'standard' way to treat elements that can potentially contain many different formatting tags, i.e, hrefs, bolding, italics, images, etc. Or should the DTD explicitly define each possible html tag w/in the element?
Much of the data of the site is pretty much chunks of text but I'm having a hard time deciding what should be chucked out and what should be set explicty w/in elements.
I'm sure I've done a crappy job @ explaining what the heck I'm trying to do but if you have any suggestions that would be great. Also, any links to DTD's that _may_ shed some light on what I need to be looking at would be great.
Thank your for your time and please reply w/ any questions regarding this post.
September 27th, 2002, 03:22 PM
Hmm..well, if you want different formatting for links, images, text and such, you use XSL, not DTD. Extensible Stylesheet Language , aka XSL, formats XML in differnet manners, depending on what media you are using. Also, different XSL stylesheets can be employed if different 'product segments' needs to have the data look differnetly.
Also, take a look at schema, as you can use it to do your DTD work.
September 27th, 2002, 08:17 PM
I think you got a really good project which will give you plenty of learning opportunities.
Anyway The most difficult part of such projects is to design data structure. DTD is old fashioned way to define your xml structure, therefore I would also recommend you to make use schema (xsd: XML Schema Definition).
I don't know how much you know about xml, xsl, xsd and xpath but don't get confused.
best place to learn and see some examples about schemas is:
I hope this will help you
September 28th, 2002, 12:15 AM
One thing to keep in mind while you design your data structure: formatting doesn't belong in the data structure!
Rather than define a piece of text as *italics*, make it a *quote* or *reference* or even *emphasized* if you have to. Focus on *what* your data is, not how it's supposed to look. Then later on you can decide how each type (the what) of information should be displayed (bold/italics/etc).