# File lib_wpm/wpm.rb, line 4084
    def compile
      unless (@running_context.ns_map) then
        @running_context.ns_map = XMLNamespaceMap.new
      end

      if (@name !~ /^[A-Z][_0-9A-Za-z]*$/) then
        raise PageError, "invalid page name: #{@name.inspect}"
      end

      compo_path = @running_context.look_up(@name)
      if (! compo_path) then
        raise "not found a component: #{@name.inspect}"
      end
      @src_path = File.join(compo_path, @name + '.rb')
      @map_path = File.join(compo_path, @name + '.map')
      @xml_path = File.join(compo_path, @name + '.xml')
      @src_stat = File.stat(@src_path)
      @map_stat = File.stat(@map_path)
      @xml_stat = File.stat(@xml_path)

      loader = Loader.new(@src_path)
      @context_class = loader.const_get(@name)
      unless (@context_class < PageContext) then
        raise PageError, "not inherited from #{PageContext.inspect}: #{@context_class}"
      end

      page_id = self.page_id
      @running_context.set_page_context(page_id, @context_class.new(self, @option))
      @context = PageContextProxy.new(page_id, @running_context)
      @widget_locator = WidgetLocator.new(@context, @running_context)
      assembler = ComponentAssembler.new(@widget_locator, self)

      @widget_locator.extend(@xml_assist)
      assembler.extend(@xml_assist)

      File.open(@map_path) {|input|
        @widget_locator.read(input)
      }
      File.open(@xml_path) {|input|
        assembler.read(input)
      }

      # traversing child components.
      super

      nil
    end