View Single Post
  #2 (permalink)  
Old November 1st, 2006, 11:51 AM
woodyz woodyz is offline
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How is your content stored as far as markup goes? Is your content XML or merely text?
Do you provide an editor to the user so they can indicate metadata about the content - that is, to indicate paragraphs, titles, headers, boldness, colors, etc? Typically, if this is all stored as XML then you could also allow them to indicate links, which your code (hopefully XSLT) will then handle.

Properly done (in my opinion) content should be stored with markup as XML for this very reason. It can then be transformed to whatever output you need - HTML, rtf, etc.

Now... assuming that the content is not stored as xml, you will need to write code that will find the pattern of a link in the content and convert it to an anchor element (the a href=...). Regular expressions are the standard (and in my opinion best) way to do this.

Woody Z http://www.learntoprogramnow.com
Reply With Quote