code: private void applyAttrSets(
            TransformerImpl transformer, StylesheetRoot stylesheet, QName attributeSetsNames[])
              throws TransformerException
    {
  
      if (null != attributeSetsNames)
      {
        int nNames = attributeSetsNames.length;
  
        for (int i = 0; i < nNames; i++)
        {
          QName qname = attributeSetsNames[i];
          java.util.List attrSets = stylesheet.getAttributeSetComposed(qname);
  
          if (null != attrSets)
          {
            int nSets = attrSets.size();
  
            // Highest priority attribute set will be at the top,
            // so process it last.
            for (int k = nSets-1; k >= 0 ; k--)
            {
              ElemAttributeSet attrSet =
                (ElemAttributeSet) attrSets.get(k);
  
              attrSet.execute(transformer);
            }
          } 
          else 
          {
            throw new TransformerException(
                XSLMessages.createMessage(XSLTErrorResources.ER_NO_ATTRIB_SET, 
                    new Object[] {qname}),this); 
          }
        }
      }
    }
docs: Add the attributes from the named attribute sets to the attribute list.
  TODO: Error handling for: "It is an error if there are two attribute sets
  with the same expanded-name and with equal import precedence and that both
  contain the same attribute unless there is a definition of the attribute
  set with higher import precedence that also contains the attribute."
  
  @param transformer non-null reference to the the current transform-time state.
  @param stylesheet The owning root stylesheet
  @param attributeSetsNames List of attribute sets names to apply
  
  @throws TransformerException