File:  [LON-CAPA] / doc / homework / Attic / lonxml_doc
Revision 1.2: download - view: text, annotated - select for diffs
Thu Oct 5 19:42:35 2000 UTC (23 years, 6 months ago) by albertel
Branches: MAIN
CVS tags: version_0_4, stable_2002_spring, stable_2002_july, stable_2002_april, stable_2001_fall, STABLE, HEAD
- document newparser and @Apache::lonxml::pwd

Notes:

1) get_all_text

check out loncom/homework/structuretags.pm start_block for an example
use. It works like HTML::TokeParser->get_text().

Additionaly note the existance of a depth counter similar to the one
in Gerd's original lonproblem.pm

2) depthcounter
$Apache::lonxml::curdepth will be a string like:
2_3_1

(tag 1 in the 3 second level tag in the 2 toplevel tag)

It gets set by callsub and is available for use in the Perl tag
implementations.

3) newparser(parser stack, string ref, directory string)

pass it refereence to an array and a reference to a string scaler.  it
creates a new HTML::TokeParser based on the referenced string.  It
also update Apache::lonxml::pwd to point to the location of the data
in this parser, which is either what was passed in or is set to the
topmost item in the stack.

4) @Apache::lonxml::pwd

contains a stack of directories corresponding to the stack of parsers

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>