XmlAspect / XmlView

set of tools for XML presentation change in browser
Apache License 2.0
0 stars 0 forks source link

Diary #4

Open sashafirsov opened 3 years ago

sashafirsov commented 3 years ago

Notes on project design and plans

sashafirsov commented 3 years ago

headers for table extraction

Entities which could be shown as tabular data need the ordered list of record fields/attributes along with assigned sorting order.

headers

sashafirsov commented 3 years ago

XML display preprocessing placement

xv:display data could be saved as

independent XML

how to refer from XSLT which transform original XML?

independent sub-tree embedded into source XML

after initial preprocessing step, xv:display is appended to original XML. CONS: original data changed.

embedded into XML clone used for further processing

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);

embedded into XSLT as template path - best

PROS: dynamic code could be more efficient than metadata processing from XML CONS: ?

sashafirsov commented 3 years ago

Display params as XSLT rules

sort and order ( -1 to hide ), filter are the parameters passed from display param state to transformation rules.

sort

is ordered sequence of fields with associated sorting XSLT template

sashafirsov commented 3 years ago

order

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.

sashafirsov commented 3 years ago

filter

Display only data defined in xPath as comma separated list.

When filter is defined, by default all data except of listed are hidden.

sashafirsov commented 3 years ago

Table render

<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
sashafirsov commented 3 years ago

table TH click/trigger handle

Primary Click/tap or SPACE key is triggering the sort button. Parameters passed from DOM:

Account

User settings to be kept

sashafirsov commented 3 years ago

Context menu

Triggered by keyboard/right click. Actions candidates