private void ApplyStyle(CSSelector nextSelector, Specificity specificity, HtmlNode node, List<HtmlStyle> htmlStyles)
        {
            if (node.Next != null)
            {
            	if (nextSelector.IsValidNode(node.GetNext()))
                {
                    nextSelector.AddSpecificity(specificity);
            		nextSelector.Parse(node.GetNext(), htmlStyles);
                }

                ApplyStyle(nextSelector, specificity, node.GetNext(), htmlStyles);
            }
        }
        private void ApplyStyle(CSSelector nextSelector, Specificity specificity, HtmlNode node, List<HtmlStyle> htmlStyles)
		{
			if (nextSelector.IsValidNode(node))
			{
                nextSelector.AddSpecificity(specificity);
				nextSelector.Parse(node, htmlStyles);
			}

			foreach (HtmlNode child in node.GetChildren())
			{
                ApplyStyle(nextSelector.Clone(), specificity, child, htmlStyles);
			}
		}