Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter ElevenSGML Functions (continued)

DTDParseDocType Function

Overview

The DTDParseDocType function parses the first section of an HTML or XML file to determine the document type information.

Syntax/Parameters

Syntax

string[] = DTDParseDocType ( handle hMTO | string data );

Parameters

hMTO

A handle to a Mapped Text Object. Or,

data

A string containing HTML or XML.

Return Value

A string array containing the properties with the key names specifying the specific property or an empty array on error. Use the GetLastError to retrieve a formatted error code.

Remarks

The returned key name items are as follows: 

  Key Name   Description  
  dtd_type   DTD Type code with composite bits. See base SDK definition for DTD_ containing the HTML type ordinal and flags.  
  root   Root Element (normally HTML).  
  access   Access type (normally PUBLIC).  
  name   Name of the DTD, if specified.  
  url   URL reference for the DTD, if specified.  
  doc_type   DTD doc type code only, DTD_ code.  
  html_version   Version code (320, 400, 401, 500, etc).  
  html_type  

HTML type codes:

DTD_HTML_TYPE_UNKNOWN
DTD_HTML_TYPE_HTML
DTD_HTML_TYPE_XHTML

 
  html_sub_type  

HTML sub type for strict, transitional, etc, using the SDK prefix codes DTD_HTML_SUB_:

DTD_HTML_SUB_TYPE_UNKNOWN
DTD_HTML_SUB_TYPE_FINAL DTD_HTML_SUB_TYPE_LOOSE
DTD_HTML_SUB_TYPE_TRANSITIONAL
DTD_HTML_SUB_TYPE_STRICT
DTD_HTML_SUB_TYPE_BASIC
DTD_HTML_SUB_TYPE_FRAMESET

 
  html_case  

HTML case codes (case is not specified for certain DTDs):

DTD_HTML_CASE_UNKNOWN
DTD_HTML_CASE_UPPER
DTD_HTML_CASE_LOWER

This is the expected case of tags. For HTML, tag case is not relevant, however, HTML 5 by convention is lower case while earlier versions are upper case.

 
  tag_case  

Case of tags by observation. The first section of the data is scanned and the tags tested. The case codes with the SDK prefix SGML_GET_CASE_:

SGML_GET_CASE_UNKNOWN
SGML_GET_CASE_MIXED
SGML_GET_CASE_UPPER
SGML_GET_CASE_LOWER

 

 

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic