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.