Exemplo n.º 1
0
        private XElement CreateHtmlTable(XmlBasedTableContext tableContext)
        {
            var xColGroup = new XElement(HtmlXNames.Colgroup);

            xColGroup.Add(new XElement(HtmlXNames.Col, new XAttribute("class", "concept")));

            var xHeaderTr = new XElement(HtmlXNames.Tr, new XElement(HtmlXNames.Th));

            foreach (var member in tableContext.LinearisedHorizontalAxis)
            {
                xColGroup.Add(new XElement(HtmlXNames.Col, new XAttribute("class", "fact")));
                var xTh = new XElement(HtmlXNames.Th, CreateMemberElement(member, HtmlXNames.Div));
                xHeaderTr.Add(xTh);
            }

            var xTable = new XElement(HtmlXNames.Table);

            xTable.AddData("horizontal-axis-role", tableContext.HorizontalAxis.Name.LocalName);
            xTable.AddClass(InlineXbrlClassNames.Table);
            xTable.Add(xColGroup);
            xTable.Add(new XElement(HtmlXNames.Thead, xHeaderTr));
            xTable.Add(new XElement(HtmlXNames.Tbody));
            _xActiveNetwork.Add(xTable);

            return(xTable);
        }
Exemplo n.º 2
0
        public override void WriteBeginPresentationNetwork(PresentationNetwork presentationNetwork)
        {
            _xActiveNetwork = new XElement(HtmlXNames.Article);
            _xActiveNetwork.AddData("role", presentationNetwork.Role.AbsoluteUri);
            _xActiveNetwork.AddClass(InlineXbrlClassNames.Network);
            _xNetworksSection.Add(_xActiveNetwork);

            var xHeader = new XElement(HtmlXNames.Header,
                                       new XElement(HtmlXNames.H1, presentationNetwork.Name));

            _xActiveNetwork.Add(xHeader);
        }
Exemplo n.º 3
0
        private void PopulateItemMemberElement(XElement xContainer, ItemMember itemMember)
        {
            xContainer.Value = RemoveBracketedMarkers(itemMember.Label);
            xContainer.AddClass(InlineXbrlClassNames.ItemMember);

            if (itemMember.Item.IsAbstract)
            {
                xContainer.AddClass(InlineXbrlClassNames.AbstractMember);
            }

            var conceptMember = itemMember as ConceptMember;

            if (conceptMember != null && LabelRoles.Totals.Contains(conceptMember.PreferredLabelRole))
            {
                xContainer.AddClass(InlineXbrlClassNames.TotalMember);
            }

            xContainer.AddData("info", SerializeJson(CreateItemMemberInfo(itemMember)));
        }