@@ -112,7 +112,7 @@ declare function app:format-failures-report($failures as node()?, $rules as node
112112
113113declare function app:show-provenance ($prim-hdu-keywords,$filename ){
114114 <div>
115- <h2>Provenance of {$filename} </h2>
115+ <h2>Data reduction information extracted from the headers: </h2>
116116 {
117117 let $kws := $prim-hdu-keywords[starts-with (name,"HIERARCH.ESO.PRO.REC" )]
118118
@@ -125,9 +125,11 @@ declare function app:show-provenance($prim-hdu-keywords,$filename ){
125125 "PIPELINE ID" : string-join (distinct-values ($rec-kws[ends-with (name,".PIPE.ID" )]/value ), ", " )
126126 }
127127
128- return (
129- <dl>{ map:for-each ( $dls, function ($k, $v){ if (exists ($v) and string-length ($v)>0 ) then (<dt>{$k}</dt>,<dd>{$v}</dd>) else () }) }</dl>
130- ,<ol>{
128+ return <dl>{
129+ map:for-each ( $dls, function ($k, $v){ if (exists ($v) and string-length ($v)>0 ) then (<dt>{$k}</dt>,<dd>{$v}</dd>) else () })
130+ , if ( empty ($rec-kws) ) then () else
131+ (<dt>HIERARCH ESO RECipies:</dt>,<dd>
132+ <ul>{
131133 for $kw in $rec-kws group by $step := substring-before (substring-after ($kw,$rec-prefix),"." )
132134 (:prepare prefixes :)
133135 let $step-prefix := $rec-prefix||$step (: e.g.: HIERARCH.ESO.PRO.REC1 :)
@@ -161,26 +163,24 @@ declare function app:show-provenance($prim-hdu-keywords,$filename ){
161163 :)
162164
163165 return
164- <li>
165- { $rec-id/value /text () }
166+ <li><ul class = "list-inline" >
167+ <b> { $rec-id/value /text () }  </b>
166168 { for $n in $step-params-names
167169 let $v := $step-params[name=substring-before ($n,".NAME" )||".VALUE" ]
168170 let $v := if ($v) then <var>{normalize-space ($v/value )}</var> else ()
169- let $pname := " -" || normalize-space ($n/value )
170- let $pname := if (exists ($v)) then $pname|| "=" else $pname
171+ let $pname := <b>   --{ normalize-space ($n/value )}</b>
172+ let $pname := if (exists ($v)) then ( $pname, "=" ) else $pname
171173 return
172- ( $pname,$v)
174+ <li>{ $pname,$v}</li>
173175 } 
174176 {
175177 for $n at $pos in $file-names group by $catg := data ($file-catgs[$pos]/value )
176- let $prefix := if ($catg) then $catg ||"=[" else "["
177- return ($prefix, <var>{string-join ($n/value ,", " )}</var>, "]" )
178+ return <li><b>{$catg}</b>=[<var>{string-join ($n/value ,", " )}</var>]</li>
178179 }
179- </li>
180+ </ul></ li>
180181
181- }</ol>
182- )
183- }
182+ }</ul></dd>)
183+ }</dl>}
184184 </div>
185185};
186186
@@ -229,8 +229,6 @@ declare function app:show-html($xml as node()*) {
229229 </ul>
230230 </nav>
231231
232- {app:show-provenance ($prim-hdu-keywords, $filename)}
233-
234232 <div>
235233 <ol id = "granules{$uuid} " class = "breadcrumb" >
236234 <li><a href = "#top" >TOP^</a></li>
@@ -321,6 +319,7 @@ declare function app:show-html($xml as node()*) {
321319 </div>
322320 </div>
323321 </div>
322+ {app:show-provenance ($prim-hdu-keywords, $filename)}
324323 </p>)
325324 else <p>No primary HDU keywords</p>
326325 }
0 commit comments