Difference between revisions of "XmlWiki"

From Organic Design wiki
Line 22: Line 22:
 
# INIT
 
# INIT
 
# - do admin and exit if running directly
 
# - do admin and exit if running directly
# - get wiki/request env
+
# - include geshi
# - get article
+
# - get wiki & request environment
# - permissions
+
# - get article (as an object if possible)
# - build env (if action=raw, env is empty but a header is added)
+
# - get user-info
 +
# - get object-specific info (perms, doc-root, doc-type)
 +
# - build env (if action=raw, env is empty)
 
# INPUT
 
# INPUT
# - validate xml and report error or,
+
# - deny access if !writable
# - process form-input (backslashes etc if necessary)
+
# - currently not doing anything else
 
# OUTPUT
 
# OUTPUT
 
# - trap MediaWiki output
 
# - trap MediaWiki output
# - extract content and links
+
# - extract links (not used yet)
# - if view/preview/raw, do transform:
+
# - apply security
#   - replace view/preview with transformed article
+
# - transform for raw, view, preview
# - render output
+
# - if saving, do publishing
# - if saving, foreach in publish-list,
+
# - render output & messages
#  - do transform but with specified env
 
#   - publish
 
 
# TRANSFORM
 
# TRANSFORM
# - process dom-article (pass PT,XSLT list and DOM-article, returns DOM-result)
+
# - if article is an object,
# - if docType is an xwArticle, see above
+
- process transforms if doctype is one of ours,
 +
- validate and apply XSLT if not
 +
# - apply geshi on article
 
# TRANSFORMS
 
# TRANSFORMS
 
# - document transforms
 
# - document transforms
Line 46: Line 48:
 
# - layout transforms
 
# - layout transforms
 
# - database table transforms
 
# - database table transforms
 +
# - transform object to php-nav-tree
 
# FUNCTIONS
 
# FUNCTIONS
 
# - get article
 
# - get article

Revision as of 09:47, 2 June 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.

  • Objects can be objects stored in XML
  • 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. - include geshi
  4. - get wiki & request environment
  5. - get article (as an object if possible)
  6. - get user-info
  7. - get object-specific info (perms, doc-root, doc-type)
  8. - build env (if action=raw, env is empty)
  9. INPUT
  10. - deny access if !writable
  11. - currently not doing anything else
  12. OUTPUT
  13. - trap MediaWiki output
  14. - extract links (not used yet)
  15. - apply security
  16. - transform for raw, view, preview
  17. - if saving, do publishing
  18. - render output & messages
  19. TRANSFORM
  20. - if article is an object,
  21. - process transforms if doctype is one of ours,
  22. - validate and apply XSLT if not
  23. - apply geshi on article
  24. TRANSFORMS
  25. - document transforms
  26. - image transforms
  27. - layout transforms
  28. - database table transforms
  29. - transform object to php-nav-tree
  30. FUNCTIONS
  31. - get article
  32. - etxract hrefs from text
  33. - message/log
  34. - geshi syntax highlighting
  35. ADMIN
  36. - enable/disable patch

</php>