1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Rep Power

    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.

  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Rep Power
    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.
  4. #3
  5. No Profile Picture
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Rep Power


    Hello MrHyde

    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

    / delta
  6. #4
  7. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Sacramento, CA
    Rep Power
    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).

IMN logo majestic logo threadwatch logo seochat tools logo