Macro Language Reference > Macros > Text (Page Level) > tparse
  
tparse
Description
Parses an SGML stream.
 
Example 306. Parse an XML stream
The example below parses an XML stream named tx1 within the current document, using the xml.dcl declaration file and the doc1.dtd DTD file:
tparse "tx1","xml.dcl","dtd/doc1.dtd"
 
Example 307. Parse an SGML stream using extended parameters
The example below parses a text stream called tx1 using the declaration doc1dcl via URL path and the doc1.dtd DTD file, with show results toggled on and a maximum error display of 50.
tparse "tx1" ,u"http://www.3b2.com/decls/doc1.sgd"
f"dtd/doc1.dtd",s1,me50
Syntax
tparse 1:n? {type}stream:t? ( {type}sgd name:t? ( {type}dtd name:t? ( err stream:t? ( show res:o? ( max error:n? ) ) ) ) )
tparse
[no parameter]
Use the current settings to parse the stream in which the cursor is clicked. If the cursor is not in a stream you will be prompted for a stream name to parse. If no settings have been declared, the Parse SGML dialog box will be invoked.
1
Re-display the results of the previous parse if there was one, i.e. view the error log.
{type}stream
The name of text stream to be parsed
{type}sgd name
SGML declaration
{type}dtd name
DTD (Document Type Definition)
err stream
The name of the error log stream
show res
0
Do not show results
1
Show results
max error
The maximum error number (the default value is 200)
Additional Information
Those parameters above that include the {type} optional parameter type specifier can take one of the values below as a prefix. If none is present the parameter is taken to be a stream (see the 2nd example above).
f
File
u
URL
 
tparse 1 simply displays the result of the latest parse run.