Open sashafirsov opened 3 years ago
Entities which could be shown as tabular data need the ordered list of record fields/attributes along with assigned sorting order.
xPath
which would be used as a key for tables definition
TableParams.xslt
output is XML with xv:display
display data for each table. This XML is reused for run-time sorting so display data extraction and injection done only once.
AsTable.xsl
transform
xv:display
list)xv:display
data could be saved as
how to refer from XSLT which transform original XML?
after initial preprocessing step, xv:display
is appended to original XML.
CONS: original data changed.
PROS: easiest processing as display data injected in place of use. CONS: injection requires re-creation of XML(memory) or inline injection by xPath(CPU);
PROS: dynamic code could be more efficient than metadata processing from XML CONS: ?
sort
and order
( -1 to hide ), filter
are the parameters passed from display param state to transformation rules.
is ordered sequence of fields with associated sorting XSLT template
inv
- inverse order asc
- alphanumerical ascending des
- alphanumerical descinc
- numeric incrementaldec
- numeric decrementalfuture
date order with past-firstpast
date order with future-firstsort:[ ['dob',future'], ['lastname','asc'], ['firstname','asc'] ]
lists older-first folks by year with last/first name inside of year sorting.Propagated in same fashion as sort
except of values are numerical with negative to hide.
Same value could serve to combine data fields into single table cell.
Display only data defined in xPath as comma separated list.
When filter
is defined, by default all data except of listed are hidden.
<xsl:template mode="DisplayAs" match="/SearchResult/BookSet/Book" >
is the entry for particular tabular data generated by TableParams.xsl
.
<xsl:apply-templates select="." mode="DisplayAsTable" >
<xsl:with-param name="headers">... sorted by order header titles
<xsl:with-param name="rows">... sorted by order/direction rows with sorted by header order cells
Primary Click/tap or SPACE key is triggering the sort button. Parameters passed from DOM:
DisplayAs
template with xPath
and order
by rotating in ['ascending','descending','']. If blank, remove the sort rulesort
number to 1 and shift others in previous orderUser settings to be kept
Triggered by keyboard/right click. Actions candidates
Notes on project design and plans