--- doc/homework/xml.html 2001/05/21 03:35:46 1.1 +++ doc/homework/xml.html 2002/10/21 17:10:35 1.6 @@ -20,47 +20,108 @@

Global Variables

- + +

+ In common usage, $Apache::lonxml::prevent_entity_encode, + $Apache::lonxml::evaluate, + $Apache::lonxml::metamode, + $Apache::lonxml::import, should never be set to a value + directly, but rather incremented when you want the effect on, + and decremented when you want the effect off. +

+

Notable Perl subroutines

If not specified these functions are in Apache::lonxml

Functions Tag Handlers can use

@@ -117,14 +195,48 @@ Apache::scripttag::start_script for an example of usage.)

  • - get_param - 4 arguments, firsth is a scaler sting of + get_param - 4 arguments, first is a scaler sting of the argument needed, second is a reference to the parser arguments stack, third is a reference to the Safe space, and fourth is an optional "context" value. This subroutine allows a tag to get a tag argument, after being interpolated inside the Safe space. This should be used if the tag might use a safe space variable reference for the tag argument. (See - Apaceh::scripttag::start_script for an example.) + Apache::scripttag::start_script for an example.) + + This version only handles scalar variables. +
  • +
  • + get_param_var - 4 arguments, first is a scaler sting of + the argument needed, second is a reference to the parser + arguments stack, third is a reference to the Safe space, and + fourth is an optional "context" value. This subroutine allows + a tag to get a tag argument, after being interpolated inside + the Safe space. This should be used if the tag might use a + safe space variable reference for the tag argument. (See + Apache::scripttag::start_script for an example.) + + This version can handle list or hash variables properly. +
  • +
  • + description - 1 argument, the token object. This will + return the textual decription of the current tag from the + insertlist.tab file. +
  • +
  • + whichuser - 0 arguments. This will take a look at the + current environment setting and return the current $symb, + $courseid, $udom, $uname. You should always use this function + if you want to determine who the current user is. (Since a + instructor might be trying to view a students version of a + resource.) +
  • +
  • + inner_xmlparse - 6 arguments, the target, an array + pointer to the current stack of tags, and array pointer to the + current stack of tag arguments, an array pointer to the + current stack of LCParser's, a pointer to the current Safe + space, a pointer to the hash of current style definitions
  • newparser - 3 args, first is a reference to the parser @@ -145,7 +257,14 @@ sub BEGIN { } Would tell xmlparse that in Apache::scripttag it can find - handlers for <script> and <display> + handlers for <script> and <display>, if one + regsiters a tag that was already registered the previous one + is remembered and will be restored on a deregister. +
  • +
  • + deregister - used to remove a previously registered tag + implementation. It will restore the previous registration if + there was one.
  • startredirection - used when a tag wants to save a @@ -164,7 +283,7 @@ sub BEGIN { a reference to the Safe space, 3 a string to be evaluated before the first arg. This subroutine will do variable interpolation and simple function interpolations on the first - argument. (See Apache::lonxml::xmlparse for an example.) + argument. (See Apache::lonxml::inner_xmlparse for an example.)
  • Apache::run::run - 2 args, first a string, second a @@ -178,24 +297,29 @@ sub BEGIN {

    Style File specific tags

    -
    Guy Albertelli
    -Last modified: Sun May 20 23:34:57 EDT 2001 +Last modified: Mon Oct 21 13:23:28 EDT 2002