Changeset 559396 in git


Ignore:
Timestamp:
Jun 17, 2005, 11:29:27 AM (18 years ago)
Author:
Michael Brickenstein <bricken@…>
Branches:
(u'spielwiese', '8d54773d6c9e2f1d2593a28bc68b7eeab54ed529')
Children:
88f1af180fd61cad5c84ed7e886b02fa905372c9
Parents:
d113d3aba56b6d8664654dbfaeeae4b356a2527e
Message:
*bricken: refactored


git-svn-id: file:///usr/local/Singular/svn/trunk@8378 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
modules/openmathserver
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • modules/openmathserver/context.py

    rd113d3 r559396  
    7474        #TODO: Make all objects __hash__ and __eq__
    7575        if (len(obj.attributes)==0):
    76             return obj.XMLencode(self)
     76            return obj.XMLEncode(self)
    7777        else:
    7878            toencode=copy(obj)
     
    8181            attribution=OMAttribution(*([OMAttributePair(k,obj.attributes[k])\
    8282                for k in obj.attributes])+[toencode])
    83             return attribution.XMLencode(self)
     83            return attribution.XMLEncode(self)
    8484           
    8585class SimpleXMLEncoder(object):
  • modules/openmathserver/objects.py

    rd113d3 r559396  
    8888    XMLAttributes=property(__getXMLAttributes,__setXMLAttributes,__delXMLAttributes,\
    8989        "xml attributes")
    90     def XMLencode(self, context):
     90    def XMLEncode(self, context):
    9191       
    9292        attr=self.XMLAttributes
     
    243243    def evaluate(self, context):
    244244        return context.evaluate(self.ref)
    245     def XMLencode(self, context):
     245    def XMLEncode(self, context):
    246246        "FIXME: maybe it should also be able to encode as reference"
    247247        return context.XMLEncodeObject(self.ref)
     
    310310    i=OMint(22482489)
    311311    print i.body
    312     print i.XMLencode(context)
     312    print i.XMLEncode(context)
    313313    #i.body="dshj"
    314314   
  • modules/openmathserver/xmlencodetest.py

    rd113d3 r559396  
    66i=OMint(22482489)
    77#print i.body
    8 print i.XMLencode(context)
     8print i.XMLEncode(context)
    99print context.XMLEncodeObject(i)
    1010v=OMVar("x")
    11 print v.XMLencode(context)
     11print v.XMLEncode(context)
    1212x=v
    1313y=OMVar("y")
    1414a=OMApply(OMSymbol("plus",arith1.content),[x,y,i])
    15 print a.XMLencode(context)
     15print a.XMLEncode(context)
    1616print context.XMLEncodeObject(context.evaluate(a))
    1717a1=OMApply(OMSymbol("plus",arith1.content),[OMint(1),OMint(2)])
Note: See TracChangeset for help on using the changeset viewer.