Structure Definition Export in HTML

Sharing structure definitions with colleagues, users, or customers is simplified through HTML formatting.

In 4D, structure definitions are presented in XML+XSL, which browsers render as HTML for easy human readability and computer-based content parsing.

However, recent browser restrictions prevent local files from using certain external resources unless sourced from the web. To overcome this issue, 4D has now re-factored this export in an HTML+CSS format, providing the option to export either XML as before or directly as HTML.

Starting from 4D v20 R4, the generated file is in HTML format when you select the “File/Export/Structure definition to HTML…” menu item. This way, the file is ready to be opened by any browser.

The export design remains largely the same, with the addition of some useful missing information, such as relation names, and the removal of obsolete ones.

All the external resources the HTML file needs are placed in the “html_export_resources” subfolder. This folder won’t be overwritten if it already exists, so feel free to override the provided CSS stylesheet with your own.

As a bonus, you can export the structure in HTML format with the EXPORT STRUCTURE command using an optional parameter:

var $xml; $html : Text

EXPORT STRUCTURE($xml) // Export in XML format
File("/PACKAGE/myStructure.xml").setText($xml)

EXPORT STRUCTURE($html; html format) // Export in HTML format
File("/PACKAGE/myStructure.html").setText($html)

We constantly strive to provide our users with the best possible experience, and we encourage you to share your thoughts and feedback on the 4D forum. Your feedback helps us better understand your needs and continuously improve our products and services.

Avatar
• Product Owner •Damien Fuzeau has joined the 4D Product team in February 2019. As a Product Owner, he is in charge of writing user stories, then translating them to functional specifications. His job also entails making sure that the feature implementations delivered are meeting the customer needs.Damien is graduated from the University of Nantes in software engineering. He spent more than 23 years in its former company, first as developer (discovering 4D in 1997), and later as engineering manager and software architect. This company is a 4D OEM partner and deployed 4D based business softwares for thousands users, on hundreds servers. So, Damien is used to 4D development and deployment in a multi-language context.