/// <summary>
        /// Convert Margin tag value of flow document to html px value
        ///  left,top,right,bottom ==> top,right,bottom,left
        /// </summary>
        /// <param name="attribute"></param>
        /// <returns></returns>
        public override string ToHtmlValue(AttributeEntity attribute)
        {
            double[] flow_margin = TransferFlowMarginToPxArray(attribute.Value);

            double[] html_margin = TransferToHtmlMargin(flow_margin);

            StringBuilder buffer = new StringBuilder();

            foreach (double value in html_margin)
                buffer.AppendFormat("{0}px ", value);

            return buffer.ToString().TrimEnd().ToLower();
        }
        /// <summary>
        /// <![CDATA[ To parse <***.***> tag, transfer it to html attribute ]]>
        /// </summary>
        /// <param name="root"></param>
        /// <param name="sequence"></param>
        /// <returns></returns>
        public override string ToHtml(XmlNode root, int sequence)
        {
            StringBuilder attributeBuffer = new StringBuilder();

            foreach (XmlNode node in root.ChildNodes)
            {
                if (node.NodeType == XmlNodeType.Element)
                {
                    string[] attributeTagValue = node.Name.Split('.');

                    string tagName = attributeTagValue.Length == 2 ? attributeTagValue[1] : node.Name;

                    TagValueConverter converter = TagConverter.GetConverterByFlowTag(tagName, TYPE_VALUE_TAG) as TagValueConverter;

                    if (converter != null)
                    {
                        AttributeEntity flowAttEntity = new AttributeEntity() { Name = FlowAttribute, Value = converter.ToStandardFlowAttributeValue(node) };

                        ValueConverter valueConverter = ValueConverter.GetFlowDocValueConverter(flowAttEntity.Name);

                        string htmlValue = valueConverter == null ? flowAttEntity.Value : valueConverter.ToHtmlValue(flowAttEntity);

                        if (IsHtmlStyle)
                            attributeBuffer.AppendFormat("style=\"{0}:{1}\" ", HtmlAttribute, htmlValue);
                        else
                            attributeBuffer.AppendFormat("{0}=\"{1}\" ", HtmlAttribute, htmlValue);
                    }
                    else
                        throw new NotSupportedException(string.Format(MessageResource.NotFound_TagValueConverter, tagName));
                }
            }

            string tmp = attributeBuffer.ToString().Trim();

            if (tmp == string.Empty)
                return string.Empty;

            return tmp.TrimEnd(' ');
        }
 public virtual string ToHtmlValue(AttributeEntity attribute)
 {
     return attribute.Value;
 }
 public virtual string ToFlowDocValue(AttributeEntity attribute)
 {
     return attribute.Value;
 }