sashafirsov / slotted-element

fetch-element and slotted-element web components to expose fetch() functionality, render JSON as HTML and support fetch() lifecycle via slot without ShadowDOM
Apache License 2.0
13 stars 0 forks source link

Diary - XML demo #6

Open sashafirsov opened 3 years ago

sashafirsov commented 3 years ago

XML is powerful tool for structured data presentation and XSLT is great presentation layer transformer. Adding the popularity of XML, it would be worth to support as one of provided plugins.

Demo would include the generic XML-as-table sample and sample of tuning up the rendering using specialized for data XSLT.

The sample should be easy to comprehend and visually distinctive. With a vast variety of available datasets like in https://github.com/awesomedata/awesome-public-datasets, most of those are pretty dry for showcase. So far I found few interesting samples for XML data:

The shop or real estate API would be another good showcase but could not find free to use one 🤔

For `countried listing mledoze / countries gives the listing in XML and SVGs for flags. Which are published in CDN

The xml-as-table.xslt would be a default template, countries-pre-pipeline.xslt would massage data before passing to default template to inject image URL, countries-post-pipeline.xslt would change the flag URL to image.

sashafirsov commented 3 years ago

There is a need for XML with embedded XSLT to show the ability of rendering UI. While xml.xsd given a perfect example of such, it is not anyhow attractive or visual.

Would need something more compelling. As an option, countries.xml with embedded XSLT for self-transformation.

Alternative could be a template for personal web site with theming as post-processor sample. The URL routing would be a programming sample for fetch-element parameters passed to XSLT to pick selected page from URL #hash