title: Generating XBRL document programmatically: Use a template or a library?
body: <p>I am working on a financial application and one of the functionality is to generate XBRL (eXtensible Business Reporting Language) document. If you are familiar with XBRL instance documents, you might be aware that they typically refer to a large number of schemas. It is usually easier to generate these XBRL instances using (commecial) libraries. </p>
  
  <p>Use case: Design a web form for the users to fill in the various fields.Generate a valid XBRL instance document using the user input.<br>
  Our platform: C# &amp; .Net</p>
  
  <p>My questions:  </p>
  
  <ul>
  <li><p>Have you used any of the (commercial) libraries? Which one would you recommend for generating 'yearly financial statements'? Altova MapForce seems to be dominant player.   </p></li>
  <li><p>A crude workaround to avoid using (commecial) libraries:</p>
  
  <ul>
  <li>Select a valid instance document, clear all the data and store the XBRL (XML) file as a template.  </li>
  <li>Render the template to the user using XSLT. Collect user input and fill in the XBRL using standard XML libraries in .Net</li>
  </ul></li>
  </ul>
  
  <p>Would you recommend this workaround? Why &amp; why not?</p>
  
  <p>Any input will be greatly appreciated :)</p>