Page 1 of 1
Article Creation/Parsing?
Posted: Fri Mar 10, 2006 12:56 am
by ruiner17
Hi All, great forum going on here!
I am looking for a solution that will allow me to write html web-based articles. These articles will have multiple Chapters, Sections, & Subsections. Along with this, the articles can be broken into pages. These elements of the article will contain various web elements (text, images, flash, php applications, etc). Essentially, putting these all together will form an online book of some sort.
I would like to have the entire article content in a flat file (xml?). Then when someone visits this article, it will pull the appropriate content into a template depending on page number, etc...
How should I get started on this? What direction should I go?
TIA
James
Posted: Fri Mar 10, 2006 1:02 am
by feyd
What about using a wiki?
Posted: Fri Mar 10, 2006 1:11 am
by ruiner17
now why didn't i think of that?
Well, I haven't had much experience with wikis. My thought was that they are database driven. I will do some research and try to understand how they work.
Thanks feyd!
Posted: Fri Mar 10, 2006 1:21 am
by feyd
True, they generally are database driven. Any particular reason you're against that?
Posted: Fri Mar 10, 2006 2:12 am
by Chris Corbyn
If you really want to you XML files PHP had a whole library of XML functions to handling parsing etc for you:
http://php.net/xml
I'm curious, if you're using XML, why not use it to display the pages too? All you need to do is write a DTD for your XML. It would probably be a lot easier, unless I've misunderstood you.
Posted: Fri Mar 10, 2006 3:13 am
by Maugrim_The_Reaper
DocBook is a popular documentation format in XML. It's basically markup over normal text/media which can later be parsed into HTML, PDF or CHM (Windows Help format). It's not difficult to learn and get started with it. Since its XML you can probably (haven't tried it) parse it as normal XML into sections.
Posted: Fri Mar 10, 2006 11:07 am
by ruiner17
thanks guys.
@feyd: I want to keep it flat file based for now in order for editors to actually markup the content on their own with out an extraordinary web-based interface. Perhaps later on I may switch over to database, but I am converting over a system that already has over 2000 articles, some 100s of pages long. This may be more than my database can handle.
@d11wtq: xml is nice since it can be universally (more or less) read. can xmls contain content like flash, php applications, etc? I would like to keep my templates driven by smarty since that is how it is now.
@Maugrim_The_Reaper: Thanks. I'll check out docbook.
I've taken a look at a few php wiki engines as feyd suggested. This is pretty close to what I am looking for. But it is definitely more than I am looking for. I would like to get to the base of the wiki engine.
I'm mainly trying to figure out how the following works:
- version control
- parsing the data (flat file) into readable html
Any thoughts, pointers?
James