protected override void AddAttributesToElement(Element element, HtmlAttributes attributes) { for (int i = 0; i < attributes.Length; i++) { String localName = attributes.GetLocalName(i); String uri = attributes.GetURI(i); if (!element.hasAttributeNS(uri, localName)) { element.setAttributeNS(uri, localName, attributes.GetValue(i)); } } }
protected override Element CreateHtmlElementSetAsRoot(HtmlAttributes attributes) { Element rv = document.createElementNS("http://www.w3.org/1999/xhtml", "html"); for (int i = 0; i < attributes.Length; i++) { rv.setAttributeNS(attributes.GetURI(i), attributes.GetLocalName(i), attributes.GetValue(i)); } document.appendChild(rv); return(rv); }
override protected void AddAttributesToElement(XmlElement element, HtmlAttributes attributes) { for (int i = 0; i < attributes.Length; i++) { String localName = attributes.GetLocalName(i); String uri = attributes.GetURI(i); if (!element.HasAttribute(localName, uri)) { element.SetAttribute(localName, uri, attributes.GetValue(i)); } } }
protected override Element CreateElement(string ns, string name, HtmlAttributes attributes) { if (OnCreateElement != null) { OnCreateElement(ns, name, attributes); } if (IsDebug) { GlobalLog.Write("Stop in CreateElement", LogChannel.NOTIFY_MSG); waiter.WaitOne(); } Element rv = document.createElementNS(ns, name); for (int i = 0; i < attributes.Length; i++) { rv.setAttributeNS(attributes.GetURI(i), attributes.GetLocalName(i), attributes.GetValue(i)); } return(rv); }