{"size": 2729, "ext": "scrbl", "max_stars_repo_path": "doc/utils/text/html-parser.scrbl", "max_stars_repo_name": "christoff-buerger/sagittarius-scheme", "max_stars_repo_stars_event_min_datetime": "2015-11-07T07:13:35.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-15T03:35:14.000Z", "max_issues_repo_path": "doc/utils/text/html-parser.scrbl", "max_issues_repo_name": "christoff-buerger/sagittarius-scheme", "max_issues_repo_issues_event_min_datetime": "2016-04-28T21:59:59.000Z", "max_issues_repo_issues_event_max_datetime": "2021-07-01T08:42:21.000Z", "max_forks_repo_path": "doc/utils/text/html-parser.scrbl", "max_forks_repo_name": "christoff-buerger/sagittarius-scheme", "max_forks_repo_forks_event_min_datetime": "2016-12-28T12:41:23.000Z", "max_forks_repo_forks_event_max_datetime": "2020-02-26T20:52:02.000Z"}
{"max_stars_count": 39, "max_issues_count": 3, "max_forks_count": 4, "avg_line_length": 34.1125, "max_line_length": 83, "alphanum_fraction": 0.7295712715}
@; -*- coding: utf-8 -*-
@subsection[:tag "text.html-parser"]{(text sxml html-parser) - Flxible HTML parser}


@define[Library]{@name{(text sxml html-parser)}}
@desc{This library provides HTML parser and printer procedures.

The provided procedures are compatible with HTMLPrag.
}

@subsubsection{High level APIs}

@define[Function]{@name{html->sxml-0nf} @args{in}}
@define[Function]{@name{html->sxml-1nf} @args{in}}
@define[Function]{@name{html->sxml-2nf} @args{in}}
@define[Function]{@name{html->sxml} @args{in}}
@define[Function]{@name{html->shtml} @args{in}}
@desc{Parse given input port to SHTML. The @var{in} must be a textual input
port.

The @code{html->sxml-2nf} procedure normalizes attributes if it doesn't have
value. Others don't. Normalization in this context means adding attribute name
as its value.
}

@define[Function]{@name{write-shtml-as-html}
 @args{shtml :optional out error-filter}}
@desc{Writes given @var{shtml} to @var{out}.

If optional argument @var{out} is given, it must be a textual output port,
then the procedure writes to given output port. Otherwise 
@code{current-output-port} is used.

Optional argument @var{error-filter} is used when unexpected SHTML entity is
met. It must be a procedure takes 2 arguments, unexpected entity and boolean
flag indicates if the entity is attribute or not. By default, it raises an
error.
}

@define[Function]{@name{shtml->html} @args{shtml}}
@desc{Converts @var{shtml} to string represented HTML.}

@subsubsection{Low level APIs}

@define[Variable]{@name{shtml-comment-symbol}}
@define[Variable]{@name{shtml-decl-symbol}}
@define[Variable]{@name{shtml-empty-symbol}}
@define[Variable]{@name{shtml-end-symbol}}
@define[Variable]{@name{shtml-entity-symbol}}
@define[Variable]{@name{shtml-pi-symbol}}
@define[Variable]{@name{shtml-start-symbol}}
@define[Variable]{@name{shtml-text-symbol}}
@define[Variable]{@name{shtml-top-symbol}}
@desc{SXML entity symbols: @code{*COMMENT*}, @code{*DECL*}, @code{*EMPTY*},
@code{*END*}, @code{*ENTITY*}, @code{*PI*}, @code{*START*}, @code{*TEXT*} and
@code{*TOP*} respectively.
}

@define[Variable]{@name{shtml-named-char-id}}
@define[Variable]{@name{shtml-numeric-char-id}}
@desc{These variables are used in @code{*ENTITY*} as public identifier.
}

@define[Function]{@name{make-shtml-entity} @args{value}}
@desc{Makes SHTML character entity. The @var{value} must be a symbol, string
or integer.

@snipet[=> "(& 151)"]{(make-shtml-entity 151)}
}

@define[Function]{@name{shtml-entity-value}}
@desc{Retrieve SHTML entity value.
}

@; TBD
@; @define[Function]{@name{make-html-tokenizer}}
@; @define[Function]{@name{tokenize-html}}
@; @define[Function]{@name{shtml-token-kind}}
@; @define[Function]{@name{parse-html/tokenizer}}
