/[gnue]/gnue-reports/src/adapters/filters/Universal/Base/Parser.py
ViewVC logotype

Diff of /gnue-reports/src/adapters/filters/Universal/Base/Parser.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by jcater, Mon Oct 6 19:23:17 2003 UTC revision 1.11 by siesel, Tue Nov 18 21:11:57 2003 UTC
# Line 34  from gnue.common.datasources import GDat Line 34  from gnue.common.datasources import GDat
34  from gnue.common.formatting import GTypecast  from gnue.common.formatting import GTypecast
35  from gnue.common.definitions import GParser  from gnue.common.definitions import GParser
36  from gnue.common.logic import GTrigger  from gnue.common.logic import GTrigger
37  from Helpers import measurement  from ParserTypes import measurement, color
38  import copy, types  import copy, types
39    
40    
# Line 72  def getXMLelements(): Line 72  def getXMLelements():
72    global xmlElements    global xmlElements
73    
74    # Here due to some nasty recursive imports    # Here due to some nasty recursive imports
75    from Objects import *    from Objects import Report,Section
76    
77    if xmlElements == None:    if xmlElements == None:
78    
# Line 95  def getXMLelements(): Line 95  def getXMLelements():
95           'ParentTags':  None },           'ParentTags':  None },
96        
97        'section':    {        'section':    {
98           'BaseClass': GRParameters.GRSection,           'BaseClass': Section, # TODO: should be replaced by Multiplexed Section
99           'Attributes': {           'Attributes': {
100              'positioning':    {              'positioning':    {
101                 'ValueSet': {                 'ValueSet': {
# Line 157  def getXMLelements(): Line 157  def getXMLelements():
157              'spacinghoriz':      {              'spacinghoriz':      {
158                 'Typecast': measurement,                 'Typecast': measurement,
159                 'Default': '0'  } } ,                 'Default': '0'  } } ,
          'ParentTags':  ('parameters',) },  
   
       'sortoptions':  {  
          'BaseClass': GRSortOptions.GRSortOptions,  
          'SingleInstance': 1,  
160           'ParentTags':  ('report',) },           'ParentTags':  ('report',) },
161    
       'sortoption':   {  
          'BaseClass': GRSortOptions.GRSortOption,  
          'Attributes': {  
             'id':          {  
                'Required': 1,  
                'Unique': 1,  
                'Typecast': GTypecast.name },  
             'description': {  
                'Required': 1,  
                'Typecast': GTypecast.name },  
             'default':     {  
                'Typecast': GTypecast.boolean,  
                'Default': 0 } },  
          'ParentTags':  ('sortoptions',) },  
   
       'sortcolumn':   {  
          'BaseClass': GRSortOptions.GRSortColumn,  
          'Attributes': {  
             'name':        {  
                'Required': 1,  
                'Typecast': GTypecast.name } },  
          'ParentTags':  ('sortoption',) },  
   
       'layout':       {  
          'BaseClass': GRLayout.GRLayout,  
          'Required': 1,  
          'SingleInstance': 1,  
          'MixedContent': 1,  
          'Attributes': {  
             'format':      {  
                'Typecast': GTypecast.text },  
             'suppressGNUeTags': {  
                'Typecast': GTypecast.boolean } },  
          'ParentTags':  ('report',) },  
   
       'section':      {  
          'BaseClass': GRLayout.GRSection,  
          'Required': 1,  
          'MixedContent': 1,  
          'KeepWhitespace': 1,  
          'Attributes': {  
             'name':        {  
                'Typecast': GTypecast.name },  
             'source':      {  
                'Typecast': GTypecast.name } },  
          'ParentTags':  ('layout',) },  
   
       'default':      {  
          'BaseClass': GRLayout.GRDefault,  
          'MixedContent': 1,  
          'KeepWhitespace': 1,  
          'ParentTags':  ('section',) },  
   
       'firstrow':      {  
          'BaseClass': GRLayout.GRFirstRow,  
          'MixedContent': 1,  
          'KeepWhitespace': 1,  
          'ParentTags':  ('section',) },  
   
       'notfirstrow':      {  
          'BaseClass': GRLayout.GRNotFirstRow,  
          'MixedContent': 1,  
          'KeepWhitespace': 1,  
          'ParentTags':  ('section',) },  
   
       'lastrow':      {  
          'BaseClass': GRLayout.GRLastRow,  
          'MixedContent': 1,  
          'KeepWhitespace': 1,  
          'ParentTags':  ('section',) },  
   
       'notlastrow':      {  
          'BaseClass': GRLayout.GRNotLastRow,  
          'MixedContent': 1,  
          'KeepWhitespace': 1,  
          'ParentTags':  ('section',) },  
   
       'field':        {  
          'BaseClass': GRLayout.GRField,  
          'Attributes': {  
             'name':        {  
                'Required': 1,  
                'Typecast': GTypecast.name },  
             'source':      {  
                'Typecast': GTypecast.name },  
             'section':      {  
                'Typecast': GTypecast.name },  
             'format':      {  
                'Typecast': GTypecast.name } },  
          'ParentTags':  ('section',) },  
   
       'summ':         {  
          'BaseClass': GRLayout.GRSumm,  
          'Attributes': {  
             'name':        {  
                'Typecast': GTypecast.name },  
             'function':    {  
                'Typecast': GTypecast.name,  
                'Default': "count"},  
             'field':      {  
                'Typecast': GTypecast.name,  
                'Default': None},  
             'section':     {  
                'Typecast': GTypecast.name },  
             'format':      {  
                'Typecast': GTypecast.name } },  
          'ParentTags':  ('layout',) },  
   
       'param':         {  
          'BaseClass': GRLayout.GRParam,  
          'Attributes': {  
             'name':        {  
                'Required': 1,  
                'Typecast': GTypecast.name },  
             'format':      {  
                'Typecast': GTypecast.name } },  
          'ParentTags':  ('layout',) },  
   
       'sources':      {  
          'BaseClass': GRSources.GRSources,  
          'SingleInstance': 1,  
          'ParentTags':  ('report',) },  
162      }      }
163    
164      borderTypes = {      borderTypes = {
# Line 340  def getXMLelements(): Line 213  def getXMLelements():
213      #      #
214      for tag in ('section',):      for tag in ('section',):
215        xmlElements[tag]['Attributes'].update( borderStyles )        xmlElements[tag]['Attributes'].update( borderStyles )
                   
       
   
216    
217    
218    return GParser.buildImportableTags('report',xmlElements)    return GParser.buildImportableTags('report',xmlElements)

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26