XmlAspect.org/XmlView

From ApiFusion
Revision as of 04:19, 5 June 2017 by Suns (talk | contribs) (Delivery model)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

http://xmlaspect.org/XmlView

Xml View

Is a set of helpers to present XML in multiple modes(table, bar/pie chart) in addition to collapsible tree in a browser. For now only table presentation is implemented.

JSON does not have in-browser capability (except of collapsible tree in development tools), so XmlView would be handy there as well.

XSLT and bookmarklet(button in browser) to display XML as a table could be found in XmlView project page

Wish List

The prioritized wish list is moderated here. Use the Discussion page to bring new ones.

index.html

Serves the project entry point with all references and XmlView tools configurations.

CDN selection

The project home page will always be referencing to the latest revision on CDN.

Revisions

Each revision will be preserved on CDN with own URL to support already used bookmarklet and XSLT. Revision 1.0.0 URL is:

https://cdn.xml4jquery.com/ajax/libs/XmlView/1.0.0/


bookmarklet

Is the link with associated JS to run XmlView transformation on opened XML document. The bookmarklet on open will run RunXslt.js which will initiate the rendering.

Delivery model

  • inject XSLT into own XML. No need for bookmarklet. Change XSLT parameters in configurator.
  • bookmarklet runs RunXslt.js, (chrome requires server to set header Access-Control-Allow-Origin: * which is set in project's CDN)
  • set a DNS record of xmlview.mydomain.com to point to xmlview.xmlaspect.org , Use renderer.html in bookmarklet. document.domain will be set to mydomain.com
  • copy XmlView project into own host. Use renderer.html in bookmarklet.
  • use proxy where XML will be read over network by xmlview.xmlaspect.org/proxy.php</a>.
    • XML shall be available for public (server sets header Access-Control-Allow-Origin: *).
    • Bookmarklet will forward the page to proxy. Proxy will return XML with injected XSLT.

Browser specifics

Chrome

rendered XHTML, document.domain is empty. Requires server to set header Access-Control-Allow-Origin: * in order to get access to XML (which is same as document.URL)

Internet Explorer 11

Uses XML document, no HTML headers.

?Needs own bookmarklet to set XSLT instruction.

view configuration

The tool configuration will modify the type of presentation (Table, Pie chart, Bar Chart) and other rendering parameters.

XML sample

You could try on this one: Countries.xml

XML URL

To prefill some config parameters.

View AS button

to open XML from URL and display.

Real-time 'preview' panel during parameters change TBD.

XSLT

You could embed the XSLT instruction into XML to see it instantly without the need for bookmarklet.


See also

XmlView project page CDN TBD

Sources

GitHub

TODO list

  • popup with settings
    • add XPath filter into URL and settings
  • table headers
    • resize by header separator drag
    • DnD fields
    • add filter on field
  • '...' field dialog to define
    • sorting options( as number, string, date, ... )
    • visibility (font, palette, ...)
    • link to other fields
    • preserve in browser storage
    • URL params in dialog and in URL parsing
  • sorting by individual branch(table)
    • in URL parameters
    • run-time by table header click
  • CDN/proj URL change in bookmarklet
  • read parameters from
    • XML itself
  • Parameters
    • css
    • list of fields
    • list of field names as header caption
    • add the external XSLTs as parameter to be included into transformation
  • CLA and plugins registration
  • Autodetect delivery method
  • Pie chart
  • Bar chart
  • collapsible tree in case default browser view is overridden. For example in IFRAME XML is not shown.
  • browser plugin to substitute/improve default collapsible tree view
    • config import from index.html

Design notes