Difference between revisions of "XmlWiki"
Line 7: | Line 7: | ||
==How does it tie in with MediaWiki?== | ==How does it tie in with MediaWiki?== | ||
Two pseudo-namespaces have been added "xml" and "sys". These are both XML articles, and their contents affects the article they're associated with. Any sys:article is readable and writable only by users in the "admin" group. | Two pseudo-namespaces have been added "xml" and "sys". These are both XML articles, and their contents affects the article they're associated with. Any sys:article is readable and writable only by users in the "admin" group. | ||
− | *The sys:article holds security information: owner, read-groups, write-groups | + | *The sys:user-article holds security information: owner, read-groups, write-groups |
− | * | + | *sys:user articles are of docType ''xmlwiki:system'', and xml:articles are ''xmlwiki:properties''. |
*The xml:article contains the transform-list, publish-list and base-class-list | *The xml:article contains the transform-list, publish-list and base-class-list | ||
Line 19: | Line 19: | ||
*'''SKIN:''' This is a new compulsory skin (''skins/xwskin.php'') which renders the page output as a DOM-object so xmlWiki can apply design transforms to it rather than PHP-based templates. If ''raw'' content is requested, then only the articles own transforms are applied, because skins and page-layout are part of the xmlWiki environment, not the article. | *'''SKIN:''' This is a new compulsory skin (''skins/xwskin.php'') which renders the page output as a DOM-object so xmlWiki can apply design transforms to it rather than PHP-based templates. If ''raw'' content is requested, then only the articles own transforms are applied, because skins and page-layout are part of the xmlWiki environment, not the article. | ||
*'''OUTPUT:''' This replaces the output rendering in ''index.php''. It handles read permissions and transforms the xwskin-generated DOM-output with ''xmlwiki.xslt''. | *'''OUTPUT:''' This replaces the output rendering in ''index.php''. It handles read permissions and transforms the xwskin-generated DOM-output with ''xmlwiki.xslt''. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
'''Wiki Objects available from OUTPUT-hook:''' | '''Wiki Objects available from OUTPUT-hook:''' | ||
*[[Wiki Objects]] | *[[Wiki Objects]] |
Revision as of 21:22, 20 June 2005
Contents
What is xmlWiki?
Articles in xmlWiki work just like the normal MediaWiki articles except, when their contents is xml. In this case it will be represented as a DOM object at runtime, and the content will be validated against any referenced DTD or xml-schema. If any XSLT's are referenced, xmlWiki will attempt to apply them to the article. If the XSLT-output-method is "html" then it will be reduced to a string.
How is it Installed?
It's three scripts (source below) which are in an "xmlwiki" directory in the main wiki folder. the hack is applied or removed by running the xmlwiki/index.php script. If xmlWiki is disabled then the security layer is also disabled, so the xmlwiki directory should be accessible only by admin.
How does it tie in with MediaWiki?
Two pseudo-namespaces have been added "xml" and "sys". These are both XML articles, and their contents affects the article they're associated with. Any sys:article is readable and writable only by users in the "admin" group.
- The sys:user-article holds security information: owner, read-groups, write-groups
- sys:user articles are of docType xmlwiki:system, and xml:articles are xmlwiki:properties.
- The xml:article contains the transform-list, publish-list and base-class-list
More Specifically
There are five hooks now! but it's most efficient like this :-)
- INIT: This hooks into index.php after the environment has been established, but before any article or input processing occurs. This does the require_once of xmlwiki.php.
- INPUT: This hooks into index.php before input processing so it can direct any XPath inputs into the article-DOM and transform them into a standard input for xmlWiki. This also handles write-permissions.
- PARSER: This hooks into the parse-function in includes/Parser.php. If the article is XML, it is validated and domificated. If it includes XSLT references, or has a transform-list in its xml:article then those transforms are also applied here. The article will be back in string form again after this.
- SKIN: This is a new compulsory skin (skins/xwskin.php) which renders the page output as a DOM-object so xmlWiki can apply design transforms to it rather than PHP-based templates. If raw content is requested, then only the articles own transforms are applied, because skins and page-layout are part of the xmlWiki environment, not the article.
- OUTPUT: This replaces the output rendering in index.php. It handles read permissions and transforms the xwskin-generated DOM-output with xmlwiki.xslt.
Wiki Objects available from OUTPUT-hook: