Difference between revisions of "Test matrix"

From FollowTheScore
Jump to: navigation, search
m (generating a matrix from an indented list: rm whitespace from input list)
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Type:Test
+
{{Type Test
 
  |parameter = matrix
 
  |parameter = matrix
 
}}
 
}}
Line 6: Line 6:
 
Input is:
 
Input is:
 
  one
 
  one
 +
  oho
 
   aha
 
   aha
  oho
+
  two ~~ Two
  two
 
 
   ehem
 
   ehem
 
  three
 
  three
 
  four
 
  four
 
   aha
 
   aha
   uhui
+
   uhui ~~ UHU
 +
two ~~ Two
 +
    uhui ~~ UHU
 +
 
 
Output is:
 
Output is:
 +
{|class=wikitable
 +
!normal
 +
!flipped
 +
|--
 +
|<pre>{{#dplmatrix:a simple demo matrix||||
 +
one
 +
oho
 +
aha
 +
two ~~ Two
 +
ehem
 +
three
 +
four
 +
aha
 +
uhui ~~ UHU
 +
two ~~ Two
 +
  uhui ~~ UHU
 +
}}</pre>
 +
|<pre>{{#dplmatrix:a simple demo matrix|<big>&bull;</big>|.|flip|
 +
one
 +
oho
 +
aha
 +
two ~~ Two
 +
ehem
 +
three
 +
four
 +
aha
 +
uhui ~~ UHU
 +
two ~~ Two
 +
  uhui ~~ UHU
 +
}}</pre>
 +
|--
 +
|
 
{{#dplmatrix:a simple demo matrix||||
 
{{#dplmatrix:a simple demo matrix||||
 
one
 
one
 +
oho
 
  aha
 
  aha
 +
two ~~ Two
 +
ehem
 +
three
 +
four
 +
aha
 +
uhui ~~ UHU
 +
two ~~ Two
 +
  uhui ~~ UHU
 +
}}
 +
|
 +
{{#dplmatrix:a simple demo matrix|<big>&bull;</big>|.|flip|
 +
one
 
  oho
 
  oho
two
+
aha
 +
two ~~ Two
 
  ehem
 
  ehem
 
three
 
three
 
four
 
four
 
  aha
 
  aha
  uhui
+
  uhui ~~ UHU
 +
two ~~ Two
 +
  uhui ~~ UHU
 
}}
 
}}
 +
|}
 +
* "from" items ("source") start in col 1
 +
* "to" items ("target") are indented by at least one space
 +
* source appears in input sequence
 +
* target is sorted by alphabet
 +
* items are treated as pages and shown as a link
 +
* the label can be defined by adding it after the iterm, separated by "~~"
 +
* symbols for "yes" and "no" can be defined
 +
* via the stylesheet in [[Mediawiki:Common.css]] you can control the layout (class=dplmatrix)
  
 
===Links to DPL Manual pages===
 
===Links to DPL Manual pages===
Now we use two nested DPL queries to generate the indented list:
+
Now we use two nested DPL queries and [[Test matrix2]] to generate the indented list:
 +
<pre>
 +
{{#dplmatrix:''links from articles to the DPL manual''|'''x'''|-|flip|
 +
  {{#dpl:
 +
    |debug=1
 +
    |category=DPL Manual
 +
    |format=,%PAGE% ~~ %TITLE%\n²{:Test matrix2¦page=%PAGE%¦category=DPL Manual¦namespace=}²,
 +
  }}
 +
}}
 +
</pre>
 +
 
 
{{#dplmatrix:''links from articles to the DPL manual''|'''x'''|-|flip|
 
{{#dplmatrix:''links from articles to the DPL manual''|'''x'''|-|flip|
 
   {{#dpl:
 
   {{#dpl:

Latest revision as of 03:29, 17 July 2008

Test matrix

generating a matrix from an indented list

Input is:

one
 oho
 aha
two ~~ Two
 ehem
three
four
 aha
 uhui ~~ UHU
two ~~ Two
   uhui ~~ UHU

Output is:

normal flipped
{{#dplmatrix:a simple demo matrix||||
one
 oho
 aha
two ~~ Two
 ehem
three
four
 aha
 uhui ~~ UHU
two ~~ Two
   uhui ~~ UHU
}}
{{#dplmatrix:a simple demo matrix|<big>•</big>|.|flip|
one
 oho
 aha
two ~~ Two
 ehem
three
four
 aha
 uhui ~~ UHU
two ~~ Two
   uhui ~~ UHU
}}
a simple demo matrix aha ehem oho UHU
one x   x  
Two   x   x
three        
four x     x
a simple demo matrix one Two three four
aha . .
ehem . . .
oho . . .
UHU . .
  • "from" items ("source") start in col 1
  • "to" items ("target") are indented by at least one space
  • source appears in input sequence
  • target is sorted by alphabet
  • items are treated as pages and shown as a link
  • the label can be defined by adding it after the iterm, separated by "~~"
  • symbols for "yes" and "no" can be defined
  • via the stylesheet in Mediawiki:Common.css you can control the layout (class=dplmatrix)

Links to DPL Manual pages

Now we use two nested DPL queries and Test matrix2 to generate the indented list:

{{#dplmatrix:''links from articles to the DPL manual''|'''x'''|-|flip|
  {{#dpl:
    |debug=1
    |category=DPL Manual
    |format=,%PAGE% ~~ %TITLE%\n²{:Test matrix2¦page=%PAGE%¦category=DPL Manual¦namespace=}²,
  }}
}}
links from articles to the DPL manual Manual Manual - Authors and History Manual - Compatibility Manual - DPL Bug Reporting and Feature Requests Manual - DPL parameters: Controlling output format Manual - DPL parameters: Controlling output volume Manual - DPL parameters: Other parameters Manual - DPL Special Page with Parameters Manual - DPL with PostgreSQL Manual - dplmatrix Manual - dplnum Manual - dplreplace Manual - dplvar Manual - General Usage and Invocation Syntax Manual - DPL parameters: Controlling output order Manual - DPL parameters: Criteria for page selection Manual - dplchapter Manual - Source and Installation
Manual - x x x x x x x x x x x x x x x x x
Manual - Authors and History x - - - - - - - - x - - - - - - - -
Manual - Compatibility x x - - - - - - - - - - - - - - - x
Manual - DPL Bug Reporting and Feature Requests x - - - - - - - - x - - - - - - - -
Manual - DPL Special Page with Parameters - - - - - - - - - x - - - - - - - -
Manual - DPL parameters: Controlling output format x - - - - - - - - x - - - x x - - -
Manual - DPL parameters: Controlling output order x - - - x - - - - x - - - - - - - -
Manual - DPL parameters: Controlling output volume x - - - x - - - - x - - - - - x - -
Manual - DPL parameters: Criteria for page selection x - - - - x - - - x - - - - - - - x
Manual - DPL parameters: Other parameters x - - - - - - - - x - - - - - - - -
Manual - DPL with PostgreSQL - - - - - - - - - x - - - - - - - x
Manual - General Usage and Invocation Syntax x - - - - - - - - x - - - - - x - -
Manual - Source and Installation x - - - - - - - - x - - - - - x - -
Manual - dplchapter - - - - - - - - - x - - - - - - - -