private LocatorNode CreateLocatorNode(string label, ExtensionItem extensionItem, DiscoverableTaxonomySet dts)
        {
            var itemName = (XNamespace)_targetNamespaceDeclaration.Value + extensionItem.Name;
            var item     = dts.FindItem(itemName);

            if (item == null)
            {
                throw new InvalidOperationException($"There is no item called {itemName} in the DTS. Perhaps you added taxonomies in the wrong order or forgot to add a base taxonomy.");
            }
            return(new LocatorNode(label, item));
        }
        private Item CreateItem(ExtensionItem extensionItem)
        {
            var item = new Item
            {
                Id                = CreateId(extensionItem),
                Name              = (XNamespace)_targetNamespaceDeclaration.Value + extensionItem.Name,
                PeriodType        = extensionItem.PeriodType,
                BalanceType       = extensionItem.BalanceType,
                DataType          = extensionItem.DataType,
                IsAbstract        = extensionItem.IsAbstract,
                SubstitutionGroup = extensionItem.SubstitutionGroup
            };

            return(item);
        }
 private string CreateId(ExtensionItem item)
 {
     return($"{_targetNamespaceDeclaration.Name.LocalName}_{item.Name}");
 }