Difference between revisions of "XmlWiki"
From Organic Design wiki
Line 20: | Line 20: | ||
Current script [[xmlwiki.php|here]] | Current script [[xmlwiki.php|here]] | ||
− | < | + | <php> |
# INIT | # INIT | ||
# - do admin and exit if running directly | # - do admin and exit if running directly | ||
Line 47: | Line 47: | ||
# ADMIN | # ADMIN | ||
# - enable/disable patch | # - enable/disable patch | ||
− | </ | + | </php> |
Revision as of 01:26, 31 May 2005
File:Xmlwiki old.jpg Old logo: File:Xmlwiki wht.jpg
A Wiki of Objects
xmlWiki is a modification of the index.php page offering new features which are all maintained from editing normal wiki articles.
- All articles are objects stored in XML
- An additional xml page allows editing the data aspect of an article as a tree.
- A permissions structure offering basic read/write control over articles with users and groups.
- PHP Functions can be created and maintained by developers and can be dynamically applied to articles before rendering.
- Articles can made to automatically publish remotely over HTTP or FTP when edits are saved.
If the browser is fully XML-capable, then requested articles can be returned as XML for the client to transform with an XSLT and render. If not, xmlWiki can transform the document before returning it to the client.
The structure of xmlWiki
The xmlWiki layer is composed of a single PHP script called xmlwiki.php which, when called directly hooks or unhooks itself from three places in the MediaWiki index.php script.
The eneral structure of the xmlwiki.php script is as follows:
Current script here <php>
- INIT
- - do admin and exit if running directly
- - get wiki/request env
- - get article
- - permissions
- - build env (if action=raw, env is empty but a header is added)
- INPUT
- - validate xml and report error or,
- - process form-input (backslashes etc if necessary)
- OUTPUT
- - trap MediaWiki output
- - extract content and links
- - if view/preview/raw, do transform:
- - if docType is an xwArticle, see above
- - replace view/preview with transformed article
- - render output
- - if saving, foreach in publish-list,
- - do transform but with specified env
- - publish
- FUNCTION
- - get article as dom
- - process dom-article (pass PT,XSLT list and DOM-article, returns DOM-result)
- - etxract hrefs from text
- - message
- ADMIN
- - enable/disable patch
</php>