This is part 2 of the description of automating MediaWiki documentation using dbscript, and deals with documenting table data.
First, we need to specify which tables are to be documented: Go to the Project’s Value Scripts menu item, click New, select Script Type “XML”, enter an identifier for the script, and press Insert.
Next, go to the Tables item of the new Value Script. Select a table from the dropdown at the bottom of the page, and select Script Mode “Field Elements” (default).
I included the following tables of AdventureWorks in the documentation:
After you added the desired tables, they are displayed in the list Tables. Click each table name, and then its Columns menu.
From the Column dropdown, select the columns you want to add in your documentation, or press Insert All to include all columns. Columns can be deleted from the list by clicking Delete.
As the Value Script definition is complete, navigate to the Documentation Generator created in the previous post, and display its Parts page.
Under New Part, select Value Script, and click Create.
Enter a Sequence number, select an XSL (default “MediaWiki ValueScript DocGen”), select the newly created value script, and the database you imported the AdventureWorks schema from.
Specify an Alternate Page Section (e.g. “wikivalues”) to avoid overwriting the table definition in the default Page Section. Click Insert.
In the Documentation Generators menu click Generate, and generate the whole documentation, or just the newly created Part containing the data values.