Changes

Jump to navigation Jump to search
2,095 bytes added ,  13:38, 12 August 2020
no edit summary
: You tried to create a page for a ConTeXt command that is not documented in the interface files. Check that you didn't make a typing error first. Alternatively, it is possible that the ConTeXt command is a generated instance, and in that case the page should be a `<nowiki>#REDIRECT</nowiki>`. If neither are the case or you are unsure, ask for advice on the mailing list.
* '''When saving my edit, I see some red text with an XML error.'''
: [[Command]] pages must be either well-formed XML, or nothing but a `<nowiki>#REDIRECT</nowiki>`. You likely made a booboo with an XML tag or have an unquoted `<` or `>` or `&` somewhere. Only the content of `<nowiki><xmlcode></nowiki>`, `<nowiki><texcode></nowiki>`, and `<nowiki><context></nowiki>` are exempt from the normal XML rules (but on the downside, they cannot be nested). Note that <nowiki><pre></nowiki> and <nowiki><code></nowiki> content should be properly quoted as well.
* '''I tried to edit a section, but I see an error that says 'Section not found'.'''
: Only the predefined top-level sections can be edited separately (this limitation is likely to stay).
''A warning'': During preview, <code><cd:iref/></code> will not be able to access data from outside of the current section you are editing. This will (barring errors) resolve itself once the section is saved and the full page is reloaded.
 
== Implementation notes ==
 
=== About those extension tags ===
 
The special tags <code><nowiki><texcode></nowiki></code>, <code><nowiki><xmlcode></nowiki></code>, and <code><nowiki><context></nowiki></code> or our wiki are handled by an extension (<code>context</code>) written a long time ago by Patrick Gundlach. That extension converts the parsed XML output from mediawiki into HTML code that looks 'right'. In normal wiki pages this works, because the mediawiki xml parser is quite forgiving and does some recovery attempts itself when a user keys in something that is not well-formed XML.
 
For example, in a normal wiki page you do not need to properly quote the attributes of <code><nowiki><context></nowiki></code>. And the structure within <code><nowiki><xmlcode></nowiki></code> does not have to be properly nested.
 
But it also sometimes backfires. If you use a XML tag name inside <code><nowiki><context></nowiki></code>, it will not be displayed at all.
 
In a standalone XML file, you would wrap a CDATA section around things like the content of <code><nowiki><xmlcode></nowiki></code>. But unfortunately, that is something that either the mediawiki parser or the <code>context</code> does not understand.
 
So, for now, I decided to treat the content of <code><nowiki><texcode></nowiki></code>, <code><nowiki><xmlcode></nowiki></code>, and <code><nowiki><context></nowiki></code> as if they are SGML elements with data model CDATA. That means that the generated XML files on disk are not actually well-formed, for example this content of <code><nowiki><xmlcode></nowiki>:
 
<xmlcode>
<document>
This <highlight detail="important">you</highlight> need to know.
</document>
</xmlcode>
 
should actually be this:
 
<xmlcode><![CDATA[
<document>
This <highlight detail="important">you</highlight> need to know.
</document>
]]></xmlcode>
 
but then it could not displayed, or there would be a constant difference between the xml version and the wiki database version of a page (resulting in endless 'This revision is outdated' messages).

Navigation menu