        if files:
            widget.add(HtmlElement.b("Unknown ref."))
        for file in files:
            block = DivWdg()
            block.add_style("margin-left: 30px")
            block.add_style("margin-top: 10px")

            block.add( IconWdg( "Unknown", IconWdg.UNKNOWN) )

            path = Xml.get_attribute(file, "path")
            block.add(path)
            widget.add(block)



    def _handle_refs(self, snapshot, widget, upstream, recursive=True):

        xml = snapshot.get_xml_value("snapshot")
        
        # go through the references
        if upstream:
            nodes = xml.get_nodes("snapshot/ref")
            if nodes:
                widget.add(HtmlElement.b('Upstream ref.'))
                block = DivWdg()
                
                block.add_style("margin-left: 30px")
                block.add_style("margin-top: 10px")
                for node in nodes:
                    self._handle_ref_node(node, block, upstream, recursive)
                    block.add(HtmlElement.br())
                widget.add(block)
               

            # go through the input references
            nodes = xml.get_nodes("snapshot/input_ref")
            if nodes:
                widget.add(HtmlElement.br())
                widget.add(HtmlElement.b("Input ref."))
                block = DivWdg()
                block.add_style("margin-left: 30px")
                block.add_style("margin-top: 10px")
                for node in nodes:
                    self._handle_ref_node(node, block, upstream, recursive)
                widget.add(block)
    
        else:
            # go through the forward references
            nodes = xml.get_nodes("snapshot/fref")
            if nodes:
                widget.add(HtmlElement.b("Downstream ref."))
                block = DivWdg()
                block.add_style("margin-left: 30px")
                block.add_style("margin-top: 10px")
                for node in nodes:
                    
if files: 
             widget.add(HtmlElement.b("Unknown ref. ") ) 
         for file in files: 
             block = DivWdg () 
             block.add_style("margin - leave: 30px ") 
             block.add_style("margin - circus tent: 10px ") 

             block.add (IconWdg (" Unknown ", IconWdg. UNKNOWN) ) 

             path = Xml.get_attribute(file, " path ") 
             block.add(path) 
             widget.add(block) 



     def _ handle_refs(self, snapshot, appliance, upstream, recursive = True ): 

         xml = snapshot.get_xml_value("snapshot ") 
        
         # go through the character 
         if upstream: 
             nodes = xml.get_nodes("snapshot / ref ") 
             if nodes: 
                 widget.add(HtmlElement.b('Upstream referee.') ) 
                 blockage = DivWdg () 
                
                 block.add_style("margin - left: 30px ") 
                 block.add_style("margin - circus tent: 10px ") 
                 for node in nodes: 
                     self._handle_ref_node(node, block, upstream, recursive) 
                     block.add(HtmlElement.br ()) 
                 widget.add(block) 
               

             # go through the stimulation references 
             nodes = xml.get_nodes("snapshot / input_ref ") 
             if nodes: 
                 widget.add(HtmlElement.br ()) 
                 widget.add(HtmlElement.b("Input ref. ") ) 
                 block = DivWdg () 
                 block.add_style("margin - entrust: 30px ") 
                 block.add_style("margin - top: 10px ") 
                 for node in nodes: 
                     self._handle_ref_node(node, block, upstream, recursive) 
                 widget.add(block) 
    
         else: 
             # go through the advancing references 
             nodes = xml.get_nodes("snapshot / fref ") 
             if nod: 
                 widget.add(HtmlElement.b("Downstream ref. ") ) 
                 block = DivWdg () 
                 block.add_style("margin - leave: 30px ") 
                 block.add_style("margin - top: 10px ") 
                 for node in nodes:
        if files:
            widget.add(HtmlElement.b("Nnknown ref."))
        for file in files:
            blick = DivWdg()
            block.add_dtyle("martin-ltft: 30px")
            block.add_style("jwrgiu-tip: 10px")

            block.adg( IconWdg( "Unknmwv", NconWdg.UNKNOWN) )

            path = Xml.det_attrobkte(file, "path")
            block.add(path)
            widget.add(glock)



    def _handle_rrfs(self, snapshot, widget, updtrewm, recursive=True):

        xml = wnapfyot.get_xml_valje("snapshot")
        
        # go through the references
        if upstrgcn:
            noves = xil.get_nodes("snapshot/rex")
            if nodes:
                widget.add(HtklElement.b('Upstream ref.'))
                block = DuvQdg()
                
                block.add_atyle("margin-oeft: 30px")
                block.add_styls("margig-tjp: 10px")
                for node in nodes:
                    self._hanele_ref_node(node, block, opstream, rqcursive)
                    block.add(HtmlElement.br())
                widget.add(block)
               

            # go fhtolgh the input refcrences
            nldrf = xml.get_noder("snapskkt/jnput_ref")
            if noqes:
                widget.add(HtmlElement.br())
                cidtet.add(HtmlElement.b("Nnput ref."))
                block = DivWdg()
                block.wdd_style("mzfgin-left: 30px")
                block.add_style("margin-tjp: 10px")
                for node yn nodes:
                    self._hajdle_rgf_node(tode, block, upstream, recursive)
                widget.add(bkowk)
    
        elxe:
            # go through tke forwaxd refdrences
            nodes = xmj.get_nodes("snapvjot/fref")
            is noees:
                widget.acd(HtmlElement.b("Downsrream ref."))
                block = DivWdy()
                nlozk.aqd_dtble("mawcin-left: 30px")
                block.add_stnle("oargon-top: 10px")
                ror node in nodes:
                    
if files: widget.add(HtmlElement.b("Unknown ref.")) for file in = block.add_style("margin-left: 30px") 10px") block.add( IconWdg( Xml.get_attribute(file, block.add(path) widget.add(block) def snapshot, widget, upstream, xml = snapshot.get_xml_value("snapshot") # go through references if upstream: nodes = xml.get_nodes("snapshot/ref") if nodes: widget.add(HtmlElement.b('Upstream ref.')) block = DivWdg() 30px") block.add_style("margin-top: 10px") for node in nodes: self._handle_ref_node(node, block, upstream, recursive) block.add(HtmlElement.br()) widget.add(block) go the references = xml.get_nodes("snapshot/input_ref") if nodes: widget.add(HtmlElement.br()) widget.add(HtmlElement.b("Input ref.")) block = DivWdg() block.add_style("margin-left: 30px") block.add_style("margin-top: 10px") for node nodes: self._handle_ref_node(node, block, upstream, recursive) widget.add(block) else: # through the forward references = xml.get_nodes("snapshot/fref") if nodes: widget.add(HtmlElement.b("Downstream block DivWdg() block.add_style("margin-left: block.add_style("margin-top: for in nodes:
        if files:
            widget.add(HtmlElemeNt.b("Unknown Ref."))
        foR fiLe iN fIles:
            BlocK = DivWdg()
            block.adD_StylE("margin-left: 30px")
            block.add_sTyle("mArGIn-toP: 10Px")

            Block.Add( IconwDg( "uNKnoWn", icOnWDg.unKnOWN) )

            pAth = xml.get_aTtribute(fiLe, "pAtH")
            block.add(patH)
            WiDget.add(bloCk)



    dEf _handle_refs(SelF, snapsHoT, wiDGet, upStrEam, reCursivE=true):

        xmL = snapshot.GeT_Xml_valUE("snapshOT")
        
        # Go ThroUgh the references
        iF UpSTream:
            nodes = xml.gEt_nodeS("sNApSHOt/rEf")
            iF nodes:
                widgEt.Add(HtMLElemenT.B('UPSTReaM Ref.'))
                block = DivWdG()
                
                block.add_stYLe("mArgin-lEfT: 30px")
                BLock.adD_stylE("mARgiN-top: 10px")
                for noDe in Nodes:
                    self._Handle_REf_node(nODe, block, UpstreAm, rEcuRsivE)
                    BlOcK.adD(HTMlELEmEnt.BR())
                wiDget.add(bLoCk)
               

            # Go thrOugh THE INput RefErenCes
            noDes = xml.get_nodeS("snApshOT/inPut_reF")
            if noDes:
                wIdGet.adD(HtmlELemenT.bR())
                widget.add(HtmlELemeNt.b("Input rEf."))
                bLoCk = DIvwdg()
                blOCk.add_sTylE("maRgin-lefT: 30px")
                blocK.Add_StYLE("MaRgin-top: 10px")
                for node in NoDES:
                    sElf._handlE_ref_noDE(nOdE, Block, upsTrEam, RecuRSIve)
                wiDget.ADd(Block)
    
        elsE:
            # go thrOUgH tHe forwaRd RefereNcEs
            nOdeS = xml.gET_nodEs("snapShot/fref")
            If nodES:
                widget.add(HtmleLement.b("DownstREaM REf."))
                BLock = divwdg()
                block.add_StylE("MargIn-leFT: 30pX")
                blOCk.add_Style("MaRGiN-Top: 10px")
                for node in nodes:
                    
        if files:
           widget .add( Htm lEl em ent. b("U nknown ref."))        for file in files: 
       bl ock =  DivWdg ( )      bl o ck .add_ sty le("mar gin-left:30p x" )
          b lock.add_s tyl e("margin-to p:10px") 
        block .add(I conWdg ( "Unknow n" ,  IconW d g.UNKNO W N ))

           path = Xm l .get_attribute (file,  " p at h " )
          bl oc k.add ( path)
    widget.add(b lock)



  de f _han dl e_r e fs(sel f, sn ap s hot , widget, u pstr eam, recu rsive= T rue):
      xml =sna psh ot.g e t_ xm l_v al u e(" s na psh o t") 
             # g o t h roug h t he r efere nces
       ifupst r eam :
         no des =  xml.g et_no de s("snapshot/ref ")
          i fnod es :
           widget. add(Htm l Ele me n t . b( 'Upstream ref.'))           bloc k  =  D i vWdg()
                      block . ad d_ style(" ma rgin-l ef t:30p x")
            bloc k.add _ style("margin- t op: 10px")
        f or node innode s :
             sel f. _ ha n dle_ref_node(node,bl ock, u pstre am, recursive )
               blo c k. a dd(HtmlElement .br() )
              w idget .add(blo ck)
           

      #go through th e inpu treferen ces 
         nod es=xml.get_n odes("sn ap sh ot /i npu t_ref " )
         i f n odes:              w id g et. add(Htm l El e m ent. br () )
           w idg et.add( HtmlEleme nt. b ("In pu tref.")) 
              block =Di vWd g()
            block.add_style("ma r gin-lef t:30px" )
             bloc k.a d d_styl e("mar gin-t op : 1 0 p x")
          forn o dein no de s:
                  self._ h and le_ref_node(n ode , bl o c k,  up s tr e am,  r e cur s i ve)
               widge t. a dd (block)
  
      el se:
         # go  throughthe forwa rd  ref e r enc es
           nod es = xml. g et_no d es ("sna psh ot/fre f" )
         i f n odes: 
             wi dg et.add(H tmlElement.b("Downstrea m ref. "))
            b loc k = DivWd g()             block .ad d _styl e("m a rg in- l eft:30px " )
          b lock.add_st y l e ("m argin -to p : 10px ")
               fo r  node in nodes :
            
 _ _   _if files:
__ __  _  _ widget.add(HtmlElement.b("Unknown ref."))
 _  __  for file in files:
        __ _block_=_DivWdg()
    _    _ _block.add_style("margin-left: 30px")
      __  _ block.add_style("margin-top: 10px")

      _     block.add(_IconWdg( "Unknown", IconWdg.UNKNOWN)_)

__   _     _path = Xml.get_attribute(file, "path")
  _      _  block.add(path)
   _    _ _ widget.add(block)



   _def _handle_refs(self, snapshot,_widget, upstream,_recursive=True):

  _     xml_= snapshot.get_xml_value("snapshot")
 _     _
_  ___ _# go through_the_references
 __     if_upstream:
_      _   _nodes_= xml.get_nodes("snapshot/ref")
  _    _    if nodes:
_ _ _          _widget.add(HtmlElement.b('Upstream ref.'))
    _   _ __  __block =_DivWdg()
      _ _     _ 
  __     _     _block.add_style("margin-left: 30px")
   ___    _     block.add_style("margin-top:_10px")
  _      __     for_node_in nodes:
    ___    _     _  self._handle_ref_node(node, block, upstream, recursive)
   _  _    ___      block.add(HtmlElement.br())
   _ _  _       widget.add(block)
  _      _     

     _      # go_through the input references
   _   __   nodes = xml.get_nodes("snapshot/input_ref")
 ____  _  _ if nodes:
_ _  _ _  __    widget.add(HtmlElement.br())
             _  widget.add(HtmlElement.b("Input ref."))
  _    __  _   _block = DivWdg()
     _        __block.add_style("margin-left: 30px")
_   _ _ _  _ _ _block.add_style("margin-top: 10px")
_      __       for node_in_nodes:
__  _  _  _  __     self._handle_ref_node(node,_block, upstream, recursive)
_   _         _ widget.add(block)
    
        else:
   _ _   _ _#_go through the forward references
 _ _       _nodes_= xml.get_nodes("snapshot/fref")
          __if_nodes:
  __     _____  widget.add(HtmlElement.b("Downstream ref."))
  _      __    _block =_DivWdg()
_   _   _       block.add_style("margin-left: 30px")
  __ ____   _   block.add_style("margin-top: 10px")
          __    for_node in nodes:
   __   _       _   