Ignore:
Timestamp:
Jun 14, 2005, 2:22:52 PM (19 years ago)
Author:
Michael Brickenstein <bricken@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
9b973c144b1c3a7ddd2df88833b75055fc1688ae
Parents:
bb3e2b01b8b571e1ce0e1df85bcb71fb0ccb8e9d
Message:
*bricken: can do this all day


git-svn-id: file:///usr/local/Singular/svn/trunk@8362 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/openmathserver/objects.py

    rbb3e2b0 rbfcf68  
    9595        children=self.children
    9696        if children:
    97             body="".join([context.XMLencode(c) for c in children])
     97            body="".join([context.XMLEncodeObject(c) for c in children])
    9898        else:
    9999            body=self.body
     
    131131                return context.apply(efunc, eargs)
    132132            except EvaluationFailedError, NotImplementedError:
    133                 return self
     133                return OMapplication(efunc, eargs)
     134                #return self
    134135        else:
    135136            return OMapplication(efunc, eargs)
     137    XMLtag="OMA"
     138    def getChildren(self):
     139        return [self.func]+self.args
     140    def setChildren(self):
     141        raise UnsupportedOperationError
    136142class OMsymbol(OMobject):
    137143    def __init__(self,name,cd=None):
     
    147153    def evaluate(self,context):
    148154        return context.evaluateSymbol(self)
     155    XMLtag="OMS"
     156    def getXMLattributes(self):
     157        return [XMLattribute("name", self.name),\
     158                 XMLattribute("cdbase",self.cd.base),\
     159                 XMLattribute("cd",self.cd.name)]
     160    def setXMLattributes(self):
     161        raise UnsupportedOperationError
    149162class SimpleValue(OMobject):
    150163    def __init__(self,value):
     
    172185        return str(self.value)
    173186    def setBody(self, value):
    174         raise OperationNotPossibleError
     187        raise UnsupportedOperationError
    175188    XMLtag="OMI"
    176189class OMfloat(SimpleValue):
     
    183196    def __str__(self):
    184197        return "OMfloat("+repr(self.value)+")"
     198    XMLtag="OMF"
     199    def getXMLattributes(self):
     200        return [XMLattribute("dec",str(self.value))]
    185201       
    186202if __name__=='__main__':
Note: See TracChangeset for help on using the changeset viewer.