Storing HTML in table

Поиск
Список
Период
Сортировка
От Rob
Тема Storing HTML in table
Дата
Msg-id hq2dnTZ-cos83R_enZ2dnUVZ_tednZ2d@speakeasy.net
обсуждение исходный текст
Ответы Re: Storing HTML in table  (Greg Stark <gsstark@mit.edu>)
Список pgsql-sql
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'><imgsrc=...></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,


В списке pgsql-sql по дате отправления:

Предыдущее
От: "JuanCri"
Дата:
Сообщение: Re: query
Следующее
От: stig erikson
Дата:
Сообщение: Re: A Not Join