System.Xml.Xsl.XsltOld.HtmlAttributeProps.GetProps C# (CSharp) Method

GetProps() static public method

static public GetProps ( string name ) : HtmlAttributeProps
name string
return HtmlAttributeProps
        static public  HtmlAttributeProps GetProps(string name) {
            HtmlAttributeProps result = (HtmlAttributeProps) s_table[name];
            return result;
            // We can do this but in case of Xml/Html mixed output this doesn't have big sence.
//          return result != null ?  result : s_otherElements;            
        }

Usage Example

 private void WriteAttributes(ArrayList list, int count, HtmlElementProps htmlElementsProps)
 {
     Debug.Assert(count <= list.Count);
     for (int attrib = 0; attrib < count; attrib++)
     {
         Debug.Assert(list[attrib] is BuilderInfo);
         BuilderInfo attribute = (BuilderInfo)list[attrib];
         string      attrValue = attribute.Value;
         bool        abr = false, uri = false;
         {
             if (htmlElementsProps != null && attribute.Prefix.Length == 0)
             {
                 HtmlAttributeProps htmlAttrProps = attribute.htmlAttrProps;
                 if (htmlAttrProps == null && attribute.search)
                 {
                     htmlAttrProps = HtmlAttributeProps.GetProps(attribute.LocalName);
                 }
                 if (htmlAttrProps != null)
                 {
                     abr = htmlElementsProps.AbrParent && htmlAttrProps.Abr;
                     uri = htmlElementsProps.UriParent && (htmlAttrProps.Uri ||
                                                           htmlElementsProps.NameParent && htmlAttrProps.Name
                                                           );
                 }
             }
         }
         Write(s_Space);
         WriteName(attribute.Prefix, attribute.LocalName);
         if (abr && string.Equals(attribute.LocalName, attrValue, StringComparison.OrdinalIgnoreCase))
         {
             // Since the name of the attribute = the value of the attribute,
             // this is a boolean attribute whose value should be suppressed
             continue;
         }
         Write(s_EqualQuote);
         if (uri)
         {
             WriteHtmlUri(attrValue);
         }
         else if (_isHtmlOutput)
         {
             WriteHtmlAttributeValue(attrValue);
         }
         else
         {
             WriteXmlAttributeValue(attrValue);
         }
         Write(s_Quote);
     }
 }
All Usage Examples Of System.Xml.Xsl.XsltOld.HtmlAttributeProps::GetProps
HtmlAttributeProps