proof of concept that I'm reaching for the right info
Change-Id: I851a6a89152d8984a01d38a0792a93fd6b8a071b
diff --git a/nkjp2korap.xsl b/nkjp2korap.xsl
index 2a94615..5b19e00 100644
--- a/nkjp2korap.xsl
+++ b/nkjp2korap.xsl
@@ -1,8 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                xmlns:nkjp="http://www.nkjp.pl/ns/1.0"
+                xmlns:tei="http://www.tei-c.org/ns/1.0"
                 xmlns:f="func" xmlns:map="http://www.w3.org/2005/xpath-functions/map"
-                exclude-result-prefixes="xs f map" version="3.0" expand-text="yes">
+                exclude-result-prefixes="xs f map nkjp tei" version="3.0" expand-text="yes">
 
   <xsl:param name="corpusID"/>
   <xsl:param name="docID"/>
@@ -26,6 +28,19 @@
         </text>
       </xsl:element>
     </xsl:result-document>
+    
+    <xsl:result-document encoding="UTF-8" method="xml" indent="yes" xpath-default-namespace="http://ids-mannheim.de/ns/KorAP"
+      href="{'test/output/' || $corpusID || '/' || $docID || '/' || $textID || '/header.xml'}" 
+      doctype-public="-//IDS//DTD IDS-XCES 1.0//EN" doctype-system="http://corpora.ids-mannheim.de/idsxces1/DTD/ids.xcesdoc.dtd">
+      
+      <idsHeader type="document" pattern="text" status="new" version="1.1" TEIform="teiHeader">
+        <xsl:copy-of select="$text.xml//tei:TEI/tei:teiHeader/tei:fileDesc"/>
+      </idsHeader>
+      
+      <xsl:copy>
+        
+      </xsl:copy>
+    </xsl:result-document>
 
   </xsl:template>