Re: .XHTML vs .Text

  •  07-09-2004, 6:41 PM

    Re: .XHTML vs .Text

    I'm no expert, but here is my opinion:

     
    Whenever possible, force people to entered structured content via content templates (ie, forms).
     
    For instance, a job posting would have fields as such:
     
    title: ___________________
    classification: _______________
    pay rate: ______________
    dud date: _______________
     
    etc...

    Then, you'd format this yourself when you grab the data and build the HTML via the CMS.
     
    However, there are times when you need to allow people to enter free-form content.
     
    In that case, I'm trying to restrict the HTML editor to only allow the basic structured tags: Paragraphs, headers, lists,etc. I'm trying to avoid any presentational markup.
     
    And that is what we're storing in the database.
     
    Ideally, I suppose, you'd store XML mapped against a schema then transform that, but we're not that far yet ;o)
     
    I like Bruce D's suggestion about saving two versions. In my case, when I pull up content as a snippet/abstract I first remove all HTML tags via a regex leaving just the text.
View Complete Thread