>>I've been meaning for a long time to release some code samples-- here is >>one I especially like for making menus and navbars in html-- same code will >>work for either. >>
I have created the ability in the system to have includes shared pretty easily with the Share:: namespace, but haven't put anything in there yet. This namespace is Apache::ASP::Share more generally, so this could then a module like Apache::ASP::Share::Wizard, which might export a menu() subroutine, that someone could then wire pretty easily into their XMLSubs package namespace? Then this sub could be distributed with Apache::ASP. Alternatively, you could publish this to CPAN as the Apache::ASP::Share::Wizard package, and put everything you want in there at your leisure. Useful templates can be loaded from that like $Response->Include("Share::Wizard/template.inc"), and the subs/objects can be imported normally. That would be cool if at the end of an install, someone could man/perldoc Apache::ASP::Share::Wizard I wish I had a better structured interface for this, or a XMLSubs namespace mapping ability, but I have neither yet hooked into Apache::ASP. The Share:: include namespace was hard enough to work out as it was. >><table><tr><td> >><my:menu selected="$$args{cmd}"> >> <sel><b><a href="__URL__">__CAPTION__</a></b><br></sel> >> <norm><a href="__URL__">__CAPTION__</a><br></norm> >></my:menu> >></td></tr></table> Did you know that in the body of an XMLSubs, you can do things like <%= $Object->URL %> instead of the __URL__. I begin to see how it would be nice to offer a set of standard XMLSubs that can do such things as __TOKEN__ post processing as standard. I have thought about ports a subset of the standard JSP taglibs for similar effect so we can have a nice default tag library to work with too, but have some namespace issues to work though first. >>One thing to note that is NOT mentioned on the ASP site-- apparently the >>parsing algorithm doesn't know how to handle values that are NOT enclosed >>in quotes. Html does not require quotes as long as the value contains no >>spaces and only alphanumeric characters. You can't do that here. The other >>thing to point out is that any perl variables (eg. $myvar) are NOT escaped >>in the usual apache::asp way, (<%=$myvar%>) but instead are just simply >>passed between the quotes. Personally I think this is an inconsistancy, and In Apache::ASP v3.0 ( & 2.9xx betas ), there will be the default syntax of <my:sub arg1="<%= $var %>" /> instead of the <my:sub arg1="$var" /> today. To retain backwared compatibility, there will be an XMLSubsPerlArgs config that can be set to activate the old method for backwards compatibility. Other big things will happen in 3.0 like UseStrict becoming default, which is why 3.0 will be the release for them. I have already code forked off the 2.xx branch internally from 3.0 so I can keep doing fixes there separate from the bigger changes in 3.0. Thanks for sharing that interesting code sample. Regards, Josh --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]