Skip to content

[declarative-custom-elements] Use cases: data transformation #1103

@sashafirsov

Description

@sashafirsov

Do template expressions need to be able to transform data? In what ways?

yes, the transform into data DOM, which later transformed into HTML DOM. XSLT at its primitive side.
The data can be transfered into variables, passed to HTML via attributes, tags, and text via selectors. The XPath selector is already there, no need to invent the wheel.

What data can be used?

  • DCE attributes
  • data- attributes
  • DCE instace payload( HTML within custom tag )
  • data slices - filled by <slice> tag/attribute and bound to value of child element by event
  • template variables - temporary variables during the rendering i.e. <xsl:variable>

Image

system data/API

Is available via value of special custom elements, poyfills: http-request | local-storage | location-element

The scope of system API should be aware of encapsulation and guarded to the scope of embeddable application, similar to the page but implemented as DCE. Such embeddable application would have all props and API of web app. Accessing those via special custom elements would account the scoping by app root.

Other working examples: attributes | data slices/events | diary - slice, value, select relations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions