Beispiel #1
0
        public static UfFormatDescriber Tag()
        {
            UfFormatDescriber uFormat = new UfFormatDescriber
            {
                Name = "tag",
                Description = "Tag",
                Type = UfFormatDescriber.FormatTypes.Elemental
            };

            UfElementDescriber uFElement = new UfElementDescriber
            {
                Name = "tag",
                Multiples = true,
                Attribute = "rel",
                Type = UfElementDescriber.PropertyTypes.UrlTextTag
            };

            uFormat.BaseElement = uFElement;
            uFElement.AllowedTags.Add("a", "link");
            uFElement.AddAttributeValue("tag");

            return uFormat;
        }
Beispiel #2
0
        /// <summary>
        /// Gets the format describer for the NoFollow microformat
        /// </summary>
        /// <returns>The UfFormatDescriber for NoFollow relation</returns>
        public static UfFormatDescriber NoFollow()
        {
            UfFormatDescriber uFormat = new UfFormatDescriber
            {
                Name = "nofollow",
                Description = "Stops search engines following links",
                Type = UfFormatDescriber.FormatTypes.Elemental
            };

            UfElementDescriber uFElement = new UfElementDescriber
            {
                Name = "nofollow",
                Attribute = "rel",
                Type = UfElementDescriber.PropertyTypes.UrlText
            };

            uFormat.BaseElement = uFElement;
            uFElement.AllowedTags.Add("a", "link");
            uFElement.AddAttributeValue("nofollow");

            return uFormat;
        }
Beispiel #3
0
        /// <summary>
        /// Gets the format describer for the Principles microformat
        /// </summary>
        /// <returns>The UfFormatDescriber for the Principles relation</returns>
        public static UfFormatDescriber Principles()
        {
            UfFormatDescriber uFormat = new UfFormatDescriber
            {
                Name = "principles",
                Description = "Principles",
                Type = UfFormatDescriber.FormatTypes.Elemental
            };

            UfElementDescriber uFElement = new UfElementDescriber
            {
                Name = "principles",
                Attribute = "rel",
                Type = UfElementDescriber.PropertyTypes.UrlText
            };

            uFormat.BaseElement = uFElement;

            uFElement.AllowedTags.Add("a", "link");
            uFElement.AddAttributeValue("principles");

            return uFormat;
        }
Beispiel #4
0
        /// <summary>
        /// Gets the format describer for the ItemLicense microformat
        /// </summary>
        /// <returns>The UfFormatDescriber for the Item License relation</returns>
        public static UfFormatDescriber ItemLicense()
        {
            UfFormatDescriber uFormat = new UfFormatDescriber
            {
                Name = "item-license",
                Description = "item-license used in hNews hEntry item",
                Type = UfFormatDescriber.FormatTypes.Elemental
            };

            UfElementDescriber uFElement = new UfElementDescriber
            {
                Name = "item-license",
                Attribute = "rel",
                Type = UfElementDescriber.PropertyTypes.UrlText
            };

            uFormat.BaseElement = uFElement;
            uFElement.AllowedTags.Add("a", "link");
            uFElement.AddAttributeValue("item-license");

            return uFormat;
        }