GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Eleven — SGML Functions (continued)
Overview
The SGMLGetItemResult function returns status and error data for the last item parsed.
Syntax/Parameters
Syntax
dword = SGMLGetItemResult ( handle hSGML );
Parameters
hSGML
A handle to an SGML Object.
Return Value
Returns a 32-bit dword result code using bitwise flags. On error, a formatted error code will be returned and can also be retrieved using the GetLastError function. Note that the top 4-bits of the result are always zero so as to not conflict with the formatted error code.
Remarks
The bitwise result codes are as follows:
Define | Bitwise Value | Description | |||||
Error Indicators (Bitwise AND) | |||||||
SPI_RC_ERROR_MASK | 0x0FFFF000 | Mask for Errors | |||||
SPI_RC_ERROR_NON_ATTRIBUTE_MASK | 0x0F9FF000 | Mask for Errors (no attribute errors) | |||||
DTD Error Codes | |||||||
SPI_RC_ERROR_ELEMENT_NOT_IN_DTD | 0x00001000 | Element not in DTD | |||||
SPI_RC_ERROR_NAMESPACE_NOT_IN_DTD | 0x00002000 | Namespace not in DTD | |||||
General Errors | |||||||
SPI_RC_OVERFLOW | 0x00010000 | Item Overflowed Buffer | |||||
SPI_RC_ENTITY_ERROR | 0x00020000 | Character Entity Had Error (space) | |||||
SPI_RC_TAG_ERROR | 0x00040000 | SGML Tag Error | |||||
SPI_RC_ELEMENT_ERROR | 0x00080000 | SGML Element in Error | |||||
SPI_RC_ELEMENT_NAMESPACE_ERROR | 0x00100000 | SGML Namespace in Error (for element) | |||||
SPI_RC_ATTRIBUTE_ERROR | 0x00200000 | SGML Attribute in Error (one or more) | |||||
SPI_RC_ATTRIBUTE_NAMESPACE_ERROR | 0x00400000 | SGML Attribute in Error (one or more) | |||||
SPI_RC_QUOTE_ERROR | 0x00800000 | Error Quoting Value | |||||
SPI_RC_NO_CLOSE_ERROR | 0x01000000 | Failure to Close Tag or Stopped Parse | |||||
SPI_RC_TO_MANY_PARAMETERS | 0x02000000 | Overflow in Parameter List | |||||
SPI_RC_ELEMENT_CASE_ERROR | 0x04000000 | Element XHTML Case Mismatch | |||||
SPI_RC_ATTRIBUTE_CASE_ERROR | 0x08000000 | Attribute XHTML Case Mismatch | |||||
Attribute Property Errors | |||||||
SPI_RC_VALUE_ERROR | 0x10000000 | HTML or CSS Value(s) in Error | |||||
SPI_RC_UNKNOWN_PROPERTY | 0x20000000 | Unknown CSS Property or Properties | |||||
Break Codes | |||||||
SPI_RC_BREAK_MASK | 0x0000000F | Break Type Mask | |||||
SPI_RC_BREAK_NORMAL | 0x00000000 | Broke on Space, ';' or '.' | |||||
SPI_RC_BREAK_ELEMENT | 0x00000001 | Broke on Start of Tag | |||||
SPI_RC_BREAK_CHAR | 0x00000002 | Broke on Start of Char Entity |
Each parameter also has error bits. Certain error conditions will result in the parser stopping while moving through a tag. For example, forgetting the P element:
< STYLE="text-align: center">
Will have the SPI_RC_NO_CLOSE_ERROR flag set since the ‘=’ character is interpreted as part of the element name and therefore is in error, as such the parse is stopped. On calling for the next items, the parser will return the remainder of the tag as text and spaces:
1 -- "text-align:
2 --
3 -- center">
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.