Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Field Type: XML #105

Open
3 tasks
EitanBlumin opened this issue Apr 1, 2019 · 1 comment
Open
3 tasks

New Field Type: XML #105

EitanBlumin opened this issue Apr 1, 2019 · 1 comment
Assignees
Milestone

Comments

@EitanBlumin
Copy link
Owner

Implement new field/parameter type: XML
Editing the field would either be done using a regular TextArea input, or a SummerNote control with code highlighting (if supported).

Displaying the field should be simple enough using a combination of javascript and jquery. Specifically, this should be a good starting point:

var xml = (new DOMParser()).parseFromString(xmlText,'text/xml');

It theoretically would also be possible to either make use of the jstree library, or using the built-in Bootstrap controls (such as collapsible accordion).

  • Check if summernote supports code highlighting for XML documents
  • Write function renderXML that would generate either bootstrap accordion tree, or use the jstree library.
  • Add field type in portal.DataViewFieldTypes

Additionally, it should be preferable to add a new field to portal.DataViewField which would be used to configure the schema for the XML object (i.e. something like XSLT).
This schema should create constraints on the manipulations a user can perform on the XML document. For example: Which elements they can add, which attributes, what values, etc.

@EitanBlumin EitanBlumin added this to the Beta release milestone Apr 1, 2019
@EitanBlumin EitanBlumin self-assigned this Apr 1, 2019
@EitanBlumin EitanBlumin changed the title New data type: XML New Field Type: XML Apr 1, 2019
@EitanBlumin
Copy link
Owner Author

EitanBlumin commented Apr 1, 2019

This should be a decent start, at least for displaying values at first:

http://www.levmuchnik.net/Content/ProgrammingTips/WEB/XMLDisplay/DisplayXMLFileWithJavascript.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant