GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Eleven — SGML Functions (continued)
Overview
The HTMLToXHTML function takes an input stream of HTML code and conforms the tagging XHTML.
Syntax/Parameters
Syntax
string = HTMLToXHTML ( handle hData | string data, dword options], [handle log] );
Parameters
hData or data
A handle to a SGML Object, Mapped Text or Edit Object. Or,
A string containing HTML code;
options
An optional dword specifying conformance flags. The default value is 0x00000000, see Remarks.
log
An optional handle to a Log Object to receive any errors or warnings.
Return Value
A string containing the conformed code, a message or an empty string on error. Use the GetLastError function to retrieve a formatted error code.
Remarks
The HTMLToXHTML function takes a source HTML code base and attempts to conform it XHTML. The function reads each tag and character entity and then writes an adjusted version back to the output string. In addition, the code can be tidied for conformed line endings and width.
Errors are normalized and HTML attributes promoted to CSS as appropriate. If a log is provided, errors and warnings are dumped to the log. Certain deprecated tags are automatically updated as required. For example, <FONT> is replaced with <span>.
Flags are as follows:
SDK Definition | Bitwise | Description | |||||
General | |||||||
HTX_ALL_OPTIONS | 0xFFFFFFFF | All Options On | |||||
Tidy | |||||||
HTX_TIDY_CODE_BREAKS | 0x00000001 | Tidy Code Breaks (blocks) | |||||
HTX_TIDY_CODE_LINE_ENDINGS | 0x00000002 | Tidy Code Line Endings | |||||
HTX_TIDY_CODE_WRAP | 0x00000004 | Wrap the Code | |||||
HTML Errors | |||||||
HTX_REPORT_TAG_ERRORS | 0x00000010 | Report Tag Errors to Log | |||||
HTX_REPORT_CSS_ERRORS | 0x00000020 | Report CSS Errors to Log | |||||
HTX_REPORT_NESTING_ERRORS | 0x00000040 | Report Nesting Errors to Log | |||||
HTML | |||||||
HTX_NO_HEADER | 0x00000100 | No Header or Footer | |||||
EDGAR | |||||||
HTX_MX_REMOVE_EDGAR_TAGS | 0x00001000 | Remove Revisions, Page etc. | |||||
HTX_UPDATE_EDGAR_R_TAGS | 0x00002000 | Update Revisions to -sec-ix-redline |
Note that the HTX_MX_REMOVE_EDGAR_TAGS option also converts ^ characters to entities, as required by the EDGAR System.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.