コード例 #1
0
        private bool makeLink(XmlElement xmlElement)
        {
            bool   esComplejo      = false;
            string atributoABuscar = _prefijo + ":type";

            XmlNode atributoDecisor = xmlElement.Attributes.GetNamedItem(atributoABuscar);

            if (atributoDecisor != null && atributoDecisor.Value.ToLower().Equals("simple"))
            {
                XLinkSimple enlaceSimple = new XLinkSimple(xmlElement);

                enlaceSimple.Actuacion = getValueAtributo(xmlElement.Attributes, "actuate");
                enlaceSimple.Recurso   = getValueAtributo(xmlElement.Attributes, "href");
                enlaceSimple.Rol       = getValueAtributo(xmlElement.Attributes, "role");
                enlaceSimple.RolArco   = getValueAtributo(xmlElement.Attributes, "arcrole");
                enlaceSimple.Titulo    = getValueAtributo(xmlElement.Attributes, "title");

                _enlacesSimples.Add(enlaceSimple);
            }
            else if (atributoDecisor != null && atributoDecisor.Value.ToLower().Equals("extended"))
            {
                IXLinkExtendedLink enlaceExtendido = new XLinkExtendedLink(xmlElement);

                enlaceExtendido.Rol    = getValueAtributo(xmlElement.Attributes, "role");
                enlaceExtendido.Titulo = getValueAtributo(xmlElement.Attributes, "title");

                esComplejo = xmlElement.HasChildNodes;

                if (esComplejo)
                {
                    //si es complejo y tiene hijos.
                    explorarEnlaceComplejo(xmlElement, enlaceExtendido);
                }

                ((XLinkExtendedLink)enlaceExtendido).dataBind();

                _enlacesExtendidos.Add(enlaceExtendido);
            }

            return(esComplejo);
        }
コード例 #2
0
ファイル: XLinkProcesor.cs プロジェクト: mondedos/dotxbrl
        private bool makeLink(XmlElement xmlElement)
        {
            bool esComplejo = false;
            string atributoABuscar = _prefijo + ":type";

            XmlNode atributoDecisor = xmlElement.Attributes.GetNamedItem(atributoABuscar);

            if (atributoDecisor != null && atributoDecisor.Value.ToLower().Equals("simple"))
            {
                XLinkSimple enlaceSimple = new XLinkSimple(xmlElement);

                enlaceSimple.Actuacion = getValueAtributo(xmlElement.Attributes, "actuate");
                enlaceSimple.Recurso = getValueAtributo(xmlElement.Attributes, "href");
                enlaceSimple.Rol = getValueAtributo(xmlElement.Attributes, "role");
                enlaceSimple.RolArco = getValueAtributo(xmlElement.Attributes, "arcrole");
                enlaceSimple.Titulo = getValueAtributo(xmlElement.Attributes, "title");

                _enlacesSimples.Add(enlaceSimple);
            }
            else if (atributoDecisor != null && atributoDecisor.Value.ToLower().Equals("extended"))
            {
                IXLinkExtendedLink enlaceExtendido = new XLinkExtendedLink(xmlElement);

                enlaceExtendido.Rol = getValueAtributo(xmlElement.Attributes, "role");
                enlaceExtendido.Titulo = getValueAtributo(xmlElement.Attributes, "title");

                esComplejo = xmlElement.HasChildNodes;

                if (esComplejo)
                {
                    //si es complejo y tiene hijos.
                    explorarEnlaceComplejo(xmlElement, enlaceExtendido);
                }

                ((XLinkExtendedLink)enlaceExtendido).dataBind();

                _enlacesExtendidos.Add(enlaceExtendido);
            }

            return esComplejo;
        }