titlepage.templates.xsl 246 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094
  1. <?xml version="1.0"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" version="1.0" exclude-result-prefixes="exsl">
  3. <!-- This stylesheet was created by template/titlepage.xsl-->
  4. <xsl:template name="article.titlepage.recto">
  5. <xsl:choose>
  6. <xsl:when test="articleinfo/title">
  7. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/title"/>
  8. </xsl:when>
  9. <xsl:when test="artheader/title">
  10. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/title"/>
  11. </xsl:when>
  12. <xsl:when test="info/title">
  13. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/title"/>
  14. </xsl:when>
  15. <xsl:when test="title">
  16. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="title"/>
  17. </xsl:when>
  18. </xsl:choose>
  19. <xsl:choose>
  20. <xsl:when test="articleinfo/subtitle">
  21. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/subtitle"/>
  22. </xsl:when>
  23. <xsl:when test="artheader/subtitle">
  24. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/subtitle"/>
  25. </xsl:when>
  26. <xsl:when test="info/subtitle">
  27. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/subtitle"/>
  28. </xsl:when>
  29. <xsl:when test="subtitle">
  30. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="subtitle"/>
  31. </xsl:when>
  32. </xsl:choose>
  33. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/corpauthor"/>
  34. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/corpauthor"/>
  35. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/corpauthor"/>
  36. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/authorgroup"/>
  37. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/authorgroup"/>
  38. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/authorgroup"/>
  39. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/author"/>
  40. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/author"/>
  41. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/author"/>
  42. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/othercredit"/>
  43. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/othercredit"/>
  44. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/othercredit"/>
  45. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/releaseinfo"/>
  46. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/releaseinfo"/>
  47. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  48. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/copyright"/>
  49. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/copyright"/>
  50. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/copyright"/>
  51. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/legalnotice"/>
  52. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/legalnotice"/>
  53. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/legalnotice"/>
  54. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/pubdate"/>
  55. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/pubdate"/>
  56. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/pubdate"/>
  57. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revision"/>
  58. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revision"/>
  59. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revision"/>
  60. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revhistory"/>
  61. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revhistory"/>
  62. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revhistory"/>
  63. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/abstract"/>
  64. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/abstract"/>
  65. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/abstract"/>
  66. </xsl:template>
  67. <xsl:template name="article.titlepage.verso">
  68. </xsl:template>
  69. <xsl:template name="article.titlepage.separator">
  70. </xsl:template>
  71. <xsl:template name="article.titlepage.before.recto">
  72. </xsl:template>
  73. <xsl:template name="article.titlepage.before.verso">
  74. </xsl:template>
  75. <xsl:template name="article.titlepage">
  76. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
  77. <xsl:variable name="recto.content">
  78. <xsl:call-template name="article.titlepage.before.recto"/>
  79. <xsl:call-template name="article.titlepage.recto"/>
  80. </xsl:variable>
  81. <xsl:variable name="recto.elements.count">
  82. <xsl:choose>
  83. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  84. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  85. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  86. <xsl:otherwise>1</xsl:otherwise>
  87. </xsl:choose>
  88. </xsl:variable>
  89. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  90. <fo:block start-indent="0pt" text-align="center"><xsl:copy-of select="$recto.content"/></fo:block>
  91. </xsl:if>
  92. <xsl:variable name="verso.content">
  93. <xsl:call-template name="article.titlepage.before.verso"/>
  94. <xsl:call-template name="article.titlepage.verso"/>
  95. </xsl:variable>
  96. <xsl:variable name="verso.elements.count">
  97. <xsl:choose>
  98. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  99. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  100. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  101. <xsl:otherwise>1</xsl:otherwise>
  102. </xsl:choose>
  103. </xsl:variable>
  104. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  105. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  106. </xsl:if>
  107. <xsl:call-template name="article.titlepage.separator"/>
  108. </fo:block>
  109. </xsl:template>
  110. <xsl:template match="*" mode="article.titlepage.recto.mode">
  111. <!-- if an element isn't found in this mode, -->
  112. <!-- try the generic titlepage.mode -->
  113. <xsl:apply-templates select="." mode="titlepage.mode"/>
  114. </xsl:template>
  115. <xsl:template match="*" mode="article.titlepage.verso.mode">
  116. <!-- if an element isn't found in this mode, -->
  117. <!-- try the generic titlepage.mode -->
  118. <xsl:apply-templates select="." mode="titlepage.mode"/>
  119. </xsl:template>
  120. <xsl:template match="title" mode="article.titlepage.recto.auto.mode">
  121. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" keep-with-next.within-column="always" font-size="24.8832pt" font-weight="bold">
  122. <xsl:call-template name="component.title">
  123. <xsl:with-param name="node" select="ancestor-or-self::article[1]"/>
  124. </xsl:call-template>
  125. </fo:block>
  126. </xsl:template>
  127. <xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode">
  128. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style">
  129. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  130. </fo:block>
  131. </xsl:template>
  132. <xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode">
  133. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
  134. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  135. </fo:block>
  136. </xsl:template>
  137. <xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode">
  138. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
  139. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  140. </fo:block>
  141. </xsl:template>
  142. <xsl:template match="author" mode="article.titlepage.recto.auto.mode">
  143. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
  144. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  145. </fo:block>
  146. </xsl:template>
  147. <xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode">
  148. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  149. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  150. </fo:block>
  151. </xsl:template>
  152. <xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode">
  153. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  154. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  155. </fo:block>
  156. </xsl:template>
  157. <xsl:template match="copyright" mode="article.titlepage.recto.auto.mode">
  158. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  159. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  160. </fo:block>
  161. </xsl:template>
  162. <xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode">
  163. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
  164. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  165. </fo:block>
  166. </xsl:template>
  167. <xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode">
  168. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  169. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  170. </fo:block>
  171. </xsl:template>
  172. <xsl:template match="revision" mode="article.titlepage.recto.auto.mode">
  173. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  174. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  175. </fo:block>
  176. </xsl:template>
  177. <xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode">
  178. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  179. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  180. </fo:block>
  181. </xsl:template>
  182. <xsl:template match="abstract" mode="article.titlepage.recto.auto.mode">
  183. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
  184. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  185. </fo:block>
  186. </xsl:template>
  187. <xsl:template name="set.titlepage.recto">
  188. <xsl:choose>
  189. <xsl:when test="setinfo/title">
  190. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/title"/>
  191. </xsl:when>
  192. <xsl:when test="info/title">
  193. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/title"/>
  194. </xsl:when>
  195. <xsl:when test="title">
  196. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="title"/>
  197. </xsl:when>
  198. </xsl:choose>
  199. <xsl:choose>
  200. <xsl:when test="setinfo/subtitle">
  201. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/subtitle"/>
  202. </xsl:when>
  203. <xsl:when test="info/subtitle">
  204. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/subtitle"/>
  205. </xsl:when>
  206. <xsl:when test="subtitle">
  207. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="subtitle"/>
  208. </xsl:when>
  209. </xsl:choose>
  210. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/corpauthor"/>
  211. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/corpauthor"/>
  212. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/authorgroup"/>
  213. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/authorgroup"/>
  214. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/author"/>
  215. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/author"/>
  216. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/othercredit"/>
  217. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/othercredit"/>
  218. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/releaseinfo"/>
  219. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  220. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/copyright"/>
  221. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/copyright"/>
  222. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/legalnotice"/>
  223. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/legalnotice"/>
  224. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/pubdate"/>
  225. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/pubdate"/>
  226. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revision"/>
  227. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revision"/>
  228. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revhistory"/>
  229. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revhistory"/>
  230. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/abstract"/>
  231. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/abstract"/>
  232. </xsl:template>
  233. <xsl:template name="set.titlepage.verso">
  234. </xsl:template>
  235. <xsl:template name="set.titlepage.separator">
  236. </xsl:template>
  237. <xsl:template name="set.titlepage.before.recto">
  238. </xsl:template>
  239. <xsl:template name="set.titlepage.before.verso">
  240. </xsl:template>
  241. <xsl:template name="set.titlepage">
  242. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  243. <xsl:variable name="recto.content">
  244. <xsl:call-template name="set.titlepage.before.recto"/>
  245. <xsl:call-template name="set.titlepage.recto"/>
  246. </xsl:variable>
  247. <xsl:variable name="recto.elements.count">
  248. <xsl:choose>
  249. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  250. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  251. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  252. <xsl:otherwise>1</xsl:otherwise>
  253. </xsl:choose>
  254. </xsl:variable>
  255. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  256. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  257. </xsl:if>
  258. <xsl:variable name="verso.content">
  259. <xsl:call-template name="set.titlepage.before.verso"/>
  260. <xsl:call-template name="set.titlepage.verso"/>
  261. </xsl:variable>
  262. <xsl:variable name="verso.elements.count">
  263. <xsl:choose>
  264. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  265. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  266. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  267. <xsl:otherwise>1</xsl:otherwise>
  268. </xsl:choose>
  269. </xsl:variable>
  270. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  271. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  272. </xsl:if>
  273. <xsl:call-template name="set.titlepage.separator"/>
  274. </fo:block>
  275. </xsl:template>
  276. <xsl:template match="*" mode="set.titlepage.recto.mode">
  277. <!-- if an element isn't found in this mode, -->
  278. <!-- try the generic titlepage.mode -->
  279. <xsl:apply-templates select="." mode="titlepage.mode"/>
  280. </xsl:template>
  281. <xsl:template match="*" mode="set.titlepage.verso.mode">
  282. <!-- if an element isn't found in this mode, -->
  283. <!-- try the generic titlepage.mode -->
  284. <xsl:apply-templates select="." mode="titlepage.mode"/>
  285. </xsl:template>
  286. <xsl:template match="title" mode="set.titlepage.recto.auto.mode">
  287. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
  288. <xsl:call-template name="division.title">
  289. <xsl:with-param name="node" select="ancestor-or-self::set[1]"/>
  290. </xsl:call-template>
  291. </fo:block>
  292. </xsl:template>
  293. <xsl:template match="subtitle" mode="set.titlepage.recto.auto.mode">
  294. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style" font-family="{$title.fontset}" text-align="center">
  295. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  296. </fo:block>
  297. </xsl:template>
  298. <xsl:template match="corpauthor" mode="set.titlepage.recto.auto.mode">
  299. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
  300. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  301. </fo:block>
  302. </xsl:template>
  303. <xsl:template match="authorgroup" mode="set.titlepage.recto.auto.mode">
  304. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
  305. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  306. </fo:block>
  307. </xsl:template>
  308. <xsl:template match="author" mode="set.titlepage.recto.auto.mode">
  309. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
  310. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  311. </fo:block>
  312. </xsl:template>
  313. <xsl:template match="othercredit" mode="set.titlepage.recto.auto.mode">
  314. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
  315. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  316. </fo:block>
  317. </xsl:template>
  318. <xsl:template match="releaseinfo" mode="set.titlepage.recto.auto.mode">
  319. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
  320. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  321. </fo:block>
  322. </xsl:template>
  323. <xsl:template match="copyright" mode="set.titlepage.recto.auto.mode">
  324. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
  325. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  326. </fo:block>
  327. </xsl:template>
  328. <xsl:template match="legalnotice" mode="set.titlepage.recto.auto.mode">
  329. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
  330. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  331. </fo:block>
  332. </xsl:template>
  333. <xsl:template match="pubdate" mode="set.titlepage.recto.auto.mode">
  334. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
  335. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  336. </fo:block>
  337. </xsl:template>
  338. <xsl:template match="revision" mode="set.titlepage.recto.auto.mode">
  339. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
  340. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  341. </fo:block>
  342. </xsl:template>
  343. <xsl:template match="revhistory" mode="set.titlepage.recto.auto.mode">
  344. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
  345. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  346. </fo:block>
  347. </xsl:template>
  348. <xsl:template match="abstract" mode="set.titlepage.recto.auto.mode">
  349. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
  350. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  351. </fo:block>
  352. </xsl:template>
  353. <xsl:template name="book.titlepage.recto">
  354. <xsl:choose>
  355. <xsl:when test="bookinfo/title">
  356. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
  357. </xsl:when>
  358. <xsl:when test="info/title">
  359. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
  360. </xsl:when>
  361. <xsl:when test="title">
  362. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
  363. </xsl:when>
  364. </xsl:choose>
  365. <xsl:choose>
  366. <xsl:when test="bookinfo/subtitle">
  367. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
  368. </xsl:when>
  369. <xsl:when test="info/subtitle">
  370. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
  371. </xsl:when>
  372. <xsl:when test="subtitle">
  373. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
  374. </xsl:when>
  375. </xsl:choose>
  376. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
  377. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
  378. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
  379. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
  380. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
  381. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
  382. </xsl:template>
  383. <xsl:template name="book.titlepage.verso">
  384. <xsl:choose>
  385. <xsl:when test="bookinfo/title">
  386. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/title"/>
  387. </xsl:when>
  388. <xsl:when test="info/title">
  389. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/title"/>
  390. </xsl:when>
  391. <xsl:when test="title">
  392. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="title"/>
  393. </xsl:when>
  394. </xsl:choose>
  395. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/corpauthor"/>
  396. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/corpauthor"/>
  397. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/authorgroup"/>
  398. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/authorgroup"/>
  399. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/author"/>
  400. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/author"/>
  401. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/othercredit"/>
  402. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/othercredit"/>
  403. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/releaseinfo"/>
  404. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/releaseinfo"/>
  405. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/pubdate"/>
  406. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/pubdate"/>
  407. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/copyright"/>
  408. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/copyright"/>
  409. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/abstract"/>
  410. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/abstract"/>
  411. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/legalnotice"/>
  412. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/legalnotice"/>
  413. </xsl:template>
  414. <xsl:template name="book.titlepage.separator"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
  415. </xsl:template>
  416. <xsl:template name="book.titlepage.before.recto">
  417. </xsl:template>
  418. <xsl:template name="book.titlepage.before.verso"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
  419. </xsl:template>
  420. <xsl:template name="book.titlepage">
  421. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  422. <xsl:variable name="recto.content">
  423. <xsl:call-template name="book.titlepage.before.recto"/>
  424. <xsl:call-template name="book.titlepage.recto"/>
  425. </xsl:variable>
  426. <xsl:variable name="recto.elements.count">
  427. <xsl:choose>
  428. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  429. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  430. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  431. <xsl:otherwise>1</xsl:otherwise>
  432. </xsl:choose>
  433. </xsl:variable>
  434. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  435. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  436. </xsl:if>
  437. <xsl:variable name="verso.content">
  438. <xsl:call-template name="book.titlepage.before.verso"/>
  439. <xsl:call-template name="book.titlepage.verso"/>
  440. </xsl:variable>
  441. <xsl:variable name="verso.elements.count">
  442. <xsl:choose>
  443. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  444. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  445. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  446. <xsl:otherwise>1</xsl:otherwise>
  447. </xsl:choose>
  448. </xsl:variable>
  449. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  450. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  451. </xsl:if>
  452. <xsl:call-template name="book.titlepage.separator"/>
  453. </fo:block>
  454. </xsl:template>
  455. <xsl:template match="*" mode="book.titlepage.recto.mode">
  456. <!-- if an element isn't found in this mode, -->
  457. <!-- try the generic titlepage.mode -->
  458. <xsl:apply-templates select="." mode="titlepage.mode"/>
  459. </xsl:template>
  460. <xsl:template match="*" mode="book.titlepage.verso.mode">
  461. <!-- if an element isn't found in this mode, -->
  462. <!-- try the generic titlepage.mode -->
  463. <xsl:apply-templates select="." mode="titlepage.mode"/>
  464. </xsl:template>
  465. <xsl:template match="title" mode="book.titlepage.recto.auto.mode">
  466. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
  467. <xsl:call-template name="division.title">
  468. <xsl:with-param name="node" select="ancestor-or-self::book[1]"/>
  469. </xsl:call-template>
  470. </fo:block>
  471. </xsl:template>
  472. <xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
  473. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="20.736pt" space-before="15.552pt" font-family="{$title.fontset}">
  474. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  475. </fo:block>
  476. </xsl:template>
  477. <xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode">
  478. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" font-size="17.28pt" keep-with-next.within-column="always" space-before="2in">
  479. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  480. </fo:block>
  481. </xsl:template>
  482. <xsl:template match="authorgroup" mode="book.titlepage.recto.auto.mode">
  483. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" space-before="2in">
  484. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  485. </fo:block>
  486. </xsl:template>
  487. <xsl:template match="author" mode="book.titlepage.recto.auto.mode">
  488. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" font-size="17.28pt" space-before="10.8pt" keep-with-next.within-column="always">
  489. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  490. </fo:block>
  491. </xsl:template>
  492. <xsl:template match="title" mode="book.titlepage.verso.auto.mode">
  493. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="14.4pt" font-weight="bold" font-family="{$title.fontset}">
  494. <xsl:call-template name="book.verso.title">
  495. </xsl:call-template>
  496. </fo:block>
  497. </xsl:template>
  498. <xsl:template match="corpauthor" mode="book.titlepage.verso.auto.mode">
  499. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  500. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  501. </fo:block>
  502. </xsl:template>
  503. <xsl:template match="authorgroup" mode="book.titlepage.verso.auto.mode">
  504. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  505. <xsl:call-template name="verso.authorgroup">
  506. </xsl:call-template>
  507. </fo:block>
  508. </xsl:template>
  509. <xsl:template match="author" mode="book.titlepage.verso.auto.mode">
  510. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  511. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  512. </fo:block>
  513. </xsl:template>
  514. <xsl:template match="othercredit" mode="book.titlepage.verso.auto.mode">
  515. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  516. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  517. </fo:block>
  518. </xsl:template>
  519. <xsl:template match="releaseinfo" mode="book.titlepage.verso.auto.mode">
  520. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="0.5em">
  521. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  522. </fo:block>
  523. </xsl:template>
  524. <xsl:template match="pubdate" mode="book.titlepage.verso.auto.mode">
  525. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="1em">
  526. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  527. </fo:block>
  528. </xsl:template>
  529. <xsl:template match="copyright" mode="book.titlepage.verso.auto.mode">
  530. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  531. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  532. </fo:block>
  533. </xsl:template>
  534. <xsl:template match="abstract" mode="book.titlepage.verso.auto.mode">
  535. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  536. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  537. </fo:block>
  538. </xsl:template>
  539. <xsl:template match="legalnotice" mode="book.titlepage.verso.auto.mode">
  540. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="8pt">
  541. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  542. </fo:block>
  543. </xsl:template>
  544. <xsl:template name="part.titlepage.recto">
  545. <xsl:choose>
  546. <xsl:when test="partinfo/title">
  547. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/title"/>
  548. </xsl:when>
  549. <xsl:when test="docinfo/title">
  550. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/title"/>
  551. </xsl:when>
  552. <xsl:when test="info/title">
  553. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/title"/>
  554. </xsl:when>
  555. <xsl:when test="title">
  556. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="title"/>
  557. </xsl:when>
  558. </xsl:choose>
  559. <xsl:choose>
  560. <xsl:when test="partinfo/subtitle">
  561. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/subtitle"/>
  562. </xsl:when>
  563. <xsl:when test="docinfo/subtitle">
  564. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  565. </xsl:when>
  566. <xsl:when test="info/subtitle">
  567. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/subtitle"/>
  568. </xsl:when>
  569. <xsl:when test="subtitle">
  570. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="subtitle"/>
  571. </xsl:when>
  572. </xsl:choose>
  573. </xsl:template>
  574. <xsl:template name="part.titlepage.verso">
  575. </xsl:template>
  576. <xsl:template name="part.titlepage.separator">
  577. </xsl:template>
  578. <xsl:template name="part.titlepage.before.recto">
  579. </xsl:template>
  580. <xsl:template name="part.titlepage.before.verso">
  581. </xsl:template>
  582. <xsl:template name="part.titlepage">
  583. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  584. <xsl:variable name="recto.content">
  585. <xsl:call-template name="part.titlepage.before.recto"/>
  586. <xsl:call-template name="part.titlepage.recto"/>
  587. </xsl:variable>
  588. <xsl:variable name="recto.elements.count">
  589. <xsl:choose>
  590. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  591. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  592. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  593. <xsl:otherwise>1</xsl:otherwise>
  594. </xsl:choose>
  595. </xsl:variable>
  596. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  597. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  598. </xsl:if>
  599. <xsl:variable name="verso.content">
  600. <xsl:call-template name="part.titlepage.before.verso"/>
  601. <xsl:call-template name="part.titlepage.verso"/>
  602. </xsl:variable>
  603. <xsl:variable name="verso.elements.count">
  604. <xsl:choose>
  605. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  606. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  607. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  608. <xsl:otherwise>1</xsl:otherwise>
  609. </xsl:choose>
  610. </xsl:variable>
  611. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  612. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  613. </xsl:if>
  614. <xsl:call-template name="part.titlepage.separator"/>
  615. </fo:block>
  616. </xsl:template>
  617. <xsl:template match="*" mode="part.titlepage.recto.mode">
  618. <!-- if an element isn't found in this mode, -->
  619. <!-- try the generic titlepage.mode -->
  620. <xsl:apply-templates select="." mode="titlepage.mode"/>
  621. </xsl:template>
  622. <xsl:template match="*" mode="part.titlepage.verso.mode">
  623. <!-- if an element isn't found in this mode, -->
  624. <!-- try the generic titlepage.mode -->
  625. <xsl:apply-templates select="." mode="titlepage.mode"/>
  626. </xsl:template>
  627. <xsl:template match="title" mode="part.titlepage.recto.auto.mode">
  628. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="part.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
  629. <xsl:call-template name="division.title">
  630. <xsl:with-param name="node" select="ancestor-or-self::part[1]"/>
  631. </xsl:call-template>
  632. </fo:block>
  633. </xsl:template>
  634. <xsl:template match="subtitle" mode="part.titlepage.recto.auto.mode">
  635. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="part.titlepage.recto.style" text-align="center" font-size="20.736pt" space-before="15.552pt" font-weight="bold" font-style="italic" font-family="{$title.fontset}">
  636. <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
  637. </fo:block>
  638. </xsl:template>
  639. <xsl:template name="partintro.titlepage.recto">
  640. <xsl:choose>
  641. <xsl:when test="partintroinfo/title">
  642. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/title"/>
  643. </xsl:when>
  644. <xsl:when test="docinfo/title">
  645. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/title"/>
  646. </xsl:when>
  647. <xsl:when test="info/title">
  648. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/title"/>
  649. </xsl:when>
  650. <xsl:when test="title">
  651. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="title"/>
  652. </xsl:when>
  653. </xsl:choose>
  654. <xsl:choose>
  655. <xsl:when test="partintroinfo/subtitle">
  656. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/subtitle"/>
  657. </xsl:when>
  658. <xsl:when test="docinfo/subtitle">
  659. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  660. </xsl:when>
  661. <xsl:when test="info/subtitle">
  662. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/subtitle"/>
  663. </xsl:when>
  664. <xsl:when test="subtitle">
  665. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="subtitle"/>
  666. </xsl:when>
  667. </xsl:choose>
  668. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/corpauthor"/>
  669. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  670. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/corpauthor"/>
  671. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/authorgroup"/>
  672. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  673. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/authorgroup"/>
  674. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/author"/>
  675. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/author"/>
  676. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/author"/>
  677. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/othercredit"/>
  678. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  679. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/othercredit"/>
  680. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/releaseinfo"/>
  681. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  682. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  683. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/copyright"/>
  684. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  685. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/copyright"/>
  686. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/legalnotice"/>
  687. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  688. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/legalnotice"/>
  689. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/pubdate"/>
  690. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  691. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/pubdate"/>
  692. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revision"/>
  693. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revision"/>
  694. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revision"/>
  695. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revhistory"/>
  696. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  697. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revhistory"/>
  698. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/abstract"/>
  699. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  700. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/abstract"/>
  701. </xsl:template>
  702. <xsl:template name="partintro.titlepage.verso">
  703. </xsl:template>
  704. <xsl:template name="partintro.titlepage.separator">
  705. </xsl:template>
  706. <xsl:template name="partintro.titlepage.before.recto">
  707. </xsl:template>
  708. <xsl:template name="partintro.titlepage.before.verso">
  709. </xsl:template>
  710. <xsl:template name="partintro.titlepage">
  711. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  712. <xsl:variable name="recto.content">
  713. <xsl:call-template name="partintro.titlepage.before.recto"/>
  714. <xsl:call-template name="partintro.titlepage.recto"/>
  715. </xsl:variable>
  716. <xsl:variable name="recto.elements.count">
  717. <xsl:choose>
  718. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  719. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  720. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  721. <xsl:otherwise>1</xsl:otherwise>
  722. </xsl:choose>
  723. </xsl:variable>
  724. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  725. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  726. </xsl:if>
  727. <xsl:variable name="verso.content">
  728. <xsl:call-template name="partintro.titlepage.before.verso"/>
  729. <xsl:call-template name="partintro.titlepage.verso"/>
  730. </xsl:variable>
  731. <xsl:variable name="verso.elements.count">
  732. <xsl:choose>
  733. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  734. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  735. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  736. <xsl:otherwise>1</xsl:otherwise>
  737. </xsl:choose>
  738. </xsl:variable>
  739. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  740. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  741. </xsl:if>
  742. <xsl:call-template name="partintro.titlepage.separator"/>
  743. </fo:block>
  744. </xsl:template>
  745. <xsl:template match="*" mode="partintro.titlepage.recto.mode">
  746. <!-- if an element isn't found in this mode, -->
  747. <!-- try the generic titlepage.mode -->
  748. <xsl:apply-templates select="." mode="titlepage.mode"/>
  749. </xsl:template>
  750. <xsl:template match="*" mode="partintro.titlepage.verso.mode">
  751. <!-- if an element isn't found in this mode, -->
  752. <!-- try the generic titlepage.mode -->
  753. <xsl:apply-templates select="." mode="titlepage.mode"/>
  754. </xsl:template>
  755. <xsl:template match="title" mode="partintro.titlepage.recto.auto.mode">
  756. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="24.8832pt" font-weight="bold" space-before="1em" font-family="{$title.fontset}">
  757. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  758. </fo:block>
  759. </xsl:template>
  760. <xsl:template match="subtitle" mode="partintro.titlepage.recto.auto.mode">
  761. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="14.4pt" font-weight="bold" font-style="italic" font-family="{$title.fontset}">
  762. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  763. </fo:block>
  764. </xsl:template>
  765. <xsl:template match="corpauthor" mode="partintro.titlepage.recto.auto.mode">
  766. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  767. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  768. </fo:block>
  769. </xsl:template>
  770. <xsl:template match="authorgroup" mode="partintro.titlepage.recto.auto.mode">
  771. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  772. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  773. </fo:block>
  774. </xsl:template>
  775. <xsl:template match="author" mode="partintro.titlepage.recto.auto.mode">
  776. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  777. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  778. </fo:block>
  779. </xsl:template>
  780. <xsl:template match="othercredit" mode="partintro.titlepage.recto.auto.mode">
  781. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  782. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  783. </fo:block>
  784. </xsl:template>
  785. <xsl:template match="releaseinfo" mode="partintro.titlepage.recto.auto.mode">
  786. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  787. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  788. </fo:block>
  789. </xsl:template>
  790. <xsl:template match="copyright" mode="partintro.titlepage.recto.auto.mode">
  791. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  792. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  793. </fo:block>
  794. </xsl:template>
  795. <xsl:template match="legalnotice" mode="partintro.titlepage.recto.auto.mode">
  796. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  797. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  798. </fo:block>
  799. </xsl:template>
  800. <xsl:template match="pubdate" mode="partintro.titlepage.recto.auto.mode">
  801. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  802. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  803. </fo:block>
  804. </xsl:template>
  805. <xsl:template match="revision" mode="partintro.titlepage.recto.auto.mode">
  806. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  807. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  808. </fo:block>
  809. </xsl:template>
  810. <xsl:template match="revhistory" mode="partintro.titlepage.recto.auto.mode">
  811. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  812. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  813. </fo:block>
  814. </xsl:template>
  815. <xsl:template match="abstract" mode="partintro.titlepage.recto.auto.mode">
  816. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  817. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  818. </fo:block>
  819. </xsl:template>
  820. <xsl:template name="reference.titlepage.recto">
  821. <xsl:choose>
  822. <xsl:when test="referenceinfo/title">
  823. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/title"/>
  824. </xsl:when>
  825. <xsl:when test="docinfo/title">
  826. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/title"/>
  827. </xsl:when>
  828. <xsl:when test="info/title">
  829. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/title"/>
  830. </xsl:when>
  831. <xsl:when test="title">
  832. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="title"/>
  833. </xsl:when>
  834. </xsl:choose>
  835. <xsl:choose>
  836. <xsl:when test="referenceinfo/subtitle">
  837. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/subtitle"/>
  838. </xsl:when>
  839. <xsl:when test="docinfo/subtitle">
  840. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  841. </xsl:when>
  842. <xsl:when test="info/subtitle">
  843. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/subtitle"/>
  844. </xsl:when>
  845. <xsl:when test="subtitle">
  846. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="subtitle"/>
  847. </xsl:when>
  848. </xsl:choose>
  849. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/corpauthor"/>
  850. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  851. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/corpauthor"/>
  852. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/authorgroup"/>
  853. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  854. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/authorgroup"/>
  855. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/author"/>
  856. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/author"/>
  857. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/author"/>
  858. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/othercredit"/>
  859. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  860. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/othercredit"/>
  861. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/releaseinfo"/>
  862. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  863. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  864. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/copyright"/>
  865. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  866. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/copyright"/>
  867. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/legalnotice"/>
  868. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  869. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/legalnotice"/>
  870. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/pubdate"/>
  871. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  872. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/pubdate"/>
  873. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revision"/>
  874. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revision"/>
  875. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revision"/>
  876. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revhistory"/>
  877. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  878. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revhistory"/>
  879. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/abstract"/>
  880. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  881. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/abstract"/>
  882. </xsl:template>
  883. <xsl:template name="reference.titlepage.verso">
  884. </xsl:template>
  885. <xsl:template name="reference.titlepage.separator">
  886. </xsl:template>
  887. <xsl:template name="reference.titlepage.before.recto">
  888. </xsl:template>
  889. <xsl:template name="reference.titlepage.before.verso">
  890. </xsl:template>
  891. <xsl:template name="reference.titlepage">
  892. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  893. <xsl:variable name="recto.content">
  894. <xsl:call-template name="reference.titlepage.before.recto"/>
  895. <xsl:call-template name="reference.titlepage.recto"/>
  896. </xsl:variable>
  897. <xsl:variable name="recto.elements.count">
  898. <xsl:choose>
  899. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  900. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  901. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  902. <xsl:otherwise>1</xsl:otherwise>
  903. </xsl:choose>
  904. </xsl:variable>
  905. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  906. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  907. </xsl:if>
  908. <xsl:variable name="verso.content">
  909. <xsl:call-template name="reference.titlepage.before.verso"/>
  910. <xsl:call-template name="reference.titlepage.verso"/>
  911. </xsl:variable>
  912. <xsl:variable name="verso.elements.count">
  913. <xsl:choose>
  914. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  915. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  916. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  917. <xsl:otherwise>1</xsl:otherwise>
  918. </xsl:choose>
  919. </xsl:variable>
  920. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  921. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  922. </xsl:if>
  923. <xsl:call-template name="reference.titlepage.separator"/>
  924. </fo:block>
  925. </xsl:template>
  926. <xsl:template match="*" mode="reference.titlepage.recto.mode">
  927. <!-- if an element isn't found in this mode, -->
  928. <!-- try the generic titlepage.mode -->
  929. <xsl:apply-templates select="." mode="titlepage.mode"/>
  930. </xsl:template>
  931. <xsl:template match="*" mode="reference.titlepage.verso.mode">
  932. <!-- if an element isn't found in this mode, -->
  933. <!-- try the generic titlepage.mode -->
  934. <xsl:apply-templates select="." mode="titlepage.mode"/>
  935. </xsl:template>
  936. <xsl:template match="title" mode="reference.titlepage.recto.auto.mode">
  937. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
  938. <xsl:call-template name="division.title">
  939. <xsl:with-param name="node" select="ancestor-or-self::reference[1]"/>
  940. </xsl:call-template>
  941. </fo:block>
  942. </xsl:template>
  943. <xsl:template match="subtitle" mode="reference.titlepage.recto.auto.mode">
  944. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style" font-family="{$title.fontset}" text-align="center">
  945. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  946. </fo:block>
  947. </xsl:template>
  948. <xsl:template match="corpauthor" mode="reference.titlepage.recto.auto.mode">
  949. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  950. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  951. </fo:block>
  952. </xsl:template>
  953. <xsl:template match="authorgroup" mode="reference.titlepage.recto.auto.mode">
  954. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  955. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  956. </fo:block>
  957. </xsl:template>
  958. <xsl:template match="author" mode="reference.titlepage.recto.auto.mode">
  959. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  960. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  961. </fo:block>
  962. </xsl:template>
  963. <xsl:template match="othercredit" mode="reference.titlepage.recto.auto.mode">
  964. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  965. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  966. </fo:block>
  967. </xsl:template>
  968. <xsl:template match="releaseinfo" mode="reference.titlepage.recto.auto.mode">
  969. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  970. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  971. </fo:block>
  972. </xsl:template>
  973. <xsl:template match="copyright" mode="reference.titlepage.recto.auto.mode">
  974. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  975. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  976. </fo:block>
  977. </xsl:template>
  978. <xsl:template match="legalnotice" mode="reference.titlepage.recto.auto.mode">
  979. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  980. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  981. </fo:block>
  982. </xsl:template>
  983. <xsl:template match="pubdate" mode="reference.titlepage.recto.auto.mode">
  984. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  985. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  986. </fo:block>
  987. </xsl:template>
  988. <xsl:template match="revision" mode="reference.titlepage.recto.auto.mode">
  989. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  990. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  991. </fo:block>
  992. </xsl:template>
  993. <xsl:template match="revhistory" mode="reference.titlepage.recto.auto.mode">
  994. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  995. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  996. </fo:block>
  997. </xsl:template>
  998. <xsl:template match="abstract" mode="reference.titlepage.recto.auto.mode">
  999. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  1000. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1001. </fo:block>
  1002. </xsl:template>
  1003. <xsl:template name="refsynopsisdiv.titlepage.recto">
  1004. <xsl:choose>
  1005. <xsl:when test="refsynopsisdivinfo/title">
  1006. <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="refsynopsisdivinfo/title"/>
  1007. </xsl:when>
  1008. <xsl:when test="docinfo/title">
  1009. <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
  1010. </xsl:when>
  1011. <xsl:when test="info/title">
  1012. <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="info/title"/>
  1013. </xsl:when>
  1014. <xsl:when test="title">
  1015. <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="title"/>
  1016. </xsl:when>
  1017. </xsl:choose>
  1018. </xsl:template>
  1019. <xsl:template name="refsynopsisdiv.titlepage.verso">
  1020. </xsl:template>
  1021. <xsl:template name="refsynopsisdiv.titlepage.separator">
  1022. </xsl:template>
  1023. <xsl:template name="refsynopsisdiv.titlepage.before.recto">
  1024. </xsl:template>
  1025. <xsl:template name="refsynopsisdiv.titlepage.before.verso">
  1026. </xsl:template>
  1027. <xsl:template name="refsynopsisdiv.titlepage">
  1028. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1029. <xsl:variable name="recto.content">
  1030. <xsl:call-template name="refsynopsisdiv.titlepage.before.recto"/>
  1031. <xsl:call-template name="refsynopsisdiv.titlepage.recto"/>
  1032. </xsl:variable>
  1033. <xsl:variable name="recto.elements.count">
  1034. <xsl:choose>
  1035. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1036. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1037. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1038. <xsl:otherwise>1</xsl:otherwise>
  1039. </xsl:choose>
  1040. </xsl:variable>
  1041. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1042. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1043. </xsl:if>
  1044. <xsl:variable name="verso.content">
  1045. <xsl:call-template name="refsynopsisdiv.titlepage.before.verso"/>
  1046. <xsl:call-template name="refsynopsisdiv.titlepage.verso"/>
  1047. </xsl:variable>
  1048. <xsl:variable name="verso.elements.count">
  1049. <xsl:choose>
  1050. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1051. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1052. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1053. <xsl:otherwise>1</xsl:otherwise>
  1054. </xsl:choose>
  1055. </xsl:variable>
  1056. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1057. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1058. </xsl:if>
  1059. <xsl:call-template name="refsynopsisdiv.titlepage.separator"/>
  1060. </fo:block>
  1061. </xsl:template>
  1062. <xsl:template match="*" mode="refsynopsisdiv.titlepage.recto.mode">
  1063. <!-- if an element isn't found in this mode, -->
  1064. <!-- try the generic titlepage.mode -->
  1065. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1066. </xsl:template>
  1067. <xsl:template match="*" mode="refsynopsisdiv.titlepage.verso.mode">
  1068. <!-- if an element isn't found in this mode, -->
  1069. <!-- try the generic titlepage.mode -->
  1070. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1071. </xsl:template>
  1072. <xsl:template match="title" mode="refsynopsisdiv.titlepage.recto.auto.mode">
  1073. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style" font-family="{$title.fontset}">
  1074. <xsl:apply-templates select="." mode="refsynopsisdiv.titlepage.recto.mode"/>
  1075. </fo:block>
  1076. </xsl:template>
  1077. <xsl:template name="refsection.titlepage.recto">
  1078. <xsl:choose>
  1079. <xsl:when test="refsectioninfo/title">
  1080. <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="refsectioninfo/title"/>
  1081. </xsl:when>
  1082. <xsl:when test="docinfo/title">
  1083. <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="docinfo/title"/>
  1084. </xsl:when>
  1085. <xsl:when test="info/title">
  1086. <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="info/title"/>
  1087. </xsl:when>
  1088. <xsl:when test="title">
  1089. <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="title"/>
  1090. </xsl:when>
  1091. </xsl:choose>
  1092. </xsl:template>
  1093. <xsl:template name="refsection.titlepage.verso">
  1094. </xsl:template>
  1095. <xsl:template name="refsection.titlepage.separator">
  1096. </xsl:template>
  1097. <xsl:template name="refsection.titlepage.before.recto">
  1098. </xsl:template>
  1099. <xsl:template name="refsection.titlepage.before.verso">
  1100. </xsl:template>
  1101. <xsl:template name="refsection.titlepage">
  1102. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1103. <xsl:variable name="recto.content">
  1104. <xsl:call-template name="refsection.titlepage.before.recto"/>
  1105. <xsl:call-template name="refsection.titlepage.recto"/>
  1106. </xsl:variable>
  1107. <xsl:variable name="recto.elements.count">
  1108. <xsl:choose>
  1109. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1110. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1111. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1112. <xsl:otherwise>1</xsl:otherwise>
  1113. </xsl:choose>
  1114. </xsl:variable>
  1115. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1116. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1117. </xsl:if>
  1118. <xsl:variable name="verso.content">
  1119. <xsl:call-template name="refsection.titlepage.before.verso"/>
  1120. <xsl:call-template name="refsection.titlepage.verso"/>
  1121. </xsl:variable>
  1122. <xsl:variable name="verso.elements.count">
  1123. <xsl:choose>
  1124. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1125. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1126. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1127. <xsl:otherwise>1</xsl:otherwise>
  1128. </xsl:choose>
  1129. </xsl:variable>
  1130. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1131. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1132. </xsl:if>
  1133. <xsl:call-template name="refsection.titlepage.separator"/>
  1134. </fo:block>
  1135. </xsl:template>
  1136. <xsl:template match="*" mode="refsection.titlepage.recto.mode">
  1137. <!-- if an element isn't found in this mode, -->
  1138. <!-- try the generic titlepage.mode -->
  1139. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1140. </xsl:template>
  1141. <xsl:template match="*" mode="refsection.titlepage.verso.mode">
  1142. <!-- if an element isn't found in this mode, -->
  1143. <!-- try the generic titlepage.mode -->
  1144. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1145. </xsl:template>
  1146. <xsl:template match="title" mode="refsection.titlepage.recto.auto.mode">
  1147. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsection.titlepage.recto.style" font-family="{$title.fontset}">
  1148. <xsl:apply-templates select="." mode="refsection.titlepage.recto.mode"/>
  1149. </fo:block>
  1150. </xsl:template>
  1151. <xsl:template name="refsect1.titlepage.recto">
  1152. <xsl:choose>
  1153. <xsl:when test="refsect1info/title">
  1154. <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="refsect1info/title"/>
  1155. </xsl:when>
  1156. <xsl:when test="docinfo/title">
  1157. <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="docinfo/title"/>
  1158. </xsl:when>
  1159. <xsl:when test="info/title">
  1160. <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="info/title"/>
  1161. </xsl:when>
  1162. <xsl:when test="title">
  1163. <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="title"/>
  1164. </xsl:when>
  1165. </xsl:choose>
  1166. </xsl:template>
  1167. <xsl:template name="refsect1.titlepage.verso">
  1168. </xsl:template>
  1169. <xsl:template name="refsect1.titlepage.separator">
  1170. </xsl:template>
  1171. <xsl:template name="refsect1.titlepage.before.recto">
  1172. </xsl:template>
  1173. <xsl:template name="refsect1.titlepage.before.verso">
  1174. </xsl:template>
  1175. <xsl:template name="refsect1.titlepage">
  1176. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1177. <xsl:variable name="recto.content">
  1178. <xsl:call-template name="refsect1.titlepage.before.recto"/>
  1179. <xsl:call-template name="refsect1.titlepage.recto"/>
  1180. </xsl:variable>
  1181. <xsl:variable name="recto.elements.count">
  1182. <xsl:choose>
  1183. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1184. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1185. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1186. <xsl:otherwise>1</xsl:otherwise>
  1187. </xsl:choose>
  1188. </xsl:variable>
  1189. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1190. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1191. </xsl:if>
  1192. <xsl:variable name="verso.content">
  1193. <xsl:call-template name="refsect1.titlepage.before.verso"/>
  1194. <xsl:call-template name="refsect1.titlepage.verso"/>
  1195. </xsl:variable>
  1196. <xsl:variable name="verso.elements.count">
  1197. <xsl:choose>
  1198. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1199. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1200. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1201. <xsl:otherwise>1</xsl:otherwise>
  1202. </xsl:choose>
  1203. </xsl:variable>
  1204. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1205. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1206. </xsl:if>
  1207. <xsl:call-template name="refsect1.titlepage.separator"/>
  1208. </fo:block>
  1209. </xsl:template>
  1210. <xsl:template match="*" mode="refsect1.titlepage.recto.mode">
  1211. <!-- if an element isn't found in this mode, -->
  1212. <!-- try the generic titlepage.mode -->
  1213. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1214. </xsl:template>
  1215. <xsl:template match="*" mode="refsect1.titlepage.verso.mode">
  1216. <!-- if an element isn't found in this mode, -->
  1217. <!-- try the generic titlepage.mode -->
  1218. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1219. </xsl:template>
  1220. <xsl:template match="title" mode="refsect1.titlepage.recto.auto.mode">
  1221. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect1.titlepage.recto.style" font-family="{$title.fontset}">
  1222. <xsl:apply-templates select="." mode="refsect1.titlepage.recto.mode"/>
  1223. </fo:block>
  1224. </xsl:template>
  1225. <xsl:template name="refsect2.titlepage.recto">
  1226. <xsl:choose>
  1227. <xsl:when test="refsect2info/title">
  1228. <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="refsect2info/title"/>
  1229. </xsl:when>
  1230. <xsl:when test="docinfo/title">
  1231. <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="docinfo/title"/>
  1232. </xsl:when>
  1233. <xsl:when test="info/title">
  1234. <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="info/title"/>
  1235. </xsl:when>
  1236. <xsl:when test="title">
  1237. <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="title"/>
  1238. </xsl:when>
  1239. </xsl:choose>
  1240. </xsl:template>
  1241. <xsl:template name="refsect2.titlepage.verso">
  1242. </xsl:template>
  1243. <xsl:template name="refsect2.titlepage.separator">
  1244. </xsl:template>
  1245. <xsl:template name="refsect2.titlepage.before.recto">
  1246. </xsl:template>
  1247. <xsl:template name="refsect2.titlepage.before.verso">
  1248. </xsl:template>
  1249. <xsl:template name="refsect2.titlepage">
  1250. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1251. <xsl:variable name="recto.content">
  1252. <xsl:call-template name="refsect2.titlepage.before.recto"/>
  1253. <xsl:call-template name="refsect2.titlepage.recto"/>
  1254. </xsl:variable>
  1255. <xsl:variable name="recto.elements.count">
  1256. <xsl:choose>
  1257. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1258. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1259. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1260. <xsl:otherwise>1</xsl:otherwise>
  1261. </xsl:choose>
  1262. </xsl:variable>
  1263. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1264. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1265. </xsl:if>
  1266. <xsl:variable name="verso.content">
  1267. <xsl:call-template name="refsect2.titlepage.before.verso"/>
  1268. <xsl:call-template name="refsect2.titlepage.verso"/>
  1269. </xsl:variable>
  1270. <xsl:variable name="verso.elements.count">
  1271. <xsl:choose>
  1272. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1273. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1274. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1275. <xsl:otherwise>1</xsl:otherwise>
  1276. </xsl:choose>
  1277. </xsl:variable>
  1278. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1279. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1280. </xsl:if>
  1281. <xsl:call-template name="refsect2.titlepage.separator"/>
  1282. </fo:block>
  1283. </xsl:template>
  1284. <xsl:template match="*" mode="refsect2.titlepage.recto.mode">
  1285. <!-- if an element isn't found in this mode, -->
  1286. <!-- try the generic titlepage.mode -->
  1287. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1288. </xsl:template>
  1289. <xsl:template match="*" mode="refsect2.titlepage.verso.mode">
  1290. <!-- if an element isn't found in this mode, -->
  1291. <!-- try the generic titlepage.mode -->
  1292. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1293. </xsl:template>
  1294. <xsl:template match="title" mode="refsect2.titlepage.recto.auto.mode">
  1295. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect2.titlepage.recto.style" font-family="{$title.fontset}">
  1296. <xsl:apply-templates select="." mode="refsect2.titlepage.recto.mode"/>
  1297. </fo:block>
  1298. </xsl:template>
  1299. <xsl:template name="refsect3.titlepage.recto">
  1300. <xsl:choose>
  1301. <xsl:when test="refsect3info/title">
  1302. <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="refsect3info/title"/>
  1303. </xsl:when>
  1304. <xsl:when test="docinfo/title">
  1305. <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="docinfo/title"/>
  1306. </xsl:when>
  1307. <xsl:when test="info/title">
  1308. <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="info/title"/>
  1309. </xsl:when>
  1310. <xsl:when test="title">
  1311. <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="title"/>
  1312. </xsl:when>
  1313. </xsl:choose>
  1314. </xsl:template>
  1315. <xsl:template name="refsect3.titlepage.verso">
  1316. </xsl:template>
  1317. <xsl:template name="refsect3.titlepage.separator">
  1318. </xsl:template>
  1319. <xsl:template name="refsect3.titlepage.before.recto">
  1320. </xsl:template>
  1321. <xsl:template name="refsect3.titlepage.before.verso">
  1322. </xsl:template>
  1323. <xsl:template name="refsect3.titlepage">
  1324. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1325. <xsl:variable name="recto.content">
  1326. <xsl:call-template name="refsect3.titlepage.before.recto"/>
  1327. <xsl:call-template name="refsect3.titlepage.recto"/>
  1328. </xsl:variable>
  1329. <xsl:variable name="recto.elements.count">
  1330. <xsl:choose>
  1331. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1332. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1333. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1334. <xsl:otherwise>1</xsl:otherwise>
  1335. </xsl:choose>
  1336. </xsl:variable>
  1337. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1338. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1339. </xsl:if>
  1340. <xsl:variable name="verso.content">
  1341. <xsl:call-template name="refsect3.titlepage.before.verso"/>
  1342. <xsl:call-template name="refsect3.titlepage.verso"/>
  1343. </xsl:variable>
  1344. <xsl:variable name="verso.elements.count">
  1345. <xsl:choose>
  1346. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1347. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1348. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1349. <xsl:otherwise>1</xsl:otherwise>
  1350. </xsl:choose>
  1351. </xsl:variable>
  1352. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1353. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1354. </xsl:if>
  1355. <xsl:call-template name="refsect3.titlepage.separator"/>
  1356. </fo:block>
  1357. </xsl:template>
  1358. <xsl:template match="*" mode="refsect3.titlepage.recto.mode">
  1359. <!-- if an element isn't found in this mode, -->
  1360. <!-- try the generic titlepage.mode -->
  1361. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1362. </xsl:template>
  1363. <xsl:template match="*" mode="refsect3.titlepage.verso.mode">
  1364. <!-- if an element isn't found in this mode, -->
  1365. <!-- try the generic titlepage.mode -->
  1366. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1367. </xsl:template>
  1368. <xsl:template match="title" mode="refsect3.titlepage.recto.auto.mode">
  1369. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect3.titlepage.recto.style" font-family="{$title.fontset}">
  1370. <xsl:apply-templates select="." mode="refsect3.titlepage.recto.mode"/>
  1371. </fo:block>
  1372. </xsl:template>
  1373. <xsl:template name="dedication.titlepage.recto">
  1374. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
  1375. <xsl:call-template name="component.title">
  1376. <xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/>
  1377. </xsl:call-template></fo:block>
  1378. <xsl:choose>
  1379. <xsl:when test="dedicationinfo/subtitle">
  1380. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/subtitle"/>
  1381. </xsl:when>
  1382. <xsl:when test="docinfo/subtitle">
  1383. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1384. </xsl:when>
  1385. <xsl:when test="info/subtitle">
  1386. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/subtitle"/>
  1387. </xsl:when>
  1388. <xsl:when test="subtitle">
  1389. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="subtitle"/>
  1390. </xsl:when>
  1391. </xsl:choose>
  1392. </xsl:template>
  1393. <xsl:template name="dedication.titlepage.verso">
  1394. </xsl:template>
  1395. <xsl:template name="dedication.titlepage.separator">
  1396. </xsl:template>
  1397. <xsl:template name="dedication.titlepage.before.recto">
  1398. </xsl:template>
  1399. <xsl:template name="dedication.titlepage.before.verso">
  1400. </xsl:template>
  1401. <xsl:template name="dedication.titlepage">
  1402. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1403. <xsl:variable name="recto.content">
  1404. <xsl:call-template name="dedication.titlepage.before.recto"/>
  1405. <xsl:call-template name="dedication.titlepage.recto"/>
  1406. </xsl:variable>
  1407. <xsl:variable name="recto.elements.count">
  1408. <xsl:choose>
  1409. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1410. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1411. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1412. <xsl:otherwise>1</xsl:otherwise>
  1413. </xsl:choose>
  1414. </xsl:variable>
  1415. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1416. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1417. </xsl:if>
  1418. <xsl:variable name="verso.content">
  1419. <xsl:call-template name="dedication.titlepage.before.verso"/>
  1420. <xsl:call-template name="dedication.titlepage.verso"/>
  1421. </xsl:variable>
  1422. <xsl:variable name="verso.elements.count">
  1423. <xsl:choose>
  1424. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1425. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1426. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1427. <xsl:otherwise>1</xsl:otherwise>
  1428. </xsl:choose>
  1429. </xsl:variable>
  1430. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1431. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1432. </xsl:if>
  1433. <xsl:call-template name="dedication.titlepage.separator"/>
  1434. </fo:block>
  1435. </xsl:template>
  1436. <xsl:template match="*" mode="dedication.titlepage.recto.mode">
  1437. <!-- if an element isn't found in this mode, -->
  1438. <!-- try the generic titlepage.mode -->
  1439. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1440. </xsl:template>
  1441. <xsl:template match="*" mode="dedication.titlepage.verso.mode">
  1442. <!-- if an element isn't found in this mode, -->
  1443. <!-- try the generic titlepage.mode -->
  1444. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1445. </xsl:template>
  1446. <xsl:template match="subtitle" mode="dedication.titlepage.recto.auto.mode">
  1447. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" font-family="{$title.fontset}">
  1448. <xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
  1449. </fo:block>
  1450. </xsl:template>
  1451. <xsl:template name="preface.titlepage.recto">
  1452. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
  1453. <xsl:call-template name="component.title">
  1454. <xsl:with-param name="node" select="ancestor-or-self::preface[1]"/>
  1455. </xsl:call-template></fo:block>
  1456. <xsl:choose>
  1457. <xsl:when test="prefaceinfo/subtitle">
  1458. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/>
  1459. </xsl:when>
  1460. <xsl:when test="docinfo/subtitle">
  1461. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1462. </xsl:when>
  1463. <xsl:when test="info/subtitle">
  1464. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/>
  1465. </xsl:when>
  1466. <xsl:when test="subtitle">
  1467. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/>
  1468. </xsl:when>
  1469. </xsl:choose>
  1470. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/>
  1471. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  1472. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/>
  1473. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/>
  1474. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  1475. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/>
  1476. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/>
  1477. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/>
  1478. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/>
  1479. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/>
  1480. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  1481. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/>
  1482. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/>
  1483. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  1484. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  1485. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/>
  1486. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  1487. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/>
  1488. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/>
  1489. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  1490. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/>
  1491. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/>
  1492. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  1493. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/>
  1494. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/>
  1495. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/>
  1496. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/>
  1497. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/>
  1498. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  1499. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/>
  1500. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/abstract"/>
  1501. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  1502. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/abstract"/>
  1503. </xsl:template>
  1504. <xsl:template name="preface.titlepage.verso">
  1505. </xsl:template>
  1506. <xsl:template name="preface.titlepage.separator">
  1507. </xsl:template>
  1508. <xsl:template name="preface.titlepage.before.recto">
  1509. </xsl:template>
  1510. <xsl:template name="preface.titlepage.before.verso">
  1511. </xsl:template>
  1512. <xsl:template name="preface.titlepage">
  1513. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1514. <xsl:variable name="recto.content">
  1515. <xsl:call-template name="preface.titlepage.before.recto"/>
  1516. <xsl:call-template name="preface.titlepage.recto"/>
  1517. </xsl:variable>
  1518. <xsl:variable name="recto.elements.count">
  1519. <xsl:choose>
  1520. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1521. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1522. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1523. <xsl:otherwise>1</xsl:otherwise>
  1524. </xsl:choose>
  1525. </xsl:variable>
  1526. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1527. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1528. </xsl:if>
  1529. <xsl:variable name="verso.content">
  1530. <xsl:call-template name="preface.titlepage.before.verso"/>
  1531. <xsl:call-template name="preface.titlepage.verso"/>
  1532. </xsl:variable>
  1533. <xsl:variable name="verso.elements.count">
  1534. <xsl:choose>
  1535. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1536. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1537. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1538. <xsl:otherwise>1</xsl:otherwise>
  1539. </xsl:choose>
  1540. </xsl:variable>
  1541. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1542. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1543. </xsl:if>
  1544. <xsl:call-template name="preface.titlepage.separator"/>
  1545. </fo:block>
  1546. </xsl:template>
  1547. <xsl:template match="*" mode="preface.titlepage.recto.mode">
  1548. <!-- if an element isn't found in this mode, -->
  1549. <!-- try the generic titlepage.mode -->
  1550. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1551. </xsl:template>
  1552. <xsl:template match="*" mode="preface.titlepage.verso.mode">
  1553. <!-- if an element isn't found in this mode, -->
  1554. <!-- try the generic titlepage.mode -->
  1555. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1556. </xsl:template>
  1557. <xsl:template match="subtitle" mode="preface.titlepage.recto.auto.mode">
  1558. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" font-family="{$title.fontset}">
  1559. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1560. </fo:block>
  1561. </xsl:template>
  1562. <xsl:template match="corpauthor" mode="preface.titlepage.recto.auto.mode">
  1563. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1564. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1565. </fo:block>
  1566. </xsl:template>
  1567. <xsl:template match="authorgroup" mode="preface.titlepage.recto.auto.mode">
  1568. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1569. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1570. </fo:block>
  1571. </xsl:template>
  1572. <xsl:template match="author" mode="preface.titlepage.recto.auto.mode">
  1573. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1574. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1575. </fo:block>
  1576. </xsl:template>
  1577. <xsl:template match="othercredit" mode="preface.titlepage.recto.auto.mode">
  1578. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1579. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1580. </fo:block>
  1581. </xsl:template>
  1582. <xsl:template match="releaseinfo" mode="preface.titlepage.recto.auto.mode">
  1583. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1584. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1585. </fo:block>
  1586. </xsl:template>
  1587. <xsl:template match="copyright" mode="preface.titlepage.recto.auto.mode">
  1588. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1589. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1590. </fo:block>
  1591. </xsl:template>
  1592. <xsl:template match="legalnotice" mode="preface.titlepage.recto.auto.mode">
  1593. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1594. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1595. </fo:block>
  1596. </xsl:template>
  1597. <xsl:template match="pubdate" mode="preface.titlepage.recto.auto.mode">
  1598. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1599. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1600. </fo:block>
  1601. </xsl:template>
  1602. <xsl:template match="revision" mode="preface.titlepage.recto.auto.mode">
  1603. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1604. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1605. </fo:block>
  1606. </xsl:template>
  1607. <xsl:template match="revhistory" mode="preface.titlepage.recto.auto.mode">
  1608. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1609. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1610. </fo:block>
  1611. </xsl:template>
  1612. <xsl:template match="abstract" mode="preface.titlepage.recto.auto.mode">
  1613. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1614. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1615. </fo:block>
  1616. </xsl:template>
  1617. <xsl:template name="chapter.titlepage.recto">
  1618. <xsl:choose>
  1619. <xsl:when test="chapterinfo/title">
  1620. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/title"/>
  1621. </xsl:when>
  1622. <xsl:when test="docinfo/title">
  1623. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/title"/>
  1624. </xsl:when>
  1625. <xsl:when test="info/title">
  1626. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/title"/>
  1627. </xsl:when>
  1628. <xsl:when test="title">
  1629. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="title"/>
  1630. </xsl:when>
  1631. </xsl:choose>
  1632. <xsl:choose>
  1633. <xsl:when test="chapterinfo/subtitle">
  1634. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/subtitle"/>
  1635. </xsl:when>
  1636. <xsl:when test="docinfo/subtitle">
  1637. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1638. </xsl:when>
  1639. <xsl:when test="info/subtitle">
  1640. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/subtitle"/>
  1641. </xsl:when>
  1642. <xsl:when test="subtitle">
  1643. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="subtitle"/>
  1644. </xsl:when>
  1645. </xsl:choose>
  1646. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/corpauthor"/>
  1647. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  1648. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/corpauthor"/>
  1649. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/authorgroup"/>
  1650. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  1651. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/authorgroup"/>
  1652. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/author"/>
  1653. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/author"/>
  1654. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/author"/>
  1655. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/othercredit"/>
  1656. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  1657. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/othercredit"/>
  1658. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/releaseinfo"/>
  1659. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  1660. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  1661. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/copyright"/>
  1662. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  1663. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/copyright"/>
  1664. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/legalnotice"/>
  1665. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  1666. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/legalnotice"/>
  1667. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/pubdate"/>
  1668. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  1669. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/pubdate"/>
  1670. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revision"/>
  1671. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revision"/>
  1672. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revision"/>
  1673. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revhistory"/>
  1674. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  1675. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revhistory"/>
  1676. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/abstract"/>
  1677. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  1678. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/abstract"/>
  1679. </xsl:template>
  1680. <xsl:template name="chapter.titlepage.verso">
  1681. </xsl:template>
  1682. <xsl:template name="chapter.titlepage.separator">
  1683. </xsl:template>
  1684. <xsl:template name="chapter.titlepage.before.recto">
  1685. </xsl:template>
  1686. <xsl:template name="chapter.titlepage.before.verso">
  1687. </xsl:template>
  1688. <xsl:template name="chapter.titlepage">
  1689. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
  1690. <xsl:variable name="recto.content">
  1691. <xsl:call-template name="chapter.titlepage.before.recto"/>
  1692. <xsl:call-template name="chapter.titlepage.recto"/>
  1693. </xsl:variable>
  1694. <xsl:variable name="recto.elements.count">
  1695. <xsl:choose>
  1696. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1697. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1698. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1699. <xsl:otherwise>1</xsl:otherwise>
  1700. </xsl:choose>
  1701. </xsl:variable>
  1702. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1703. <fo:block margin-left="{$title.margin.left}"><xsl:copy-of select="$recto.content"/></fo:block>
  1704. </xsl:if>
  1705. <xsl:variable name="verso.content">
  1706. <xsl:call-template name="chapter.titlepage.before.verso"/>
  1707. <xsl:call-template name="chapter.titlepage.verso"/>
  1708. </xsl:variable>
  1709. <xsl:variable name="verso.elements.count">
  1710. <xsl:choose>
  1711. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1712. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1713. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1714. <xsl:otherwise>1</xsl:otherwise>
  1715. </xsl:choose>
  1716. </xsl:variable>
  1717. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1718. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1719. </xsl:if>
  1720. <xsl:call-template name="chapter.titlepage.separator"/>
  1721. </fo:block>
  1722. </xsl:template>
  1723. <xsl:template match="*" mode="chapter.titlepage.recto.mode">
  1724. <!-- if an element isn't found in this mode, -->
  1725. <!-- try the generic titlepage.mode -->
  1726. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1727. </xsl:template>
  1728. <xsl:template match="*" mode="chapter.titlepage.verso.mode">
  1729. <!-- if an element isn't found in this mode, -->
  1730. <!-- try the generic titlepage.mode -->
  1731. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1732. </xsl:template>
  1733. <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
  1734. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" font-size="24.8832pt" font-weight="bold">
  1735. <xsl:call-template name="component.title">
  1736. <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
  1737. </xsl:call-template>
  1738. </fo:block>
  1739. </xsl:template>
  1740. <xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode">
  1741. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" font-style="italic" font-size="14.4pt" font-weight="bold">
  1742. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1743. </fo:block>
  1744. </xsl:template>
  1745. <xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode">
  1746. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
  1747. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1748. </fo:block>
  1749. </xsl:template>
  1750. <xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode">
  1751. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
  1752. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1753. </fo:block>
  1754. </xsl:template>
  1755. <xsl:template match="author" mode="chapter.titlepage.recto.auto.mode">
  1756. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
  1757. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1758. </fo:block>
  1759. </xsl:template>
  1760. <xsl:template match="othercredit" mode="chapter.titlepage.recto.auto.mode">
  1761. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1762. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1763. </fo:block>
  1764. </xsl:template>
  1765. <xsl:template match="releaseinfo" mode="chapter.titlepage.recto.auto.mode">
  1766. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1767. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1768. </fo:block>
  1769. </xsl:template>
  1770. <xsl:template match="copyright" mode="chapter.titlepage.recto.auto.mode">
  1771. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1772. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1773. </fo:block>
  1774. </xsl:template>
  1775. <xsl:template match="legalnotice" mode="chapter.titlepage.recto.auto.mode">
  1776. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1777. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1778. </fo:block>
  1779. </xsl:template>
  1780. <xsl:template match="pubdate" mode="chapter.titlepage.recto.auto.mode">
  1781. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1782. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1783. </fo:block>
  1784. </xsl:template>
  1785. <xsl:template match="revision" mode="chapter.titlepage.recto.auto.mode">
  1786. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1787. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1788. </fo:block>
  1789. </xsl:template>
  1790. <xsl:template match="revhistory" mode="chapter.titlepage.recto.auto.mode">
  1791. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1792. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1793. </fo:block>
  1794. </xsl:template>
  1795. <xsl:template match="abstract" mode="chapter.titlepage.recto.auto.mode">
  1796. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1797. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1798. </fo:block>
  1799. </xsl:template>
  1800. <xsl:template name="appendix.titlepage.recto">
  1801. <xsl:choose>
  1802. <xsl:when test="appendixinfo/title">
  1803. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/title"/>
  1804. </xsl:when>
  1805. <xsl:when test="docinfo/title">
  1806. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/title"/>
  1807. </xsl:when>
  1808. <xsl:when test="info/title">
  1809. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/title"/>
  1810. </xsl:when>
  1811. <xsl:when test="title">
  1812. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="title"/>
  1813. </xsl:when>
  1814. </xsl:choose>
  1815. <xsl:choose>
  1816. <xsl:when test="appendixinfo/subtitle">
  1817. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/subtitle"/>
  1818. </xsl:when>
  1819. <xsl:when test="docinfo/subtitle">
  1820. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1821. </xsl:when>
  1822. <xsl:when test="info/subtitle">
  1823. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/subtitle"/>
  1824. </xsl:when>
  1825. <xsl:when test="subtitle">
  1826. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="subtitle"/>
  1827. </xsl:when>
  1828. </xsl:choose>
  1829. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/corpauthor"/>
  1830. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  1831. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/corpauthor"/>
  1832. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/authorgroup"/>
  1833. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  1834. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/authorgroup"/>
  1835. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/author"/>
  1836. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/author"/>
  1837. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/author"/>
  1838. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/othercredit"/>
  1839. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  1840. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/othercredit"/>
  1841. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/releaseinfo"/>
  1842. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  1843. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  1844. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/copyright"/>
  1845. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  1846. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/copyright"/>
  1847. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/legalnotice"/>
  1848. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  1849. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/legalnotice"/>
  1850. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/pubdate"/>
  1851. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  1852. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/pubdate"/>
  1853. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revision"/>
  1854. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revision"/>
  1855. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revision"/>
  1856. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revhistory"/>
  1857. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  1858. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revhistory"/>
  1859. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/abstract"/>
  1860. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  1861. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/abstract"/>
  1862. </xsl:template>
  1863. <xsl:template name="appendix.titlepage.verso">
  1864. </xsl:template>
  1865. <xsl:template name="appendix.titlepage.separator">
  1866. </xsl:template>
  1867. <xsl:template name="appendix.titlepage.before.recto">
  1868. </xsl:template>
  1869. <xsl:template name="appendix.titlepage.before.verso">
  1870. </xsl:template>
  1871. <xsl:template name="appendix.titlepage">
  1872. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1873. <xsl:variable name="recto.content">
  1874. <xsl:call-template name="appendix.titlepage.before.recto"/>
  1875. <xsl:call-template name="appendix.titlepage.recto"/>
  1876. </xsl:variable>
  1877. <xsl:variable name="recto.elements.count">
  1878. <xsl:choose>
  1879. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1880. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1881. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1882. <xsl:otherwise>1</xsl:otherwise>
  1883. </xsl:choose>
  1884. </xsl:variable>
  1885. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1886. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1887. </xsl:if>
  1888. <xsl:variable name="verso.content">
  1889. <xsl:call-template name="appendix.titlepage.before.verso"/>
  1890. <xsl:call-template name="appendix.titlepage.verso"/>
  1891. </xsl:variable>
  1892. <xsl:variable name="verso.elements.count">
  1893. <xsl:choose>
  1894. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1895. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1896. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1897. <xsl:otherwise>1</xsl:otherwise>
  1898. </xsl:choose>
  1899. </xsl:variable>
  1900. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1901. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1902. </xsl:if>
  1903. <xsl:call-template name="appendix.titlepage.separator"/>
  1904. </fo:block>
  1905. </xsl:template>
  1906. <xsl:template match="*" mode="appendix.titlepage.recto.mode">
  1907. <!-- if an element isn't found in this mode, -->
  1908. <!-- try the generic titlepage.mode -->
  1909. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1910. </xsl:template>
  1911. <xsl:template match="*" mode="appendix.titlepage.verso.mode">
  1912. <!-- if an element isn't found in this mode, -->
  1913. <!-- try the generic titlepage.mode -->
  1914. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1915. </xsl:template>
  1916. <xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
  1917. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-weight="bold" font-family="{$title.fontset}">
  1918. <xsl:call-template name="component.title">
  1919. <xsl:with-param name="node" select="ancestor-or-self::appendix[1]"/>
  1920. </xsl:call-template>
  1921. </fo:block>
  1922. </xsl:template>
  1923. <xsl:template match="subtitle" mode="appendix.titlepage.recto.auto.mode">
  1924. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" font-family="{$title.fontset}">
  1925. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1926. </fo:block>
  1927. </xsl:template>
  1928. <xsl:template match="corpauthor" mode="appendix.titlepage.recto.auto.mode">
  1929. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1930. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1931. </fo:block>
  1932. </xsl:template>
  1933. <xsl:template match="authorgroup" mode="appendix.titlepage.recto.auto.mode">
  1934. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1935. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1936. </fo:block>
  1937. </xsl:template>
  1938. <xsl:template match="author" mode="appendix.titlepage.recto.auto.mode">
  1939. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1940. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1941. </fo:block>
  1942. </xsl:template>
  1943. <xsl:template match="othercredit" mode="appendix.titlepage.recto.auto.mode">
  1944. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1945. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1946. </fo:block>
  1947. </xsl:template>
  1948. <xsl:template match="releaseinfo" mode="appendix.titlepage.recto.auto.mode">
  1949. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1950. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1951. </fo:block>
  1952. </xsl:template>
  1953. <xsl:template match="copyright" mode="appendix.titlepage.recto.auto.mode">
  1954. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1955. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1956. </fo:block>
  1957. </xsl:template>
  1958. <xsl:template match="legalnotice" mode="appendix.titlepage.recto.auto.mode">
  1959. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1960. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1961. </fo:block>
  1962. </xsl:template>
  1963. <xsl:template match="pubdate" mode="appendix.titlepage.recto.auto.mode">
  1964. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1965. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1966. </fo:block>
  1967. </xsl:template>
  1968. <xsl:template match="revision" mode="appendix.titlepage.recto.auto.mode">
  1969. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1970. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1971. </fo:block>
  1972. </xsl:template>
  1973. <xsl:template match="revhistory" mode="appendix.titlepage.recto.auto.mode">
  1974. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1975. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1976. </fo:block>
  1977. </xsl:template>
  1978. <xsl:template match="abstract" mode="appendix.titlepage.recto.auto.mode">
  1979. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1980. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1981. </fo:block>
  1982. </xsl:template>
  1983. <xsl:template name="section.titlepage.recto">
  1984. <xsl:choose>
  1985. <xsl:when test="sectioninfo/title">
  1986. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/title"/>
  1987. </xsl:when>
  1988. <xsl:when test="info/title">
  1989. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/title"/>
  1990. </xsl:when>
  1991. <xsl:when test="title">
  1992. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="title"/>
  1993. </xsl:when>
  1994. </xsl:choose>
  1995. <xsl:choose>
  1996. <xsl:when test="sectioninfo/subtitle">
  1997. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/subtitle"/>
  1998. </xsl:when>
  1999. <xsl:when test="info/subtitle">
  2000. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/subtitle"/>
  2001. </xsl:when>
  2002. <xsl:when test="subtitle">
  2003. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="subtitle"/>
  2004. </xsl:when>
  2005. </xsl:choose>
  2006. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/corpauthor"/>
  2007. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2008. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/authorgroup"/>
  2009. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2010. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/author"/>
  2011. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/author"/>
  2012. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/othercredit"/>
  2013. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/othercredit"/>
  2014. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/releaseinfo"/>
  2015. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2016. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/copyright"/>
  2017. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/copyright"/>
  2018. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/legalnotice"/>
  2019. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2020. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/pubdate"/>
  2021. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/pubdate"/>
  2022. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revision"/>
  2023. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revision"/>
  2024. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revhistory"/>
  2025. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revhistory"/>
  2026. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/abstract"/>
  2027. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/abstract"/>
  2028. </xsl:template>
  2029. <xsl:template name="section.titlepage.verso">
  2030. </xsl:template>
  2031. <xsl:template name="section.titlepage.separator">
  2032. </xsl:template>
  2033. <xsl:template name="section.titlepage.before.recto">
  2034. </xsl:template>
  2035. <xsl:template name="section.titlepage.before.verso">
  2036. </xsl:template>
  2037. <xsl:template name="section.titlepage">
  2038. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2039. <xsl:variable name="recto.content">
  2040. <xsl:call-template name="section.titlepage.before.recto"/>
  2041. <xsl:call-template name="section.titlepage.recto"/>
  2042. </xsl:variable>
  2043. <xsl:variable name="recto.elements.count">
  2044. <xsl:choose>
  2045. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2046. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2047. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2048. <xsl:otherwise>1</xsl:otherwise>
  2049. </xsl:choose>
  2050. </xsl:variable>
  2051. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2052. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2053. </xsl:if>
  2054. <xsl:variable name="verso.content">
  2055. <xsl:call-template name="section.titlepage.before.verso"/>
  2056. <xsl:call-template name="section.titlepage.verso"/>
  2057. </xsl:variable>
  2058. <xsl:variable name="verso.elements.count">
  2059. <xsl:choose>
  2060. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2061. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2062. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2063. <xsl:otherwise>1</xsl:otherwise>
  2064. </xsl:choose>
  2065. </xsl:variable>
  2066. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2067. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2068. </xsl:if>
  2069. <xsl:call-template name="section.titlepage.separator"/>
  2070. </fo:block>
  2071. </xsl:template>
  2072. <xsl:template match="*" mode="section.titlepage.recto.mode">
  2073. <!-- if an element isn't found in this mode, -->
  2074. <!-- try the generic titlepage.mode -->
  2075. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2076. </xsl:template>
  2077. <xsl:template match="*" mode="section.titlepage.verso.mode">
  2078. <!-- if an element isn't found in this mode, -->
  2079. <!-- try the generic titlepage.mode -->
  2080. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2081. </xsl:template>
  2082. <xsl:template match="title" mode="section.titlepage.recto.auto.mode">
  2083. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
  2084. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2085. </fo:block>
  2086. </xsl:template>
  2087. <xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode">
  2088. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style" font-family="{$title.fontset}">
  2089. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2090. </fo:block>
  2091. </xsl:template>
  2092. <xsl:template match="corpauthor" mode="section.titlepage.recto.auto.mode">
  2093. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2094. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2095. </fo:block>
  2096. </xsl:template>
  2097. <xsl:template match="authorgroup" mode="section.titlepage.recto.auto.mode">
  2098. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2099. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2100. </fo:block>
  2101. </xsl:template>
  2102. <xsl:template match="author" mode="section.titlepage.recto.auto.mode">
  2103. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2104. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2105. </fo:block>
  2106. </xsl:template>
  2107. <xsl:template match="othercredit" mode="section.titlepage.recto.auto.mode">
  2108. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2109. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2110. </fo:block>
  2111. </xsl:template>
  2112. <xsl:template match="releaseinfo" mode="section.titlepage.recto.auto.mode">
  2113. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2114. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2115. </fo:block>
  2116. </xsl:template>
  2117. <xsl:template match="copyright" mode="section.titlepage.recto.auto.mode">
  2118. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2119. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2120. </fo:block>
  2121. </xsl:template>
  2122. <xsl:template match="legalnotice" mode="section.titlepage.recto.auto.mode">
  2123. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2124. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2125. </fo:block>
  2126. </xsl:template>
  2127. <xsl:template match="pubdate" mode="section.titlepage.recto.auto.mode">
  2128. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2129. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2130. </fo:block>
  2131. </xsl:template>
  2132. <xsl:template match="revision" mode="section.titlepage.recto.auto.mode">
  2133. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2134. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2135. </fo:block>
  2136. </xsl:template>
  2137. <xsl:template match="revhistory" mode="section.titlepage.recto.auto.mode">
  2138. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2139. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2140. </fo:block>
  2141. </xsl:template>
  2142. <xsl:template match="abstract" mode="section.titlepage.recto.auto.mode">
  2143. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2144. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2145. </fo:block>
  2146. </xsl:template>
  2147. <xsl:template name="sect1.titlepage.recto">
  2148. <xsl:choose>
  2149. <xsl:when test="sect1info/title">
  2150. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/title"/>
  2151. </xsl:when>
  2152. <xsl:when test="info/title">
  2153. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/title"/>
  2154. </xsl:when>
  2155. <xsl:when test="title">
  2156. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="title"/>
  2157. </xsl:when>
  2158. </xsl:choose>
  2159. <xsl:choose>
  2160. <xsl:when test="sect1info/subtitle">
  2161. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/subtitle"/>
  2162. </xsl:when>
  2163. <xsl:when test="info/subtitle">
  2164. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/subtitle"/>
  2165. </xsl:when>
  2166. <xsl:when test="subtitle">
  2167. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="subtitle"/>
  2168. </xsl:when>
  2169. </xsl:choose>
  2170. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/corpauthor"/>
  2171. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2172. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/authorgroup"/>
  2173. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2174. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/author"/>
  2175. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/author"/>
  2176. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/othercredit"/>
  2177. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/othercredit"/>
  2178. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/releaseinfo"/>
  2179. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2180. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/copyright"/>
  2181. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/copyright"/>
  2182. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/legalnotice"/>
  2183. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2184. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/pubdate"/>
  2185. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/pubdate"/>
  2186. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revision"/>
  2187. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revision"/>
  2188. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revhistory"/>
  2189. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revhistory"/>
  2190. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/abstract"/>
  2191. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/abstract"/>
  2192. </xsl:template>
  2193. <xsl:template name="sect1.titlepage.verso">
  2194. </xsl:template>
  2195. <xsl:template name="sect1.titlepage.separator">
  2196. </xsl:template>
  2197. <xsl:template name="sect1.titlepage.before.recto">
  2198. </xsl:template>
  2199. <xsl:template name="sect1.titlepage.before.verso">
  2200. </xsl:template>
  2201. <xsl:template name="sect1.titlepage">
  2202. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2203. <xsl:variable name="recto.content">
  2204. <xsl:call-template name="sect1.titlepage.before.recto"/>
  2205. <xsl:call-template name="sect1.titlepage.recto"/>
  2206. </xsl:variable>
  2207. <xsl:variable name="recto.elements.count">
  2208. <xsl:choose>
  2209. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2210. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2211. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2212. <xsl:otherwise>1</xsl:otherwise>
  2213. </xsl:choose>
  2214. </xsl:variable>
  2215. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2216. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2217. </xsl:if>
  2218. <xsl:variable name="verso.content">
  2219. <xsl:call-template name="sect1.titlepage.before.verso"/>
  2220. <xsl:call-template name="sect1.titlepage.verso"/>
  2221. </xsl:variable>
  2222. <xsl:variable name="verso.elements.count">
  2223. <xsl:choose>
  2224. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2225. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2226. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2227. <xsl:otherwise>1</xsl:otherwise>
  2228. </xsl:choose>
  2229. </xsl:variable>
  2230. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2231. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2232. </xsl:if>
  2233. <xsl:call-template name="sect1.titlepage.separator"/>
  2234. </fo:block>
  2235. </xsl:template>
  2236. <xsl:template match="*" mode="sect1.titlepage.recto.mode">
  2237. <!-- if an element isn't found in this mode, -->
  2238. <!-- try the generic titlepage.mode -->
  2239. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2240. </xsl:template>
  2241. <xsl:template match="*" mode="sect1.titlepage.verso.mode">
  2242. <!-- if an element isn't found in this mode, -->
  2243. <!-- try the generic titlepage.mode -->
  2244. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2245. </xsl:template>
  2246. <xsl:template match="title" mode="sect1.titlepage.recto.auto.mode">
  2247. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
  2248. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2249. </fo:block>
  2250. </xsl:template>
  2251. <xsl:template match="subtitle" mode="sect1.titlepage.recto.auto.mode">
  2252. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style" font-family="{$title.fontset}">
  2253. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2254. </fo:block>
  2255. </xsl:template>
  2256. <xsl:template match="corpauthor" mode="sect1.titlepage.recto.auto.mode">
  2257. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2258. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2259. </fo:block>
  2260. </xsl:template>
  2261. <xsl:template match="authorgroup" mode="sect1.titlepage.recto.auto.mode">
  2262. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2263. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2264. </fo:block>
  2265. </xsl:template>
  2266. <xsl:template match="author" mode="sect1.titlepage.recto.auto.mode">
  2267. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2268. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2269. </fo:block>
  2270. </xsl:template>
  2271. <xsl:template match="othercredit" mode="sect1.titlepage.recto.auto.mode">
  2272. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2273. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2274. </fo:block>
  2275. </xsl:template>
  2276. <xsl:template match="releaseinfo" mode="sect1.titlepage.recto.auto.mode">
  2277. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2278. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2279. </fo:block>
  2280. </xsl:template>
  2281. <xsl:template match="copyright" mode="sect1.titlepage.recto.auto.mode">
  2282. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2283. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2284. </fo:block>
  2285. </xsl:template>
  2286. <xsl:template match="legalnotice" mode="sect1.titlepage.recto.auto.mode">
  2287. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2288. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2289. </fo:block>
  2290. </xsl:template>
  2291. <xsl:template match="pubdate" mode="sect1.titlepage.recto.auto.mode">
  2292. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2293. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2294. </fo:block>
  2295. </xsl:template>
  2296. <xsl:template match="revision" mode="sect1.titlepage.recto.auto.mode">
  2297. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2298. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2299. </fo:block>
  2300. </xsl:template>
  2301. <xsl:template match="revhistory" mode="sect1.titlepage.recto.auto.mode">
  2302. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2303. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2304. </fo:block>
  2305. </xsl:template>
  2306. <xsl:template match="abstract" mode="sect1.titlepage.recto.auto.mode">
  2307. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2308. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2309. </fo:block>
  2310. </xsl:template>
  2311. <xsl:template name="sect2.titlepage.recto">
  2312. <xsl:choose>
  2313. <xsl:when test="sect2info/title">
  2314. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/title"/>
  2315. </xsl:when>
  2316. <xsl:when test="info/title">
  2317. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/title"/>
  2318. </xsl:when>
  2319. <xsl:when test="title">
  2320. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="title"/>
  2321. </xsl:when>
  2322. </xsl:choose>
  2323. <xsl:choose>
  2324. <xsl:when test="sect2info/subtitle">
  2325. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/subtitle"/>
  2326. </xsl:when>
  2327. <xsl:when test="info/subtitle">
  2328. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/subtitle"/>
  2329. </xsl:when>
  2330. <xsl:when test="subtitle">
  2331. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="subtitle"/>
  2332. </xsl:when>
  2333. </xsl:choose>
  2334. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/corpauthor"/>
  2335. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2336. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/authorgroup"/>
  2337. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2338. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/author"/>
  2339. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/author"/>
  2340. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/othercredit"/>
  2341. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/othercredit"/>
  2342. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/releaseinfo"/>
  2343. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2344. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/copyright"/>
  2345. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/copyright"/>
  2346. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/legalnotice"/>
  2347. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2348. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/pubdate"/>
  2349. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/pubdate"/>
  2350. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revision"/>
  2351. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revision"/>
  2352. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revhistory"/>
  2353. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revhistory"/>
  2354. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/abstract"/>
  2355. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/abstract"/>
  2356. </xsl:template>
  2357. <xsl:template name="sect2.titlepage.verso">
  2358. </xsl:template>
  2359. <xsl:template name="sect2.titlepage.separator">
  2360. </xsl:template>
  2361. <xsl:template name="sect2.titlepage.before.recto">
  2362. </xsl:template>
  2363. <xsl:template name="sect2.titlepage.before.verso">
  2364. </xsl:template>
  2365. <xsl:template name="sect2.titlepage">
  2366. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2367. <xsl:variable name="recto.content">
  2368. <xsl:call-template name="sect2.titlepage.before.recto"/>
  2369. <xsl:call-template name="sect2.titlepage.recto"/>
  2370. </xsl:variable>
  2371. <xsl:variable name="recto.elements.count">
  2372. <xsl:choose>
  2373. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2374. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2375. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2376. <xsl:otherwise>1</xsl:otherwise>
  2377. </xsl:choose>
  2378. </xsl:variable>
  2379. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2380. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2381. </xsl:if>
  2382. <xsl:variable name="verso.content">
  2383. <xsl:call-template name="sect2.titlepage.before.verso"/>
  2384. <xsl:call-template name="sect2.titlepage.verso"/>
  2385. </xsl:variable>
  2386. <xsl:variable name="verso.elements.count">
  2387. <xsl:choose>
  2388. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2389. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2390. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2391. <xsl:otherwise>1</xsl:otherwise>
  2392. </xsl:choose>
  2393. </xsl:variable>
  2394. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2395. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2396. </xsl:if>
  2397. <xsl:call-template name="sect2.titlepage.separator"/>
  2398. </fo:block>
  2399. </xsl:template>
  2400. <xsl:template match="*" mode="sect2.titlepage.recto.mode">
  2401. <!-- if an element isn't found in this mode, -->
  2402. <!-- try the generic titlepage.mode -->
  2403. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2404. </xsl:template>
  2405. <xsl:template match="*" mode="sect2.titlepage.verso.mode">
  2406. <!-- if an element isn't found in this mode, -->
  2407. <!-- try the generic titlepage.mode -->
  2408. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2409. </xsl:template>
  2410. <xsl:template match="title" mode="sect2.titlepage.recto.auto.mode">
  2411. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
  2412. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2413. </fo:block>
  2414. </xsl:template>
  2415. <xsl:template match="subtitle" mode="sect2.titlepage.recto.auto.mode">
  2416. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style" font-family="{$title.fontset}">
  2417. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2418. </fo:block>
  2419. </xsl:template>
  2420. <xsl:template match="corpauthor" mode="sect2.titlepage.recto.auto.mode">
  2421. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2422. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2423. </fo:block>
  2424. </xsl:template>
  2425. <xsl:template match="authorgroup" mode="sect2.titlepage.recto.auto.mode">
  2426. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2427. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2428. </fo:block>
  2429. </xsl:template>
  2430. <xsl:template match="author" mode="sect2.titlepage.recto.auto.mode">
  2431. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2432. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2433. </fo:block>
  2434. </xsl:template>
  2435. <xsl:template match="othercredit" mode="sect2.titlepage.recto.auto.mode">
  2436. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2437. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2438. </fo:block>
  2439. </xsl:template>
  2440. <xsl:template match="releaseinfo" mode="sect2.titlepage.recto.auto.mode">
  2441. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2442. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2443. </fo:block>
  2444. </xsl:template>
  2445. <xsl:template match="copyright" mode="sect2.titlepage.recto.auto.mode">
  2446. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2447. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2448. </fo:block>
  2449. </xsl:template>
  2450. <xsl:template match="legalnotice" mode="sect2.titlepage.recto.auto.mode">
  2451. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2452. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2453. </fo:block>
  2454. </xsl:template>
  2455. <xsl:template match="pubdate" mode="sect2.titlepage.recto.auto.mode">
  2456. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2457. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2458. </fo:block>
  2459. </xsl:template>
  2460. <xsl:template match="revision" mode="sect2.titlepage.recto.auto.mode">
  2461. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2462. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2463. </fo:block>
  2464. </xsl:template>
  2465. <xsl:template match="revhistory" mode="sect2.titlepage.recto.auto.mode">
  2466. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2467. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2468. </fo:block>
  2469. </xsl:template>
  2470. <xsl:template match="abstract" mode="sect2.titlepage.recto.auto.mode">
  2471. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2472. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2473. </fo:block>
  2474. </xsl:template>
  2475. <xsl:template name="sect3.titlepage.recto">
  2476. <xsl:choose>
  2477. <xsl:when test="sect3info/title">
  2478. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/title"/>
  2479. </xsl:when>
  2480. <xsl:when test="info/title">
  2481. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/title"/>
  2482. </xsl:when>
  2483. <xsl:when test="title">
  2484. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="title"/>
  2485. </xsl:when>
  2486. </xsl:choose>
  2487. <xsl:choose>
  2488. <xsl:when test="sect3info/subtitle">
  2489. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/subtitle"/>
  2490. </xsl:when>
  2491. <xsl:when test="info/subtitle">
  2492. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/subtitle"/>
  2493. </xsl:when>
  2494. <xsl:when test="subtitle">
  2495. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="subtitle"/>
  2496. </xsl:when>
  2497. </xsl:choose>
  2498. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/corpauthor"/>
  2499. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2500. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/authorgroup"/>
  2501. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2502. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/author"/>
  2503. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/author"/>
  2504. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/othercredit"/>
  2505. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/othercredit"/>
  2506. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/releaseinfo"/>
  2507. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2508. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/copyright"/>
  2509. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/copyright"/>
  2510. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/legalnotice"/>
  2511. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2512. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/pubdate"/>
  2513. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/pubdate"/>
  2514. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revision"/>
  2515. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revision"/>
  2516. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revhistory"/>
  2517. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revhistory"/>
  2518. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/abstract"/>
  2519. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/abstract"/>
  2520. </xsl:template>
  2521. <xsl:template name="sect3.titlepage.verso">
  2522. </xsl:template>
  2523. <xsl:template name="sect3.titlepage.separator">
  2524. </xsl:template>
  2525. <xsl:template name="sect3.titlepage.before.recto">
  2526. </xsl:template>
  2527. <xsl:template name="sect3.titlepage.before.verso">
  2528. </xsl:template>
  2529. <xsl:template name="sect3.titlepage">
  2530. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2531. <xsl:variable name="recto.content">
  2532. <xsl:call-template name="sect3.titlepage.before.recto"/>
  2533. <xsl:call-template name="sect3.titlepage.recto"/>
  2534. </xsl:variable>
  2535. <xsl:variable name="recto.elements.count">
  2536. <xsl:choose>
  2537. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2538. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2539. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2540. <xsl:otherwise>1</xsl:otherwise>
  2541. </xsl:choose>
  2542. </xsl:variable>
  2543. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2544. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2545. </xsl:if>
  2546. <xsl:variable name="verso.content">
  2547. <xsl:call-template name="sect3.titlepage.before.verso"/>
  2548. <xsl:call-template name="sect3.titlepage.verso"/>
  2549. </xsl:variable>
  2550. <xsl:variable name="verso.elements.count">
  2551. <xsl:choose>
  2552. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2553. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2554. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2555. <xsl:otherwise>1</xsl:otherwise>
  2556. </xsl:choose>
  2557. </xsl:variable>
  2558. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2559. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2560. </xsl:if>
  2561. <xsl:call-template name="sect3.titlepage.separator"/>
  2562. </fo:block>
  2563. </xsl:template>
  2564. <xsl:template match="*" mode="sect3.titlepage.recto.mode">
  2565. <!-- if an element isn't found in this mode, -->
  2566. <!-- try the generic titlepage.mode -->
  2567. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2568. </xsl:template>
  2569. <xsl:template match="*" mode="sect3.titlepage.verso.mode">
  2570. <!-- if an element isn't found in this mode, -->
  2571. <!-- try the generic titlepage.mode -->
  2572. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2573. </xsl:template>
  2574. <xsl:template match="title" mode="sect3.titlepage.recto.auto.mode">
  2575. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
  2576. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2577. </fo:block>
  2578. </xsl:template>
  2579. <xsl:template match="subtitle" mode="sect3.titlepage.recto.auto.mode">
  2580. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style" font-family="{$title.fontset}">
  2581. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2582. </fo:block>
  2583. </xsl:template>
  2584. <xsl:template match="corpauthor" mode="sect3.titlepage.recto.auto.mode">
  2585. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2586. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2587. </fo:block>
  2588. </xsl:template>
  2589. <xsl:template match="authorgroup" mode="sect3.titlepage.recto.auto.mode">
  2590. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2591. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2592. </fo:block>
  2593. </xsl:template>
  2594. <xsl:template match="author" mode="sect3.titlepage.recto.auto.mode">
  2595. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2596. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2597. </fo:block>
  2598. </xsl:template>
  2599. <xsl:template match="othercredit" mode="sect3.titlepage.recto.auto.mode">
  2600. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2601. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2602. </fo:block>
  2603. </xsl:template>
  2604. <xsl:template match="releaseinfo" mode="sect3.titlepage.recto.auto.mode">
  2605. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2606. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2607. </fo:block>
  2608. </xsl:template>
  2609. <xsl:template match="copyright" mode="sect3.titlepage.recto.auto.mode">
  2610. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2611. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2612. </fo:block>
  2613. </xsl:template>
  2614. <xsl:template match="legalnotice" mode="sect3.titlepage.recto.auto.mode">
  2615. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2616. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2617. </fo:block>
  2618. </xsl:template>
  2619. <xsl:template match="pubdate" mode="sect3.titlepage.recto.auto.mode">
  2620. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2621. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2622. </fo:block>
  2623. </xsl:template>
  2624. <xsl:template match="revision" mode="sect3.titlepage.recto.auto.mode">
  2625. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2626. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2627. </fo:block>
  2628. </xsl:template>
  2629. <xsl:template match="revhistory" mode="sect3.titlepage.recto.auto.mode">
  2630. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2631. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2632. </fo:block>
  2633. </xsl:template>
  2634. <xsl:template match="abstract" mode="sect3.titlepage.recto.auto.mode">
  2635. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2636. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2637. </fo:block>
  2638. </xsl:template>
  2639. <xsl:template name="sect4.titlepage.recto">
  2640. <xsl:choose>
  2641. <xsl:when test="sect4info/title">
  2642. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/title"/>
  2643. </xsl:when>
  2644. <xsl:when test="info/title">
  2645. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/title"/>
  2646. </xsl:when>
  2647. <xsl:when test="title">
  2648. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="title"/>
  2649. </xsl:when>
  2650. </xsl:choose>
  2651. <xsl:choose>
  2652. <xsl:when test="sect4info/subtitle">
  2653. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/subtitle"/>
  2654. </xsl:when>
  2655. <xsl:when test="info/subtitle">
  2656. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/subtitle"/>
  2657. </xsl:when>
  2658. <xsl:when test="subtitle">
  2659. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="subtitle"/>
  2660. </xsl:when>
  2661. </xsl:choose>
  2662. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/corpauthor"/>
  2663. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2664. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/authorgroup"/>
  2665. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2666. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/author"/>
  2667. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/author"/>
  2668. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/othercredit"/>
  2669. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/othercredit"/>
  2670. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/releaseinfo"/>
  2671. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2672. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/copyright"/>
  2673. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/copyright"/>
  2674. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/legalnotice"/>
  2675. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2676. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/pubdate"/>
  2677. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/pubdate"/>
  2678. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revision"/>
  2679. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revision"/>
  2680. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revhistory"/>
  2681. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revhistory"/>
  2682. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/abstract"/>
  2683. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/abstract"/>
  2684. </xsl:template>
  2685. <xsl:template name="sect4.titlepage.verso">
  2686. </xsl:template>
  2687. <xsl:template name="sect4.titlepage.separator">
  2688. </xsl:template>
  2689. <xsl:template name="sect4.titlepage.before.recto">
  2690. </xsl:template>
  2691. <xsl:template name="sect4.titlepage.before.verso">
  2692. </xsl:template>
  2693. <xsl:template name="sect4.titlepage">
  2694. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2695. <xsl:variable name="recto.content">
  2696. <xsl:call-template name="sect4.titlepage.before.recto"/>
  2697. <xsl:call-template name="sect4.titlepage.recto"/>
  2698. </xsl:variable>
  2699. <xsl:variable name="recto.elements.count">
  2700. <xsl:choose>
  2701. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2702. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2703. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2704. <xsl:otherwise>1</xsl:otherwise>
  2705. </xsl:choose>
  2706. </xsl:variable>
  2707. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2708. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2709. </xsl:if>
  2710. <xsl:variable name="verso.content">
  2711. <xsl:call-template name="sect4.titlepage.before.verso"/>
  2712. <xsl:call-template name="sect4.titlepage.verso"/>
  2713. </xsl:variable>
  2714. <xsl:variable name="verso.elements.count">
  2715. <xsl:choose>
  2716. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2717. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2718. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2719. <xsl:otherwise>1</xsl:otherwise>
  2720. </xsl:choose>
  2721. </xsl:variable>
  2722. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2723. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2724. </xsl:if>
  2725. <xsl:call-template name="sect4.titlepage.separator"/>
  2726. </fo:block>
  2727. </xsl:template>
  2728. <xsl:template match="*" mode="sect4.titlepage.recto.mode">
  2729. <!-- if an element isn't found in this mode, -->
  2730. <!-- try the generic titlepage.mode -->
  2731. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2732. </xsl:template>
  2733. <xsl:template match="*" mode="sect4.titlepage.verso.mode">
  2734. <!-- if an element isn't found in this mode, -->
  2735. <!-- try the generic titlepage.mode -->
  2736. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2737. </xsl:template>
  2738. <xsl:template match="title" mode="sect4.titlepage.recto.auto.mode">
  2739. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
  2740. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2741. </fo:block>
  2742. </xsl:template>
  2743. <xsl:template match="subtitle" mode="sect4.titlepage.recto.auto.mode">
  2744. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style" font-family="{$title.fontset}">
  2745. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2746. </fo:block>
  2747. </xsl:template>
  2748. <xsl:template match="corpauthor" mode="sect4.titlepage.recto.auto.mode">
  2749. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2750. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2751. </fo:block>
  2752. </xsl:template>
  2753. <xsl:template match="authorgroup" mode="sect4.titlepage.recto.auto.mode">
  2754. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2755. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2756. </fo:block>
  2757. </xsl:template>
  2758. <xsl:template match="author" mode="sect4.titlepage.recto.auto.mode">
  2759. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2760. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2761. </fo:block>
  2762. </xsl:template>
  2763. <xsl:template match="othercredit" mode="sect4.titlepage.recto.auto.mode">
  2764. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2765. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2766. </fo:block>
  2767. </xsl:template>
  2768. <xsl:template match="releaseinfo" mode="sect4.titlepage.recto.auto.mode">
  2769. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2770. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2771. </fo:block>
  2772. </xsl:template>
  2773. <xsl:template match="copyright" mode="sect4.titlepage.recto.auto.mode">
  2774. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2775. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2776. </fo:block>
  2777. </xsl:template>
  2778. <xsl:template match="legalnotice" mode="sect4.titlepage.recto.auto.mode">
  2779. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2780. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2781. </fo:block>
  2782. </xsl:template>
  2783. <xsl:template match="pubdate" mode="sect4.titlepage.recto.auto.mode">
  2784. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2785. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2786. </fo:block>
  2787. </xsl:template>
  2788. <xsl:template match="revision" mode="sect4.titlepage.recto.auto.mode">
  2789. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2790. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2791. </fo:block>
  2792. </xsl:template>
  2793. <xsl:template match="revhistory" mode="sect4.titlepage.recto.auto.mode">
  2794. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2795. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2796. </fo:block>
  2797. </xsl:template>
  2798. <xsl:template match="abstract" mode="sect4.titlepage.recto.auto.mode">
  2799. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2800. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2801. </fo:block>
  2802. </xsl:template>
  2803. <xsl:template name="sect5.titlepage.recto">
  2804. <xsl:choose>
  2805. <xsl:when test="sect5info/title">
  2806. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/title"/>
  2807. </xsl:when>
  2808. <xsl:when test="info/title">
  2809. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/title"/>
  2810. </xsl:when>
  2811. <xsl:when test="title">
  2812. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="title"/>
  2813. </xsl:when>
  2814. </xsl:choose>
  2815. <xsl:choose>
  2816. <xsl:when test="sect5info/subtitle">
  2817. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/subtitle"/>
  2818. </xsl:when>
  2819. <xsl:when test="info/subtitle">
  2820. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/subtitle"/>
  2821. </xsl:when>
  2822. <xsl:when test="subtitle">
  2823. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="subtitle"/>
  2824. </xsl:when>
  2825. </xsl:choose>
  2826. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/corpauthor"/>
  2827. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2828. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/authorgroup"/>
  2829. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2830. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/author"/>
  2831. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/author"/>
  2832. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/othercredit"/>
  2833. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/othercredit"/>
  2834. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/releaseinfo"/>
  2835. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2836. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/copyright"/>
  2837. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/copyright"/>
  2838. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/legalnotice"/>
  2839. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2840. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/pubdate"/>
  2841. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/pubdate"/>
  2842. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revision"/>
  2843. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revision"/>
  2844. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revhistory"/>
  2845. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revhistory"/>
  2846. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/abstract"/>
  2847. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/abstract"/>
  2848. </xsl:template>
  2849. <xsl:template name="sect5.titlepage.verso">
  2850. </xsl:template>
  2851. <xsl:template name="sect5.titlepage.separator">
  2852. </xsl:template>
  2853. <xsl:template name="sect5.titlepage.before.recto">
  2854. </xsl:template>
  2855. <xsl:template name="sect5.titlepage.before.verso">
  2856. </xsl:template>
  2857. <xsl:template name="sect5.titlepage">
  2858. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2859. <xsl:variable name="recto.content">
  2860. <xsl:call-template name="sect5.titlepage.before.recto"/>
  2861. <xsl:call-template name="sect5.titlepage.recto"/>
  2862. </xsl:variable>
  2863. <xsl:variable name="recto.elements.count">
  2864. <xsl:choose>
  2865. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2866. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2867. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2868. <xsl:otherwise>1</xsl:otherwise>
  2869. </xsl:choose>
  2870. </xsl:variable>
  2871. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2872. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2873. </xsl:if>
  2874. <xsl:variable name="verso.content">
  2875. <xsl:call-template name="sect5.titlepage.before.verso"/>
  2876. <xsl:call-template name="sect5.titlepage.verso"/>
  2877. </xsl:variable>
  2878. <xsl:variable name="verso.elements.count">
  2879. <xsl:choose>
  2880. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2881. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2882. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2883. <xsl:otherwise>1</xsl:otherwise>
  2884. </xsl:choose>
  2885. </xsl:variable>
  2886. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2887. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2888. </xsl:if>
  2889. <xsl:call-template name="sect5.titlepage.separator"/>
  2890. </fo:block>
  2891. </xsl:template>
  2892. <xsl:template match="*" mode="sect5.titlepage.recto.mode">
  2893. <!-- if an element isn't found in this mode, -->
  2894. <!-- try the generic titlepage.mode -->
  2895. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2896. </xsl:template>
  2897. <xsl:template match="*" mode="sect5.titlepage.verso.mode">
  2898. <!-- if an element isn't found in this mode, -->
  2899. <!-- try the generic titlepage.mode -->
  2900. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2901. </xsl:template>
  2902. <xsl:template match="title" mode="sect5.titlepage.recto.auto.mode">
  2903. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
  2904. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2905. </fo:block>
  2906. </xsl:template>
  2907. <xsl:template match="subtitle" mode="sect5.titlepage.recto.auto.mode">
  2908. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style" font-family="{$title.fontset}">
  2909. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2910. </fo:block>
  2911. </xsl:template>
  2912. <xsl:template match="corpauthor" mode="sect5.titlepage.recto.auto.mode">
  2913. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2914. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2915. </fo:block>
  2916. </xsl:template>
  2917. <xsl:template match="authorgroup" mode="sect5.titlepage.recto.auto.mode">
  2918. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2919. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2920. </fo:block>
  2921. </xsl:template>
  2922. <xsl:template match="author" mode="sect5.titlepage.recto.auto.mode">
  2923. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2924. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2925. </fo:block>
  2926. </xsl:template>
  2927. <xsl:template match="othercredit" mode="sect5.titlepage.recto.auto.mode">
  2928. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2929. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2930. </fo:block>
  2931. </xsl:template>
  2932. <xsl:template match="releaseinfo" mode="sect5.titlepage.recto.auto.mode">
  2933. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2934. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2935. </fo:block>
  2936. </xsl:template>
  2937. <xsl:template match="copyright" mode="sect5.titlepage.recto.auto.mode">
  2938. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2939. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2940. </fo:block>
  2941. </xsl:template>
  2942. <xsl:template match="legalnotice" mode="sect5.titlepage.recto.auto.mode">
  2943. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2944. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2945. </fo:block>
  2946. </xsl:template>
  2947. <xsl:template match="pubdate" mode="sect5.titlepage.recto.auto.mode">
  2948. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2949. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2950. </fo:block>
  2951. </xsl:template>
  2952. <xsl:template match="revision" mode="sect5.titlepage.recto.auto.mode">
  2953. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2954. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2955. </fo:block>
  2956. </xsl:template>
  2957. <xsl:template match="revhistory" mode="sect5.titlepage.recto.auto.mode">
  2958. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2959. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2960. </fo:block>
  2961. </xsl:template>
  2962. <xsl:template match="abstract" mode="sect5.titlepage.recto.auto.mode">
  2963. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2964. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2965. </fo:block>
  2966. </xsl:template>
  2967. <xsl:template name="simplesect.titlepage.recto">
  2968. <xsl:choose>
  2969. <xsl:when test="simplesectinfo/title">
  2970. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/title"/>
  2971. </xsl:when>
  2972. <xsl:when test="docinfo/title">
  2973. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/title"/>
  2974. </xsl:when>
  2975. <xsl:when test="info/title">
  2976. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/title"/>
  2977. </xsl:when>
  2978. <xsl:when test="title">
  2979. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="title"/>
  2980. </xsl:when>
  2981. </xsl:choose>
  2982. <xsl:choose>
  2983. <xsl:when test="simplesectinfo/subtitle">
  2984. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/subtitle"/>
  2985. </xsl:when>
  2986. <xsl:when test="docinfo/subtitle">
  2987. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  2988. </xsl:when>
  2989. <xsl:when test="info/subtitle">
  2990. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/subtitle"/>
  2991. </xsl:when>
  2992. <xsl:when test="subtitle">
  2993. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="subtitle"/>
  2994. </xsl:when>
  2995. </xsl:choose>
  2996. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/corpauthor"/>
  2997. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  2998. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2999. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/authorgroup"/>
  3000. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  3001. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/authorgroup"/>
  3002. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/author"/>
  3003. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/author"/>
  3004. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/author"/>
  3005. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/othercredit"/>
  3006. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  3007. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/othercredit"/>
  3008. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/releaseinfo"/>
  3009. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  3010. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  3011. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/copyright"/>
  3012. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  3013. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/copyright"/>
  3014. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/legalnotice"/>
  3015. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  3016. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/legalnotice"/>
  3017. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/pubdate"/>
  3018. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  3019. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/pubdate"/>
  3020. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revision"/>
  3021. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revision"/>
  3022. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revision"/>
  3023. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revhistory"/>
  3024. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  3025. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revhistory"/>
  3026. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/abstract"/>
  3027. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  3028. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/abstract"/>
  3029. </xsl:template>
  3030. <xsl:template name="simplesect.titlepage.verso">
  3031. </xsl:template>
  3032. <xsl:template name="simplesect.titlepage.separator">
  3033. </xsl:template>
  3034. <xsl:template name="simplesect.titlepage.before.recto">
  3035. </xsl:template>
  3036. <xsl:template name="simplesect.titlepage.before.verso">
  3037. </xsl:template>
  3038. <xsl:template name="simplesect.titlepage">
  3039. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3040. <xsl:variable name="recto.content">
  3041. <xsl:call-template name="simplesect.titlepage.before.recto"/>
  3042. <xsl:call-template name="simplesect.titlepage.recto"/>
  3043. </xsl:variable>
  3044. <xsl:variable name="recto.elements.count">
  3045. <xsl:choose>
  3046. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3047. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3048. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3049. <xsl:otherwise>1</xsl:otherwise>
  3050. </xsl:choose>
  3051. </xsl:variable>
  3052. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3053. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3054. </xsl:if>
  3055. <xsl:variable name="verso.content">
  3056. <xsl:call-template name="simplesect.titlepage.before.verso"/>
  3057. <xsl:call-template name="simplesect.titlepage.verso"/>
  3058. </xsl:variable>
  3059. <xsl:variable name="verso.elements.count">
  3060. <xsl:choose>
  3061. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3062. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3063. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3064. <xsl:otherwise>1</xsl:otherwise>
  3065. </xsl:choose>
  3066. </xsl:variable>
  3067. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3068. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3069. </xsl:if>
  3070. <xsl:call-template name="simplesect.titlepage.separator"/>
  3071. </fo:block>
  3072. </xsl:template>
  3073. <xsl:template match="*" mode="simplesect.titlepage.recto.mode">
  3074. <!-- if an element isn't found in this mode, -->
  3075. <!-- try the generic titlepage.mode -->
  3076. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3077. </xsl:template>
  3078. <xsl:template match="*" mode="simplesect.titlepage.verso.mode">
  3079. <!-- if an element isn't found in this mode, -->
  3080. <!-- try the generic titlepage.mode -->
  3081. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3082. </xsl:template>
  3083. <xsl:template match="title" mode="simplesect.titlepage.recto.auto.mode">
  3084. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
  3085. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3086. </fo:block>
  3087. </xsl:template>
  3088. <xsl:template match="subtitle" mode="simplesect.titlepage.recto.auto.mode">
  3089. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style" font-family="{$title.fontset}">
  3090. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3091. </fo:block>
  3092. </xsl:template>
  3093. <xsl:template match="corpauthor" mode="simplesect.titlepage.recto.auto.mode">
  3094. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3095. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3096. </fo:block>
  3097. </xsl:template>
  3098. <xsl:template match="authorgroup" mode="simplesect.titlepage.recto.auto.mode">
  3099. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3100. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3101. </fo:block>
  3102. </xsl:template>
  3103. <xsl:template match="author" mode="simplesect.titlepage.recto.auto.mode">
  3104. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3105. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3106. </fo:block>
  3107. </xsl:template>
  3108. <xsl:template match="othercredit" mode="simplesect.titlepage.recto.auto.mode">
  3109. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3110. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3111. </fo:block>
  3112. </xsl:template>
  3113. <xsl:template match="releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
  3114. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3115. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3116. </fo:block>
  3117. </xsl:template>
  3118. <xsl:template match="copyright" mode="simplesect.titlepage.recto.auto.mode">
  3119. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3120. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3121. </fo:block>
  3122. </xsl:template>
  3123. <xsl:template match="legalnotice" mode="simplesect.titlepage.recto.auto.mode">
  3124. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3125. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3126. </fo:block>
  3127. </xsl:template>
  3128. <xsl:template match="pubdate" mode="simplesect.titlepage.recto.auto.mode">
  3129. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3130. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3131. </fo:block>
  3132. </xsl:template>
  3133. <xsl:template match="revision" mode="simplesect.titlepage.recto.auto.mode">
  3134. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3135. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3136. </fo:block>
  3137. </xsl:template>
  3138. <xsl:template match="revhistory" mode="simplesect.titlepage.recto.auto.mode">
  3139. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3140. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3141. </fo:block>
  3142. </xsl:template>
  3143. <xsl:template match="abstract" mode="simplesect.titlepage.recto.auto.mode">
  3144. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3145. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3146. </fo:block>
  3147. </xsl:template>
  3148. <xsl:template name="bibliography.titlepage.recto">
  3149. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
  3150. <xsl:call-template name="component.title">
  3151. <xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/>
  3152. </xsl:call-template></fo:block>
  3153. <xsl:choose>
  3154. <xsl:when test="bibliographyinfo/subtitle">
  3155. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/subtitle"/>
  3156. </xsl:when>
  3157. <xsl:when test="docinfo/subtitle">
  3158. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3159. </xsl:when>
  3160. <xsl:when test="info/subtitle">
  3161. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/subtitle"/>
  3162. </xsl:when>
  3163. <xsl:when test="subtitle">
  3164. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="subtitle"/>
  3165. </xsl:when>
  3166. </xsl:choose>
  3167. </xsl:template>
  3168. <xsl:template name="bibliography.titlepage.verso">
  3169. </xsl:template>
  3170. <xsl:template name="bibliography.titlepage.separator">
  3171. </xsl:template>
  3172. <xsl:template name="bibliography.titlepage.before.recto">
  3173. </xsl:template>
  3174. <xsl:template name="bibliography.titlepage.before.verso">
  3175. </xsl:template>
  3176. <xsl:template name="bibliography.titlepage">
  3177. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3178. <xsl:variable name="recto.content">
  3179. <xsl:call-template name="bibliography.titlepage.before.recto"/>
  3180. <xsl:call-template name="bibliography.titlepage.recto"/>
  3181. </xsl:variable>
  3182. <xsl:variable name="recto.elements.count">
  3183. <xsl:choose>
  3184. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3185. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3186. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3187. <xsl:otherwise>1</xsl:otherwise>
  3188. </xsl:choose>
  3189. </xsl:variable>
  3190. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3191. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3192. </xsl:if>
  3193. <xsl:variable name="verso.content">
  3194. <xsl:call-template name="bibliography.titlepage.before.verso"/>
  3195. <xsl:call-template name="bibliography.titlepage.verso"/>
  3196. </xsl:variable>
  3197. <xsl:variable name="verso.elements.count">
  3198. <xsl:choose>
  3199. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3200. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3201. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3202. <xsl:otherwise>1</xsl:otherwise>
  3203. </xsl:choose>
  3204. </xsl:variable>
  3205. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3206. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3207. </xsl:if>
  3208. <xsl:call-template name="bibliography.titlepage.separator"/>
  3209. </fo:block>
  3210. </xsl:template>
  3211. <xsl:template match="*" mode="bibliography.titlepage.recto.mode">
  3212. <!-- if an element isn't found in this mode, -->
  3213. <!-- try the generic titlepage.mode -->
  3214. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3215. </xsl:template>
  3216. <xsl:template match="*" mode="bibliography.titlepage.verso.mode">
  3217. <!-- if an element isn't found in this mode, -->
  3218. <!-- try the generic titlepage.mode -->
  3219. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3220. </xsl:template>
  3221. <xsl:template match="subtitle" mode="bibliography.titlepage.recto.auto.mode">
  3222. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" font-family="{$title.fontset}">
  3223. <xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
  3224. </fo:block>
  3225. </xsl:template>
  3226. <xsl:template name="bibliodiv.titlepage.recto">
  3227. <xsl:choose>
  3228. <xsl:when test="bibliodivinfo/title">
  3229. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/title"/>
  3230. </xsl:when>
  3231. <xsl:when test="docinfo/title">
  3232. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/title"/>
  3233. </xsl:when>
  3234. <xsl:when test="info/title">
  3235. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/title"/>
  3236. </xsl:when>
  3237. <xsl:when test="title">
  3238. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="title"/>
  3239. </xsl:when>
  3240. </xsl:choose>
  3241. <xsl:choose>
  3242. <xsl:when test="bibliodivinfo/subtitle">
  3243. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/subtitle"/>
  3244. </xsl:when>
  3245. <xsl:when test="docinfo/subtitle">
  3246. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3247. </xsl:when>
  3248. <xsl:when test="info/subtitle">
  3249. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/subtitle"/>
  3250. </xsl:when>
  3251. <xsl:when test="subtitle">
  3252. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="subtitle"/>
  3253. </xsl:when>
  3254. </xsl:choose>
  3255. </xsl:template>
  3256. <xsl:template name="bibliodiv.titlepage.verso">
  3257. </xsl:template>
  3258. <xsl:template name="bibliodiv.titlepage.separator">
  3259. </xsl:template>
  3260. <xsl:template name="bibliodiv.titlepage.before.recto">
  3261. </xsl:template>
  3262. <xsl:template name="bibliodiv.titlepage.before.verso">
  3263. </xsl:template>
  3264. <xsl:template name="bibliodiv.titlepage">
  3265. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3266. <xsl:variable name="recto.content">
  3267. <xsl:call-template name="bibliodiv.titlepage.before.recto"/>
  3268. <xsl:call-template name="bibliodiv.titlepage.recto"/>
  3269. </xsl:variable>
  3270. <xsl:variable name="recto.elements.count">
  3271. <xsl:choose>
  3272. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3273. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3274. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3275. <xsl:otherwise>1</xsl:otherwise>
  3276. </xsl:choose>
  3277. </xsl:variable>
  3278. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3279. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3280. </xsl:if>
  3281. <xsl:variable name="verso.content">
  3282. <xsl:call-template name="bibliodiv.titlepage.before.verso"/>
  3283. <xsl:call-template name="bibliodiv.titlepage.verso"/>
  3284. </xsl:variable>
  3285. <xsl:variable name="verso.elements.count">
  3286. <xsl:choose>
  3287. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3288. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3289. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3290. <xsl:otherwise>1</xsl:otherwise>
  3291. </xsl:choose>
  3292. </xsl:variable>
  3293. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3294. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3295. </xsl:if>
  3296. <xsl:call-template name="bibliodiv.titlepage.separator"/>
  3297. </fo:block>
  3298. </xsl:template>
  3299. <xsl:template match="*" mode="bibliodiv.titlepage.recto.mode">
  3300. <!-- if an element isn't found in this mode, -->
  3301. <!-- try the generic titlepage.mode -->
  3302. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3303. </xsl:template>
  3304. <xsl:template match="*" mode="bibliodiv.titlepage.verso.mode">
  3305. <!-- if an element isn't found in this mode, -->
  3306. <!-- try the generic titlepage.mode -->
  3307. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3308. </xsl:template>
  3309. <xsl:template match="title" mode="bibliodiv.titlepage.recto.auto.mode">
  3310. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.fontset}" font-weight="bold">
  3311. <xsl:call-template name="component.title">
  3312. <xsl:with-param name="node" select="ancestor-or-self::bibliodiv[1]"/>
  3313. </xsl:call-template>
  3314. </fo:block>
  3315. </xsl:template>
  3316. <xsl:template match="subtitle" mode="bibliodiv.titlepage.recto.auto.mode">
  3317. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" font-family="{$title.fontset}">
  3318. <xsl:apply-templates select="." mode="bibliodiv.titlepage.recto.mode"/>
  3319. </fo:block>
  3320. </xsl:template>
  3321. <xsl:template name="glossary.titlepage.recto">
  3322. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
  3323. <xsl:call-template name="component.title">
  3324. <xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/>
  3325. </xsl:call-template></fo:block>
  3326. <xsl:choose>
  3327. <xsl:when test="glossaryinfo/subtitle">
  3328. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/subtitle"/>
  3329. </xsl:when>
  3330. <xsl:when test="docinfo/subtitle">
  3331. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3332. </xsl:when>
  3333. <xsl:when test="info/subtitle">
  3334. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/subtitle"/>
  3335. </xsl:when>
  3336. <xsl:when test="subtitle">
  3337. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="subtitle"/>
  3338. </xsl:when>
  3339. </xsl:choose>
  3340. </xsl:template>
  3341. <xsl:template name="glossary.titlepage.verso">
  3342. </xsl:template>
  3343. <xsl:template name="glossary.titlepage.separator">
  3344. </xsl:template>
  3345. <xsl:template name="glossary.titlepage.before.recto">
  3346. </xsl:template>
  3347. <xsl:template name="glossary.titlepage.before.verso">
  3348. </xsl:template>
  3349. <xsl:template name="glossary.titlepage">
  3350. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3351. <xsl:variable name="recto.content">
  3352. <xsl:call-template name="glossary.titlepage.before.recto"/>
  3353. <xsl:call-template name="glossary.titlepage.recto"/>
  3354. </xsl:variable>
  3355. <xsl:variable name="recto.elements.count">
  3356. <xsl:choose>
  3357. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3358. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3359. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3360. <xsl:otherwise>1</xsl:otherwise>
  3361. </xsl:choose>
  3362. </xsl:variable>
  3363. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3364. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3365. </xsl:if>
  3366. <xsl:variable name="verso.content">
  3367. <xsl:call-template name="glossary.titlepage.before.verso"/>
  3368. <xsl:call-template name="glossary.titlepage.verso"/>
  3369. </xsl:variable>
  3370. <xsl:variable name="verso.elements.count">
  3371. <xsl:choose>
  3372. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3373. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3374. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3375. <xsl:otherwise>1</xsl:otherwise>
  3376. </xsl:choose>
  3377. </xsl:variable>
  3378. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3379. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3380. </xsl:if>
  3381. <xsl:call-template name="glossary.titlepage.separator"/>
  3382. </fo:block>
  3383. </xsl:template>
  3384. <xsl:template match="*" mode="glossary.titlepage.recto.mode">
  3385. <!-- if an element isn't found in this mode, -->
  3386. <!-- try the generic titlepage.mode -->
  3387. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3388. </xsl:template>
  3389. <xsl:template match="*" mode="glossary.titlepage.verso.mode">
  3390. <!-- if an element isn't found in this mode, -->
  3391. <!-- try the generic titlepage.mode -->
  3392. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3393. </xsl:template>
  3394. <xsl:template match="subtitle" mode="glossary.titlepage.recto.auto.mode">
  3395. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" font-family="{$title.fontset}">
  3396. <xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
  3397. </fo:block>
  3398. </xsl:template>
  3399. <xsl:template name="glossdiv.titlepage.recto">
  3400. <xsl:choose>
  3401. <xsl:when test="glossdivinfo/title">
  3402. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/title"/>
  3403. </xsl:when>
  3404. <xsl:when test="docinfo/title">
  3405. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
  3406. </xsl:when>
  3407. <xsl:when test="info/title">
  3408. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/title"/>
  3409. </xsl:when>
  3410. <xsl:when test="title">
  3411. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="title"/>
  3412. </xsl:when>
  3413. </xsl:choose>
  3414. <xsl:choose>
  3415. <xsl:when test="glossdivinfo/subtitle">
  3416. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/subtitle"/>
  3417. </xsl:when>
  3418. <xsl:when test="docinfo/subtitle">
  3419. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3420. </xsl:when>
  3421. <xsl:when test="info/subtitle">
  3422. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
  3423. </xsl:when>
  3424. <xsl:when test="subtitle">
  3425. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="subtitle"/>
  3426. </xsl:when>
  3427. </xsl:choose>
  3428. </xsl:template>
  3429. <xsl:template name="glossdiv.titlepage.verso">
  3430. </xsl:template>
  3431. <xsl:template name="glossdiv.titlepage.separator">
  3432. </xsl:template>
  3433. <xsl:template name="glossdiv.titlepage.before.recto">
  3434. </xsl:template>
  3435. <xsl:template name="glossdiv.titlepage.before.verso">
  3436. </xsl:template>
  3437. <xsl:template name="glossdiv.titlepage">
  3438. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3439. <xsl:variable name="recto.content">
  3440. <xsl:call-template name="glossdiv.titlepage.before.recto"/>
  3441. <xsl:call-template name="glossdiv.titlepage.recto"/>
  3442. </xsl:variable>
  3443. <xsl:variable name="recto.elements.count">
  3444. <xsl:choose>
  3445. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3446. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3447. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3448. <xsl:otherwise>1</xsl:otherwise>
  3449. </xsl:choose>
  3450. </xsl:variable>
  3451. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3452. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3453. </xsl:if>
  3454. <xsl:variable name="verso.content">
  3455. <xsl:call-template name="glossdiv.titlepage.before.verso"/>
  3456. <xsl:call-template name="glossdiv.titlepage.verso"/>
  3457. </xsl:variable>
  3458. <xsl:variable name="verso.elements.count">
  3459. <xsl:choose>
  3460. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3461. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3462. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3463. <xsl:otherwise>1</xsl:otherwise>
  3464. </xsl:choose>
  3465. </xsl:variable>
  3466. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3467. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3468. </xsl:if>
  3469. <xsl:call-template name="glossdiv.titlepage.separator"/>
  3470. </fo:block>
  3471. </xsl:template>
  3472. <xsl:template match="*" mode="glossdiv.titlepage.recto.mode">
  3473. <!-- if an element isn't found in this mode, -->
  3474. <!-- try the generic titlepage.mode -->
  3475. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3476. </xsl:template>
  3477. <xsl:template match="*" mode="glossdiv.titlepage.verso.mode">
  3478. <!-- if an element isn't found in this mode, -->
  3479. <!-- try the generic titlepage.mode -->
  3480. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3481. </xsl:template>
  3482. <xsl:template match="title" mode="glossdiv.titlepage.recto.auto.mode">
  3483. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.fontset}" font-weight="bold">
  3484. <xsl:call-template name="component.title">
  3485. <xsl:with-param name="node" select="ancestor-or-self::glossdiv[1]"/>
  3486. </xsl:call-template>
  3487. </fo:block>
  3488. </xsl:template>
  3489. <xsl:template match="subtitle" mode="glossdiv.titlepage.recto.auto.mode">
  3490. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" font-family="{$title.fontset}">
  3491. <xsl:apply-templates select="." mode="glossdiv.titlepage.recto.mode"/>
  3492. </fo:block>
  3493. </xsl:template>
  3494. <xsl:template name="index.titlepage.recto">
  3495. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" margin-left="0pt" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
  3496. <xsl:call-template name="component.title">
  3497. <xsl:with-param name="node" select="ancestor-or-self::index[1]"/>
  3498. <xsl:with-param name="pagewide" select="1"/>
  3499. </xsl:call-template></fo:block>
  3500. <xsl:choose>
  3501. <xsl:when test="indexinfo/subtitle">
  3502. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/>
  3503. </xsl:when>
  3504. <xsl:when test="docinfo/subtitle">
  3505. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3506. </xsl:when>
  3507. <xsl:when test="info/subtitle">
  3508. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/>
  3509. </xsl:when>
  3510. <xsl:when test="subtitle">
  3511. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/>
  3512. </xsl:when>
  3513. </xsl:choose>
  3514. </xsl:template>
  3515. <xsl:template name="index.titlepage.verso">
  3516. </xsl:template>
  3517. <xsl:template name="index.titlepage.separator">
  3518. </xsl:template>
  3519. <xsl:template name="index.titlepage.before.recto">
  3520. </xsl:template>
  3521. <xsl:template name="index.titlepage.before.verso">
  3522. </xsl:template>
  3523. <xsl:template name="index.titlepage">
  3524. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3525. <xsl:variable name="recto.content">
  3526. <xsl:call-template name="index.titlepage.before.recto"/>
  3527. <xsl:call-template name="index.titlepage.recto"/>
  3528. </xsl:variable>
  3529. <xsl:variable name="recto.elements.count">
  3530. <xsl:choose>
  3531. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3532. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3533. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3534. <xsl:otherwise>1</xsl:otherwise>
  3535. </xsl:choose>
  3536. </xsl:variable>
  3537. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3538. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3539. </xsl:if>
  3540. <xsl:variable name="verso.content">
  3541. <xsl:call-template name="index.titlepage.before.verso"/>
  3542. <xsl:call-template name="index.titlepage.verso"/>
  3543. </xsl:variable>
  3544. <xsl:variable name="verso.elements.count">
  3545. <xsl:choose>
  3546. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3547. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3548. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3549. <xsl:otherwise>1</xsl:otherwise>
  3550. </xsl:choose>
  3551. </xsl:variable>
  3552. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3553. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3554. </xsl:if>
  3555. <xsl:call-template name="index.titlepage.separator"/>
  3556. </fo:block>
  3557. </xsl:template>
  3558. <xsl:template match="*" mode="index.titlepage.recto.mode">
  3559. <!-- if an element isn't found in this mode, -->
  3560. <!-- try the generic titlepage.mode -->
  3561. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3562. </xsl:template>
  3563. <xsl:template match="*" mode="index.titlepage.verso.mode">
  3564. <!-- if an element isn't found in this mode, -->
  3565. <!-- try the generic titlepage.mode -->
  3566. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3567. </xsl:template>
  3568. <xsl:template match="subtitle" mode="index.titlepage.recto.auto.mode">
  3569. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" font-family="{$title.fontset}">
  3570. <xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
  3571. </fo:block>
  3572. </xsl:template>
  3573. <xsl:template name="indexdiv.titlepage.recto">
  3574. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style">
  3575. <xsl:call-template name="indexdiv.title">
  3576. <xsl:with-param name="title" select="title"/>
  3577. </xsl:call-template></fo:block>
  3578. <xsl:choose>
  3579. <xsl:when test="indexdivinfo/subtitle">
  3580. <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="indexdivinfo/subtitle"/>
  3581. </xsl:when>
  3582. <xsl:when test="docinfo/subtitle">
  3583. <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3584. </xsl:when>
  3585. <xsl:when test="info/subtitle">
  3586. <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
  3587. </xsl:when>
  3588. <xsl:when test="subtitle">
  3589. <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="subtitle"/>
  3590. </xsl:when>
  3591. </xsl:choose>
  3592. </xsl:template>
  3593. <xsl:template name="indexdiv.titlepage.verso">
  3594. </xsl:template>
  3595. <xsl:template name="indexdiv.titlepage.separator">
  3596. </xsl:template>
  3597. <xsl:template name="indexdiv.titlepage.before.recto">
  3598. </xsl:template>
  3599. <xsl:template name="indexdiv.titlepage.before.verso">
  3600. </xsl:template>
  3601. <xsl:template name="indexdiv.titlepage">
  3602. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3603. <xsl:variable name="recto.content">
  3604. <xsl:call-template name="indexdiv.titlepage.before.recto"/>
  3605. <xsl:call-template name="indexdiv.titlepage.recto"/>
  3606. </xsl:variable>
  3607. <xsl:variable name="recto.elements.count">
  3608. <xsl:choose>
  3609. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3610. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3611. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3612. <xsl:otherwise>1</xsl:otherwise>
  3613. </xsl:choose>
  3614. </xsl:variable>
  3615. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3616. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3617. </xsl:if>
  3618. <xsl:variable name="verso.content">
  3619. <xsl:call-template name="indexdiv.titlepage.before.verso"/>
  3620. <xsl:call-template name="indexdiv.titlepage.verso"/>
  3621. </xsl:variable>
  3622. <xsl:variable name="verso.elements.count">
  3623. <xsl:choose>
  3624. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3625. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3626. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3627. <xsl:otherwise>1</xsl:otherwise>
  3628. </xsl:choose>
  3629. </xsl:variable>
  3630. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3631. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3632. </xsl:if>
  3633. <xsl:call-template name="indexdiv.titlepage.separator"/>
  3634. </fo:block>
  3635. </xsl:template>
  3636. <xsl:template match="*" mode="indexdiv.titlepage.recto.mode">
  3637. <!-- if an element isn't found in this mode, -->
  3638. <!-- try the generic titlepage.mode -->
  3639. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3640. </xsl:template>
  3641. <xsl:template match="*" mode="indexdiv.titlepage.verso.mode">
  3642. <!-- if an element isn't found in this mode, -->
  3643. <!-- try the generic titlepage.mode -->
  3644. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3645. </xsl:template>
  3646. <xsl:template match="subtitle" mode="indexdiv.titlepage.recto.auto.mode">
  3647. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style" font-family="{$title.fontset}">
  3648. <xsl:apply-templates select="." mode="indexdiv.titlepage.recto.mode"/>
  3649. </fo:block>
  3650. </xsl:template>
  3651. <xsl:template name="setindex.titlepage.recto">
  3652. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" margin-left="0pt" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
  3653. <xsl:call-template name="component.title">
  3654. <xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/>
  3655. <xsl:with-param name="pagewide" select="1"/>
  3656. </xsl:call-template></fo:block>
  3657. <xsl:choose>
  3658. <xsl:when test="setindexinfo/subtitle">
  3659. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/>
  3660. </xsl:when>
  3661. <xsl:when test="docinfo/subtitle">
  3662. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3663. </xsl:when>
  3664. <xsl:when test="info/subtitle">
  3665. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/subtitle"/>
  3666. </xsl:when>
  3667. <xsl:when test="subtitle">
  3668. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/>
  3669. </xsl:when>
  3670. </xsl:choose>
  3671. </xsl:template>
  3672. <xsl:template name="setindex.titlepage.verso">
  3673. </xsl:template>
  3674. <xsl:template name="setindex.titlepage.separator">
  3675. </xsl:template>
  3676. <xsl:template name="setindex.titlepage.before.recto">
  3677. </xsl:template>
  3678. <xsl:template name="setindex.titlepage.before.verso">
  3679. </xsl:template>
  3680. <xsl:template name="setindex.titlepage">
  3681. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3682. <xsl:variable name="recto.content">
  3683. <xsl:call-template name="setindex.titlepage.before.recto"/>
  3684. <xsl:call-template name="setindex.titlepage.recto"/>
  3685. </xsl:variable>
  3686. <xsl:variable name="recto.elements.count">
  3687. <xsl:choose>
  3688. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3689. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3690. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3691. <xsl:otherwise>1</xsl:otherwise>
  3692. </xsl:choose>
  3693. </xsl:variable>
  3694. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3695. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3696. </xsl:if>
  3697. <xsl:variable name="verso.content">
  3698. <xsl:call-template name="setindex.titlepage.before.verso"/>
  3699. <xsl:call-template name="setindex.titlepage.verso"/>
  3700. </xsl:variable>
  3701. <xsl:variable name="verso.elements.count">
  3702. <xsl:choose>
  3703. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3704. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3705. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3706. <xsl:otherwise>1</xsl:otherwise>
  3707. </xsl:choose>
  3708. </xsl:variable>
  3709. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3710. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3711. </xsl:if>
  3712. <xsl:call-template name="setindex.titlepage.separator"/>
  3713. </fo:block>
  3714. </xsl:template>
  3715. <xsl:template match="*" mode="setindex.titlepage.recto.mode">
  3716. <!-- if an element isn't found in this mode, -->
  3717. <!-- try the generic titlepage.mode -->
  3718. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3719. </xsl:template>
  3720. <xsl:template match="*" mode="setindex.titlepage.verso.mode">
  3721. <!-- if an element isn't found in this mode, -->
  3722. <!-- try the generic titlepage.mode -->
  3723. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3724. </xsl:template>
  3725. <xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode">
  3726. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" font-family="{$title.fontset}">
  3727. <xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
  3728. </fo:block>
  3729. </xsl:template>
  3730. <xsl:template name="colophon.titlepage.recto">
  3731. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
  3732. <xsl:call-template name="component.title">
  3733. <xsl:with-param name="node" select="ancestor-or-self::colophon[1]"/>
  3734. </xsl:call-template></fo:block>
  3735. <xsl:choose>
  3736. <xsl:when test="colophoninfo/subtitle">
  3737. <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="colophoninfo/subtitle"/>
  3738. </xsl:when>
  3739. <xsl:when test="docinfo/subtitle">
  3740. <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3741. </xsl:when>
  3742. <xsl:when test="info/subtitle">
  3743. <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="info/subtitle"/>
  3744. </xsl:when>
  3745. <xsl:when test="subtitle">
  3746. <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="subtitle"/>
  3747. </xsl:when>
  3748. </xsl:choose>
  3749. </xsl:template>
  3750. <xsl:template name="colophon.titlepage.verso">
  3751. </xsl:template>
  3752. <xsl:template name="colophon.titlepage.separator">
  3753. </xsl:template>
  3754. <xsl:template name="colophon.titlepage.before.recto">
  3755. </xsl:template>
  3756. <xsl:template name="colophon.titlepage.before.verso">
  3757. </xsl:template>
  3758. <xsl:template name="colophon.titlepage">
  3759. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3760. <xsl:variable name="recto.content">
  3761. <xsl:call-template name="colophon.titlepage.before.recto"/>
  3762. <xsl:call-template name="colophon.titlepage.recto"/>
  3763. </xsl:variable>
  3764. <xsl:variable name="recto.elements.count">
  3765. <xsl:choose>
  3766. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3767. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3768. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3769. <xsl:otherwise>1</xsl:otherwise>
  3770. </xsl:choose>
  3771. </xsl:variable>
  3772. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3773. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3774. </xsl:if>
  3775. <xsl:variable name="verso.content">
  3776. <xsl:call-template name="colophon.titlepage.before.verso"/>
  3777. <xsl:call-template name="colophon.titlepage.verso"/>
  3778. </xsl:variable>
  3779. <xsl:variable name="verso.elements.count">
  3780. <xsl:choose>
  3781. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3782. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3783. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3784. <xsl:otherwise>1</xsl:otherwise>
  3785. </xsl:choose>
  3786. </xsl:variable>
  3787. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3788. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3789. </xsl:if>
  3790. <xsl:call-template name="colophon.titlepage.separator"/>
  3791. </fo:block>
  3792. </xsl:template>
  3793. <xsl:template match="*" mode="colophon.titlepage.recto.mode">
  3794. <!-- if an element isn't found in this mode, -->
  3795. <!-- try the generic titlepage.mode -->
  3796. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3797. </xsl:template>
  3798. <xsl:template match="*" mode="colophon.titlepage.verso.mode">
  3799. <!-- if an element isn't found in this mode, -->
  3800. <!-- try the generic titlepage.mode -->
  3801. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3802. </xsl:template>
  3803. <xsl:template match="subtitle" mode="colophon.titlepage.recto.auto.mode">
  3804. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" font-family="{$title.fontset}">
  3805. <xsl:apply-templates select="." mode="colophon.titlepage.recto.mode"/>
  3806. </fo:block>
  3807. </xsl:template>
  3808. <xsl:template name="sidebar.titlepage.recto">
  3809. <xsl:choose>
  3810. <xsl:when test="sidebarinfo/title">
  3811. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/title"/>
  3812. </xsl:when>
  3813. <xsl:when test="docinfo/title">
  3814. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/title"/>
  3815. </xsl:when>
  3816. <xsl:when test="info/title">
  3817. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/title"/>
  3818. </xsl:when>
  3819. <xsl:when test="title">
  3820. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="title"/>
  3821. </xsl:when>
  3822. </xsl:choose>
  3823. <xsl:choose>
  3824. <xsl:when test="sidebarinfo/subtitle">
  3825. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/subtitle"/>
  3826. </xsl:when>
  3827. <xsl:when test="docinfo/subtitle">
  3828. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3829. </xsl:when>
  3830. <xsl:when test="info/subtitle">
  3831. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/subtitle"/>
  3832. </xsl:when>
  3833. <xsl:when test="subtitle">
  3834. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="subtitle"/>
  3835. </xsl:when>
  3836. </xsl:choose>
  3837. </xsl:template>
  3838. <xsl:template name="sidebar.titlepage.verso">
  3839. </xsl:template>
  3840. <xsl:template name="sidebar.titlepage.separator">
  3841. </xsl:template>
  3842. <xsl:template name="sidebar.titlepage.before.recto">
  3843. </xsl:template>
  3844. <xsl:template name="sidebar.titlepage.before.verso">
  3845. </xsl:template>
  3846. <xsl:template name="sidebar.titlepage">
  3847. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3848. <xsl:variable name="recto.content">
  3849. <xsl:call-template name="sidebar.titlepage.before.recto"/>
  3850. <xsl:call-template name="sidebar.titlepage.recto"/>
  3851. </xsl:variable>
  3852. <xsl:variable name="recto.elements.count">
  3853. <xsl:choose>
  3854. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3855. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3856. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3857. <xsl:otherwise>1</xsl:otherwise>
  3858. </xsl:choose>
  3859. </xsl:variable>
  3860. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3861. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3862. </xsl:if>
  3863. <xsl:variable name="verso.content">
  3864. <xsl:call-template name="sidebar.titlepage.before.verso"/>
  3865. <xsl:call-template name="sidebar.titlepage.verso"/>
  3866. </xsl:variable>
  3867. <xsl:variable name="verso.elements.count">
  3868. <xsl:choose>
  3869. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3870. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3871. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3872. <xsl:otherwise>1</xsl:otherwise>
  3873. </xsl:choose>
  3874. </xsl:variable>
  3875. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3876. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3877. </xsl:if>
  3878. <xsl:call-template name="sidebar.titlepage.separator"/>
  3879. </fo:block>
  3880. </xsl:template>
  3881. <xsl:template match="*" mode="sidebar.titlepage.recto.mode">
  3882. <!-- if an element isn't found in this mode, -->
  3883. <!-- try the generic titlepage.mode -->
  3884. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3885. </xsl:template>
  3886. <xsl:template match="*" mode="sidebar.titlepage.verso.mode">
  3887. <!-- if an element isn't found in this mode, -->
  3888. <!-- try the generic titlepage.mode -->
  3889. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3890. </xsl:template>
  3891. <xsl:template match="title" mode="sidebar.titlepage.recto.auto.mode">
  3892. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sidebar.titlepage.recto.style" font-family="{$title.fontset}" font-weight="bold">
  3893. <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
  3894. </fo:block>
  3895. </xsl:template>
  3896. <xsl:template match="subtitle" mode="sidebar.titlepage.recto.auto.mode">
  3897. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sidebar.titlepage.recto.style" font-family="{$title.fontset}">
  3898. <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
  3899. </fo:block>
  3900. </xsl:template>
  3901. <xsl:template name="qandaset.titlepage.recto">
  3902. <xsl:choose>
  3903. <xsl:when test="qandasetinfo/title">
  3904. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/title"/>
  3905. </xsl:when>
  3906. <xsl:when test="blockinfo/title">
  3907. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/title"/>
  3908. </xsl:when>
  3909. <xsl:when test="info/title">
  3910. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/title"/>
  3911. </xsl:when>
  3912. <xsl:when test="title">
  3913. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="title"/>
  3914. </xsl:when>
  3915. </xsl:choose>
  3916. <xsl:choose>
  3917. <xsl:when test="qandasetinfo/subtitle">
  3918. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/subtitle"/>
  3919. </xsl:when>
  3920. <xsl:when test="blockinfo/subtitle">
  3921. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/subtitle"/>
  3922. </xsl:when>
  3923. <xsl:when test="info/subtitle">
  3924. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/subtitle"/>
  3925. </xsl:when>
  3926. <xsl:when test="subtitle">
  3927. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="subtitle"/>
  3928. </xsl:when>
  3929. </xsl:choose>
  3930. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/corpauthor"/>
  3931. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/corpauthor"/>
  3932. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/corpauthor"/>
  3933. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/authorgroup"/>
  3934. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/authorgroup"/>
  3935. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/authorgroup"/>
  3936. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/author"/>
  3937. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/author"/>
  3938. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/author"/>
  3939. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/othercredit"/>
  3940. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/othercredit"/>
  3941. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/othercredit"/>
  3942. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/releaseinfo"/>
  3943. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/releaseinfo"/>
  3944. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  3945. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/copyright"/>
  3946. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/copyright"/>
  3947. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/copyright"/>
  3948. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/legalnotice"/>
  3949. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/legalnotice"/>
  3950. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/legalnotice"/>
  3951. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/pubdate"/>
  3952. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/pubdate"/>
  3953. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/pubdate"/>
  3954. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revision"/>
  3955. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revision"/>
  3956. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revision"/>
  3957. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revhistory"/>
  3958. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revhistory"/>
  3959. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revhistory"/>
  3960. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/abstract"/>
  3961. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/abstract"/>
  3962. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/abstract"/>
  3963. </xsl:template>
  3964. <xsl:template name="qandaset.titlepage.verso">
  3965. </xsl:template>
  3966. <xsl:template name="qandaset.titlepage.separator">
  3967. </xsl:template>
  3968. <xsl:template name="qandaset.titlepage.before.recto">
  3969. </xsl:template>
  3970. <xsl:template name="qandaset.titlepage.before.verso">
  3971. </xsl:template>
  3972. <xsl:template name="qandaset.titlepage">
  3973. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
  3974. <xsl:variable name="recto.content">
  3975. <xsl:call-template name="qandaset.titlepage.before.recto"/>
  3976. <xsl:call-template name="qandaset.titlepage.recto"/>
  3977. </xsl:variable>
  3978. <xsl:variable name="recto.elements.count">
  3979. <xsl:choose>
  3980. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3981. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3982. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3983. <xsl:otherwise>1</xsl:otherwise>
  3984. </xsl:choose>
  3985. </xsl:variable>
  3986. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3987. <fo:block start-indent="0pt" text-align="center"><xsl:copy-of select="$recto.content"/></fo:block>
  3988. </xsl:if>
  3989. <xsl:variable name="verso.content">
  3990. <xsl:call-template name="qandaset.titlepage.before.verso"/>
  3991. <xsl:call-template name="qandaset.titlepage.verso"/>
  3992. </xsl:variable>
  3993. <xsl:variable name="verso.elements.count">
  3994. <xsl:choose>
  3995. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3996. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3997. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3998. <xsl:otherwise>1</xsl:otherwise>
  3999. </xsl:choose>
  4000. </xsl:variable>
  4001. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4002. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4003. </xsl:if>
  4004. <xsl:call-template name="qandaset.titlepage.separator"/>
  4005. </fo:block>
  4006. </xsl:template>
  4007. <xsl:template match="*" mode="qandaset.titlepage.recto.mode">
  4008. <!-- if an element isn't found in this mode, -->
  4009. <!-- try the generic titlepage.mode -->
  4010. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4011. </xsl:template>
  4012. <xsl:template match="*" mode="qandaset.titlepage.verso.mode">
  4013. <!-- if an element isn't found in this mode, -->
  4014. <!-- try the generic titlepage.mode -->
  4015. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4016. </xsl:template>
  4017. <xsl:template match="title" mode="qandaset.titlepage.recto.auto.mode">
  4018. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" keep-with-next.within-column="always" font-size="24.8832pt" font-weight="bold">
  4019. <xsl:call-template name="component.title">
  4020. <xsl:with-param name="node" select="ancestor-or-self::qandaset[1]"/>
  4021. </xsl:call-template>
  4022. </fo:block>
  4023. </xsl:template>
  4024. <xsl:template match="subtitle" mode="qandaset.titlepage.recto.auto.mode">
  4025. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style">
  4026. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4027. </fo:block>
  4028. </xsl:template>
  4029. <xsl:template match="corpauthor" mode="qandaset.titlepage.recto.auto.mode">
  4030. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
  4031. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4032. </fo:block>
  4033. </xsl:template>
  4034. <xsl:template match="authorgroup" mode="qandaset.titlepage.recto.auto.mode">
  4035. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
  4036. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4037. </fo:block>
  4038. </xsl:template>
  4039. <xsl:template match="author" mode="qandaset.titlepage.recto.auto.mode">
  4040. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
  4041. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4042. </fo:block>
  4043. </xsl:template>
  4044. <xsl:template match="othercredit" mode="qandaset.titlepage.recto.auto.mode">
  4045. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4046. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4047. </fo:block>
  4048. </xsl:template>
  4049. <xsl:template match="releaseinfo" mode="qandaset.titlepage.recto.auto.mode">
  4050. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4051. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4052. </fo:block>
  4053. </xsl:template>
  4054. <xsl:template match="copyright" mode="qandaset.titlepage.recto.auto.mode">
  4055. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4056. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4057. </fo:block>
  4058. </xsl:template>
  4059. <xsl:template match="legalnotice" mode="qandaset.titlepage.recto.auto.mode">
  4060. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
  4061. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4062. </fo:block>
  4063. </xsl:template>
  4064. <xsl:template match="pubdate" mode="qandaset.titlepage.recto.auto.mode">
  4065. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4066. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4067. </fo:block>
  4068. </xsl:template>
  4069. <xsl:template match="revision" mode="qandaset.titlepage.recto.auto.mode">
  4070. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4071. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4072. </fo:block>
  4073. </xsl:template>
  4074. <xsl:template match="revhistory" mode="qandaset.titlepage.recto.auto.mode">
  4075. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4076. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4077. </fo:block>
  4078. </xsl:template>
  4079. <xsl:template match="abstract" mode="qandaset.titlepage.recto.auto.mode">
  4080. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
  4081. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4082. </fo:block>
  4083. </xsl:template>
  4084. <xsl:template name="table.of.contents.titlepage.recto">
  4085. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="table.of.contents.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4086. <xsl:call-template name="gentext">
  4087. <xsl:with-param name="key" select="'TableofContents'"/>
  4088. </xsl:call-template></fo:block>
  4089. </xsl:template>
  4090. <xsl:template name="table.of.contents.titlepage.verso">
  4091. </xsl:template>
  4092. <xsl:template name="table.of.contents.titlepage.separator">
  4093. </xsl:template>
  4094. <xsl:template name="table.of.contents.titlepage.before.recto">
  4095. </xsl:template>
  4096. <xsl:template name="table.of.contents.titlepage.before.verso">
  4097. </xsl:template>
  4098. <xsl:template name="table.of.contents.titlepage">
  4099. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4100. <xsl:variable name="recto.content">
  4101. <xsl:call-template name="table.of.contents.titlepage.before.recto"/>
  4102. <xsl:call-template name="table.of.contents.titlepage.recto"/>
  4103. </xsl:variable>
  4104. <xsl:variable name="recto.elements.count">
  4105. <xsl:choose>
  4106. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4107. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4108. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4109. <xsl:otherwise>1</xsl:otherwise>
  4110. </xsl:choose>
  4111. </xsl:variable>
  4112. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4113. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4114. </xsl:if>
  4115. <xsl:variable name="verso.content">
  4116. <xsl:call-template name="table.of.contents.titlepage.before.verso"/>
  4117. <xsl:call-template name="table.of.contents.titlepage.verso"/>
  4118. </xsl:variable>
  4119. <xsl:variable name="verso.elements.count">
  4120. <xsl:choose>
  4121. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4122. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4123. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4124. <xsl:otherwise>1</xsl:otherwise>
  4125. </xsl:choose>
  4126. </xsl:variable>
  4127. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4128. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4129. </xsl:if>
  4130. <xsl:call-template name="table.of.contents.titlepage.separator"/>
  4131. </fo:block>
  4132. </xsl:template>
  4133. <xsl:template match="*" mode="table.of.contents.titlepage.recto.mode">
  4134. <!-- if an element isn't found in this mode, -->
  4135. <!-- try the generic titlepage.mode -->
  4136. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4137. </xsl:template>
  4138. <xsl:template match="*" mode="table.of.contents.titlepage.verso.mode">
  4139. <!-- if an element isn't found in this mode, -->
  4140. <!-- try the generic titlepage.mode -->
  4141. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4142. </xsl:template>
  4143. <xsl:template name="list.of.tables.titlepage.recto">
  4144. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.tables.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4145. <xsl:call-template name="gentext">
  4146. <xsl:with-param name="key" select="'ListofTables'"/>
  4147. </xsl:call-template></fo:block>
  4148. </xsl:template>
  4149. <xsl:template name="list.of.tables.titlepage.verso">
  4150. </xsl:template>
  4151. <xsl:template name="list.of.tables.titlepage.separator">
  4152. </xsl:template>
  4153. <xsl:template name="list.of.tables.titlepage.before.recto">
  4154. </xsl:template>
  4155. <xsl:template name="list.of.tables.titlepage.before.verso">
  4156. </xsl:template>
  4157. <xsl:template name="list.of.tables.titlepage">
  4158. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4159. <xsl:variable name="recto.content">
  4160. <xsl:call-template name="list.of.tables.titlepage.before.recto"/>
  4161. <xsl:call-template name="list.of.tables.titlepage.recto"/>
  4162. </xsl:variable>
  4163. <xsl:variable name="recto.elements.count">
  4164. <xsl:choose>
  4165. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4166. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4167. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4168. <xsl:otherwise>1</xsl:otherwise>
  4169. </xsl:choose>
  4170. </xsl:variable>
  4171. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4172. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4173. </xsl:if>
  4174. <xsl:variable name="verso.content">
  4175. <xsl:call-template name="list.of.tables.titlepage.before.verso"/>
  4176. <xsl:call-template name="list.of.tables.titlepage.verso"/>
  4177. </xsl:variable>
  4178. <xsl:variable name="verso.elements.count">
  4179. <xsl:choose>
  4180. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4181. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4182. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4183. <xsl:otherwise>1</xsl:otherwise>
  4184. </xsl:choose>
  4185. </xsl:variable>
  4186. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4187. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4188. </xsl:if>
  4189. <xsl:call-template name="list.of.tables.titlepage.separator"/>
  4190. </fo:block>
  4191. </xsl:template>
  4192. <xsl:template match="*" mode="list.of.tables.titlepage.recto.mode">
  4193. <!-- if an element isn't found in this mode, -->
  4194. <!-- try the generic titlepage.mode -->
  4195. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4196. </xsl:template>
  4197. <xsl:template match="*" mode="list.of.tables.titlepage.verso.mode">
  4198. <!-- if an element isn't found in this mode, -->
  4199. <!-- try the generic titlepage.mode -->
  4200. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4201. </xsl:template>
  4202. <xsl:template name="list.of.figures.titlepage.recto">
  4203. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.figures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4204. <xsl:call-template name="gentext">
  4205. <xsl:with-param name="key" select="'ListofFigures'"/>
  4206. </xsl:call-template></fo:block>
  4207. </xsl:template>
  4208. <xsl:template name="list.of.figures.titlepage.verso">
  4209. </xsl:template>
  4210. <xsl:template name="list.of.figures.titlepage.separator">
  4211. </xsl:template>
  4212. <xsl:template name="list.of.figures.titlepage.before.recto">
  4213. </xsl:template>
  4214. <xsl:template name="list.of.figures.titlepage.before.verso">
  4215. </xsl:template>
  4216. <xsl:template name="list.of.figures.titlepage">
  4217. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4218. <xsl:variable name="recto.content">
  4219. <xsl:call-template name="list.of.figures.titlepage.before.recto"/>
  4220. <xsl:call-template name="list.of.figures.titlepage.recto"/>
  4221. </xsl:variable>
  4222. <xsl:variable name="recto.elements.count">
  4223. <xsl:choose>
  4224. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4225. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4226. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4227. <xsl:otherwise>1</xsl:otherwise>
  4228. </xsl:choose>
  4229. </xsl:variable>
  4230. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4231. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4232. </xsl:if>
  4233. <xsl:variable name="verso.content">
  4234. <xsl:call-template name="list.of.figures.titlepage.before.verso"/>
  4235. <xsl:call-template name="list.of.figures.titlepage.verso"/>
  4236. </xsl:variable>
  4237. <xsl:variable name="verso.elements.count">
  4238. <xsl:choose>
  4239. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4240. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4241. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4242. <xsl:otherwise>1</xsl:otherwise>
  4243. </xsl:choose>
  4244. </xsl:variable>
  4245. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4246. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4247. </xsl:if>
  4248. <xsl:call-template name="list.of.figures.titlepage.separator"/>
  4249. </fo:block>
  4250. </xsl:template>
  4251. <xsl:template match="*" mode="list.of.figures.titlepage.recto.mode">
  4252. <!-- if an element isn't found in this mode, -->
  4253. <!-- try the generic titlepage.mode -->
  4254. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4255. </xsl:template>
  4256. <xsl:template match="*" mode="list.of.figures.titlepage.verso.mode">
  4257. <!-- if an element isn't found in this mode, -->
  4258. <!-- try the generic titlepage.mode -->
  4259. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4260. </xsl:template>
  4261. <xsl:template name="list.of.examples.titlepage.recto">
  4262. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.examples.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4263. <xsl:call-template name="gentext">
  4264. <xsl:with-param name="key" select="'ListofExamples'"/>
  4265. </xsl:call-template></fo:block>
  4266. </xsl:template>
  4267. <xsl:template name="list.of.examples.titlepage.verso">
  4268. </xsl:template>
  4269. <xsl:template name="list.of.examples.titlepage.separator">
  4270. </xsl:template>
  4271. <xsl:template name="list.of.examples.titlepage.before.recto">
  4272. </xsl:template>
  4273. <xsl:template name="list.of.examples.titlepage.before.verso">
  4274. </xsl:template>
  4275. <xsl:template name="list.of.examples.titlepage">
  4276. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4277. <xsl:variable name="recto.content">
  4278. <xsl:call-template name="list.of.examples.titlepage.before.recto"/>
  4279. <xsl:call-template name="list.of.examples.titlepage.recto"/>
  4280. </xsl:variable>
  4281. <xsl:variable name="recto.elements.count">
  4282. <xsl:choose>
  4283. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4284. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4285. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4286. <xsl:otherwise>1</xsl:otherwise>
  4287. </xsl:choose>
  4288. </xsl:variable>
  4289. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4290. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4291. </xsl:if>
  4292. <xsl:variable name="verso.content">
  4293. <xsl:call-template name="list.of.examples.titlepage.before.verso"/>
  4294. <xsl:call-template name="list.of.examples.titlepage.verso"/>
  4295. </xsl:variable>
  4296. <xsl:variable name="verso.elements.count">
  4297. <xsl:choose>
  4298. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4299. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4300. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4301. <xsl:otherwise>1</xsl:otherwise>
  4302. </xsl:choose>
  4303. </xsl:variable>
  4304. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4305. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4306. </xsl:if>
  4307. <xsl:call-template name="list.of.examples.titlepage.separator"/>
  4308. </fo:block>
  4309. </xsl:template>
  4310. <xsl:template match="*" mode="list.of.examples.titlepage.recto.mode">
  4311. <!-- if an element isn't found in this mode, -->
  4312. <!-- try the generic titlepage.mode -->
  4313. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4314. </xsl:template>
  4315. <xsl:template match="*" mode="list.of.examples.titlepage.verso.mode">
  4316. <!-- if an element isn't found in this mode, -->
  4317. <!-- try the generic titlepage.mode -->
  4318. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4319. </xsl:template>
  4320. <xsl:template name="list.of.equations.titlepage.recto">
  4321. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.equations.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4322. <xsl:call-template name="gentext">
  4323. <xsl:with-param name="key" select="'ListofEquations'"/>
  4324. </xsl:call-template></fo:block>
  4325. </xsl:template>
  4326. <xsl:template name="list.of.equations.titlepage.verso">
  4327. </xsl:template>
  4328. <xsl:template name="list.of.equations.titlepage.separator">
  4329. </xsl:template>
  4330. <xsl:template name="list.of.equations.titlepage.before.recto">
  4331. </xsl:template>
  4332. <xsl:template name="list.of.equations.titlepage.before.verso">
  4333. </xsl:template>
  4334. <xsl:template name="list.of.equations.titlepage">
  4335. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4336. <xsl:variable name="recto.content">
  4337. <xsl:call-template name="list.of.equations.titlepage.before.recto"/>
  4338. <xsl:call-template name="list.of.equations.titlepage.recto"/>
  4339. </xsl:variable>
  4340. <xsl:variable name="recto.elements.count">
  4341. <xsl:choose>
  4342. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4343. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4344. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4345. <xsl:otherwise>1</xsl:otherwise>
  4346. </xsl:choose>
  4347. </xsl:variable>
  4348. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4349. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4350. </xsl:if>
  4351. <xsl:variable name="verso.content">
  4352. <xsl:call-template name="list.of.equations.titlepage.before.verso"/>
  4353. <xsl:call-template name="list.of.equations.titlepage.verso"/>
  4354. </xsl:variable>
  4355. <xsl:variable name="verso.elements.count">
  4356. <xsl:choose>
  4357. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4358. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4359. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4360. <xsl:otherwise>1</xsl:otherwise>
  4361. </xsl:choose>
  4362. </xsl:variable>
  4363. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4364. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4365. </xsl:if>
  4366. <xsl:call-template name="list.of.equations.titlepage.separator"/>
  4367. </fo:block>
  4368. </xsl:template>
  4369. <xsl:template match="*" mode="list.of.equations.titlepage.recto.mode">
  4370. <!-- if an element isn't found in this mode, -->
  4371. <!-- try the generic titlepage.mode -->
  4372. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4373. </xsl:template>
  4374. <xsl:template match="*" mode="list.of.equations.titlepage.verso.mode">
  4375. <!-- if an element isn't found in this mode, -->
  4376. <!-- try the generic titlepage.mode -->
  4377. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4378. </xsl:template>
  4379. <xsl:template name="list.of.procedures.titlepage.recto">
  4380. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.procedures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4381. <xsl:call-template name="gentext">
  4382. <xsl:with-param name="key" select="'ListofProcedures'"/>
  4383. </xsl:call-template></fo:block>
  4384. </xsl:template>
  4385. <xsl:template name="list.of.procedures.titlepage.verso">
  4386. </xsl:template>
  4387. <xsl:template name="list.of.procedures.titlepage.separator">
  4388. </xsl:template>
  4389. <xsl:template name="list.of.procedures.titlepage.before.recto">
  4390. </xsl:template>
  4391. <xsl:template name="list.of.procedures.titlepage.before.verso">
  4392. </xsl:template>
  4393. <xsl:template name="list.of.procedures.titlepage">
  4394. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4395. <xsl:variable name="recto.content">
  4396. <xsl:call-template name="list.of.procedures.titlepage.before.recto"/>
  4397. <xsl:call-template name="list.of.procedures.titlepage.recto"/>
  4398. </xsl:variable>
  4399. <xsl:variable name="recto.elements.count">
  4400. <xsl:choose>
  4401. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4402. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4403. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4404. <xsl:otherwise>1</xsl:otherwise>
  4405. </xsl:choose>
  4406. </xsl:variable>
  4407. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4408. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4409. </xsl:if>
  4410. <xsl:variable name="verso.content">
  4411. <xsl:call-template name="list.of.procedures.titlepage.before.verso"/>
  4412. <xsl:call-template name="list.of.procedures.titlepage.verso"/>
  4413. </xsl:variable>
  4414. <xsl:variable name="verso.elements.count">
  4415. <xsl:choose>
  4416. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4417. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4418. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4419. <xsl:otherwise>1</xsl:otherwise>
  4420. </xsl:choose>
  4421. </xsl:variable>
  4422. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4423. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4424. </xsl:if>
  4425. <xsl:call-template name="list.of.procedures.titlepage.separator"/>
  4426. </fo:block>
  4427. </xsl:template>
  4428. <xsl:template match="*" mode="list.of.procedures.titlepage.recto.mode">
  4429. <!-- if an element isn't found in this mode, -->
  4430. <!-- try the generic titlepage.mode -->
  4431. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4432. </xsl:template>
  4433. <xsl:template match="*" mode="list.of.procedures.titlepage.verso.mode">
  4434. <!-- if an element isn't found in this mode, -->
  4435. <!-- try the generic titlepage.mode -->
  4436. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4437. </xsl:template>
  4438. <xsl:template name="list.of.unknowns.titlepage.recto">
  4439. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.unknowns.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4440. <xsl:call-template name="gentext">
  4441. <xsl:with-param name="key" select="'ListofUnknown'"/>
  4442. </xsl:call-template></fo:block>
  4443. </xsl:template>
  4444. <xsl:template name="list.of.unknowns.titlepage.verso">
  4445. </xsl:template>
  4446. <xsl:template name="list.of.unknowns.titlepage.separator">
  4447. </xsl:template>
  4448. <xsl:template name="list.of.unknowns.titlepage.before.recto">
  4449. </xsl:template>
  4450. <xsl:template name="list.of.unknowns.titlepage.before.verso">
  4451. </xsl:template>
  4452. <xsl:template name="list.of.unknowns.titlepage">
  4453. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4454. <xsl:variable name="recto.content">
  4455. <xsl:call-template name="list.of.unknowns.titlepage.before.recto"/>
  4456. <xsl:call-template name="list.of.unknowns.titlepage.recto"/>
  4457. </xsl:variable>
  4458. <xsl:variable name="recto.elements.count">
  4459. <xsl:choose>
  4460. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4461. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4462. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4463. <xsl:otherwise>1</xsl:otherwise>
  4464. </xsl:choose>
  4465. </xsl:variable>
  4466. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4467. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4468. </xsl:if>
  4469. <xsl:variable name="verso.content">
  4470. <xsl:call-template name="list.of.unknowns.titlepage.before.verso"/>
  4471. <xsl:call-template name="list.of.unknowns.titlepage.verso"/>
  4472. </xsl:variable>
  4473. <xsl:variable name="verso.elements.count">
  4474. <xsl:choose>
  4475. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4476. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4477. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4478. <xsl:otherwise>1</xsl:otherwise>
  4479. </xsl:choose>
  4480. </xsl:variable>
  4481. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4482. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4483. </xsl:if>
  4484. <xsl:call-template name="list.of.unknowns.titlepage.separator"/>
  4485. </fo:block>
  4486. </xsl:template>
  4487. <xsl:template match="*" mode="list.of.unknowns.titlepage.recto.mode">
  4488. <!-- if an element isn't found in this mode, -->
  4489. <!-- try the generic titlepage.mode -->
  4490. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4491. </xsl:template>
  4492. <xsl:template match="*" mode="list.of.unknowns.titlepage.verso.mode">
  4493. <!-- if an element isn't found in this mode, -->
  4494. <!-- try the generic titlepage.mode -->
  4495. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4496. </xsl:template>
  4497. </xsl:stylesheet>