File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 298298 </xsl : if >
299299 </xsl : template >
300300
301-
302301 <!-- HINT: Turn a <orderedlist role="procedure"> into a real <procedure>
303302
304303 In ADoc you use this syntax:
385384 <xsl : apply-templates select =" ." />
386385 </xsl : template >
387386
387+ <!-- Structure -->
388+
389+ <xsl : template match =" d:book[normalize-space(d:preface/d:title) = '']" >
390+ <xsl : copy >
391+ <xsl : copy-of select =" @*" />
392+ <info >
393+ <xsl : apply-templates select =" d:info/node()" />
394+ <xsl : apply-templates select =" d:preface" mode =" book-preface" />
395+ </info >
396+ <xsl : apply-templates select =" node()[not(self::d:info)]" />
397+ </xsl : copy >
398+ </xsl : template >
399+
400+ <xsl : template match =" *" mode =" book-preface" >
401+ <xsl : copy >
402+ <xsl : apply-templates select =" @* | node()" mode =" book-preface" />
403+ </xsl : copy >
404+ </xsl : template >
405+ <xsl : template match =" d:preface/d:title" mode =" book-preface" />
406+ <xsl : template match =" d:preface" mode =" book-preface" >
407+ <abstract >
408+ <xsl : apply-templates mode =" book-preface" />
409+ </abstract >
410+ </xsl : template >
411+
412+ <xsl : template match =" d:book[normalize-space(d:preface/d:title) = '']/d:preface" />
413+
414+
388415</xsl : stylesheet >
You can’t perform that action at this time.
0 commit comments