Justin French wrote:
Hi all,

I'm building a CMS that does heavy parsing of a "HTML shorthand" plain text to XHTML strict, in a similar way to Textile <http://www.textism.com/tools/textile/>.
>
1. Parse the text on demand into HTML -- the parsing script is to heavy/slow for this.


2. Store both the plain (shorthand HTML) text and parsed XHTML versions of each field -- the problem with this being that i'm storing double the data in the database...
>
3. write a reverse set of functions which converts the XHTML back to the shorthand on demand for editing -- this seems great, but I don't like the idea of maintaining two functions for such a beast.

Well, you pretty much listed all of the options. Personally, I'd probably go with #2 because hard drive space is cheap. But... if the process is really that intensive and you're really that concerned about space, then I'd do #3. It doesn't seem like it'd be that hard to maintain as you're just reversing everything and how often do you expect it to change? Sorry I can't offer a better option. :)


--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to