DocBook XSL完全手册(XSL简?短?介?绍)
文?章?标?题?
<xsl:template match="para"> <p> <xsl:apply-templates/> </p></xsl:template>,这?种?情?况?下?用?来?专?门?处?理?1.4.?生?成?格?式?化?对?象?(FO)使?用?fo
版?本?的?stylesheet
可?以?把?你?的?DocBook XML生?成?格?式?化?对?象?。?这?里?需?要?在?你?的?stylesheet
中?使?用?docbook/fo/docbook.xsl
。?在?你?的?主?stylesheet
文?件?中?使?用?<xsl:include>
引?入?所?有?的?组?件?组?装?成?完?整?的?stylesheet
来?生?成?格?式?化?对?象?。?生?成?格?式?化?对?象?只?完?成?了?输?出?过?程?的?一?半?,你?还?需?要?使?用?XSL-FO
处?理?器?,比?如?FOP。? DocBook的?fo stylesheet和?HTML stylesheet的?工?作?方?式?类?似?,就?是?用?<fo:something>
形?式?的?标?签?代?替?相?应?的?HTML标?签?。?例?如?,输?出?in-line
类?型?并?且?使?用?monospace
字?体?,fo的?形?式?会?是?如?下?的?样?子?: <fo:inline-sequence font-family="monospace">/usr/man</fo:inline-sequence>
输?出?一?个?DocBook <filename>
元?素?,在?docbook/fo/inline.xsl
中?的?模?板?定?义?看?起?来?像?如?下?的?样?子?: <xsl:template match="filename"> <xsl:call-template name="inline.monoseq"/></xsl:template><xsl:template name="inline.monoseq"> <xsl:param name="content"> <xsl:apply-templates/> </xsl:param> <fo:inline-sequence font-family="monospace"> <xsl:copy-of select="$content"/> </fo:inline-sequence></xsl:template>
在?XSL标?准?中?指?定?了?很?多?XSL-FO标?签?和?属?性?的?规?范?,要?描?述?在?DocBook中?如?何?遵?循?这?些?规?范?显?然?已?经?超?出?本?书?的?范?围?。?庆?幸?的?是?,这?些?只?是?中?间?格?式?,你?不?许?要?马?上?去?处?理?,除?非?你?正?在?自?己?编?写?stylesheets
。?
[1] 从?技?术?上?来?讲?,变?量?的?周?期?延?伸?到?<xsl:variable>
父?级?元?素?结?束?的?地?方?,也?就?是?它?最?后?一?个?同?级?兄?弟?
?