Difference between revisions of "XmlWiki"

From Organic Design wiki
Line 20: Line 20:
  
 
Current script [[xmlwiki.php|here]]
 
Current script [[xmlwiki.php|here]]
<pre>
+
<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
</pre>
+
</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>

  1. INIT
  2. - do admin and exit if running directly
  3. - get wiki/request env
  4. - get article
  5. - permissions
  6. - build env (if action=raw, env is empty but a header is added)
  7. INPUT
  8. - validate xml and report error or,
  9. - process form-input (backslashes etc if necessary)
  10. OUTPUT
  11. - trap MediaWiki output
  12. - extract content and links
  13. - if view/preview/raw, do transform:
  14. - if docType is an xwArticle, see above
  15. - replace view/preview with transformed article
  16. - render output
  17. - if saving, foreach in publish-list,
  18. - do transform but with specified env
  19. - publish
  20. FUNCTION
  21. - get article as dom
  22. - process dom-article (pass PT,XSLT list and DOM-article, returns DOM-result)
  23. - etxract hrefs from text
  24. - message
  25. ADMIN
  26. - enable/disable patch

</php>