Closed TheSly1 closed 2 years ago
Thanks! I'll check it out.
I managed to find the solution for myself. Here it is if it helps you:
In file: Instance.cs Function: GetXmlSerializerNamespaces Faulty code was this:
Contexts.
Where(c => c.Entity.Segment != null).
Select(c => c.Entity.Segment).
SelectMany(s => s.ExplicitMembers).
Select(m => m.Dimension.Namespace).
ToList().ForEach(ns => namespaces.Add(ns));
Mine version:
Contexts.
Where(c => c.Entity.Segment != null).
Select(c => c.Entity.Segment).
SelectMany(s => s.ExplicitMembers).
Select(m => new { dimensionNamespace = m.Dimension.Namespace, valueNamespace = m.Value.Namespace }).
ToList().
ForEach(obj =>
{
if (!string.IsNullOrEmpty(obj.dimensionNamespace))
{
namespaces.Add(obj.dimensionNamespace);
}
if (!string.IsNullOrEmpty(obj.valueNamespace))
{
namespaces.Add(obj.valueNamespace);
}
});
Hope it helps :)
Thank you, there is now version 1.2.2 (+corresponding nuget) with a fix for this + fix for outputting xbrldi namespace when using segments.
If you use a segment value with a namespace which is not already used elsewhere (for example: dimension of some explicit member, fact, etc.), exception will be thrown.