msd-expand2text.xsl

Expands a list of MSDs according to the morphosyntactic specifications.
Author:
Tomaž Erjavec, http://nl.ijs.si/et/
Copyright:
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Parameters Summary

string canonical - source
Which cannonical form to produce
string common - source
Take as reference the common tables, rather than language specific tables (which is the default)
string header - source
Output header row in table if set
string localise - source
Output localisations for the features
string output - source
What to output
string specs - source
A MULTEXT-East morphosyntactic specification file

Variables Summary

string err - source
Error mark
Primary separator in table
Secondary separator in table (between features)

Match Templates Summary

Sanity check and process
tei:row[@role='attribute'] (param: outputstring codelocalisationlanguagemode: expand) - source
Expand one feature
tei:row[@role='type'] (param: outputstring codelocalisationlanguagemode: expand) - source
Expand category
tei:table (param: outputstring msdpositionlocalisationlanguagemode: expand) - source
Expand one MSD, with context node appropriate PoS table
tei:row[@role='type'] (param: outputstring codelocalisationlanguagemode: expand-value) - source
Expand category value
tei:row[@role='value'] (param: outputstring codelocalisationlanguagemode: expand-value) - source
Expand attribute value
tei:row (param: codelocalisationmode: position) - source
No short description available
tei:table[@n='msd.cat'] (param: categorymode: position) - source
No short description available
tei:cell[@role='msd'] (param: output) - source
Expand one MSD
Process table with MSDs

Named Templates Summary

all-atts (param: languagelocalise) - source
Return all defined attributes - used for full canonical output
canon (param: attsraw) - source
No short description available
cat-table (param: localisationlanguagecat-code) - source
No short description available
output-header (param: output) - source
Output header row
output-row (param: output) - source
Output MSD row
pad (param: len) - source
No short description available
strip (param: msd) - source
No short description available
warn (param: textoutputcodelocalisationlanguage) - source
Warn on STDERR about problems

Parameters Detail

string canonical - source
Which cannonical form to produce
Features can be unspecified (have as their value a hyphen, '-', meaning "non-applicable"), and this parameters determines if and which such features should be output. Valid values are: none = only features where value is specified; cat = all features valid for the category; full = all features regardless of the category. This parameter only affects 'val' and 'attval' modes, with canonical=full reserved for 'attval'.
none
string common - source
Take as reference the common tables, rather than language specific tables (which is the default)
string header - source
Output header row in table if set
string localise - source
Output localisations for the features
Only works of the specifications contain the localisations for the language.
en
string output - source
What to output
Value can be one or several (space separated) values: id = output input MSD; mds = output (localised or common) MSD; check = output only non-valid MSDs; val = output brief MSD expansion, i.e. val1 val2 val3 for defined att; attval = output verbose attribute=value MSD expansion, i.e. att1=val1 att2=val2 att3=0 for all attributes; collate = output sort key of MSD, e.g. 1S120200, hyphen maps to 0.
attval
string specs - source
A MULTEXT-East morphosyntactic specification file
Can be either just the common or language specific tables, or the specifications with both.

Variables Detail

string err - source
Error mark
!?*
Primary separator in table
Only important if text output is selected.
Secondary separator in table (between features)
Only important if text output is selected.

Match Templates Detail

Sanity check and process
tei:row[@role='attribute'] (param: outputstring codelocalisationlanguagemode: expand) - source
Expand one feature
Context node should be the correct attribute row for code.
Parameters:
output -
string code - Attribute-value code to process.
localisation -
language -
tei:row[@role='type'] (param: outputstring codelocalisationlanguagemode: expand) - source
Expand category
Parameters:
output -
string code - Category code to process.
localisation -
language -
tei:table (param: outputstring msdpositionlocalisationlanguagemode: expand) - source
Expand one MSD, with context node appropriate PoS table
Parameters:
output -
string msd - MSD to process.
position -
localisation -
language -
tei:row[@role='type'] (param: outputstring codelocalisationlanguagemode: expand-value) - source
Expand category value
Parameters:
output -
string code - Category code to process.
localisation -
language -
tei:row[@role='value'] (param: outputstring codelocalisationlanguagemode: expand-value) - source
Expand attribute value
Parameters:
output -
string code - Code to process.
localisation -
language -
tei:row (param: codelocalisationmode: position) - source
No short description available
Parameters:
code -
localisation -
tei:table[@n='msd.cat'] (param: categorymode: position) - source
No short description available
Parameters:
category -
tei:cell[@role='msd'] (param: output) - source
Expand one MSD
Parameters:
output -
Process table with MSDs

Named Templates Detail

all-atts (param: languagelocalise) - source
Return all defined attributes - used for full canonical output
Parameters:
language -
localise -
canon (param: attsraw) - source
No short description available
Parameters:
atts -
raw -
cat-table (param: localisationlanguagecat-code) - source
No short description available
Parameters:
localisation -
language -
cat-code -
output-header (param: output) - source
Output header row
Also check if $output is valid.
Parameters:
output -
output-row (param: output) - source
Output MSD row
Parameters:
output -
pad (param: len) - source
No short description available
Parameters:
len -
strip (param: msd) - source
No short description available
Parameters:
msd -
warn (param: textoutputcodelocalisationlanguage) - source
Warn on STDERR about problems
Parameters:
text -
output -
code -
localisation -
language -