Re: : Yet more code (Was: Re: A nifty code sample to share)

2002-09-26 Thread Josh Chamas
[EMAIL PROTECTED] wrote: Hi Josh , my $xml_data; $xsl_data = Test.xsl; $xml_data = Test.xml; my $xslt_data_ref = $Server-XSLT(\$xsl_data, \$xml_data); print $$xslt_data_ref; $xsl_data $xml_data need to be strings, not filenames, as in: open(XML, 'Test.xml') || die(can't

RE: : Yet more code (Was: Re: A nifty code sample to share)

2002-09-24 Thread Raghu . Nalamada
. Regards Raghu -Original Message- From: Josh Chamas [mailto:[EMAIL PROTECTED]] Sent: Monday, September 23, 2002 8:09 PM To: Nalamada, Raghu Cc: [EMAIL PROTECTED] Subject: Re: : Yet more code (Was: Re: A nifty code sample to share) [EMAIL PROTECTED] wrote: Hi Josh, I need to add

Re: : Yet more code (Was: Re: A nifty code sample to share)

2002-09-24 Thread Josh Chamas
[EMAIL PROTECTED] wrote: Hi Josh , Thanks for your help . Atlast Resolved XSLT error , I had to include /Net/stmdvocs/sbcexp/devl/SunOS/sparc-5.6/run//pd/libxslt/1.0.20/lib in LD_LIBRARY_PATH. I generate XML from SQL using perl module XML_RDB . Using Apache::ASP i like

: Yet more code (Was: Re: A nifty code sample to share)

2002-09-23 Thread Raghu . Nalamada
(); Any pointers what iam doing wrong would be very helpful. Thanks Raghu -Original Message- From: Josh Chamas [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 21, 2002 2:52 PM To: Brat Wizard Cc: Apache::ASP Mailing List Subject: Re: Yet more code (Was: Re: A nifty code sample to share

RE: : Yet more code (Was: Re: A nifty code sample to share)

2002-09-23 Thread Raghu . Nalamada
-Original Message- From: Josh Chamas [mailto:[EMAIL PROTECTED]] Sent: Monday, September 23, 2002 4:21 PM To: Nalamada, Raghu Cc: [EMAIL PROTECTED] Subject: Re: : Yet more code (Was: Re: A nifty code sample to share) [EMAIL PROTECTED] wrote: Hi All , Is there any way in Apache

Re: : Yet more code (Was: Re: A nifty code sample to share)

2002-09-23 Thread Josh Chamas
[EMAIL PROTECTED] wrote: Hi Josh, I need to add to different xsl file depending upon the user's request . I believe the $Server-Config() method that I mentioned should work for you. Yes LibXSLT is installed , When i add to httpd.conf it gives me the error

Re: Yet more code (Was: Re: A nifty code sample to share)

2002-09-22 Thread Brat Wizard
Of course, you could also put just the info to be included into a separate file and allow it to be included at a judicious moment... (nah, that would be too easy ;) But the one thing that _doesn't_ allow for, and the reason why I myself have been working on the problem-- is putting together

Re: Yet more code (Was: Re: A nifty code sample to share)

2002-09-21 Thread Brat Wizard
A follow-up to my last post... adding this line to the render func: $tmpl =~ s/__\((.*?)\)__/%=($1)%/gm; # fixup embedded tests Allows this construct to be used: __(__F_ONSALE__?'YES':'NO')__ These constructs also work as expected: Item on sale? Yes or No: __(__F_ONSALE__?'YES':'NO')__

Re: Yet more code (Was: Re: A nifty code sample to share)

2002-09-20 Thread Brat Wizard
Yes, but extrordinarily easy-to-do and it didn't break nuthin ;) On Friday 20 September 2002 02:27 pm, you muttered: Brat Wizard wrote: # picture else { $$hash{$token} = sprintf($fmt, $$hash{$token}); } }

Re: Yet more code (Was: Re: A nifty code sample to share)

2002-09-20 Thread Brat Wizard
Right, its almost as if one would want a pre-processing stage of not the output, but of the content. The current model was not built to be easily extendable to this as there is only one sub per XMLSubs that gets called, but what you would really want is something like: sub my::sub_pre()

Re: A nifty code sample to share

2002-09-18 Thread Josh Chamas
my:sub ... fmtCOST:%.2f,AGE:%3d,STATE:%uc2/fmt This item costs __COST__ and you must be __AGE__ years old to buy it in the state of __STATE__ /my:sub Assuming that the data is available when the my:sub is starting to get processed, then you can use more XMLSubs to do your dirty work

A nifty code sample to share

2002-09-17 Thread Brat Wizard
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. A caveat: I use several custom modules which hides some stuff- most notably the Page object, which is basically a hash of

Re: A nifty code sample to share

2002-09-17 Thread Brat Wizard
Um- minor correction- I slightly misspoke-- I was confusing this with another module I have. This example _only_ matches the URL, CAPTION, and NAME fields from the hash. Sorry for any confusion. John On Tuesday 17 September 2002 03:27 am, Brat Wizard spewed into the ether: I've been

Re: A nifty code sample to share

2002-09-17 Thread Josh Chamas
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