\rho,

The documentation has been updated in the CVS version of SimpleTaglib
(but has not yet been released).  Here is an excerpt of the updated
documentation.  Pay particular attention to the new sentence at the
end of this paragraph:

    The called subs get passed 3 parameters: The parser object, the
    tag name, and an attribute hash. This hash only contains XML
    attributes declared using the 'attrib()' Perl function
    attribute. (Try not to confuse these two meanings of 'attribute' -
    unfortunately XML and Perl both call them that way.) The other
    declared parameters get converted into local variables with prefix
    'attr_', or, in the case of 'childStruct', converted into the '%_'
    hash. These local variables are only available inside your code
    fragment which becomes part of the XSP script, unlike the
    attribute hash which is passed directly to your handler as the
    third parameter.

So, as you discovered with your two test cases, the parameters in @_
are available directly to your handler when it is called, whilst the
other attributes (for example "$attr_param" and/or "$_{param}") are
available inside the returned code fragment which is executed at
request time.  I hope the updated documentation explains this behavior
more clearly.

For more information, take a look at the following files in CVS.  The
first is the updated SimpleTaglib.pm (the updated POD documentation is
at the bottom).  The second is a sample tag library demonstrating how
XML attributes are accessed from the handlers.

http://cvs.apache.org/viewcvs.cgi/xml-axkit/lib/Apache/AxKit/Language/XSP/SimpleTaglib.pm?rev=1.6&content-type=text/vnd.viewcvs-markup

http://cvs.apache.org/viewcvs.cgi/xml-axkit/demo/AxKit/XSP/Demo/SimpleInputAttributes.pm?rev=1.1&content-type=text/vnd.viewcvs-markup

Ken

P.S. perhaps this bug report at rt.cpan.org can be closed when the
next version of AxKit is released.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to