Parses <Exposure>

        @param node: Node containing the <Exposure> element
        @type node: xml.etree.Element

        @raise ParseError: Raised when the exposure name is not
        being defined in the context of a component type.

def parse_exposure(self, node):
        """
        Parses <Exposure>

        @param node: Node containing the <Exposure> element
        @type node: xml.etree.Element

        @raise ParseError: Raised when the exposure name is not
        being defined in the context of a component type.
        """

        if self.current_component_type == None:
            self.raise_error('Exposures must be defined in a component type')

        try:
            name = node.lattrib['name']
        except:
            self.raise_error('<Exposure> must specify a name')

        try:
            dimension = node.lattrib['dimension']
        except:
            self.raise_error("Exposure '{0}' must specify a dimension",
                             name)

        description = node.lattrib.get('description', '')

        self.current_component_type.add_exposure(Exposure(name, dimension, description))