HappyDoc Generated Documentation Class: TALGenerator

HappyDoc3-r3_1 / happydoclib / docset / docset_TAL / TAL / TALGenerator.py / TALGenerator 

Methods   
  optimizeStartTag 
optimizeStartTag (
        self,
        collect,
        name,
        attrlist,
        end,
        )

These codes are used to indicate what sort of special actions are needed for each special attribute. (Simple attributes don't get action codes.)

The special actions (which are modal) are handled by TALInterpreter.attrAction() and .attrAction_tal().

Each attribute is represented by a tuple:

(name, value)
a simple name/value pair, with no special processing
(name, value, action, *extra)
attribute with special processing needs, action is a code that indicates which branch to take, and *extra contains additional, action-specific information needed by the processing

  emitDefineMacro 
emitDefineMacro ( self,  macroName )
Exceptions   

METALError( "duplicate macro definition: %s" % ` macroName `, self.position )
METALError( "invalid macro name: %s" % ` macroName `, self.position )

  emitOnError 
emitOnError (
        self,
        name,
        onError,
        TALtag,
        isend,
        )
  optimizeArgsList 
optimizeArgsList ( self,  item )
  unEmitWhitespace 
unEmitWhitespace ( self )
  emitCondition 
emitCondition ( self,  expr )
  emitOptTag 
emitOptTag (
        self,
        name,
        optTag,
        isend,
        )
  emitI18nVariable 
emitI18nVariable (
        self,
        varname,
        action,
        expression,
        )
  __init__ 
__init__ (
        self,
        expressionCompiler=None,
        xml=1,
        source_file=None,
        )
  popSlots 
popSlots ( self )
  optimizeCommonTriple 
optimizeCommonTriple ( self,  program )
  emitSubstitution 
emitSubstitution (
        self,
        arg,
        attrDict={},
        )
  emitText 
emitText ( self,  text )
  pushSlots 
pushSlots ( self )
  emitRepeat 
emitRepeat ( self,  arg )
Exceptions   

TALError( "invalid repeat syntax: " + ` arg `, self.position )

  emitDefines 
emitDefines ( self,  defines )
Exceptions   

TALError( "invalid define syntax: " + ` part `, self.position )

  emitEndElement 
emitEndElement (
        self,
        name,
        isend=0,
        implied=0,
        )
Exceptions   

exc( "%s attributes on <%s> require explicit " %( what, name, name ), position )

  emitRawText 
emitRawText ( self,  text )
  todoPop 
todoPop ( self )
  getCode 
getCode ( self )
  compileExpression 
compileExpression ( self,  expr )
Exceptions   

TALError( '%s in expression %s' %( err.args [ 0 ], ` expr ` ), self.position )

  emitDefineSlot 
emitDefineSlot ( self,  slotName )
Exceptions   

METALError( "invalid slot name: %s" % ` slotName `, self.position )

  emitEndTag 
emitEndTag ( self,  name )
  emitUseMacro 
emitUseMacro ( self,  expr )
  emitTranslation 
emitTranslation (
        self,
        msgid,
        i18ndata,
        )
  unEmitNewlineWhitespace 
unEmitNewlineWhitespace ( self )
  popProgram 
popProgram ( self )
  optimize 
optimize ( self,  program )
  emitFillSlot 
emitFillSlot ( self,  slotName )
Exceptions   

METALError( "invalid slot name: %s" % ` slotName `, self.position )
METALError( "duplicate fill-slot name: %s" % ` slotName `, self.position )

  pushProgram 
pushProgram ( self )
  todoPush 
todoPush ( self,  todo )
  replaceAttrs 
replaceAttrs (
        self,
        attrlist,
        repldict,
        )
  emitStartElement 
emitStartElement (
        self,
        name,
        attrlist,
        taldict,
        metaldict,
        i18ndict,
        position=( None, None ),
        isend=0,
        )
Exceptions   

TALError( "bad TAL attribute: " + ` key `, position )
TALError( "missing value for TAL attribute: " + ` key `, position )
I18NError( "missing value for i18n attribute: " + ` key `, position )
TALError( "tal:content and tal:replace are mutually exclusive", position )
I18NError( "bad i18n attribute: " + ` key `, position )
METALError( "bad METAL attribute: " + ` key `, position )
TALError( "missing value for METAL attribute: " + ` key `, position )
METALError( "fill-slot must be within a use-macro", position )
METALError( "define-slot must be within a define-macro", position )
METALError( "define-macro and use-macro cannot be used " "together or with define-slot or fill-slot", position )
I18NError( "i18n:translate and tal:replace are mutually exclusive", position )
I18NError( "i18n:data must be accompanied by i18n:translate", position )

  emitStartTag 
emitStartTag (
        self,
        name,
        attrlist,
        isend=0,
        )
  emit 
emit ( self,  *instruction )

This document was automatically generated Tue Dec 5 08:30:38 2006 by HappyDoc version 3.1