components/policy/tools/template_writers/writers/admx_writer.py
def _AddCategory(self, parent, name, display_name, parent_category_name=None):
    '''Adds an ADMX category element to the passed parent node. The following
    snippet shows an example of a category element where "chromium" is the value
    of the parameter name:

    <category displayName="$(string.chromium)" name="chromium"/>

    Each parent node can have only one category with a given name. Adding the
    same category again with the same attributes is ignored, but adding it
    again with different attributes is an error.

    Args:
      parent: The parent node to which all generated elements are added.
      name: Name of the category.
      display_name: Display name of the category.
      parent_category_name: Name of the parent category. Defaults to None.
    '''
    existing = list(
        filter(lambda e: e.getAttribute('name') == name,
               parent.getElementsByTagName('category')))
    if existing:
      assert len(existing) == 1
      assert existing[0].getAttribute('name') == name
      assert existing[0].getAttribute('displayName') == display_name
      return
    attributes = {
        'name': name,
        'displayName': display_name,
    }
    category_elem = self.AddElement(parent, 'category', attributes)
    if parent_category_name:
      attributes = {'ref': parent_category_name}
      self.AddElement(category_elem, 'parentCategory', attributes)
Adds an ADMX category element to the passed parent node. The following
    snippet shows an example of a category element where "chromium" is the value
    of the parameter name:

    <category displayName="$(string.chromium)" name="chromium"/>

    Each parent node can have only one category with a given name. Adding the
    same category again with the same attributes is ignored, but adding it
    again with different attributes is an error.

    Args:
      parent: The parent node to which all generated elements are added.
      name: Name of the category.
      display_name: Display name of the category.
      parent_category_name: Name of the parent category. Defaults to None.
    
Adds an ADMX category element to the passed parent node. The following
snippet shows an example of a category element where "chromium" is the value
of the parameter name.



Each parent node can have only one category with a given name. Adding the
same category again with the same attributes is ignored, but adding it
again with different attributes is an error.
Adds an ADMX category element to the passed parent node . The following snippet shows an example of a category element where " chromium " is the value of the parameter name . Each parent node can have only one category with a given name . Adding the same category again with the same attributes is ignored but adding it again with different attributes is an error .
def _AddCategory(self, parent, name, display_name, parent_category_name=None):
    existing = list(
        filter(lambda e: e.getAttribute('name') == name,
               parent.getElementsByTagName('category')))
    if existing:
      assert len(existing) == 1
      assert existing[0].getAttribute('name') == name
      assert existing[0].getAttribute('displayName') == display_name
      return
    attributes = {
        'name': name,
        'displayName': display_name,
    }
    category_elem = self.AddElement(parent, 'category', attributes)
    if parent_category_name:
      attributes = {'ref': parent_category_name}
      self.AddElement(category_elem, 'parentCategory', attributes)
def _AddCategory ( self , parent , name , display_name , parent_category_name = None ) : existing = list ( filter ( lambda e : e . getAttribute ( 'name' ) == name , parent . getElementsByTagName ( 'category' ) ) ) if existing : assert len ( existing ) == 1 assert existing [ 0 ] . getAttribute ( 'name' ) == name assert existing [ 0 ] . getAttribute ( 'displayName' ) == display_name return attributes = { 'name' : name , 'displayName' : display_name , } category_elem = self . AddElement ( parent , 'category' , attributes ) if parent_category_name : attributes = { 'ref' : parent_category_name } self . AddElement ( category_elem , 'parentCategory' , attributes )
Adds an ADMX category element to the passed parent node.
Adds an ADMX category element to the passed parent node .
'''Adds an ADMX category element to the passed parent node. The following
    snippet shows an example of a category element where "chromium" is the value
    of the parameter name:

    <category displayName="$(string.chromium)" name="chromium"/>

    Each parent node can have only one category with a given name. Adding the
    same category again with the same attributes is ignored, but adding it
    again with different attributes is an error.

    Args:
      parent: The parent node to which all generated elements are added.
      name: Name of the category.
      display_name: Display name of the category.
      parent_category_name: Name of the parent category. Defaults to None.
    '''
self
parent
The parent node to which all generated elements are added.
The parent node to which all generated elements are added .
name
Name of the category.
Name of the category .
display_name
Display name of the category.
Display name of the category .
parent_category_name
Name of the parent category. Defaults to None.
Name of the parent category . Defaults to None .
None