private static void AttributeAppend(DomAttribute left,
                                            DomAttribute append)
        {
            var toElement       = left.OwnerElement;
            var appendThunkFrag = append as HxlAttribute.ThunkFragment;

            if (appendThunkFrag == null)
            {
                AttributeAppend(left, append.Value);
            }

            else
            {
                toElement.Attributes.Remove(append.Name);
                Func <dynamic, HxlAttribute, string> thunkLeft;

                var leftThunkFrag = left as HxlAttribute.ThunkFragment;
                if (leftThunkFrag == null)
                {
                    // No need to create a closure on the whole attribute
                    string leftValue = left.Value;
                    thunkLeft = (x, y) => leftValue;
                }
                else
                {
                    thunkLeft = leftThunkFrag._action;
                }

                var attr = HxlAttribute.Combine(left.Name, thunkLeft, appendThunkFrag._action);
                toElement.Append(attr);
            }
        }
        // Appends the given value to the attribute which uses a
        // merging semantic like "class"
        private static void AttributeAppend(DomAttribute left,
                                            string appendValue)
        {
            var toElement     = left.OwnerElement;
            var thunkFragment = left as HxlAttribute.ThunkFragment;

            if (thunkFragment != null)
            {
                toElement.RemoveAttribute(left.Name);

                var combo = HxlAttribute.Combine(
                    left.Name,
                    thunkFragment._action,
                    (x, y) => appendValue);
                toElement.Append(combo);
            }

            else if (!string.IsNullOrWhiteSpace(left.Value))
            {
                left.Value += " " + appendValue;
            }

            else
            {
                left.Value = appendValue;
            }
        }