pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob <isanamespace@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: Storing HTML in table
Date: Mon, 21 Nov 2005 16:47:51 -0500
Message-ID: <hq2dnTZ-cos83R_enZ2dnUVZ_tednZ2d@speakeasy.net> (raw)

Hi:

I need to store markup in a database to control how the browser renders the
page information.

I would like complete control over this information -- so if sometime in the
future it's decided to totally redesign the layout. Also, at some point a
tool will be created so novice computer users can enter nicely formatted
markup -- meaning you won't have to know HTML to use this tool.

In it's raw form, data will be stored like this:

<p>some header goes here</p>
<p><img src='foo.gif'></p>
<p>more text here</p>

A few ideas are to:
 * Use css
        Store the data like: <span class='text_stuff'>text here</span>
        <span class='img_stuff'><img src=...></span>

 * Store in XML and XSLT

 * Don't use HTML -- but something that will parse keys into HTML. 
        E.G. [:bold] or [:img]

But what happens if you have a single item that's [:bold], <span
class="text-bold"> or etc. and need to take away the bold and change the
font size? It just seem that there is an easy way of doing this that I'm
not thinking of. 

Does anyone recommend a certain way for storing HTML in a table?

Thanks,



view thread (2+ messages)  latest in thread

Message-ID: <hq2dnTZ-cos83R_enZ2dnUVZ_tednZ2d@speakeasy.net>
Permalink:  ../hq2dnTZ-cos83R_enZ2dnUVZ_tednZ2d@speakeasy.net/
Also on:    postgresql.org/message-id/hq2dnTZ-cos83R_enZ2dnUVZ_tednZ2d@speakeasy.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: isanamespace@yahoo.com
  Subject: Re: Storing HTML in table
  In-Reply-To: <hq2dnTZ-cos83R_enZ2dnUVZ_tednZ2d@speakeasy.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox