;ò lh†>c@sTdZddd!Zddd!Zddd!ZdklZdefd „ƒYZd S( s` $RCSfile: IXSLTProcessor.py,v $ This class encapsulates an XSLT Processor for use by ZopeXMLMethods. IXSLTProcessor is the Interface implemented by a processor library. Any processor can be used, as long as an adaptor class is written that conforms to this interface. Author: Craeg Strong Release: 1.0 s $Name: $iiþÿÿÿs$Date: 2003/03/30 03:45:47 $s$Revision: 1.9 $i (sBasesIXSLTProcessorcBsAtZdZeed„Zd„Zeeed„Zd„ZRS(s: ZopeXMLMethods XSLT Processor public interface cCsdS(s¯ Transforms the passed in XML into the required output (usually HTML) using the passed in XSLT. Both the XML and XSLT strings should be well-formed. Returns the output as a string. transformObject and REQUEST params may be used to acquire Zope content such as XSLT parameters and URN namespaces, if required. This method should never raise an exception. Instead, it should write an error message to sys.stderr and return an empty string. The idea is that web site users will at worst see an empty page. This method calls transformGuts to actually perform the transformation. N((s xmlStringsxmlURLs xsltStringsxsltURLstransformObjectsREQUEST((sL/mnt/gmirror/ports/www/zope-xmlmethods/work/ZopeXMLMethods/IXSLTProcessor.pys transformscCsdS(sŒ This is a convenience function for producing the appropriate object to pass for the 'params' parameter in transformGuts. Pass in a python map plus the parameter name and value. Since each processor has a unique way of creating its parameter map, this function abstracts that away so, for example, the unit tests can be generic. N((sparamMapsnamesvalue((sL/mnt/gmirror/ports/www/zope-xmlmethods/work/ZopeXMLMethods/IXSLTProcessor.pysaddParam3s cCsdS(sP This method actually performs the transformation. If anything goes wrong, it raises an Exception. This exception should be caught by transform() and turned into a message that gets sent to stderr by all implementations. transformGuts is used primarily for the test harness. N((s xmlStringsxmlURLs xsltStringsxsltURLstransformObjectsparamssREQUEST((sL/mnt/gmirror/ports/www/zope-xmlmethods/work/ZopeXMLMethods/IXSLTProcessor.pys transformGuts?s cCsdS(s‹ Set debug level from 0 to 3. 0 = silent 3 = extra verbose Debug messages go to Zope server log. N((slevel((sL/mnt/gmirror/ports/www/zope-xmlmethods/work/ZopeXMLMethods/IXSLTProcessor.pys setDebugLevelLs(s__name__s __module__s__doc__sNones transformsaddParams transformGutss setDebugLevel(((sL/mnt/gmirror/ports/www/zope-xmlmethods/work/ZopeXMLMethods/IXSLTProcessor.pysIXSLTProcessors   N(s__doc__s __cvstag__s__date__s __version__s InterfacesBasesIXSLTProcessor(s __cvstag__s__date__s __version__sBasesIXSLTProcessor((sL/mnt/gmirror/ports/www/zope-xmlmethods/work/ZopeXMLMethods/IXSLTProcessor.pys? s