Hi, I'm trying to knock together a taglib with AxKit::TaglibHelper, but there's a couple of things I'm real unsure on.
My main question is how do I reference the taglib from within my XML. If I remember from my limited knowledge of Cocoon a taglib is referenced by - <?xml-logicsheet href="http://www.mysite.com/mytaglib.xsl"?> I tried this with AxKit without any joy. My other question, (and probably the root of my problem), is what do I call the taglib in terms of type, (.xsl or .pm?), if its .pm I assume it has to be within a directory on my @INC path and referenced by the XML in a different way than I give above? Sorry for the daft questions but I'd love to get this working, any help v-appreciated. Regards, Mark. My code goes like this; taglib.xml -------------------------------------------------- <?xml version="1.0"?> <?xml-stylesheet href="." type="application/x-xsp"?> <?xml-stylesheet href="time.xsl" type="text/xsl"?> <xsp:page xmlns:xsp="http://www.apache.org/1999/XSP/Core" xmlns:test="http://apache.org/xsp/test-taglib/v1" language="Perl"> <greeting><test:hello/></greeting> </xsp:page> taglib.xsl -------------------------------------------------- <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsp="http://www.apache.org/1999/XSP/Core" version="1.0"> <xsl:template match="/"> <html> <head><title>taglib</title></head> <body> <table> <tr> <td><i>taglib says, </i></td> <td><b><xsl:value-of select="./greeting" /></b></td> </tr> </table> </body> </html> </xsl:template> </xsl:stylesheet> Taglib itself -------------------------------------------------- # ######################################################################## #test-taglib # ######################################################################## #001 $NS = 'http://apache.org/xsp/test-taglib/v1'; @EXPORT_TAGLIB = ( 'hello()' ); use Apache::AxKit::Language::XSP::TaglibHelper; sub parse_char { Apache::AxKit::Language::XSP::TaglibHelper::parse_char(@_); } sub parse_start { Apache::AxKit::Language::XSP::TaglibHelper::parse_start(@_); } sub parse_end { Apache::AxKit::Language::XSP::TaglibHelper::parse_end(@_); } use strict; sub hello() { return "hello world!"; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
