titlepage.templates.xsl 291 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972
  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:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/itermset"/>
  67. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/itermset"/>
  68. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/itermset"/>
  69. </xsl:template>
  70. <xsl:template name="article.titlepage.verso">
  71. </xsl:template>
  72. <xsl:template name="article.titlepage.separator">
  73. </xsl:template>
  74. <xsl:template name="article.titlepage.before.recto">
  75. </xsl:template>
  76. <xsl:template name="article.titlepage.before.verso">
  77. </xsl:template>
  78. <xsl:template name="article.titlepage">
  79. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
  80. <xsl:variable name="recto.content">
  81. <xsl:call-template name="article.titlepage.before.recto"/>
  82. <xsl:call-template name="article.titlepage.recto"/>
  83. </xsl:variable>
  84. <xsl:variable name="recto.elements.count">
  85. <xsl:choose>
  86. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  87. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  88. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  89. <xsl:otherwise>1</xsl:otherwise>
  90. </xsl:choose>
  91. </xsl:variable>
  92. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  93. <fo:block start-indent="0pt" text-align="center"><xsl:copy-of select="$recto.content"/></fo:block>
  94. </xsl:if>
  95. <xsl:variable name="verso.content">
  96. <xsl:call-template name="article.titlepage.before.verso"/>
  97. <xsl:call-template name="article.titlepage.verso"/>
  98. </xsl:variable>
  99. <xsl:variable name="verso.elements.count">
  100. <xsl:choose>
  101. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  102. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  103. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  104. <xsl:otherwise>1</xsl:otherwise>
  105. </xsl:choose>
  106. </xsl:variable>
  107. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  108. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  109. </xsl:if>
  110. <xsl:call-template name="article.titlepage.separator"/>
  111. </fo:block>
  112. </xsl:template>
  113. <xsl:template match="*" mode="article.titlepage.recto.mode">
  114. <!-- if an element isn't found in this mode, -->
  115. <!-- try the generic titlepage.mode -->
  116. <xsl:apply-templates select="." mode="titlepage.mode"/>
  117. </xsl:template>
  118. <xsl:template match="*" mode="article.titlepage.verso.mode">
  119. <!-- if an element isn't found in this mode, -->
  120. <!-- try the generic titlepage.mode -->
  121. <xsl:apply-templates select="." mode="titlepage.mode"/>
  122. </xsl:template>
  123. <xsl:template match="title" mode="article.titlepage.recto.auto.mode">
  124. <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">
  125. <xsl:call-template name="component.title">
  126. <xsl:with-param name="node" select="ancestor-or-self::article[1]"/>
  127. </xsl:call-template>
  128. </fo:block>
  129. </xsl:template>
  130. <xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode">
  131. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style">
  132. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  133. </fo:block>
  134. </xsl:template>
  135. <xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode">
  136. <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">
  137. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  138. </fo:block>
  139. </xsl:template>
  140. <xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode">
  141. <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">
  142. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  143. </fo:block>
  144. </xsl:template>
  145. <xsl:template match="author" mode="article.titlepage.recto.auto.mode">
  146. <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">
  147. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  148. </fo:block>
  149. </xsl:template>
  150. <xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode">
  151. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  152. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  153. </fo:block>
  154. </xsl:template>
  155. <xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode">
  156. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  157. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  158. </fo:block>
  159. </xsl:template>
  160. <xsl:template match="copyright" mode="article.titlepage.recto.auto.mode">
  161. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  162. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  163. </fo:block>
  164. </xsl:template>
  165. <xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode">
  166. <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}">
  167. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  168. </fo:block>
  169. </xsl:template>
  170. <xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode">
  171. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  172. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  173. </fo:block>
  174. </xsl:template>
  175. <xsl:template match="revision" mode="article.titlepage.recto.auto.mode">
  176. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  177. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  178. </fo:block>
  179. </xsl:template>
  180. <xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode">
  181. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  182. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  183. </fo:block>
  184. </xsl:template>
  185. <xsl:template match="abstract" mode="article.titlepage.recto.auto.mode">
  186. <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}">
  187. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  188. </fo:block>
  189. </xsl:template>
  190. <xsl:template match="itermset" mode="article.titlepage.recto.auto.mode">
  191. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style">
  192. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  193. </fo:block>
  194. </xsl:template>
  195. <xsl:template name="set.titlepage.recto">
  196. <xsl:choose>
  197. <xsl:when test="setinfo/title">
  198. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/title"/>
  199. </xsl:when>
  200. <xsl:when test="info/title">
  201. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/title"/>
  202. </xsl:when>
  203. <xsl:when test="title">
  204. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="title"/>
  205. </xsl:when>
  206. </xsl:choose>
  207. <xsl:choose>
  208. <xsl:when test="setinfo/subtitle">
  209. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/subtitle"/>
  210. </xsl:when>
  211. <xsl:when test="info/subtitle">
  212. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/subtitle"/>
  213. </xsl:when>
  214. <xsl:when test="subtitle">
  215. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="subtitle"/>
  216. </xsl:when>
  217. </xsl:choose>
  218. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/corpauthor"/>
  219. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/corpauthor"/>
  220. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/authorgroup"/>
  221. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/authorgroup"/>
  222. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/author"/>
  223. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/author"/>
  224. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/othercredit"/>
  225. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/othercredit"/>
  226. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/releaseinfo"/>
  227. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  228. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/copyright"/>
  229. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/copyright"/>
  230. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/legalnotice"/>
  231. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/legalnotice"/>
  232. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/pubdate"/>
  233. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/pubdate"/>
  234. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revision"/>
  235. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revision"/>
  236. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revhistory"/>
  237. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revhistory"/>
  238. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/abstract"/>
  239. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/abstract"/>
  240. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/itermset"/>
  241. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/itermset"/>
  242. </xsl:template>
  243. <xsl:template name="set.titlepage.verso">
  244. </xsl:template>
  245. <xsl:template name="set.titlepage.separator">
  246. </xsl:template>
  247. <xsl:template name="set.titlepage.before.recto">
  248. </xsl:template>
  249. <xsl:template name="set.titlepage.before.verso">
  250. </xsl:template>
  251. <xsl:template name="set.titlepage">
  252. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  253. <xsl:variable name="recto.content">
  254. <xsl:call-template name="set.titlepage.before.recto"/>
  255. <xsl:call-template name="set.titlepage.recto"/>
  256. </xsl:variable>
  257. <xsl:variable name="recto.elements.count">
  258. <xsl:choose>
  259. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  260. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  261. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  262. <xsl:otherwise>1</xsl:otherwise>
  263. </xsl:choose>
  264. </xsl:variable>
  265. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  266. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  267. </xsl:if>
  268. <xsl:variable name="verso.content">
  269. <xsl:call-template name="set.titlepage.before.verso"/>
  270. <xsl:call-template name="set.titlepage.verso"/>
  271. </xsl:variable>
  272. <xsl:variable name="verso.elements.count">
  273. <xsl:choose>
  274. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  275. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  276. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  277. <xsl:otherwise>1</xsl:otherwise>
  278. </xsl:choose>
  279. </xsl:variable>
  280. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  281. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  282. </xsl:if>
  283. <xsl:call-template name="set.titlepage.separator"/>
  284. </fo:block>
  285. </xsl:template>
  286. <xsl:template match="*" mode="set.titlepage.recto.mode">
  287. <!-- if an element isn't found in this mode, -->
  288. <!-- try the generic titlepage.mode -->
  289. <xsl:apply-templates select="." mode="titlepage.mode"/>
  290. </xsl:template>
  291. <xsl:template match="*" mode="set.titlepage.verso.mode">
  292. <!-- if an element isn't found in this mode, -->
  293. <!-- try the generic titlepage.mode -->
  294. <xsl:apply-templates select="." mode="titlepage.mode"/>
  295. </xsl:template>
  296. <xsl:template match="title" mode="set.titlepage.recto.auto.mode">
  297. <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}">
  298. <xsl:call-template name="division.title">
  299. <xsl:with-param name="node" select="ancestor-or-self::set[1]"/>
  300. </xsl:call-template>
  301. </fo:block>
  302. </xsl:template>
  303. <xsl:template match="subtitle" 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" font-family="{$title.fontset}" text-align="center">
  305. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  306. </fo:block>
  307. </xsl:template>
  308. <xsl:template match="corpauthor" 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="authorgroup" 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="author" 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="othercredit" 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="releaseinfo" 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="copyright" 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="legalnotice" 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="pubdate" 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="revision" 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 match="revhistory" mode="set.titlepage.recto.auto.mode">
  354. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
  355. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  356. </fo:block>
  357. </xsl:template>
  358. <xsl:template match="abstract" mode="set.titlepage.recto.auto.mode">
  359. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
  360. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  361. </fo:block>
  362. </xsl:template>
  363. <xsl:template match="itermset" mode="set.titlepage.recto.auto.mode">
  364. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
  365. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  366. </fo:block>
  367. </xsl:template>
  368. <xsl:template name="book.titlepage.recto">
  369. <xsl:choose>
  370. <xsl:when test="bookinfo/title">
  371. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
  372. </xsl:when>
  373. <xsl:when test="info/title">
  374. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
  375. </xsl:when>
  376. <xsl:when test="title">
  377. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
  378. </xsl:when>
  379. </xsl:choose>
  380. <xsl:choose>
  381. <xsl:when test="bookinfo/subtitle">
  382. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
  383. </xsl:when>
  384. <xsl:when test="info/subtitle">
  385. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
  386. </xsl:when>
  387. <xsl:when test="subtitle">
  388. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
  389. </xsl:when>
  390. </xsl:choose>
  391. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
  392. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
  393. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
  394. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
  395. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
  396. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
  397. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/itermset"/>
  398. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/itermset"/>
  399. </xsl:template>
  400. <xsl:template name="book.titlepage.verso">
  401. <xsl:choose>
  402. <xsl:when test="bookinfo/title">
  403. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/title"/>
  404. </xsl:when>
  405. <xsl:when test="info/title">
  406. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/title"/>
  407. </xsl:when>
  408. <xsl:when test="title">
  409. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="title"/>
  410. </xsl:when>
  411. </xsl:choose>
  412. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/corpauthor"/>
  413. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/corpauthor"/>
  414. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/authorgroup"/>
  415. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/authorgroup"/>
  416. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/author"/>
  417. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/author"/>
  418. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/othercredit"/>
  419. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/othercredit"/>
  420. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/releaseinfo"/>
  421. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/releaseinfo"/>
  422. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/pubdate"/>
  423. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/pubdate"/>
  424. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/copyright"/>
  425. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/copyright"/>
  426. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/abstract"/>
  427. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/abstract"/>
  428. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/legalnotice"/>
  429. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/legalnotice"/>
  430. </xsl:template>
  431. <xsl:template name="book.titlepage.separator"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
  432. </xsl:template>
  433. <xsl:template name="book.titlepage.before.recto">
  434. </xsl:template>
  435. <xsl:template name="book.titlepage.before.verso"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
  436. </xsl:template>
  437. <xsl:template name="book.titlepage">
  438. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  439. <xsl:variable name="recto.content">
  440. <xsl:call-template name="book.titlepage.before.recto"/>
  441. <xsl:call-template name="book.titlepage.recto"/>
  442. </xsl:variable>
  443. <xsl:variable name="recto.elements.count">
  444. <xsl:choose>
  445. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  446. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  447. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  448. <xsl:otherwise>1</xsl:otherwise>
  449. </xsl:choose>
  450. </xsl:variable>
  451. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  452. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  453. </xsl:if>
  454. <xsl:variable name="verso.content">
  455. <xsl:call-template name="book.titlepage.before.verso"/>
  456. <xsl:call-template name="book.titlepage.verso"/>
  457. </xsl:variable>
  458. <xsl:variable name="verso.elements.count">
  459. <xsl:choose>
  460. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  461. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  462. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  463. <xsl:otherwise>1</xsl:otherwise>
  464. </xsl:choose>
  465. </xsl:variable>
  466. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  467. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  468. </xsl:if>
  469. <xsl:call-template name="book.titlepage.separator"/>
  470. </fo:block>
  471. </xsl:template>
  472. <xsl:template match="*" mode="book.titlepage.recto.mode">
  473. <!-- if an element isn't found in this mode, -->
  474. <!-- try the generic titlepage.mode -->
  475. <xsl:apply-templates select="." mode="titlepage.mode"/>
  476. </xsl:template>
  477. <xsl:template match="*" mode="book.titlepage.verso.mode">
  478. <!-- if an element isn't found in this mode, -->
  479. <!-- try the generic titlepage.mode -->
  480. <xsl:apply-templates select="." mode="titlepage.mode"/>
  481. </xsl:template>
  482. <xsl:template match="title" 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" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
  484. <xsl:call-template name="division.title">
  485. <xsl:with-param name="node" select="ancestor-or-self::book[1]"/>
  486. </xsl:call-template>
  487. </fo:block>
  488. </xsl:template>
  489. <xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
  490. <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}">
  491. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  492. </fo:block>
  493. </xsl:template>
  494. <xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode">
  495. <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">
  496. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  497. </fo:block>
  498. </xsl:template>
  499. <xsl:template match="authorgroup" mode="book.titlepage.recto.auto.mode">
  500. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" space-before="2in">
  501. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  502. </fo:block>
  503. </xsl:template>
  504. <xsl:template match="author" mode="book.titlepage.recto.auto.mode">
  505. <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">
  506. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  507. </fo:block>
  508. </xsl:template>
  509. <xsl:template match="itermset" mode="book.titlepage.recto.auto.mode">
  510. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style">
  511. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  512. </fo:block>
  513. </xsl:template>
  514. <xsl:template match="title" 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" font-size="14.4pt" font-weight="bold" font-family="{$title.fontset}">
  516. <xsl:call-template name="book.verso.title">
  517. </xsl:call-template>
  518. </fo:block>
  519. </xsl:template>
  520. <xsl:template match="corpauthor" mode="book.titlepage.verso.auto.mode">
  521. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  522. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  523. </fo:block>
  524. </xsl:template>
  525. <xsl:template match="authorgroup" mode="book.titlepage.verso.auto.mode">
  526. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  527. <xsl:call-template name="verso.authorgroup">
  528. </xsl:call-template>
  529. </fo:block>
  530. </xsl:template>
  531. <xsl:template match="author" mode="book.titlepage.verso.auto.mode">
  532. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  533. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  534. </fo:block>
  535. </xsl:template>
  536. <xsl:template match="othercredit" mode="book.titlepage.verso.auto.mode">
  537. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  538. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  539. </fo:block>
  540. </xsl:template>
  541. <xsl:template match="releaseinfo" mode="book.titlepage.verso.auto.mode">
  542. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="0.5em">
  543. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  544. </fo:block>
  545. </xsl:template>
  546. <xsl:template match="pubdate" mode="book.titlepage.verso.auto.mode">
  547. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="1em">
  548. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  549. </fo:block>
  550. </xsl:template>
  551. <xsl:template match="copyright" mode="book.titlepage.verso.auto.mode">
  552. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  553. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  554. </fo:block>
  555. </xsl:template>
  556. <xsl:template match="abstract" mode="book.titlepage.verso.auto.mode">
  557. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  558. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  559. </fo:block>
  560. </xsl:template>
  561. <xsl:template match="legalnotice" mode="book.titlepage.verso.auto.mode">
  562. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="8pt">
  563. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  564. </fo:block>
  565. </xsl:template>
  566. <xsl:template name="part.titlepage.recto">
  567. <xsl:choose>
  568. <xsl:when test="partinfo/title">
  569. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/title"/>
  570. </xsl:when>
  571. <xsl:when test="docinfo/title">
  572. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/title"/>
  573. </xsl:when>
  574. <xsl:when test="info/title">
  575. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/title"/>
  576. </xsl:when>
  577. <xsl:when test="title">
  578. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="title"/>
  579. </xsl:when>
  580. </xsl:choose>
  581. <xsl:choose>
  582. <xsl:when test="partinfo/subtitle">
  583. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/subtitle"/>
  584. </xsl:when>
  585. <xsl:when test="docinfo/subtitle">
  586. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  587. </xsl:when>
  588. <xsl:when test="info/subtitle">
  589. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/subtitle"/>
  590. </xsl:when>
  591. <xsl:when test="subtitle">
  592. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="subtitle"/>
  593. </xsl:when>
  594. </xsl:choose>
  595. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/itermset"/>
  596. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  597. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/itermset"/>
  598. </xsl:template>
  599. <xsl:template name="part.titlepage.verso">
  600. </xsl:template>
  601. <xsl:template name="part.titlepage.separator">
  602. </xsl:template>
  603. <xsl:template name="part.titlepage.before.recto">
  604. </xsl:template>
  605. <xsl:template name="part.titlepage.before.verso">
  606. </xsl:template>
  607. <xsl:template name="part.titlepage">
  608. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  609. <xsl:variable name="recto.content">
  610. <xsl:call-template name="part.titlepage.before.recto"/>
  611. <xsl:call-template name="part.titlepage.recto"/>
  612. </xsl:variable>
  613. <xsl:variable name="recto.elements.count">
  614. <xsl:choose>
  615. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  616. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  617. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  618. <xsl:otherwise>1</xsl:otherwise>
  619. </xsl:choose>
  620. </xsl:variable>
  621. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  622. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  623. </xsl:if>
  624. <xsl:variable name="verso.content">
  625. <xsl:call-template name="part.titlepage.before.verso"/>
  626. <xsl:call-template name="part.titlepage.verso"/>
  627. </xsl:variable>
  628. <xsl:variable name="verso.elements.count">
  629. <xsl:choose>
  630. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  631. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  632. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  633. <xsl:otherwise>1</xsl:otherwise>
  634. </xsl:choose>
  635. </xsl:variable>
  636. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  637. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  638. </xsl:if>
  639. <xsl:call-template name="part.titlepage.separator"/>
  640. </fo:block>
  641. </xsl:template>
  642. <xsl:template match="*" mode="part.titlepage.recto.mode">
  643. <!-- if an element isn't found in this mode, -->
  644. <!-- try the generic titlepage.mode -->
  645. <xsl:apply-templates select="." mode="titlepage.mode"/>
  646. </xsl:template>
  647. <xsl:template match="*" mode="part.titlepage.verso.mode">
  648. <!-- if an element isn't found in this mode, -->
  649. <!-- try the generic titlepage.mode -->
  650. <xsl:apply-templates select="." mode="titlepage.mode"/>
  651. </xsl:template>
  652. <xsl:template match="title" mode="part.titlepage.recto.auto.mode">
  653. <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}">
  654. <xsl:call-template name="division.title">
  655. <xsl:with-param name="node" select="ancestor-or-self::part[1]"/>
  656. </xsl:call-template>
  657. </fo:block>
  658. </xsl:template>
  659. <xsl:template match="subtitle" mode="part.titlepage.recto.auto.mode">
  660. <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}">
  661. <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
  662. </fo:block>
  663. </xsl:template>
  664. <xsl:template match="itermset" mode="part.titlepage.recto.auto.mode">
  665. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="part.titlepage.recto.style">
  666. <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
  667. </fo:block>
  668. </xsl:template>
  669. <xsl:template name="partintro.titlepage.recto">
  670. <xsl:choose>
  671. <xsl:when test="partintroinfo/title">
  672. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/title"/>
  673. </xsl:when>
  674. <xsl:when test="docinfo/title">
  675. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/title"/>
  676. </xsl:when>
  677. <xsl:when test="info/title">
  678. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/title"/>
  679. </xsl:when>
  680. <xsl:when test="title">
  681. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="title"/>
  682. </xsl:when>
  683. </xsl:choose>
  684. <xsl:choose>
  685. <xsl:when test="partintroinfo/subtitle">
  686. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/subtitle"/>
  687. </xsl:when>
  688. <xsl:when test="docinfo/subtitle">
  689. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  690. </xsl:when>
  691. <xsl:when test="info/subtitle">
  692. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/subtitle"/>
  693. </xsl:when>
  694. <xsl:when test="subtitle">
  695. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="subtitle"/>
  696. </xsl:when>
  697. </xsl:choose>
  698. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/corpauthor"/>
  699. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  700. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/corpauthor"/>
  701. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/authorgroup"/>
  702. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  703. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/authorgroup"/>
  704. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/author"/>
  705. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/author"/>
  706. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/author"/>
  707. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/othercredit"/>
  708. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  709. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/othercredit"/>
  710. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/releaseinfo"/>
  711. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  712. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  713. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/copyright"/>
  714. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  715. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/copyright"/>
  716. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/legalnotice"/>
  717. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  718. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/legalnotice"/>
  719. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/pubdate"/>
  720. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  721. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/pubdate"/>
  722. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revision"/>
  723. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revision"/>
  724. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revision"/>
  725. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revhistory"/>
  726. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  727. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revhistory"/>
  728. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/abstract"/>
  729. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  730. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/abstract"/>
  731. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/itermset"/>
  732. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  733. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/itermset"/>
  734. </xsl:template>
  735. <xsl:template name="partintro.titlepage.verso">
  736. </xsl:template>
  737. <xsl:template name="partintro.titlepage.separator">
  738. </xsl:template>
  739. <xsl:template name="partintro.titlepage.before.recto">
  740. </xsl:template>
  741. <xsl:template name="partintro.titlepage.before.verso">
  742. </xsl:template>
  743. <xsl:template name="partintro.titlepage">
  744. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  745. <xsl:variable name="recto.content">
  746. <xsl:call-template name="partintro.titlepage.before.recto"/>
  747. <xsl:call-template name="partintro.titlepage.recto"/>
  748. </xsl:variable>
  749. <xsl:variable name="recto.elements.count">
  750. <xsl:choose>
  751. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  752. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  753. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  754. <xsl:otherwise>1</xsl:otherwise>
  755. </xsl:choose>
  756. </xsl:variable>
  757. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  758. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  759. </xsl:if>
  760. <xsl:variable name="verso.content">
  761. <xsl:call-template name="partintro.titlepage.before.verso"/>
  762. <xsl:call-template name="partintro.titlepage.verso"/>
  763. </xsl:variable>
  764. <xsl:variable name="verso.elements.count">
  765. <xsl:choose>
  766. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  767. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  768. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  769. <xsl:otherwise>1</xsl:otherwise>
  770. </xsl:choose>
  771. </xsl:variable>
  772. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  773. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  774. </xsl:if>
  775. <xsl:call-template name="partintro.titlepage.separator"/>
  776. </fo:block>
  777. </xsl:template>
  778. <xsl:template match="*" mode="partintro.titlepage.recto.mode">
  779. <!-- if an element isn't found in this mode, -->
  780. <!-- try the generic titlepage.mode -->
  781. <xsl:apply-templates select="." mode="titlepage.mode"/>
  782. </xsl:template>
  783. <xsl:template match="*" mode="partintro.titlepage.verso.mode">
  784. <!-- if an element isn't found in this mode, -->
  785. <!-- try the generic titlepage.mode -->
  786. <xsl:apply-templates select="." mode="titlepage.mode"/>
  787. </xsl:template>
  788. <xsl:template match="title" mode="partintro.titlepage.recto.auto.mode">
  789. <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}">
  790. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  791. </fo:block>
  792. </xsl:template>
  793. <xsl:template match="subtitle" mode="partintro.titlepage.recto.auto.mode">
  794. <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}">
  795. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  796. </fo:block>
  797. </xsl:template>
  798. <xsl:template match="corpauthor" mode="partintro.titlepage.recto.auto.mode">
  799. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  800. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  801. </fo:block>
  802. </xsl:template>
  803. <xsl:template match="authorgroup" mode="partintro.titlepage.recto.auto.mode">
  804. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  805. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  806. </fo:block>
  807. </xsl:template>
  808. <xsl:template match="author" mode="partintro.titlepage.recto.auto.mode">
  809. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  810. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  811. </fo:block>
  812. </xsl:template>
  813. <xsl:template match="othercredit" mode="partintro.titlepage.recto.auto.mode">
  814. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  815. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  816. </fo:block>
  817. </xsl:template>
  818. <xsl:template match="releaseinfo" mode="partintro.titlepage.recto.auto.mode">
  819. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  820. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  821. </fo:block>
  822. </xsl:template>
  823. <xsl:template match="copyright" mode="partintro.titlepage.recto.auto.mode">
  824. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  825. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  826. </fo:block>
  827. </xsl:template>
  828. <xsl:template match="legalnotice" mode="partintro.titlepage.recto.auto.mode">
  829. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  830. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  831. </fo:block>
  832. </xsl:template>
  833. <xsl:template match="pubdate" mode="partintro.titlepage.recto.auto.mode">
  834. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  835. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  836. </fo:block>
  837. </xsl:template>
  838. <xsl:template match="revision" mode="partintro.titlepage.recto.auto.mode">
  839. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  840. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  841. </fo:block>
  842. </xsl:template>
  843. <xsl:template match="revhistory" mode="partintro.titlepage.recto.auto.mode">
  844. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  845. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  846. </fo:block>
  847. </xsl:template>
  848. <xsl:template match="abstract" mode="partintro.titlepage.recto.auto.mode">
  849. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  850. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  851. </fo:block>
  852. </xsl:template>
  853. <xsl:template match="itermset" mode="partintro.titlepage.recto.auto.mode">
  854. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  855. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  856. </fo:block>
  857. </xsl:template>
  858. <xsl:template name="reference.titlepage.recto">
  859. <xsl:choose>
  860. <xsl:when test="referenceinfo/title">
  861. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/title"/>
  862. </xsl:when>
  863. <xsl:when test="docinfo/title">
  864. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/title"/>
  865. </xsl:when>
  866. <xsl:when test="info/title">
  867. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/title"/>
  868. </xsl:when>
  869. <xsl:when test="title">
  870. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="title"/>
  871. </xsl:when>
  872. </xsl:choose>
  873. <xsl:choose>
  874. <xsl:when test="referenceinfo/subtitle">
  875. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/subtitle"/>
  876. </xsl:when>
  877. <xsl:when test="docinfo/subtitle">
  878. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  879. </xsl:when>
  880. <xsl:when test="info/subtitle">
  881. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/subtitle"/>
  882. </xsl:when>
  883. <xsl:when test="subtitle">
  884. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="subtitle"/>
  885. </xsl:when>
  886. </xsl:choose>
  887. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/corpauthor"/>
  888. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  889. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/corpauthor"/>
  890. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/authorgroup"/>
  891. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  892. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/authorgroup"/>
  893. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/author"/>
  894. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/author"/>
  895. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/author"/>
  896. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/othercredit"/>
  897. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  898. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/othercredit"/>
  899. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/releaseinfo"/>
  900. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  901. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  902. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/copyright"/>
  903. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  904. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/copyright"/>
  905. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/legalnotice"/>
  906. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  907. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/legalnotice"/>
  908. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/pubdate"/>
  909. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  910. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/pubdate"/>
  911. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revision"/>
  912. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revision"/>
  913. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revision"/>
  914. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revhistory"/>
  915. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  916. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revhistory"/>
  917. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/abstract"/>
  918. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  919. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/abstract"/>
  920. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/itermset"/>
  921. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  922. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/itermset"/>
  923. </xsl:template>
  924. <xsl:template name="reference.titlepage.verso">
  925. </xsl:template>
  926. <xsl:template name="reference.titlepage.separator">
  927. </xsl:template>
  928. <xsl:template name="reference.titlepage.before.recto">
  929. </xsl:template>
  930. <xsl:template name="reference.titlepage.before.verso">
  931. </xsl:template>
  932. <xsl:template name="reference.titlepage">
  933. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  934. <xsl:variable name="recto.content">
  935. <xsl:call-template name="reference.titlepage.before.recto"/>
  936. <xsl:call-template name="reference.titlepage.recto"/>
  937. </xsl:variable>
  938. <xsl:variable name="recto.elements.count">
  939. <xsl:choose>
  940. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  941. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  942. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  943. <xsl:otherwise>1</xsl:otherwise>
  944. </xsl:choose>
  945. </xsl:variable>
  946. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  947. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  948. </xsl:if>
  949. <xsl:variable name="verso.content">
  950. <xsl:call-template name="reference.titlepage.before.verso"/>
  951. <xsl:call-template name="reference.titlepage.verso"/>
  952. </xsl:variable>
  953. <xsl:variable name="verso.elements.count">
  954. <xsl:choose>
  955. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  956. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  957. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  958. <xsl:otherwise>1</xsl:otherwise>
  959. </xsl:choose>
  960. </xsl:variable>
  961. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  962. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  963. </xsl:if>
  964. <xsl:call-template name="reference.titlepage.separator"/>
  965. </fo:block>
  966. </xsl:template>
  967. <xsl:template match="*" mode="reference.titlepage.recto.mode">
  968. <!-- if an element isn't found in this mode, -->
  969. <!-- try the generic titlepage.mode -->
  970. <xsl:apply-templates select="." mode="titlepage.mode"/>
  971. </xsl:template>
  972. <xsl:template match="*" mode="reference.titlepage.verso.mode">
  973. <!-- if an element isn't found in this mode, -->
  974. <!-- try the generic titlepage.mode -->
  975. <xsl:apply-templates select="." mode="titlepage.mode"/>
  976. </xsl:template>
  977. <xsl:template match="title" mode="reference.titlepage.recto.auto.mode">
  978. <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}">
  979. <xsl:call-template name="division.title">
  980. <xsl:with-param name="node" select="ancestor-or-self::reference[1]"/>
  981. </xsl:call-template>
  982. </fo:block>
  983. </xsl:template>
  984. <xsl:template match="subtitle" mode="reference.titlepage.recto.auto.mode">
  985. <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">
  986. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  987. </fo:block>
  988. </xsl:template>
  989. <xsl:template match="corpauthor" mode="reference.titlepage.recto.auto.mode">
  990. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  991. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  992. </fo:block>
  993. </xsl:template>
  994. <xsl:template match="authorgroup" mode="reference.titlepage.recto.auto.mode">
  995. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  996. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  997. </fo:block>
  998. </xsl:template>
  999. <xsl:template match="author" mode="reference.titlepage.recto.auto.mode">
  1000. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  1001. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1002. </fo:block>
  1003. </xsl:template>
  1004. <xsl:template match="othercredit" mode="reference.titlepage.recto.auto.mode">
  1005. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  1006. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1007. </fo:block>
  1008. </xsl:template>
  1009. <xsl:template match="releaseinfo" mode="reference.titlepage.recto.auto.mode">
  1010. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  1011. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1012. </fo:block>
  1013. </xsl:template>
  1014. <xsl:template match="copyright" mode="reference.titlepage.recto.auto.mode">
  1015. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  1016. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1017. </fo:block>
  1018. </xsl:template>
  1019. <xsl:template match="legalnotice" mode="reference.titlepage.recto.auto.mode">
  1020. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  1021. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1022. </fo:block>
  1023. </xsl:template>
  1024. <xsl:template match="pubdate" mode="reference.titlepage.recto.auto.mode">
  1025. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  1026. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1027. </fo:block>
  1028. </xsl:template>
  1029. <xsl:template match="revision" mode="reference.titlepage.recto.auto.mode">
  1030. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  1031. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1032. </fo:block>
  1033. </xsl:template>
  1034. <xsl:template match="revhistory" mode="reference.titlepage.recto.auto.mode">
  1035. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  1036. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1037. </fo:block>
  1038. </xsl:template>
  1039. <xsl:template match="abstract" mode="reference.titlepage.recto.auto.mode">
  1040. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  1041. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1042. </fo:block>
  1043. </xsl:template>
  1044. <xsl:template match="itermset" mode="reference.titlepage.recto.auto.mode">
  1045. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  1046. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1047. </fo:block>
  1048. </xsl:template>
  1049. <xsl:template name="refsynopsisdiv.titlepage.recto">
  1050. <xsl:choose>
  1051. <xsl:when test="refsynopsisdivinfo/title">
  1052. <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="refsynopsisdivinfo/title"/>
  1053. </xsl:when>
  1054. <xsl:when test="docinfo/title">
  1055. <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
  1056. </xsl:when>
  1057. <xsl:when test="info/title">
  1058. <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="info/title"/>
  1059. </xsl:when>
  1060. <xsl:when test="title">
  1061. <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="title"/>
  1062. </xsl:when>
  1063. </xsl:choose>
  1064. <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="refsynopsisdivinfo/itermset"/>
  1065. <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  1066. <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="info/itermset"/>
  1067. </xsl:template>
  1068. <xsl:template name="refsynopsisdiv.titlepage.verso">
  1069. </xsl:template>
  1070. <xsl:template name="refsynopsisdiv.titlepage.separator">
  1071. </xsl:template>
  1072. <xsl:template name="refsynopsisdiv.titlepage.before.recto">
  1073. </xsl:template>
  1074. <xsl:template name="refsynopsisdiv.titlepage.before.verso">
  1075. </xsl:template>
  1076. <xsl:template name="refsynopsisdiv.titlepage">
  1077. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1078. <xsl:variable name="recto.content">
  1079. <xsl:call-template name="refsynopsisdiv.titlepage.before.recto"/>
  1080. <xsl:call-template name="refsynopsisdiv.titlepage.recto"/>
  1081. </xsl:variable>
  1082. <xsl:variable name="recto.elements.count">
  1083. <xsl:choose>
  1084. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1085. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1086. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1087. <xsl:otherwise>1</xsl:otherwise>
  1088. </xsl:choose>
  1089. </xsl:variable>
  1090. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1091. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1092. </xsl:if>
  1093. <xsl:variable name="verso.content">
  1094. <xsl:call-template name="refsynopsisdiv.titlepage.before.verso"/>
  1095. <xsl:call-template name="refsynopsisdiv.titlepage.verso"/>
  1096. </xsl:variable>
  1097. <xsl:variable name="verso.elements.count">
  1098. <xsl:choose>
  1099. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1100. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1101. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1102. <xsl:otherwise>1</xsl:otherwise>
  1103. </xsl:choose>
  1104. </xsl:variable>
  1105. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1106. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1107. </xsl:if>
  1108. <xsl:call-template name="refsynopsisdiv.titlepage.separator"/>
  1109. </fo:block>
  1110. </xsl:template>
  1111. <xsl:template match="*" mode="refsynopsisdiv.titlepage.recto.mode">
  1112. <!-- if an element isn't found in this mode, -->
  1113. <!-- try the generic titlepage.mode -->
  1114. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1115. </xsl:template>
  1116. <xsl:template match="*" mode="refsynopsisdiv.titlepage.verso.mode">
  1117. <!-- if an element isn't found in this mode, -->
  1118. <!-- try the generic titlepage.mode -->
  1119. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1120. </xsl:template>
  1121. <xsl:template match="title" mode="refsynopsisdiv.titlepage.recto.auto.mode">
  1122. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style" font-family="{$title.fontset}">
  1123. <xsl:apply-templates select="." mode="refsynopsisdiv.titlepage.recto.mode"/>
  1124. </fo:block>
  1125. </xsl:template>
  1126. <xsl:template match="itermset" mode="refsynopsisdiv.titlepage.recto.auto.mode">
  1127. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style">
  1128. <xsl:apply-templates select="." mode="refsynopsisdiv.titlepage.recto.mode"/>
  1129. </fo:block>
  1130. </xsl:template>
  1131. <xsl:template name="refsection.titlepage.recto">
  1132. <xsl:choose>
  1133. <xsl:when test="refsectioninfo/title">
  1134. <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="refsectioninfo/title"/>
  1135. </xsl:when>
  1136. <xsl:when test="docinfo/title">
  1137. <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="docinfo/title"/>
  1138. </xsl:when>
  1139. <xsl:when test="info/title">
  1140. <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="info/title"/>
  1141. </xsl:when>
  1142. <xsl:when test="title">
  1143. <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="title"/>
  1144. </xsl:when>
  1145. </xsl:choose>
  1146. <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="refsectioninfo/itermset"/>
  1147. <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  1148. <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="info/itermset"/>
  1149. </xsl:template>
  1150. <xsl:template name="refsection.titlepage.verso">
  1151. </xsl:template>
  1152. <xsl:template name="refsection.titlepage.separator">
  1153. </xsl:template>
  1154. <xsl:template name="refsection.titlepage.before.recto">
  1155. </xsl:template>
  1156. <xsl:template name="refsection.titlepage.before.verso">
  1157. </xsl:template>
  1158. <xsl:template name="refsection.titlepage">
  1159. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1160. <xsl:variable name="recto.content">
  1161. <xsl:call-template name="refsection.titlepage.before.recto"/>
  1162. <xsl:call-template name="refsection.titlepage.recto"/>
  1163. </xsl:variable>
  1164. <xsl:variable name="recto.elements.count">
  1165. <xsl:choose>
  1166. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1167. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1168. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1169. <xsl:otherwise>1</xsl:otherwise>
  1170. </xsl:choose>
  1171. </xsl:variable>
  1172. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1173. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1174. </xsl:if>
  1175. <xsl:variable name="verso.content">
  1176. <xsl:call-template name="refsection.titlepage.before.verso"/>
  1177. <xsl:call-template name="refsection.titlepage.verso"/>
  1178. </xsl:variable>
  1179. <xsl:variable name="verso.elements.count">
  1180. <xsl:choose>
  1181. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1182. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1183. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1184. <xsl:otherwise>1</xsl:otherwise>
  1185. </xsl:choose>
  1186. </xsl:variable>
  1187. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1188. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1189. </xsl:if>
  1190. <xsl:call-template name="refsection.titlepage.separator"/>
  1191. </fo:block>
  1192. </xsl:template>
  1193. <xsl:template match="*" mode="refsection.titlepage.recto.mode">
  1194. <!-- if an element isn't found in this mode, -->
  1195. <!-- try the generic titlepage.mode -->
  1196. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1197. </xsl:template>
  1198. <xsl:template match="*" mode="refsection.titlepage.verso.mode">
  1199. <!-- if an element isn't found in this mode, -->
  1200. <!-- try the generic titlepage.mode -->
  1201. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1202. </xsl:template>
  1203. <xsl:template match="title" mode="refsection.titlepage.recto.auto.mode">
  1204. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsection.titlepage.recto.style" font-family="{$title.fontset}">
  1205. <xsl:apply-templates select="." mode="refsection.titlepage.recto.mode"/>
  1206. </fo:block>
  1207. </xsl:template>
  1208. <xsl:template match="itermset" mode="refsection.titlepage.recto.auto.mode">
  1209. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsection.titlepage.recto.style">
  1210. <xsl:apply-templates select="." mode="refsection.titlepage.recto.mode"/>
  1211. </fo:block>
  1212. </xsl:template>
  1213. <xsl:template name="refsect1.titlepage.recto">
  1214. <xsl:choose>
  1215. <xsl:when test="refsect1info/title">
  1216. <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="refsect1info/title"/>
  1217. </xsl:when>
  1218. <xsl:when test="docinfo/title">
  1219. <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="docinfo/title"/>
  1220. </xsl:when>
  1221. <xsl:when test="info/title">
  1222. <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="info/title"/>
  1223. </xsl:when>
  1224. <xsl:when test="title">
  1225. <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="title"/>
  1226. </xsl:when>
  1227. </xsl:choose>
  1228. <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="refsect1info/itermset"/>
  1229. <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  1230. <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="info/itermset"/>
  1231. </xsl:template>
  1232. <xsl:template name="refsect1.titlepage.verso">
  1233. </xsl:template>
  1234. <xsl:template name="refsect1.titlepage.separator">
  1235. </xsl:template>
  1236. <xsl:template name="refsect1.titlepage.before.recto">
  1237. </xsl:template>
  1238. <xsl:template name="refsect1.titlepage.before.verso">
  1239. </xsl:template>
  1240. <xsl:template name="refsect1.titlepage">
  1241. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1242. <xsl:variable name="recto.content">
  1243. <xsl:call-template name="refsect1.titlepage.before.recto"/>
  1244. <xsl:call-template name="refsect1.titlepage.recto"/>
  1245. </xsl:variable>
  1246. <xsl:variable name="recto.elements.count">
  1247. <xsl:choose>
  1248. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1249. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1250. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1251. <xsl:otherwise>1</xsl:otherwise>
  1252. </xsl:choose>
  1253. </xsl:variable>
  1254. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1255. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1256. </xsl:if>
  1257. <xsl:variable name="verso.content">
  1258. <xsl:call-template name="refsect1.titlepage.before.verso"/>
  1259. <xsl:call-template name="refsect1.titlepage.verso"/>
  1260. </xsl:variable>
  1261. <xsl:variable name="verso.elements.count">
  1262. <xsl:choose>
  1263. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1264. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1265. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1266. <xsl:otherwise>1</xsl:otherwise>
  1267. </xsl:choose>
  1268. </xsl:variable>
  1269. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1270. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1271. </xsl:if>
  1272. <xsl:call-template name="refsect1.titlepage.separator"/>
  1273. </fo:block>
  1274. </xsl:template>
  1275. <xsl:template match="*" mode="refsect1.titlepage.recto.mode">
  1276. <!-- if an element isn't found in this mode, -->
  1277. <!-- try the generic titlepage.mode -->
  1278. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1279. </xsl:template>
  1280. <xsl:template match="*" mode="refsect1.titlepage.verso.mode">
  1281. <!-- if an element isn't found in this mode, -->
  1282. <!-- try the generic titlepage.mode -->
  1283. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1284. </xsl:template>
  1285. <xsl:template match="title" mode="refsect1.titlepage.recto.auto.mode">
  1286. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect1.titlepage.recto.style" font-family="{$title.fontset}">
  1287. <xsl:apply-templates select="." mode="refsect1.titlepage.recto.mode"/>
  1288. </fo:block>
  1289. </xsl:template>
  1290. <xsl:template match="itermset" mode="refsect1.titlepage.recto.auto.mode">
  1291. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect1.titlepage.recto.style">
  1292. <xsl:apply-templates select="." mode="refsect1.titlepage.recto.mode"/>
  1293. </fo:block>
  1294. </xsl:template>
  1295. <xsl:template name="refsect2.titlepage.recto">
  1296. <xsl:choose>
  1297. <xsl:when test="refsect2info/title">
  1298. <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="refsect2info/title"/>
  1299. </xsl:when>
  1300. <xsl:when test="docinfo/title">
  1301. <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="docinfo/title"/>
  1302. </xsl:when>
  1303. <xsl:when test="info/title">
  1304. <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="info/title"/>
  1305. </xsl:when>
  1306. <xsl:when test="title">
  1307. <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="title"/>
  1308. </xsl:when>
  1309. </xsl:choose>
  1310. <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="refsect2info/itermset"/>
  1311. <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  1312. <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="info/itermset"/>
  1313. </xsl:template>
  1314. <xsl:template name="refsect2.titlepage.verso">
  1315. </xsl:template>
  1316. <xsl:template name="refsect2.titlepage.separator">
  1317. </xsl:template>
  1318. <xsl:template name="refsect2.titlepage.before.recto">
  1319. </xsl:template>
  1320. <xsl:template name="refsect2.titlepage.before.verso">
  1321. </xsl:template>
  1322. <xsl:template name="refsect2.titlepage">
  1323. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1324. <xsl:variable name="recto.content">
  1325. <xsl:call-template name="refsect2.titlepage.before.recto"/>
  1326. <xsl:call-template name="refsect2.titlepage.recto"/>
  1327. </xsl:variable>
  1328. <xsl:variable name="recto.elements.count">
  1329. <xsl:choose>
  1330. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1331. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1332. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1333. <xsl:otherwise>1</xsl:otherwise>
  1334. </xsl:choose>
  1335. </xsl:variable>
  1336. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1337. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1338. </xsl:if>
  1339. <xsl:variable name="verso.content">
  1340. <xsl:call-template name="refsect2.titlepage.before.verso"/>
  1341. <xsl:call-template name="refsect2.titlepage.verso"/>
  1342. </xsl:variable>
  1343. <xsl:variable name="verso.elements.count">
  1344. <xsl:choose>
  1345. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1346. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1347. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1348. <xsl:otherwise>1</xsl:otherwise>
  1349. </xsl:choose>
  1350. </xsl:variable>
  1351. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1352. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1353. </xsl:if>
  1354. <xsl:call-template name="refsect2.titlepage.separator"/>
  1355. </fo:block>
  1356. </xsl:template>
  1357. <xsl:template match="*" mode="refsect2.titlepage.recto.mode">
  1358. <!-- if an element isn't found in this mode, -->
  1359. <!-- try the generic titlepage.mode -->
  1360. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1361. </xsl:template>
  1362. <xsl:template match="*" mode="refsect2.titlepage.verso.mode">
  1363. <!-- if an element isn't found in this mode, -->
  1364. <!-- try the generic titlepage.mode -->
  1365. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1366. </xsl:template>
  1367. <xsl:template match="title" mode="refsect2.titlepage.recto.auto.mode">
  1368. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect2.titlepage.recto.style" font-family="{$title.fontset}">
  1369. <xsl:apply-templates select="." mode="refsect2.titlepage.recto.mode"/>
  1370. </fo:block>
  1371. </xsl:template>
  1372. <xsl:template match="itermset" mode="refsect2.titlepage.recto.auto.mode">
  1373. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect2.titlepage.recto.style">
  1374. <xsl:apply-templates select="." mode="refsect2.titlepage.recto.mode"/>
  1375. </fo:block>
  1376. </xsl:template>
  1377. <xsl:template name="refsect3.titlepage.recto">
  1378. <xsl:choose>
  1379. <xsl:when test="refsect3info/title">
  1380. <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="refsect3info/title"/>
  1381. </xsl:when>
  1382. <xsl:when test="docinfo/title">
  1383. <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="docinfo/title"/>
  1384. </xsl:when>
  1385. <xsl:when test="info/title">
  1386. <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="info/title"/>
  1387. </xsl:when>
  1388. <xsl:when test="title">
  1389. <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="title"/>
  1390. </xsl:when>
  1391. </xsl:choose>
  1392. <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="refsect3info/itermset"/>
  1393. <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  1394. <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="info/itermset"/>
  1395. </xsl:template>
  1396. <xsl:template name="refsect3.titlepage.verso">
  1397. </xsl:template>
  1398. <xsl:template name="refsect3.titlepage.separator">
  1399. </xsl:template>
  1400. <xsl:template name="refsect3.titlepage.before.recto">
  1401. </xsl:template>
  1402. <xsl:template name="refsect3.titlepage.before.verso">
  1403. </xsl:template>
  1404. <xsl:template name="refsect3.titlepage">
  1405. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1406. <xsl:variable name="recto.content">
  1407. <xsl:call-template name="refsect3.titlepage.before.recto"/>
  1408. <xsl:call-template name="refsect3.titlepage.recto"/>
  1409. </xsl:variable>
  1410. <xsl:variable name="recto.elements.count">
  1411. <xsl:choose>
  1412. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1413. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1414. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1415. <xsl:otherwise>1</xsl:otherwise>
  1416. </xsl:choose>
  1417. </xsl:variable>
  1418. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1419. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1420. </xsl:if>
  1421. <xsl:variable name="verso.content">
  1422. <xsl:call-template name="refsect3.titlepage.before.verso"/>
  1423. <xsl:call-template name="refsect3.titlepage.verso"/>
  1424. </xsl:variable>
  1425. <xsl:variable name="verso.elements.count">
  1426. <xsl:choose>
  1427. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1428. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1429. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1430. <xsl:otherwise>1</xsl:otherwise>
  1431. </xsl:choose>
  1432. </xsl:variable>
  1433. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1434. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1435. </xsl:if>
  1436. <xsl:call-template name="refsect3.titlepage.separator"/>
  1437. </fo:block>
  1438. </xsl:template>
  1439. <xsl:template match="*" mode="refsect3.titlepage.recto.mode">
  1440. <!-- if an element isn't found in this mode, -->
  1441. <!-- try the generic titlepage.mode -->
  1442. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1443. </xsl:template>
  1444. <xsl:template match="*" mode="refsect3.titlepage.verso.mode">
  1445. <!-- if an element isn't found in this mode, -->
  1446. <!-- try the generic titlepage.mode -->
  1447. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1448. </xsl:template>
  1449. <xsl:template match="title" mode="refsect3.titlepage.recto.auto.mode">
  1450. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect3.titlepage.recto.style" font-family="{$title.fontset}">
  1451. <xsl:apply-templates select="." mode="refsect3.titlepage.recto.mode"/>
  1452. </fo:block>
  1453. </xsl:template>
  1454. <xsl:template match="itermset" mode="refsect3.titlepage.recto.auto.mode">
  1455. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect3.titlepage.recto.style">
  1456. <xsl:apply-templates select="." mode="refsect3.titlepage.recto.mode"/>
  1457. </fo:block>
  1458. </xsl:template>
  1459. <xsl:template name="dedication.titlepage.recto">
  1460. <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">
  1461. <xsl:call-template name="component.title">
  1462. <xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/>
  1463. </xsl:call-template></fo:block>
  1464. <xsl:choose>
  1465. <xsl:when test="dedicationinfo/subtitle">
  1466. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/subtitle"/>
  1467. </xsl:when>
  1468. <xsl:when test="docinfo/subtitle">
  1469. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1470. </xsl:when>
  1471. <xsl:when test="info/subtitle">
  1472. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/subtitle"/>
  1473. </xsl:when>
  1474. <xsl:when test="subtitle">
  1475. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="subtitle"/>
  1476. </xsl:when>
  1477. </xsl:choose>
  1478. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/itermset"/>
  1479. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  1480. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/itermset"/>
  1481. </xsl:template>
  1482. <xsl:template name="dedication.titlepage.verso">
  1483. </xsl:template>
  1484. <xsl:template name="dedication.titlepage.separator">
  1485. </xsl:template>
  1486. <xsl:template name="dedication.titlepage.before.recto">
  1487. </xsl:template>
  1488. <xsl:template name="dedication.titlepage.before.verso">
  1489. </xsl:template>
  1490. <xsl:template name="dedication.titlepage">
  1491. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1492. <xsl:variable name="recto.content">
  1493. <xsl:call-template name="dedication.titlepage.before.recto"/>
  1494. <xsl:call-template name="dedication.titlepage.recto"/>
  1495. </xsl:variable>
  1496. <xsl:variable name="recto.elements.count">
  1497. <xsl:choose>
  1498. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1499. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1500. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1501. <xsl:otherwise>1</xsl:otherwise>
  1502. </xsl:choose>
  1503. </xsl:variable>
  1504. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1505. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1506. </xsl:if>
  1507. <xsl:variable name="verso.content">
  1508. <xsl:call-template name="dedication.titlepage.before.verso"/>
  1509. <xsl:call-template name="dedication.titlepage.verso"/>
  1510. </xsl:variable>
  1511. <xsl:variable name="verso.elements.count">
  1512. <xsl:choose>
  1513. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1514. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1515. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1516. <xsl:otherwise>1</xsl:otherwise>
  1517. </xsl:choose>
  1518. </xsl:variable>
  1519. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1520. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1521. </xsl:if>
  1522. <xsl:call-template name="dedication.titlepage.separator"/>
  1523. </fo:block>
  1524. </xsl:template>
  1525. <xsl:template match="*" mode="dedication.titlepage.recto.mode">
  1526. <!-- if an element isn't found in this mode, -->
  1527. <!-- try the generic titlepage.mode -->
  1528. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1529. </xsl:template>
  1530. <xsl:template match="*" mode="dedication.titlepage.verso.mode">
  1531. <!-- if an element isn't found in this mode, -->
  1532. <!-- try the generic titlepage.mode -->
  1533. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1534. </xsl:template>
  1535. <xsl:template match="subtitle" mode="dedication.titlepage.recto.auto.mode">
  1536. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" font-family="{$title.fontset}">
  1537. <xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
  1538. </fo:block>
  1539. </xsl:template>
  1540. <xsl:template match="itermset" mode="dedication.titlepage.recto.auto.mode">
  1541. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style">
  1542. <xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
  1543. </fo:block>
  1544. </xsl:template>
  1545. <xsl:template name="acknowledgements.titlepage.recto">
  1546. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="acknowledgements.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
  1547. <xsl:call-template name="component.title">
  1548. <xsl:with-param name="node" select="ancestor-or-self::acknowledgements[1]"/>
  1549. </xsl:call-template></fo:block>
  1550. <xsl:choose>
  1551. <xsl:when test="acknowledgementsinfo/subtitle">
  1552. <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="acknowledgementsinfo/subtitle"/>
  1553. </xsl:when>
  1554. <xsl:when test="docinfo/subtitle">
  1555. <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1556. </xsl:when>
  1557. <xsl:when test="info/subtitle">
  1558. <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="info/subtitle"/>
  1559. </xsl:when>
  1560. <xsl:when test="subtitle">
  1561. <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="subtitle"/>
  1562. </xsl:when>
  1563. </xsl:choose>
  1564. <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="acknowledgementsinfo/itermset"/>
  1565. <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  1566. <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="info/itermset"/>
  1567. </xsl:template>
  1568. <xsl:template name="acknowledgements.titlepage.verso">
  1569. </xsl:template>
  1570. <xsl:template name="acknowledgements.titlepage.separator">
  1571. </xsl:template>
  1572. <xsl:template name="acknowledgements.titlepage.before.recto">
  1573. </xsl:template>
  1574. <xsl:template name="acknowledgements.titlepage.before.verso">
  1575. </xsl:template>
  1576. <xsl:template name="acknowledgements.titlepage">
  1577. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1578. <xsl:variable name="recto.content">
  1579. <xsl:call-template name="acknowledgements.titlepage.before.recto"/>
  1580. <xsl:call-template name="acknowledgements.titlepage.recto"/>
  1581. </xsl:variable>
  1582. <xsl:variable name="recto.elements.count">
  1583. <xsl:choose>
  1584. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1585. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1586. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1587. <xsl:otherwise>1</xsl:otherwise>
  1588. </xsl:choose>
  1589. </xsl:variable>
  1590. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1591. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1592. </xsl:if>
  1593. <xsl:variable name="verso.content">
  1594. <xsl:call-template name="acknowledgements.titlepage.before.verso"/>
  1595. <xsl:call-template name="acknowledgements.titlepage.verso"/>
  1596. </xsl:variable>
  1597. <xsl:variable name="verso.elements.count">
  1598. <xsl:choose>
  1599. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1600. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1601. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1602. <xsl:otherwise>1</xsl:otherwise>
  1603. </xsl:choose>
  1604. </xsl:variable>
  1605. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1606. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1607. </xsl:if>
  1608. <xsl:call-template name="acknowledgements.titlepage.separator"/>
  1609. </fo:block>
  1610. </xsl:template>
  1611. <xsl:template match="*" mode="acknowledgements.titlepage.recto.mode">
  1612. <!-- if an element isn't found in this mode, -->
  1613. <!-- try the generic titlepage.mode -->
  1614. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1615. </xsl:template>
  1616. <xsl:template match="*" mode="acknowledgements.titlepage.verso.mode">
  1617. <!-- if an element isn't found in this mode, -->
  1618. <!-- try the generic titlepage.mode -->
  1619. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1620. </xsl:template>
  1621. <xsl:template match="subtitle" mode="acknowledgements.titlepage.recto.auto.mode">
  1622. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="acknowledgements.titlepage.recto.style" font-family="{$title.fontset}">
  1623. <xsl:apply-templates select="." mode="acknowledgements.titlepage.recto.mode"/>
  1624. </fo:block>
  1625. </xsl:template>
  1626. <xsl:template match="itermset" mode="acknowledgements.titlepage.recto.auto.mode">
  1627. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="acknowledgements.titlepage.recto.style">
  1628. <xsl:apply-templates select="." mode="acknowledgements.titlepage.recto.mode"/>
  1629. </fo:block>
  1630. </xsl:template>
  1631. <xsl:template name="preface.titlepage.recto">
  1632. <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">
  1633. <xsl:call-template name="component.title">
  1634. <xsl:with-param name="node" select="ancestor-or-self::preface[1]"/>
  1635. </xsl:call-template></fo:block>
  1636. <xsl:choose>
  1637. <xsl:when test="prefaceinfo/subtitle">
  1638. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/>
  1639. </xsl:when>
  1640. <xsl:when test="docinfo/subtitle">
  1641. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1642. </xsl:when>
  1643. <xsl:when test="info/subtitle">
  1644. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/>
  1645. </xsl:when>
  1646. <xsl:when test="subtitle">
  1647. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/>
  1648. </xsl:when>
  1649. </xsl:choose>
  1650. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/>
  1651. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  1652. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/>
  1653. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/>
  1654. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  1655. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/>
  1656. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/>
  1657. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/>
  1658. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/>
  1659. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/>
  1660. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  1661. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/>
  1662. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/>
  1663. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  1664. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  1665. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/>
  1666. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  1667. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/>
  1668. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/>
  1669. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  1670. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/>
  1671. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/>
  1672. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  1673. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/>
  1674. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/>
  1675. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/>
  1676. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/>
  1677. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/>
  1678. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  1679. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/>
  1680. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/abstract"/>
  1681. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  1682. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/abstract"/>
  1683. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/itermset"/>
  1684. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  1685. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/itermset"/>
  1686. </xsl:template>
  1687. <xsl:template name="preface.titlepage.verso">
  1688. </xsl:template>
  1689. <xsl:template name="preface.titlepage.separator">
  1690. </xsl:template>
  1691. <xsl:template name="preface.titlepage.before.recto">
  1692. </xsl:template>
  1693. <xsl:template name="preface.titlepage.before.verso">
  1694. </xsl:template>
  1695. <xsl:template name="preface.titlepage">
  1696. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1697. <xsl:variable name="recto.content">
  1698. <xsl:call-template name="preface.titlepage.before.recto"/>
  1699. <xsl:call-template name="preface.titlepage.recto"/>
  1700. </xsl:variable>
  1701. <xsl:variable name="recto.elements.count">
  1702. <xsl:choose>
  1703. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1704. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1705. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1706. <xsl:otherwise>1</xsl:otherwise>
  1707. </xsl:choose>
  1708. </xsl:variable>
  1709. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1710. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1711. </xsl:if>
  1712. <xsl:variable name="verso.content">
  1713. <xsl:call-template name="preface.titlepage.before.verso"/>
  1714. <xsl:call-template name="preface.titlepage.verso"/>
  1715. </xsl:variable>
  1716. <xsl:variable name="verso.elements.count">
  1717. <xsl:choose>
  1718. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1719. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1720. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1721. <xsl:otherwise>1</xsl:otherwise>
  1722. </xsl:choose>
  1723. </xsl:variable>
  1724. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1725. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1726. </xsl:if>
  1727. <xsl:call-template name="preface.titlepage.separator"/>
  1728. </fo:block>
  1729. </xsl:template>
  1730. <xsl:template match="*" mode="preface.titlepage.recto.mode">
  1731. <!-- if an element isn't found in this mode, -->
  1732. <!-- try the generic titlepage.mode -->
  1733. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1734. </xsl:template>
  1735. <xsl:template match="*" mode="preface.titlepage.verso.mode">
  1736. <!-- if an element isn't found in this mode, -->
  1737. <!-- try the generic titlepage.mode -->
  1738. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1739. </xsl:template>
  1740. <xsl:template match="subtitle" mode="preface.titlepage.recto.auto.mode">
  1741. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" font-family="{$title.fontset}">
  1742. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1743. </fo:block>
  1744. </xsl:template>
  1745. <xsl:template match="corpauthor" mode="preface.titlepage.recto.auto.mode">
  1746. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1747. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1748. </fo:block>
  1749. </xsl:template>
  1750. <xsl:template match="authorgroup" mode="preface.titlepage.recto.auto.mode">
  1751. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1752. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1753. </fo:block>
  1754. </xsl:template>
  1755. <xsl:template match="author" mode="preface.titlepage.recto.auto.mode">
  1756. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1757. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1758. </fo:block>
  1759. </xsl:template>
  1760. <xsl:template match="othercredit" mode="preface.titlepage.recto.auto.mode">
  1761. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1762. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1763. </fo:block>
  1764. </xsl:template>
  1765. <xsl:template match="releaseinfo" mode="preface.titlepage.recto.auto.mode">
  1766. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1767. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1768. </fo:block>
  1769. </xsl:template>
  1770. <xsl:template match="copyright" mode="preface.titlepage.recto.auto.mode">
  1771. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1772. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1773. </fo:block>
  1774. </xsl:template>
  1775. <xsl:template match="legalnotice" mode="preface.titlepage.recto.auto.mode">
  1776. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1777. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1778. </fo:block>
  1779. </xsl:template>
  1780. <xsl:template match="pubdate" mode="preface.titlepage.recto.auto.mode">
  1781. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1782. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1783. </fo:block>
  1784. </xsl:template>
  1785. <xsl:template match="revision" mode="preface.titlepage.recto.auto.mode">
  1786. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1787. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1788. </fo:block>
  1789. </xsl:template>
  1790. <xsl:template match="revhistory" mode="preface.titlepage.recto.auto.mode">
  1791. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1792. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1793. </fo:block>
  1794. </xsl:template>
  1795. <xsl:template match="abstract" mode="preface.titlepage.recto.auto.mode">
  1796. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1797. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1798. </fo:block>
  1799. </xsl:template>
  1800. <xsl:template match="itermset" mode="preface.titlepage.recto.auto.mode">
  1801. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1802. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1803. </fo:block>
  1804. </xsl:template>
  1805. <xsl:template name="chapter.titlepage.recto">
  1806. <xsl:choose>
  1807. <xsl:when test="chapterinfo/title">
  1808. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/title"/>
  1809. </xsl:when>
  1810. <xsl:when test="docinfo/title">
  1811. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/title"/>
  1812. </xsl:when>
  1813. <xsl:when test="info/title">
  1814. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/title"/>
  1815. </xsl:when>
  1816. <xsl:when test="title">
  1817. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="title"/>
  1818. </xsl:when>
  1819. </xsl:choose>
  1820. <xsl:choose>
  1821. <xsl:when test="chapterinfo/subtitle">
  1822. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/subtitle"/>
  1823. </xsl:when>
  1824. <xsl:when test="docinfo/subtitle">
  1825. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1826. </xsl:when>
  1827. <xsl:when test="info/subtitle">
  1828. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/subtitle"/>
  1829. </xsl:when>
  1830. <xsl:when test="subtitle">
  1831. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="subtitle"/>
  1832. </xsl:when>
  1833. </xsl:choose>
  1834. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/corpauthor"/>
  1835. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  1836. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/corpauthor"/>
  1837. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/authorgroup"/>
  1838. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  1839. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/authorgroup"/>
  1840. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/author"/>
  1841. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/author"/>
  1842. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/author"/>
  1843. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/othercredit"/>
  1844. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  1845. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/othercredit"/>
  1846. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/releaseinfo"/>
  1847. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  1848. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  1849. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/copyright"/>
  1850. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  1851. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/copyright"/>
  1852. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/legalnotice"/>
  1853. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  1854. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/legalnotice"/>
  1855. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/pubdate"/>
  1856. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  1857. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/pubdate"/>
  1858. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revision"/>
  1859. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revision"/>
  1860. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revision"/>
  1861. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revhistory"/>
  1862. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  1863. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revhistory"/>
  1864. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/abstract"/>
  1865. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  1866. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/abstract"/>
  1867. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/itermset"/>
  1868. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  1869. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/itermset"/>
  1870. </xsl:template>
  1871. <xsl:template name="chapter.titlepage.verso">
  1872. </xsl:template>
  1873. <xsl:template name="chapter.titlepage.separator">
  1874. </xsl:template>
  1875. <xsl:template name="chapter.titlepage.before.recto">
  1876. </xsl:template>
  1877. <xsl:template name="chapter.titlepage.before.verso">
  1878. </xsl:template>
  1879. <xsl:template name="chapter.titlepage">
  1880. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
  1881. <xsl:variable name="recto.content">
  1882. <xsl:call-template name="chapter.titlepage.before.recto"/>
  1883. <xsl:call-template name="chapter.titlepage.recto"/>
  1884. </xsl:variable>
  1885. <xsl:variable name="recto.elements.count">
  1886. <xsl:choose>
  1887. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1888. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1889. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1890. <xsl:otherwise>1</xsl:otherwise>
  1891. </xsl:choose>
  1892. </xsl:variable>
  1893. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1894. <fo:block margin-left="{$title.margin.left}"><xsl:copy-of select="$recto.content"/></fo:block>
  1895. </xsl:if>
  1896. <xsl:variable name="verso.content">
  1897. <xsl:call-template name="chapter.titlepage.before.verso"/>
  1898. <xsl:call-template name="chapter.titlepage.verso"/>
  1899. </xsl:variable>
  1900. <xsl:variable name="verso.elements.count">
  1901. <xsl:choose>
  1902. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1903. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1904. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1905. <xsl:otherwise>1</xsl:otherwise>
  1906. </xsl:choose>
  1907. </xsl:variable>
  1908. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1909. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1910. </xsl:if>
  1911. <xsl:call-template name="chapter.titlepage.separator"/>
  1912. </fo:block>
  1913. </xsl:template>
  1914. <xsl:template match="*" mode="chapter.titlepage.recto.mode">
  1915. <!-- if an element isn't found in this mode, -->
  1916. <!-- try the generic titlepage.mode -->
  1917. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1918. </xsl:template>
  1919. <xsl:template match="*" mode="chapter.titlepage.verso.mode">
  1920. <!-- if an element isn't found in this mode, -->
  1921. <!-- try the generic titlepage.mode -->
  1922. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1923. </xsl:template>
  1924. <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
  1925. <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">
  1926. <xsl:call-template name="component.title">
  1927. <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
  1928. </xsl:call-template>
  1929. </fo:block>
  1930. </xsl:template>
  1931. <xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode">
  1932. <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">
  1933. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1934. </fo:block>
  1935. </xsl:template>
  1936. <xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode">
  1937. <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">
  1938. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1939. </fo:block>
  1940. </xsl:template>
  1941. <xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode">
  1942. <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">
  1943. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1944. </fo:block>
  1945. </xsl:template>
  1946. <xsl:template match="author" mode="chapter.titlepage.recto.auto.mode">
  1947. <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">
  1948. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1949. </fo:block>
  1950. </xsl:template>
  1951. <xsl:template match="othercredit" mode="chapter.titlepage.recto.auto.mode">
  1952. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1953. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1954. </fo:block>
  1955. </xsl:template>
  1956. <xsl:template match="releaseinfo" mode="chapter.titlepage.recto.auto.mode">
  1957. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1958. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1959. </fo:block>
  1960. </xsl:template>
  1961. <xsl:template match="copyright" mode="chapter.titlepage.recto.auto.mode">
  1962. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1963. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1964. </fo:block>
  1965. </xsl:template>
  1966. <xsl:template match="legalnotice" mode="chapter.titlepage.recto.auto.mode">
  1967. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1968. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1969. </fo:block>
  1970. </xsl:template>
  1971. <xsl:template match="pubdate" mode="chapter.titlepage.recto.auto.mode">
  1972. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1973. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1974. </fo:block>
  1975. </xsl:template>
  1976. <xsl:template match="revision" mode="chapter.titlepage.recto.auto.mode">
  1977. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1978. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1979. </fo:block>
  1980. </xsl:template>
  1981. <xsl:template match="revhistory" mode="chapter.titlepage.recto.auto.mode">
  1982. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1983. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1984. </fo:block>
  1985. </xsl:template>
  1986. <xsl:template match="abstract" mode="chapter.titlepage.recto.auto.mode">
  1987. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1988. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1989. </fo:block>
  1990. </xsl:template>
  1991. <xsl:template match="itermset" mode="chapter.titlepage.recto.auto.mode">
  1992. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1993. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1994. </fo:block>
  1995. </xsl:template>
  1996. <xsl:template name="appendix.titlepage.recto">
  1997. <xsl:choose>
  1998. <xsl:when test="appendixinfo/title">
  1999. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/title"/>
  2000. </xsl:when>
  2001. <xsl:when test="docinfo/title">
  2002. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/title"/>
  2003. </xsl:when>
  2004. <xsl:when test="info/title">
  2005. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/title"/>
  2006. </xsl:when>
  2007. <xsl:when test="title">
  2008. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="title"/>
  2009. </xsl:when>
  2010. </xsl:choose>
  2011. <xsl:choose>
  2012. <xsl:when test="appendixinfo/subtitle">
  2013. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/subtitle"/>
  2014. </xsl:when>
  2015. <xsl:when test="docinfo/subtitle">
  2016. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  2017. </xsl:when>
  2018. <xsl:when test="info/subtitle">
  2019. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/subtitle"/>
  2020. </xsl:when>
  2021. <xsl:when test="subtitle">
  2022. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="subtitle"/>
  2023. </xsl:when>
  2024. </xsl:choose>
  2025. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/corpauthor"/>
  2026. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  2027. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2028. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/authorgroup"/>
  2029. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  2030. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2031. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/author"/>
  2032. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/author"/>
  2033. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/author"/>
  2034. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/othercredit"/>
  2035. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  2036. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/othercredit"/>
  2037. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/releaseinfo"/>
  2038. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  2039. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2040. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/copyright"/>
  2041. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  2042. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/copyright"/>
  2043. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/legalnotice"/>
  2044. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  2045. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2046. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/pubdate"/>
  2047. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  2048. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/pubdate"/>
  2049. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revision"/>
  2050. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revision"/>
  2051. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revision"/>
  2052. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revhistory"/>
  2053. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  2054. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revhistory"/>
  2055. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/abstract"/>
  2056. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  2057. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/abstract"/>
  2058. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/itermset"/>
  2059. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  2060. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/itermset"/>
  2061. </xsl:template>
  2062. <xsl:template name="appendix.titlepage.verso">
  2063. </xsl:template>
  2064. <xsl:template name="appendix.titlepage.separator">
  2065. </xsl:template>
  2066. <xsl:template name="appendix.titlepage.before.recto">
  2067. </xsl:template>
  2068. <xsl:template name="appendix.titlepage.before.verso">
  2069. </xsl:template>
  2070. <xsl:template name="appendix.titlepage">
  2071. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2072. <xsl:variable name="recto.content">
  2073. <xsl:call-template name="appendix.titlepage.before.recto"/>
  2074. <xsl:call-template name="appendix.titlepage.recto"/>
  2075. </xsl:variable>
  2076. <xsl:variable name="recto.elements.count">
  2077. <xsl:choose>
  2078. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2079. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2080. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2081. <xsl:otherwise>1</xsl:otherwise>
  2082. </xsl:choose>
  2083. </xsl:variable>
  2084. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2085. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2086. </xsl:if>
  2087. <xsl:variable name="verso.content">
  2088. <xsl:call-template name="appendix.titlepage.before.verso"/>
  2089. <xsl:call-template name="appendix.titlepage.verso"/>
  2090. </xsl:variable>
  2091. <xsl:variable name="verso.elements.count">
  2092. <xsl:choose>
  2093. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2094. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2095. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2096. <xsl:otherwise>1</xsl:otherwise>
  2097. </xsl:choose>
  2098. </xsl:variable>
  2099. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2100. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2101. </xsl:if>
  2102. <xsl:call-template name="appendix.titlepage.separator"/>
  2103. </fo:block>
  2104. </xsl:template>
  2105. <xsl:template match="*" mode="appendix.titlepage.recto.mode">
  2106. <!-- if an element isn't found in this mode, -->
  2107. <!-- try the generic titlepage.mode -->
  2108. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2109. </xsl:template>
  2110. <xsl:template match="*" mode="appendix.titlepage.verso.mode">
  2111. <!-- if an element isn't found in this mode, -->
  2112. <!-- try the generic titlepage.mode -->
  2113. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2114. </xsl:template>
  2115. <xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
  2116. <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}">
  2117. <xsl:call-template name="component.title">
  2118. <xsl:with-param name="node" select="ancestor-or-self::appendix[1]"/>
  2119. </xsl:call-template>
  2120. </fo:block>
  2121. </xsl:template>
  2122. <xsl:template match="subtitle" mode="appendix.titlepage.recto.auto.mode">
  2123. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" font-family="{$title.fontset}">
  2124. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  2125. </fo:block>
  2126. </xsl:template>
  2127. <xsl:template match="corpauthor" mode="appendix.titlepage.recto.auto.mode">
  2128. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  2129. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  2130. </fo:block>
  2131. </xsl:template>
  2132. <xsl:template match="authorgroup" mode="appendix.titlepage.recto.auto.mode">
  2133. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  2134. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  2135. </fo:block>
  2136. </xsl:template>
  2137. <xsl:template match="author" mode="appendix.titlepage.recto.auto.mode">
  2138. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  2139. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  2140. </fo:block>
  2141. </xsl:template>
  2142. <xsl:template match="othercredit" mode="appendix.titlepage.recto.auto.mode">
  2143. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  2144. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  2145. </fo:block>
  2146. </xsl:template>
  2147. <xsl:template match="releaseinfo" mode="appendix.titlepage.recto.auto.mode">
  2148. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  2149. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  2150. </fo:block>
  2151. </xsl:template>
  2152. <xsl:template match="copyright" mode="appendix.titlepage.recto.auto.mode">
  2153. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  2154. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  2155. </fo:block>
  2156. </xsl:template>
  2157. <xsl:template match="legalnotice" mode="appendix.titlepage.recto.auto.mode">
  2158. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  2159. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  2160. </fo:block>
  2161. </xsl:template>
  2162. <xsl:template match="pubdate" mode="appendix.titlepage.recto.auto.mode">
  2163. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  2164. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  2165. </fo:block>
  2166. </xsl:template>
  2167. <xsl:template match="revision" mode="appendix.titlepage.recto.auto.mode">
  2168. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  2169. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  2170. </fo:block>
  2171. </xsl:template>
  2172. <xsl:template match="revhistory" mode="appendix.titlepage.recto.auto.mode">
  2173. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  2174. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  2175. </fo:block>
  2176. </xsl:template>
  2177. <xsl:template match="abstract" mode="appendix.titlepage.recto.auto.mode">
  2178. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  2179. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  2180. </fo:block>
  2181. </xsl:template>
  2182. <xsl:template match="itermset" mode="appendix.titlepage.recto.auto.mode">
  2183. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  2184. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  2185. </fo:block>
  2186. </xsl:template>
  2187. <xsl:template name="section.titlepage.recto">
  2188. <xsl:choose>
  2189. <xsl:when test="sectioninfo/title">
  2190. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/title"/>
  2191. </xsl:when>
  2192. <xsl:when test="info/title">
  2193. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/title"/>
  2194. </xsl:when>
  2195. <xsl:when test="title">
  2196. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="title"/>
  2197. </xsl:when>
  2198. </xsl:choose>
  2199. <xsl:choose>
  2200. <xsl:when test="sectioninfo/subtitle">
  2201. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/subtitle"/>
  2202. </xsl:when>
  2203. <xsl:when test="info/subtitle">
  2204. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/subtitle"/>
  2205. </xsl:when>
  2206. <xsl:when test="subtitle">
  2207. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="subtitle"/>
  2208. </xsl:when>
  2209. </xsl:choose>
  2210. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/corpauthor"/>
  2211. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2212. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/authorgroup"/>
  2213. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2214. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/author"/>
  2215. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/author"/>
  2216. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/othercredit"/>
  2217. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/othercredit"/>
  2218. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/releaseinfo"/>
  2219. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2220. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/copyright"/>
  2221. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/copyright"/>
  2222. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/legalnotice"/>
  2223. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2224. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/pubdate"/>
  2225. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/pubdate"/>
  2226. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revision"/>
  2227. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revision"/>
  2228. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revhistory"/>
  2229. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revhistory"/>
  2230. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/abstract"/>
  2231. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/abstract"/>
  2232. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/itermset"/>
  2233. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/itermset"/>
  2234. </xsl:template>
  2235. <xsl:template name="section.titlepage.verso">
  2236. </xsl:template>
  2237. <xsl:template name="section.titlepage.separator">
  2238. </xsl:template>
  2239. <xsl:template name="section.titlepage.before.recto">
  2240. </xsl:template>
  2241. <xsl:template name="section.titlepage.before.verso">
  2242. </xsl:template>
  2243. <xsl:template name="section.titlepage">
  2244. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2245. <xsl:variable name="recto.content">
  2246. <xsl:call-template name="section.titlepage.before.recto"/>
  2247. <xsl:call-template name="section.titlepage.recto"/>
  2248. </xsl:variable>
  2249. <xsl:variable name="recto.elements.count">
  2250. <xsl:choose>
  2251. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2252. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2253. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2254. <xsl:otherwise>1</xsl:otherwise>
  2255. </xsl:choose>
  2256. </xsl:variable>
  2257. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2258. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2259. </xsl:if>
  2260. <xsl:variable name="verso.content">
  2261. <xsl:call-template name="section.titlepage.before.verso"/>
  2262. <xsl:call-template name="section.titlepage.verso"/>
  2263. </xsl:variable>
  2264. <xsl:variable name="verso.elements.count">
  2265. <xsl:choose>
  2266. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2267. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2268. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2269. <xsl:otherwise>1</xsl:otherwise>
  2270. </xsl:choose>
  2271. </xsl:variable>
  2272. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2273. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2274. </xsl:if>
  2275. <xsl:call-template name="section.titlepage.separator"/>
  2276. </fo:block>
  2277. </xsl:template>
  2278. <xsl:template match="*" mode="section.titlepage.recto.mode">
  2279. <!-- if an element isn't found in this mode, -->
  2280. <!-- try the generic titlepage.mode -->
  2281. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2282. </xsl:template>
  2283. <xsl:template match="*" mode="section.titlepage.verso.mode">
  2284. <!-- if an element isn't found in this mode, -->
  2285. <!-- try the generic titlepage.mode -->
  2286. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2287. </xsl:template>
  2288. <xsl:template match="title" mode="section.titlepage.recto.auto.mode">
  2289. <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}">
  2290. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2291. </fo:block>
  2292. </xsl:template>
  2293. <xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode">
  2294. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style" font-family="{$title.fontset}">
  2295. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2296. </fo:block>
  2297. </xsl:template>
  2298. <xsl:template match="corpauthor" mode="section.titlepage.recto.auto.mode">
  2299. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2300. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2301. </fo:block>
  2302. </xsl:template>
  2303. <xsl:template match="authorgroup" mode="section.titlepage.recto.auto.mode">
  2304. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2305. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2306. </fo:block>
  2307. </xsl:template>
  2308. <xsl:template match="author" mode="section.titlepage.recto.auto.mode">
  2309. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2310. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2311. </fo:block>
  2312. </xsl:template>
  2313. <xsl:template match="othercredit" mode="section.titlepage.recto.auto.mode">
  2314. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2315. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2316. </fo:block>
  2317. </xsl:template>
  2318. <xsl:template match="releaseinfo" mode="section.titlepage.recto.auto.mode">
  2319. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2320. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2321. </fo:block>
  2322. </xsl:template>
  2323. <xsl:template match="copyright" mode="section.titlepage.recto.auto.mode">
  2324. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2325. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2326. </fo:block>
  2327. </xsl:template>
  2328. <xsl:template match="legalnotice" mode="section.titlepage.recto.auto.mode">
  2329. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2330. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2331. </fo:block>
  2332. </xsl:template>
  2333. <xsl:template match="pubdate" mode="section.titlepage.recto.auto.mode">
  2334. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2335. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2336. </fo:block>
  2337. </xsl:template>
  2338. <xsl:template match="revision" mode="section.titlepage.recto.auto.mode">
  2339. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2340. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2341. </fo:block>
  2342. </xsl:template>
  2343. <xsl:template match="revhistory" mode="section.titlepage.recto.auto.mode">
  2344. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2345. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2346. </fo:block>
  2347. </xsl:template>
  2348. <xsl:template match="abstract" mode="section.titlepage.recto.auto.mode">
  2349. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2350. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2351. </fo:block>
  2352. </xsl:template>
  2353. <xsl:template match="itermset" mode="section.titlepage.recto.auto.mode">
  2354. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2355. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2356. </fo:block>
  2357. </xsl:template>
  2358. <xsl:template name="sect1.titlepage.recto">
  2359. <xsl:choose>
  2360. <xsl:when test="sect1info/title">
  2361. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/title"/>
  2362. </xsl:when>
  2363. <xsl:when test="info/title">
  2364. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/title"/>
  2365. </xsl:when>
  2366. <xsl:when test="title">
  2367. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="title"/>
  2368. </xsl:when>
  2369. </xsl:choose>
  2370. <xsl:choose>
  2371. <xsl:when test="sect1info/subtitle">
  2372. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/subtitle"/>
  2373. </xsl:when>
  2374. <xsl:when test="info/subtitle">
  2375. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/subtitle"/>
  2376. </xsl:when>
  2377. <xsl:when test="subtitle">
  2378. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="subtitle"/>
  2379. </xsl:when>
  2380. </xsl:choose>
  2381. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/corpauthor"/>
  2382. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2383. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/authorgroup"/>
  2384. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2385. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/author"/>
  2386. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/author"/>
  2387. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/othercredit"/>
  2388. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/othercredit"/>
  2389. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/releaseinfo"/>
  2390. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2391. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/copyright"/>
  2392. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/copyright"/>
  2393. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/legalnotice"/>
  2394. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2395. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/pubdate"/>
  2396. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/pubdate"/>
  2397. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revision"/>
  2398. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revision"/>
  2399. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revhistory"/>
  2400. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revhistory"/>
  2401. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/abstract"/>
  2402. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/abstract"/>
  2403. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/itermset"/>
  2404. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/itermset"/>
  2405. </xsl:template>
  2406. <xsl:template name="sect1.titlepage.verso">
  2407. </xsl:template>
  2408. <xsl:template name="sect1.titlepage.separator">
  2409. </xsl:template>
  2410. <xsl:template name="sect1.titlepage.before.recto">
  2411. </xsl:template>
  2412. <xsl:template name="sect1.titlepage.before.verso">
  2413. </xsl:template>
  2414. <xsl:template name="sect1.titlepage">
  2415. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2416. <xsl:variable name="recto.content">
  2417. <xsl:call-template name="sect1.titlepage.before.recto"/>
  2418. <xsl:call-template name="sect1.titlepage.recto"/>
  2419. </xsl:variable>
  2420. <xsl:variable name="recto.elements.count">
  2421. <xsl:choose>
  2422. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2423. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2424. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2425. <xsl:otherwise>1</xsl:otherwise>
  2426. </xsl:choose>
  2427. </xsl:variable>
  2428. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2429. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2430. </xsl:if>
  2431. <xsl:variable name="verso.content">
  2432. <xsl:call-template name="sect1.titlepage.before.verso"/>
  2433. <xsl:call-template name="sect1.titlepage.verso"/>
  2434. </xsl:variable>
  2435. <xsl:variable name="verso.elements.count">
  2436. <xsl:choose>
  2437. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2438. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2439. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2440. <xsl:otherwise>1</xsl:otherwise>
  2441. </xsl:choose>
  2442. </xsl:variable>
  2443. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2444. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2445. </xsl:if>
  2446. <xsl:call-template name="sect1.titlepage.separator"/>
  2447. </fo:block>
  2448. </xsl:template>
  2449. <xsl:template match="*" mode="sect1.titlepage.recto.mode">
  2450. <!-- if an element isn't found in this mode, -->
  2451. <!-- try the generic titlepage.mode -->
  2452. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2453. </xsl:template>
  2454. <xsl:template match="*" mode="sect1.titlepage.verso.mode">
  2455. <!-- if an element isn't found in this mode, -->
  2456. <!-- try the generic titlepage.mode -->
  2457. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2458. </xsl:template>
  2459. <xsl:template match="title" mode="sect1.titlepage.recto.auto.mode">
  2460. <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}">
  2461. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2462. </fo:block>
  2463. </xsl:template>
  2464. <xsl:template match="subtitle" mode="sect1.titlepage.recto.auto.mode">
  2465. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style" font-family="{$title.fontset}">
  2466. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2467. </fo:block>
  2468. </xsl:template>
  2469. <xsl:template match="corpauthor" mode="sect1.titlepage.recto.auto.mode">
  2470. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2471. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2472. </fo:block>
  2473. </xsl:template>
  2474. <xsl:template match="authorgroup" mode="sect1.titlepage.recto.auto.mode">
  2475. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2476. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2477. </fo:block>
  2478. </xsl:template>
  2479. <xsl:template match="author" mode="sect1.titlepage.recto.auto.mode">
  2480. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2481. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2482. </fo:block>
  2483. </xsl:template>
  2484. <xsl:template match="othercredit" mode="sect1.titlepage.recto.auto.mode">
  2485. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2486. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2487. </fo:block>
  2488. </xsl:template>
  2489. <xsl:template match="releaseinfo" mode="sect1.titlepage.recto.auto.mode">
  2490. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2491. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2492. </fo:block>
  2493. </xsl:template>
  2494. <xsl:template match="copyright" mode="sect1.titlepage.recto.auto.mode">
  2495. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2496. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2497. </fo:block>
  2498. </xsl:template>
  2499. <xsl:template match="legalnotice" mode="sect1.titlepage.recto.auto.mode">
  2500. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2501. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2502. </fo:block>
  2503. </xsl:template>
  2504. <xsl:template match="pubdate" mode="sect1.titlepage.recto.auto.mode">
  2505. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2506. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2507. </fo:block>
  2508. </xsl:template>
  2509. <xsl:template match="revision" mode="sect1.titlepage.recto.auto.mode">
  2510. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2511. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2512. </fo:block>
  2513. </xsl:template>
  2514. <xsl:template match="revhistory" mode="sect1.titlepage.recto.auto.mode">
  2515. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2516. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2517. </fo:block>
  2518. </xsl:template>
  2519. <xsl:template match="abstract" mode="sect1.titlepage.recto.auto.mode">
  2520. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2521. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2522. </fo:block>
  2523. </xsl:template>
  2524. <xsl:template match="itermset" mode="sect1.titlepage.recto.auto.mode">
  2525. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2526. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2527. </fo:block>
  2528. </xsl:template>
  2529. <xsl:template name="sect2.titlepage.recto">
  2530. <xsl:choose>
  2531. <xsl:when test="sect2info/title">
  2532. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/title"/>
  2533. </xsl:when>
  2534. <xsl:when test="info/title">
  2535. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/title"/>
  2536. </xsl:when>
  2537. <xsl:when test="title">
  2538. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="title"/>
  2539. </xsl:when>
  2540. </xsl:choose>
  2541. <xsl:choose>
  2542. <xsl:when test="sect2info/subtitle">
  2543. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/subtitle"/>
  2544. </xsl:when>
  2545. <xsl:when test="info/subtitle">
  2546. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/subtitle"/>
  2547. </xsl:when>
  2548. <xsl:when test="subtitle">
  2549. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="subtitle"/>
  2550. </xsl:when>
  2551. </xsl:choose>
  2552. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/corpauthor"/>
  2553. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2554. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/authorgroup"/>
  2555. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2556. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/author"/>
  2557. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/author"/>
  2558. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/othercredit"/>
  2559. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/othercredit"/>
  2560. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/releaseinfo"/>
  2561. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2562. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/copyright"/>
  2563. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/copyright"/>
  2564. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/legalnotice"/>
  2565. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2566. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/pubdate"/>
  2567. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/pubdate"/>
  2568. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revision"/>
  2569. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revision"/>
  2570. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revhistory"/>
  2571. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revhistory"/>
  2572. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/abstract"/>
  2573. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/abstract"/>
  2574. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/itermset"/>
  2575. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/itermset"/>
  2576. </xsl:template>
  2577. <xsl:template name="sect2.titlepage.verso">
  2578. </xsl:template>
  2579. <xsl:template name="sect2.titlepage.separator">
  2580. </xsl:template>
  2581. <xsl:template name="sect2.titlepage.before.recto">
  2582. </xsl:template>
  2583. <xsl:template name="sect2.titlepage.before.verso">
  2584. </xsl:template>
  2585. <xsl:template name="sect2.titlepage">
  2586. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2587. <xsl:variable name="recto.content">
  2588. <xsl:call-template name="sect2.titlepage.before.recto"/>
  2589. <xsl:call-template name="sect2.titlepage.recto"/>
  2590. </xsl:variable>
  2591. <xsl:variable name="recto.elements.count">
  2592. <xsl:choose>
  2593. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2594. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2595. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2596. <xsl:otherwise>1</xsl:otherwise>
  2597. </xsl:choose>
  2598. </xsl:variable>
  2599. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2600. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2601. </xsl:if>
  2602. <xsl:variable name="verso.content">
  2603. <xsl:call-template name="sect2.titlepage.before.verso"/>
  2604. <xsl:call-template name="sect2.titlepage.verso"/>
  2605. </xsl:variable>
  2606. <xsl:variable name="verso.elements.count">
  2607. <xsl:choose>
  2608. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2609. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2610. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2611. <xsl:otherwise>1</xsl:otherwise>
  2612. </xsl:choose>
  2613. </xsl:variable>
  2614. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2615. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2616. </xsl:if>
  2617. <xsl:call-template name="sect2.titlepage.separator"/>
  2618. </fo:block>
  2619. </xsl:template>
  2620. <xsl:template match="*" mode="sect2.titlepage.recto.mode">
  2621. <!-- if an element isn't found in this mode, -->
  2622. <!-- try the generic titlepage.mode -->
  2623. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2624. </xsl:template>
  2625. <xsl:template match="*" mode="sect2.titlepage.verso.mode">
  2626. <!-- if an element isn't found in this mode, -->
  2627. <!-- try the generic titlepage.mode -->
  2628. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2629. </xsl:template>
  2630. <xsl:template match="title" mode="sect2.titlepage.recto.auto.mode">
  2631. <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}">
  2632. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2633. </fo:block>
  2634. </xsl:template>
  2635. <xsl:template match="subtitle" mode="sect2.titlepage.recto.auto.mode">
  2636. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style" font-family="{$title.fontset}">
  2637. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2638. </fo:block>
  2639. </xsl:template>
  2640. <xsl:template match="corpauthor" mode="sect2.titlepage.recto.auto.mode">
  2641. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2642. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2643. </fo:block>
  2644. </xsl:template>
  2645. <xsl:template match="authorgroup" mode="sect2.titlepage.recto.auto.mode">
  2646. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2647. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2648. </fo:block>
  2649. </xsl:template>
  2650. <xsl:template match="author" mode="sect2.titlepage.recto.auto.mode">
  2651. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2652. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2653. </fo:block>
  2654. </xsl:template>
  2655. <xsl:template match="othercredit" mode="sect2.titlepage.recto.auto.mode">
  2656. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2657. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2658. </fo:block>
  2659. </xsl:template>
  2660. <xsl:template match="releaseinfo" mode="sect2.titlepage.recto.auto.mode">
  2661. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2662. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2663. </fo:block>
  2664. </xsl:template>
  2665. <xsl:template match="copyright" mode="sect2.titlepage.recto.auto.mode">
  2666. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2667. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2668. </fo:block>
  2669. </xsl:template>
  2670. <xsl:template match="legalnotice" mode="sect2.titlepage.recto.auto.mode">
  2671. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2672. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2673. </fo:block>
  2674. </xsl:template>
  2675. <xsl:template match="pubdate" mode="sect2.titlepage.recto.auto.mode">
  2676. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2677. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2678. </fo:block>
  2679. </xsl:template>
  2680. <xsl:template match="revision" mode="sect2.titlepage.recto.auto.mode">
  2681. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2682. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2683. </fo:block>
  2684. </xsl:template>
  2685. <xsl:template match="revhistory" mode="sect2.titlepage.recto.auto.mode">
  2686. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2687. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2688. </fo:block>
  2689. </xsl:template>
  2690. <xsl:template match="abstract" mode="sect2.titlepage.recto.auto.mode">
  2691. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2692. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2693. </fo:block>
  2694. </xsl:template>
  2695. <xsl:template match="itermset" mode="sect2.titlepage.recto.auto.mode">
  2696. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2697. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2698. </fo:block>
  2699. </xsl:template>
  2700. <xsl:template name="sect3.titlepage.recto">
  2701. <xsl:choose>
  2702. <xsl:when test="sect3info/title">
  2703. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/title"/>
  2704. </xsl:when>
  2705. <xsl:when test="info/title">
  2706. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/title"/>
  2707. </xsl:when>
  2708. <xsl:when test="title">
  2709. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="title"/>
  2710. </xsl:when>
  2711. </xsl:choose>
  2712. <xsl:choose>
  2713. <xsl:when test="sect3info/subtitle">
  2714. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/subtitle"/>
  2715. </xsl:when>
  2716. <xsl:when test="info/subtitle">
  2717. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/subtitle"/>
  2718. </xsl:when>
  2719. <xsl:when test="subtitle">
  2720. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="subtitle"/>
  2721. </xsl:when>
  2722. </xsl:choose>
  2723. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/corpauthor"/>
  2724. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2725. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/authorgroup"/>
  2726. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2727. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/author"/>
  2728. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/author"/>
  2729. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/othercredit"/>
  2730. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/othercredit"/>
  2731. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/releaseinfo"/>
  2732. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2733. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/copyright"/>
  2734. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/copyright"/>
  2735. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/legalnotice"/>
  2736. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2737. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/pubdate"/>
  2738. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/pubdate"/>
  2739. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revision"/>
  2740. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revision"/>
  2741. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revhistory"/>
  2742. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revhistory"/>
  2743. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/abstract"/>
  2744. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/abstract"/>
  2745. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/itermset"/>
  2746. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/itermset"/>
  2747. </xsl:template>
  2748. <xsl:template name="sect3.titlepage.verso">
  2749. </xsl:template>
  2750. <xsl:template name="sect3.titlepage.separator">
  2751. </xsl:template>
  2752. <xsl:template name="sect3.titlepage.before.recto">
  2753. </xsl:template>
  2754. <xsl:template name="sect3.titlepage.before.verso">
  2755. </xsl:template>
  2756. <xsl:template name="sect3.titlepage">
  2757. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2758. <xsl:variable name="recto.content">
  2759. <xsl:call-template name="sect3.titlepage.before.recto"/>
  2760. <xsl:call-template name="sect3.titlepage.recto"/>
  2761. </xsl:variable>
  2762. <xsl:variable name="recto.elements.count">
  2763. <xsl:choose>
  2764. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2765. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2766. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2767. <xsl:otherwise>1</xsl:otherwise>
  2768. </xsl:choose>
  2769. </xsl:variable>
  2770. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2771. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2772. </xsl:if>
  2773. <xsl:variable name="verso.content">
  2774. <xsl:call-template name="sect3.titlepage.before.verso"/>
  2775. <xsl:call-template name="sect3.titlepage.verso"/>
  2776. </xsl:variable>
  2777. <xsl:variable name="verso.elements.count">
  2778. <xsl:choose>
  2779. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2780. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2781. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2782. <xsl:otherwise>1</xsl:otherwise>
  2783. </xsl:choose>
  2784. </xsl:variable>
  2785. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2786. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2787. </xsl:if>
  2788. <xsl:call-template name="sect3.titlepage.separator"/>
  2789. </fo:block>
  2790. </xsl:template>
  2791. <xsl:template match="*" mode="sect3.titlepage.recto.mode">
  2792. <!-- if an element isn't found in this mode, -->
  2793. <!-- try the generic titlepage.mode -->
  2794. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2795. </xsl:template>
  2796. <xsl:template match="*" mode="sect3.titlepage.verso.mode">
  2797. <!-- if an element isn't found in this mode, -->
  2798. <!-- try the generic titlepage.mode -->
  2799. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2800. </xsl:template>
  2801. <xsl:template match="title" mode="sect3.titlepage.recto.auto.mode">
  2802. <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}">
  2803. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2804. </fo:block>
  2805. </xsl:template>
  2806. <xsl:template match="subtitle" mode="sect3.titlepage.recto.auto.mode">
  2807. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style" font-family="{$title.fontset}">
  2808. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2809. </fo:block>
  2810. </xsl:template>
  2811. <xsl:template match="corpauthor" mode="sect3.titlepage.recto.auto.mode">
  2812. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2813. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2814. </fo:block>
  2815. </xsl:template>
  2816. <xsl:template match="authorgroup" mode="sect3.titlepage.recto.auto.mode">
  2817. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2818. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2819. </fo:block>
  2820. </xsl:template>
  2821. <xsl:template match="author" mode="sect3.titlepage.recto.auto.mode">
  2822. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2823. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2824. </fo:block>
  2825. </xsl:template>
  2826. <xsl:template match="othercredit" mode="sect3.titlepage.recto.auto.mode">
  2827. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2828. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2829. </fo:block>
  2830. </xsl:template>
  2831. <xsl:template match="releaseinfo" mode="sect3.titlepage.recto.auto.mode">
  2832. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2833. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2834. </fo:block>
  2835. </xsl:template>
  2836. <xsl:template match="copyright" mode="sect3.titlepage.recto.auto.mode">
  2837. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2838. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2839. </fo:block>
  2840. </xsl:template>
  2841. <xsl:template match="legalnotice" mode="sect3.titlepage.recto.auto.mode">
  2842. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2843. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2844. </fo:block>
  2845. </xsl:template>
  2846. <xsl:template match="pubdate" mode="sect3.titlepage.recto.auto.mode">
  2847. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2848. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2849. </fo:block>
  2850. </xsl:template>
  2851. <xsl:template match="revision" mode="sect3.titlepage.recto.auto.mode">
  2852. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2853. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2854. </fo:block>
  2855. </xsl:template>
  2856. <xsl:template match="revhistory" mode="sect3.titlepage.recto.auto.mode">
  2857. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2858. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2859. </fo:block>
  2860. </xsl:template>
  2861. <xsl:template match="abstract" mode="sect3.titlepage.recto.auto.mode">
  2862. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2863. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2864. </fo:block>
  2865. </xsl:template>
  2866. <xsl:template match="itermset" mode="sect3.titlepage.recto.auto.mode">
  2867. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2868. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2869. </fo:block>
  2870. </xsl:template>
  2871. <xsl:template name="sect4.titlepage.recto">
  2872. <xsl:choose>
  2873. <xsl:when test="sect4info/title">
  2874. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/title"/>
  2875. </xsl:when>
  2876. <xsl:when test="info/title">
  2877. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/title"/>
  2878. </xsl:when>
  2879. <xsl:when test="title">
  2880. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="title"/>
  2881. </xsl:when>
  2882. </xsl:choose>
  2883. <xsl:choose>
  2884. <xsl:when test="sect4info/subtitle">
  2885. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/subtitle"/>
  2886. </xsl:when>
  2887. <xsl:when test="info/subtitle">
  2888. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/subtitle"/>
  2889. </xsl:when>
  2890. <xsl:when test="subtitle">
  2891. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="subtitle"/>
  2892. </xsl:when>
  2893. </xsl:choose>
  2894. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/corpauthor"/>
  2895. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2896. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/authorgroup"/>
  2897. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2898. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/author"/>
  2899. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/author"/>
  2900. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/othercredit"/>
  2901. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/othercredit"/>
  2902. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/releaseinfo"/>
  2903. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2904. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/copyright"/>
  2905. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/copyright"/>
  2906. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/legalnotice"/>
  2907. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2908. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/pubdate"/>
  2909. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/pubdate"/>
  2910. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revision"/>
  2911. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revision"/>
  2912. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revhistory"/>
  2913. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revhistory"/>
  2914. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/abstract"/>
  2915. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/abstract"/>
  2916. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/itermset"/>
  2917. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/itermset"/>
  2918. </xsl:template>
  2919. <xsl:template name="sect4.titlepage.verso">
  2920. </xsl:template>
  2921. <xsl:template name="sect4.titlepage.separator">
  2922. </xsl:template>
  2923. <xsl:template name="sect4.titlepage.before.recto">
  2924. </xsl:template>
  2925. <xsl:template name="sect4.titlepage.before.verso">
  2926. </xsl:template>
  2927. <xsl:template name="sect4.titlepage">
  2928. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2929. <xsl:variable name="recto.content">
  2930. <xsl:call-template name="sect4.titlepage.before.recto"/>
  2931. <xsl:call-template name="sect4.titlepage.recto"/>
  2932. </xsl:variable>
  2933. <xsl:variable name="recto.elements.count">
  2934. <xsl:choose>
  2935. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2936. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2937. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2938. <xsl:otherwise>1</xsl:otherwise>
  2939. </xsl:choose>
  2940. </xsl:variable>
  2941. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2942. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2943. </xsl:if>
  2944. <xsl:variable name="verso.content">
  2945. <xsl:call-template name="sect4.titlepage.before.verso"/>
  2946. <xsl:call-template name="sect4.titlepage.verso"/>
  2947. </xsl:variable>
  2948. <xsl:variable name="verso.elements.count">
  2949. <xsl:choose>
  2950. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2951. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2952. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2953. <xsl:otherwise>1</xsl:otherwise>
  2954. </xsl:choose>
  2955. </xsl:variable>
  2956. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2957. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2958. </xsl:if>
  2959. <xsl:call-template name="sect4.titlepage.separator"/>
  2960. </fo:block>
  2961. </xsl:template>
  2962. <xsl:template match="*" mode="sect4.titlepage.recto.mode">
  2963. <!-- if an element isn't found in this mode, -->
  2964. <!-- try the generic titlepage.mode -->
  2965. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2966. </xsl:template>
  2967. <xsl:template match="*" mode="sect4.titlepage.verso.mode">
  2968. <!-- if an element isn't found in this mode, -->
  2969. <!-- try the generic titlepage.mode -->
  2970. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2971. </xsl:template>
  2972. <xsl:template match="title" mode="sect4.titlepage.recto.auto.mode">
  2973. <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}">
  2974. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2975. </fo:block>
  2976. </xsl:template>
  2977. <xsl:template match="subtitle" mode="sect4.titlepage.recto.auto.mode">
  2978. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style" font-family="{$title.fontset}">
  2979. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2980. </fo:block>
  2981. </xsl:template>
  2982. <xsl:template match="corpauthor" mode="sect4.titlepage.recto.auto.mode">
  2983. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2984. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2985. </fo:block>
  2986. </xsl:template>
  2987. <xsl:template match="authorgroup" mode="sect4.titlepage.recto.auto.mode">
  2988. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2989. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2990. </fo:block>
  2991. </xsl:template>
  2992. <xsl:template match="author" mode="sect4.titlepage.recto.auto.mode">
  2993. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2994. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2995. </fo:block>
  2996. </xsl:template>
  2997. <xsl:template match="othercredit" mode="sect4.titlepage.recto.auto.mode">
  2998. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2999. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  3000. </fo:block>
  3001. </xsl:template>
  3002. <xsl:template match="releaseinfo" mode="sect4.titlepage.recto.auto.mode">
  3003. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  3004. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  3005. </fo:block>
  3006. </xsl:template>
  3007. <xsl:template match="copyright" mode="sect4.titlepage.recto.auto.mode">
  3008. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  3009. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  3010. </fo:block>
  3011. </xsl:template>
  3012. <xsl:template match="legalnotice" mode="sect4.titlepage.recto.auto.mode">
  3013. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  3014. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  3015. </fo:block>
  3016. </xsl:template>
  3017. <xsl:template match="pubdate" mode="sect4.titlepage.recto.auto.mode">
  3018. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  3019. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  3020. </fo:block>
  3021. </xsl:template>
  3022. <xsl:template match="revision" mode="sect4.titlepage.recto.auto.mode">
  3023. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  3024. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  3025. </fo:block>
  3026. </xsl:template>
  3027. <xsl:template match="revhistory" mode="sect4.titlepage.recto.auto.mode">
  3028. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  3029. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  3030. </fo:block>
  3031. </xsl:template>
  3032. <xsl:template match="abstract" mode="sect4.titlepage.recto.auto.mode">
  3033. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  3034. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  3035. </fo:block>
  3036. </xsl:template>
  3037. <xsl:template match="itermset" mode="sect4.titlepage.recto.auto.mode">
  3038. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  3039. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  3040. </fo:block>
  3041. </xsl:template>
  3042. <xsl:template name="sect5.titlepage.recto">
  3043. <xsl:choose>
  3044. <xsl:when test="sect5info/title">
  3045. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/title"/>
  3046. </xsl:when>
  3047. <xsl:when test="info/title">
  3048. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/title"/>
  3049. </xsl:when>
  3050. <xsl:when test="title">
  3051. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="title"/>
  3052. </xsl:when>
  3053. </xsl:choose>
  3054. <xsl:choose>
  3055. <xsl:when test="sect5info/subtitle">
  3056. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/subtitle"/>
  3057. </xsl:when>
  3058. <xsl:when test="info/subtitle">
  3059. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/subtitle"/>
  3060. </xsl:when>
  3061. <xsl:when test="subtitle">
  3062. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="subtitle"/>
  3063. </xsl:when>
  3064. </xsl:choose>
  3065. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/corpauthor"/>
  3066. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/corpauthor"/>
  3067. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/authorgroup"/>
  3068. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/authorgroup"/>
  3069. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/author"/>
  3070. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/author"/>
  3071. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/othercredit"/>
  3072. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/othercredit"/>
  3073. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/releaseinfo"/>
  3074. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  3075. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/copyright"/>
  3076. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/copyright"/>
  3077. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/legalnotice"/>
  3078. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/legalnotice"/>
  3079. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/pubdate"/>
  3080. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/pubdate"/>
  3081. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revision"/>
  3082. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revision"/>
  3083. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revhistory"/>
  3084. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revhistory"/>
  3085. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/abstract"/>
  3086. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/abstract"/>
  3087. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/itermset"/>
  3088. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/itermset"/>
  3089. </xsl:template>
  3090. <xsl:template name="sect5.titlepage.verso">
  3091. </xsl:template>
  3092. <xsl:template name="sect5.titlepage.separator">
  3093. </xsl:template>
  3094. <xsl:template name="sect5.titlepage.before.recto">
  3095. </xsl:template>
  3096. <xsl:template name="sect5.titlepage.before.verso">
  3097. </xsl:template>
  3098. <xsl:template name="sect5.titlepage">
  3099. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3100. <xsl:variable name="recto.content">
  3101. <xsl:call-template name="sect5.titlepage.before.recto"/>
  3102. <xsl:call-template name="sect5.titlepage.recto"/>
  3103. </xsl:variable>
  3104. <xsl:variable name="recto.elements.count">
  3105. <xsl:choose>
  3106. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3107. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3108. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3109. <xsl:otherwise>1</xsl:otherwise>
  3110. </xsl:choose>
  3111. </xsl:variable>
  3112. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3113. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3114. </xsl:if>
  3115. <xsl:variable name="verso.content">
  3116. <xsl:call-template name="sect5.titlepage.before.verso"/>
  3117. <xsl:call-template name="sect5.titlepage.verso"/>
  3118. </xsl:variable>
  3119. <xsl:variable name="verso.elements.count">
  3120. <xsl:choose>
  3121. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3122. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3123. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3124. <xsl:otherwise>1</xsl:otherwise>
  3125. </xsl:choose>
  3126. </xsl:variable>
  3127. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3128. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3129. </xsl:if>
  3130. <xsl:call-template name="sect5.titlepage.separator"/>
  3131. </fo:block>
  3132. </xsl:template>
  3133. <xsl:template match="*" mode="sect5.titlepage.recto.mode">
  3134. <!-- if an element isn't found in this mode, -->
  3135. <!-- try the generic titlepage.mode -->
  3136. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3137. </xsl:template>
  3138. <xsl:template match="*" mode="sect5.titlepage.verso.mode">
  3139. <!-- if an element isn't found in this mode, -->
  3140. <!-- try the generic titlepage.mode -->
  3141. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3142. </xsl:template>
  3143. <xsl:template match="title" mode="sect5.titlepage.recto.auto.mode">
  3144. <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}">
  3145. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  3146. </fo:block>
  3147. </xsl:template>
  3148. <xsl:template match="subtitle" mode="sect5.titlepage.recto.auto.mode">
  3149. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style" font-family="{$title.fontset}">
  3150. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  3151. </fo:block>
  3152. </xsl:template>
  3153. <xsl:template match="corpauthor" mode="sect5.titlepage.recto.auto.mode">
  3154. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  3155. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  3156. </fo:block>
  3157. </xsl:template>
  3158. <xsl:template match="authorgroup" mode="sect5.titlepage.recto.auto.mode">
  3159. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  3160. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  3161. </fo:block>
  3162. </xsl:template>
  3163. <xsl:template match="author" mode="sect5.titlepage.recto.auto.mode">
  3164. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  3165. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  3166. </fo:block>
  3167. </xsl:template>
  3168. <xsl:template match="othercredit" mode="sect5.titlepage.recto.auto.mode">
  3169. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  3170. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  3171. </fo:block>
  3172. </xsl:template>
  3173. <xsl:template match="releaseinfo" mode="sect5.titlepage.recto.auto.mode">
  3174. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  3175. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  3176. </fo:block>
  3177. </xsl:template>
  3178. <xsl:template match="copyright" mode="sect5.titlepage.recto.auto.mode">
  3179. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  3180. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  3181. </fo:block>
  3182. </xsl:template>
  3183. <xsl:template match="legalnotice" mode="sect5.titlepage.recto.auto.mode">
  3184. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  3185. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  3186. </fo:block>
  3187. </xsl:template>
  3188. <xsl:template match="pubdate" mode="sect5.titlepage.recto.auto.mode">
  3189. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  3190. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  3191. </fo:block>
  3192. </xsl:template>
  3193. <xsl:template match="revision" mode="sect5.titlepage.recto.auto.mode">
  3194. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  3195. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  3196. </fo:block>
  3197. </xsl:template>
  3198. <xsl:template match="revhistory" mode="sect5.titlepage.recto.auto.mode">
  3199. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  3200. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  3201. </fo:block>
  3202. </xsl:template>
  3203. <xsl:template match="abstract" mode="sect5.titlepage.recto.auto.mode">
  3204. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  3205. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  3206. </fo:block>
  3207. </xsl:template>
  3208. <xsl:template match="itermset" mode="sect5.titlepage.recto.auto.mode">
  3209. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  3210. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  3211. </fo:block>
  3212. </xsl:template>
  3213. <xsl:template name="simplesect.titlepage.recto">
  3214. <xsl:choose>
  3215. <xsl:when test="simplesectinfo/title">
  3216. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/title"/>
  3217. </xsl:when>
  3218. <xsl:when test="docinfo/title">
  3219. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/title"/>
  3220. </xsl:when>
  3221. <xsl:when test="info/title">
  3222. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/title"/>
  3223. </xsl:when>
  3224. <xsl:when test="title">
  3225. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="title"/>
  3226. </xsl:when>
  3227. </xsl:choose>
  3228. <xsl:choose>
  3229. <xsl:when test="simplesectinfo/subtitle">
  3230. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/subtitle"/>
  3231. </xsl:when>
  3232. <xsl:when test="docinfo/subtitle">
  3233. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3234. </xsl:when>
  3235. <xsl:when test="info/subtitle">
  3236. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/subtitle"/>
  3237. </xsl:when>
  3238. <xsl:when test="subtitle">
  3239. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="subtitle"/>
  3240. </xsl:when>
  3241. </xsl:choose>
  3242. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/corpauthor"/>
  3243. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  3244. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/corpauthor"/>
  3245. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/authorgroup"/>
  3246. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  3247. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/authorgroup"/>
  3248. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/author"/>
  3249. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/author"/>
  3250. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/author"/>
  3251. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/othercredit"/>
  3252. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  3253. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/othercredit"/>
  3254. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/releaseinfo"/>
  3255. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  3256. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  3257. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/copyright"/>
  3258. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  3259. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/copyright"/>
  3260. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/legalnotice"/>
  3261. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  3262. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/legalnotice"/>
  3263. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/pubdate"/>
  3264. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  3265. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/pubdate"/>
  3266. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revision"/>
  3267. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revision"/>
  3268. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revision"/>
  3269. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revhistory"/>
  3270. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  3271. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revhistory"/>
  3272. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/abstract"/>
  3273. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  3274. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/abstract"/>
  3275. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/itermset"/>
  3276. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  3277. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/itermset"/>
  3278. </xsl:template>
  3279. <xsl:template name="simplesect.titlepage.verso">
  3280. </xsl:template>
  3281. <xsl:template name="simplesect.titlepage.separator">
  3282. </xsl:template>
  3283. <xsl:template name="simplesect.titlepage.before.recto">
  3284. </xsl:template>
  3285. <xsl:template name="simplesect.titlepage.before.verso">
  3286. </xsl:template>
  3287. <xsl:template name="simplesect.titlepage">
  3288. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3289. <xsl:variable name="recto.content">
  3290. <xsl:call-template name="simplesect.titlepage.before.recto"/>
  3291. <xsl:call-template name="simplesect.titlepage.recto"/>
  3292. </xsl:variable>
  3293. <xsl:variable name="recto.elements.count">
  3294. <xsl:choose>
  3295. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3296. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3297. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3298. <xsl:otherwise>1</xsl:otherwise>
  3299. </xsl:choose>
  3300. </xsl:variable>
  3301. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3302. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3303. </xsl:if>
  3304. <xsl:variable name="verso.content">
  3305. <xsl:call-template name="simplesect.titlepage.before.verso"/>
  3306. <xsl:call-template name="simplesect.titlepage.verso"/>
  3307. </xsl:variable>
  3308. <xsl:variable name="verso.elements.count">
  3309. <xsl:choose>
  3310. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3311. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3312. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3313. <xsl:otherwise>1</xsl:otherwise>
  3314. </xsl:choose>
  3315. </xsl:variable>
  3316. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3317. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3318. </xsl:if>
  3319. <xsl:call-template name="simplesect.titlepage.separator"/>
  3320. </fo:block>
  3321. </xsl:template>
  3322. <xsl:template match="*" mode="simplesect.titlepage.recto.mode">
  3323. <!-- if an element isn't found in this mode, -->
  3324. <!-- try the generic titlepage.mode -->
  3325. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3326. </xsl:template>
  3327. <xsl:template match="*" mode="simplesect.titlepage.verso.mode">
  3328. <!-- if an element isn't found in this mode, -->
  3329. <!-- try the generic titlepage.mode -->
  3330. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3331. </xsl:template>
  3332. <xsl:template match="title" mode="simplesect.titlepage.recto.auto.mode">
  3333. <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}">
  3334. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3335. </fo:block>
  3336. </xsl:template>
  3337. <xsl:template match="subtitle" mode="simplesect.titlepage.recto.auto.mode">
  3338. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style" font-family="{$title.fontset}">
  3339. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3340. </fo:block>
  3341. </xsl:template>
  3342. <xsl:template match="corpauthor" mode="simplesect.titlepage.recto.auto.mode">
  3343. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3344. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3345. </fo:block>
  3346. </xsl:template>
  3347. <xsl:template match="authorgroup" mode="simplesect.titlepage.recto.auto.mode">
  3348. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3349. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3350. </fo:block>
  3351. </xsl:template>
  3352. <xsl:template match="author" mode="simplesect.titlepage.recto.auto.mode">
  3353. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3354. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3355. </fo:block>
  3356. </xsl:template>
  3357. <xsl:template match="othercredit" mode="simplesect.titlepage.recto.auto.mode">
  3358. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3359. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3360. </fo:block>
  3361. </xsl:template>
  3362. <xsl:template match="releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
  3363. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3364. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3365. </fo:block>
  3366. </xsl:template>
  3367. <xsl:template match="copyright" mode="simplesect.titlepage.recto.auto.mode">
  3368. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3369. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3370. </fo:block>
  3371. </xsl:template>
  3372. <xsl:template match="legalnotice" mode="simplesect.titlepage.recto.auto.mode">
  3373. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3374. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3375. </fo:block>
  3376. </xsl:template>
  3377. <xsl:template match="pubdate" mode="simplesect.titlepage.recto.auto.mode">
  3378. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3379. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3380. </fo:block>
  3381. </xsl:template>
  3382. <xsl:template match="revision" mode="simplesect.titlepage.recto.auto.mode">
  3383. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3384. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3385. </fo:block>
  3386. </xsl:template>
  3387. <xsl:template match="revhistory" mode="simplesect.titlepage.recto.auto.mode">
  3388. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3389. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3390. </fo:block>
  3391. </xsl:template>
  3392. <xsl:template match="abstract" mode="simplesect.titlepage.recto.auto.mode">
  3393. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3394. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3395. </fo:block>
  3396. </xsl:template>
  3397. <xsl:template match="itermset" mode="simplesect.titlepage.recto.auto.mode">
  3398. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3399. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3400. </fo:block>
  3401. </xsl:template>
  3402. <xsl:template name="topic.titlepage.recto">
  3403. <xsl:choose>
  3404. <xsl:when test="topicinfo/title">
  3405. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/title"/>
  3406. </xsl:when>
  3407. <xsl:when test="info/title">
  3408. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/title"/>
  3409. </xsl:when>
  3410. <xsl:when test="title">
  3411. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="title"/>
  3412. </xsl:when>
  3413. </xsl:choose>
  3414. <xsl:choose>
  3415. <xsl:when test="topicinfo/subtitle">
  3416. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/subtitle"/>
  3417. </xsl:when>
  3418. <xsl:when test="info/subtitle">
  3419. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/subtitle"/>
  3420. </xsl:when>
  3421. <xsl:when test="subtitle">
  3422. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="subtitle"/>
  3423. </xsl:when>
  3424. </xsl:choose>
  3425. </xsl:template>
  3426. <xsl:template name="topic.titlepage.verso">
  3427. </xsl:template>
  3428. <xsl:template name="topic.titlepage.separator">
  3429. </xsl:template>
  3430. <xsl:template name="topic.titlepage.before.recto">
  3431. </xsl:template>
  3432. <xsl:template name="topic.titlepage.before.verso">
  3433. </xsl:template>
  3434. <xsl:template name="topic.titlepage">
  3435. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3436. <xsl:variable name="recto.content">
  3437. <xsl:call-template name="topic.titlepage.before.recto"/>
  3438. <xsl:call-template name="topic.titlepage.recto"/>
  3439. </xsl:variable>
  3440. <xsl:variable name="recto.elements.count">
  3441. <xsl:choose>
  3442. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3443. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3444. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3445. <xsl:otherwise>1</xsl:otherwise>
  3446. </xsl:choose>
  3447. </xsl:variable>
  3448. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3449. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3450. </xsl:if>
  3451. <xsl:variable name="verso.content">
  3452. <xsl:call-template name="topic.titlepage.before.verso"/>
  3453. <xsl:call-template name="topic.titlepage.verso"/>
  3454. </xsl:variable>
  3455. <xsl:variable name="verso.elements.count">
  3456. <xsl:choose>
  3457. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3458. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3459. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3460. <xsl:otherwise>1</xsl:otherwise>
  3461. </xsl:choose>
  3462. </xsl:variable>
  3463. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3464. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3465. </xsl:if>
  3466. <xsl:call-template name="topic.titlepage.separator"/>
  3467. </fo:block>
  3468. </xsl:template>
  3469. <xsl:template match="*" mode="topic.titlepage.recto.mode">
  3470. <!-- if an element isn't found in this mode, -->
  3471. <!-- try the generic titlepage.mode -->
  3472. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3473. </xsl:template>
  3474. <xsl:template match="*" mode="topic.titlepage.verso.mode">
  3475. <!-- if an element isn't found in this mode, -->
  3476. <!-- try the generic titlepage.mode -->
  3477. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3478. </xsl:template>
  3479. <xsl:template match="title" mode="topic.titlepage.recto.auto.mode">
  3480. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="topic.titlepage.recto.style" font-weight="bold" font-size="17.28pt" space-before="1em" space-after="1em" font-family="{$title.fontset}">
  3481. <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
  3482. </fo:block>
  3483. </xsl:template>
  3484. <xsl:template match="subtitle" mode="topic.titlepage.recto.auto.mode">
  3485. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="topic.titlepage.recto.style" font-family="{$title.fontset}">
  3486. <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
  3487. </fo:block>
  3488. </xsl:template>
  3489. <xsl:template name="bibliography.titlepage.recto">
  3490. <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">
  3491. <xsl:call-template name="component.title">
  3492. <xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/>
  3493. </xsl:call-template></fo:block>
  3494. <xsl:choose>
  3495. <xsl:when test="bibliographyinfo/subtitle">
  3496. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/subtitle"/>
  3497. </xsl:when>
  3498. <xsl:when test="docinfo/subtitle">
  3499. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3500. </xsl:when>
  3501. <xsl:when test="info/subtitle">
  3502. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/subtitle"/>
  3503. </xsl:when>
  3504. <xsl:when test="subtitle">
  3505. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="subtitle"/>
  3506. </xsl:when>
  3507. </xsl:choose>
  3508. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/itermset"/>
  3509. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  3510. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/itermset"/>
  3511. </xsl:template>
  3512. <xsl:template name="bibliography.titlepage.verso">
  3513. </xsl:template>
  3514. <xsl:template name="bibliography.titlepage.separator">
  3515. </xsl:template>
  3516. <xsl:template name="bibliography.titlepage.before.recto">
  3517. </xsl:template>
  3518. <xsl:template name="bibliography.titlepage.before.verso">
  3519. </xsl:template>
  3520. <xsl:template name="bibliography.titlepage">
  3521. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3522. <xsl:variable name="recto.content">
  3523. <xsl:call-template name="bibliography.titlepage.before.recto"/>
  3524. <xsl:call-template name="bibliography.titlepage.recto"/>
  3525. </xsl:variable>
  3526. <xsl:variable name="recto.elements.count">
  3527. <xsl:choose>
  3528. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3529. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3530. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3531. <xsl:otherwise>1</xsl:otherwise>
  3532. </xsl:choose>
  3533. </xsl:variable>
  3534. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3535. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3536. </xsl:if>
  3537. <xsl:variable name="verso.content">
  3538. <xsl:call-template name="bibliography.titlepage.before.verso"/>
  3539. <xsl:call-template name="bibliography.titlepage.verso"/>
  3540. </xsl:variable>
  3541. <xsl:variable name="verso.elements.count">
  3542. <xsl:choose>
  3543. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3544. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3545. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3546. <xsl:otherwise>1</xsl:otherwise>
  3547. </xsl:choose>
  3548. </xsl:variable>
  3549. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3550. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3551. </xsl:if>
  3552. <xsl:call-template name="bibliography.titlepage.separator"/>
  3553. </fo:block>
  3554. </xsl:template>
  3555. <xsl:template match="*" mode="bibliography.titlepage.recto.mode">
  3556. <!-- if an element isn't found in this mode, -->
  3557. <!-- try the generic titlepage.mode -->
  3558. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3559. </xsl:template>
  3560. <xsl:template match="*" mode="bibliography.titlepage.verso.mode">
  3561. <!-- if an element isn't found in this mode, -->
  3562. <!-- try the generic titlepage.mode -->
  3563. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3564. </xsl:template>
  3565. <xsl:template match="subtitle" mode="bibliography.titlepage.recto.auto.mode">
  3566. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" font-family="{$title.fontset}">
  3567. <xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
  3568. </fo:block>
  3569. </xsl:template>
  3570. <xsl:template match="itermset" mode="bibliography.titlepage.recto.auto.mode">
  3571. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style">
  3572. <xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
  3573. </fo:block>
  3574. </xsl:template>
  3575. <xsl:template name="bibliodiv.titlepage.recto">
  3576. <xsl:choose>
  3577. <xsl:when test="bibliodivinfo/title">
  3578. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/title"/>
  3579. </xsl:when>
  3580. <xsl:when test="docinfo/title">
  3581. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/title"/>
  3582. </xsl:when>
  3583. <xsl:when test="info/title">
  3584. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/title"/>
  3585. </xsl:when>
  3586. <xsl:when test="title">
  3587. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="title"/>
  3588. </xsl:when>
  3589. </xsl:choose>
  3590. <xsl:choose>
  3591. <xsl:when test="bibliodivinfo/subtitle">
  3592. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/subtitle"/>
  3593. </xsl:when>
  3594. <xsl:when test="docinfo/subtitle">
  3595. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3596. </xsl:when>
  3597. <xsl:when test="info/subtitle">
  3598. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/subtitle"/>
  3599. </xsl:when>
  3600. <xsl:when test="subtitle">
  3601. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="subtitle"/>
  3602. </xsl:when>
  3603. </xsl:choose>
  3604. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/itermset"/>
  3605. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  3606. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/itermset"/>
  3607. </xsl:template>
  3608. <xsl:template name="bibliodiv.titlepage.verso">
  3609. </xsl:template>
  3610. <xsl:template name="bibliodiv.titlepage.separator">
  3611. </xsl:template>
  3612. <xsl:template name="bibliodiv.titlepage.before.recto">
  3613. </xsl:template>
  3614. <xsl:template name="bibliodiv.titlepage.before.verso">
  3615. </xsl:template>
  3616. <xsl:template name="bibliodiv.titlepage">
  3617. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3618. <xsl:variable name="recto.content">
  3619. <xsl:call-template name="bibliodiv.titlepage.before.recto"/>
  3620. <xsl:call-template name="bibliodiv.titlepage.recto"/>
  3621. </xsl:variable>
  3622. <xsl:variable name="recto.elements.count">
  3623. <xsl:choose>
  3624. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.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($recto.content)/*)"/></xsl:when>
  3627. <xsl:otherwise>1</xsl:otherwise>
  3628. </xsl:choose>
  3629. </xsl:variable>
  3630. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3631. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3632. </xsl:if>
  3633. <xsl:variable name="verso.content">
  3634. <xsl:call-template name="bibliodiv.titlepage.before.verso"/>
  3635. <xsl:call-template name="bibliodiv.titlepage.verso"/>
  3636. </xsl:variable>
  3637. <xsl:variable name="verso.elements.count">
  3638. <xsl:choose>
  3639. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3640. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3641. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3642. <xsl:otherwise>1</xsl:otherwise>
  3643. </xsl:choose>
  3644. </xsl:variable>
  3645. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3646. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3647. </xsl:if>
  3648. <xsl:call-template name="bibliodiv.titlepage.separator"/>
  3649. </fo:block>
  3650. </xsl:template>
  3651. <xsl:template match="*" mode="bibliodiv.titlepage.recto.mode">
  3652. <!-- if an element isn't found in this mode, -->
  3653. <!-- try the generic titlepage.mode -->
  3654. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3655. </xsl:template>
  3656. <xsl:template match="*" mode="bibliodiv.titlepage.verso.mode">
  3657. <!-- if an element isn't found in this mode, -->
  3658. <!-- try the generic titlepage.mode -->
  3659. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3660. </xsl:template>
  3661. <xsl:template match="title" mode="bibliodiv.titlepage.recto.auto.mode">
  3662. <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">
  3663. <xsl:call-template name="component.title">
  3664. <xsl:with-param name="node" select="ancestor-or-self::bibliodiv[1]"/>
  3665. </xsl:call-template>
  3666. </fo:block>
  3667. </xsl:template>
  3668. <xsl:template match="subtitle" mode="bibliodiv.titlepage.recto.auto.mode">
  3669. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" font-family="{$title.fontset}">
  3670. <xsl:apply-templates select="." mode="bibliodiv.titlepage.recto.mode"/>
  3671. </fo:block>
  3672. </xsl:template>
  3673. <xsl:template match="itermset" mode="bibliodiv.titlepage.recto.auto.mode">
  3674. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style">
  3675. <xsl:apply-templates select="." mode="bibliodiv.titlepage.recto.mode"/>
  3676. </fo:block>
  3677. </xsl:template>
  3678. <xsl:template name="glossary.titlepage.recto">
  3679. <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">
  3680. <xsl:call-template name="component.title">
  3681. <xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/>
  3682. </xsl:call-template></fo:block>
  3683. <xsl:choose>
  3684. <xsl:when test="glossaryinfo/subtitle">
  3685. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/subtitle"/>
  3686. </xsl:when>
  3687. <xsl:when test="docinfo/subtitle">
  3688. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3689. </xsl:when>
  3690. <xsl:when test="info/subtitle">
  3691. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/subtitle"/>
  3692. </xsl:when>
  3693. <xsl:when test="subtitle">
  3694. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="subtitle"/>
  3695. </xsl:when>
  3696. </xsl:choose>
  3697. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/itermset"/>
  3698. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  3699. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/itermset"/>
  3700. </xsl:template>
  3701. <xsl:template name="glossary.titlepage.verso">
  3702. </xsl:template>
  3703. <xsl:template name="glossary.titlepage.separator">
  3704. </xsl:template>
  3705. <xsl:template name="glossary.titlepage.before.recto">
  3706. </xsl:template>
  3707. <xsl:template name="glossary.titlepage.before.verso">
  3708. </xsl:template>
  3709. <xsl:template name="glossary.titlepage">
  3710. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3711. <xsl:variable name="recto.content">
  3712. <xsl:call-template name="glossary.titlepage.before.recto"/>
  3713. <xsl:call-template name="glossary.titlepage.recto"/>
  3714. </xsl:variable>
  3715. <xsl:variable name="recto.elements.count">
  3716. <xsl:choose>
  3717. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3718. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3719. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3720. <xsl:otherwise>1</xsl:otherwise>
  3721. </xsl:choose>
  3722. </xsl:variable>
  3723. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3724. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3725. </xsl:if>
  3726. <xsl:variable name="verso.content">
  3727. <xsl:call-template name="glossary.titlepage.before.verso"/>
  3728. <xsl:call-template name="glossary.titlepage.verso"/>
  3729. </xsl:variable>
  3730. <xsl:variable name="verso.elements.count">
  3731. <xsl:choose>
  3732. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3733. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3734. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3735. <xsl:otherwise>1</xsl:otherwise>
  3736. </xsl:choose>
  3737. </xsl:variable>
  3738. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3739. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3740. </xsl:if>
  3741. <xsl:call-template name="glossary.titlepage.separator"/>
  3742. </fo:block>
  3743. </xsl:template>
  3744. <xsl:template match="*" mode="glossary.titlepage.recto.mode">
  3745. <!-- if an element isn't found in this mode, -->
  3746. <!-- try the generic titlepage.mode -->
  3747. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3748. </xsl:template>
  3749. <xsl:template match="*" mode="glossary.titlepage.verso.mode">
  3750. <!-- if an element isn't found in this mode, -->
  3751. <!-- try the generic titlepage.mode -->
  3752. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3753. </xsl:template>
  3754. <xsl:template match="subtitle" mode="glossary.titlepage.recto.auto.mode">
  3755. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" font-family="{$title.fontset}">
  3756. <xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
  3757. </fo:block>
  3758. </xsl:template>
  3759. <xsl:template match="itermset" mode="glossary.titlepage.recto.auto.mode">
  3760. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style">
  3761. <xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
  3762. </fo:block>
  3763. </xsl:template>
  3764. <xsl:template name="glossdiv.titlepage.recto">
  3765. <xsl:choose>
  3766. <xsl:when test="glossdivinfo/title">
  3767. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/title"/>
  3768. </xsl:when>
  3769. <xsl:when test="docinfo/title">
  3770. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
  3771. </xsl:when>
  3772. <xsl:when test="info/title">
  3773. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/title"/>
  3774. </xsl:when>
  3775. <xsl:when test="title">
  3776. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="title"/>
  3777. </xsl:when>
  3778. </xsl:choose>
  3779. <xsl:choose>
  3780. <xsl:when test="glossdivinfo/subtitle">
  3781. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/subtitle"/>
  3782. </xsl:when>
  3783. <xsl:when test="docinfo/subtitle">
  3784. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3785. </xsl:when>
  3786. <xsl:when test="info/subtitle">
  3787. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
  3788. </xsl:when>
  3789. <xsl:when test="subtitle">
  3790. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="subtitle"/>
  3791. </xsl:when>
  3792. </xsl:choose>
  3793. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/itermset"/>
  3794. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  3795. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/itermset"/>
  3796. </xsl:template>
  3797. <xsl:template name="glossdiv.titlepage.verso">
  3798. </xsl:template>
  3799. <xsl:template name="glossdiv.titlepage.separator">
  3800. </xsl:template>
  3801. <xsl:template name="glossdiv.titlepage.before.recto">
  3802. </xsl:template>
  3803. <xsl:template name="glossdiv.titlepage.before.verso">
  3804. </xsl:template>
  3805. <xsl:template name="glossdiv.titlepage">
  3806. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3807. <xsl:variable name="recto.content">
  3808. <xsl:call-template name="glossdiv.titlepage.before.recto"/>
  3809. <xsl:call-template name="glossdiv.titlepage.recto"/>
  3810. </xsl:variable>
  3811. <xsl:variable name="recto.elements.count">
  3812. <xsl:choose>
  3813. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3814. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3815. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3816. <xsl:otherwise>1</xsl:otherwise>
  3817. </xsl:choose>
  3818. </xsl:variable>
  3819. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3820. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3821. </xsl:if>
  3822. <xsl:variable name="verso.content">
  3823. <xsl:call-template name="glossdiv.titlepage.before.verso"/>
  3824. <xsl:call-template name="glossdiv.titlepage.verso"/>
  3825. </xsl:variable>
  3826. <xsl:variable name="verso.elements.count">
  3827. <xsl:choose>
  3828. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3829. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3830. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3831. <xsl:otherwise>1</xsl:otherwise>
  3832. </xsl:choose>
  3833. </xsl:variable>
  3834. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3835. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3836. </xsl:if>
  3837. <xsl:call-template name="glossdiv.titlepage.separator"/>
  3838. </fo:block>
  3839. </xsl:template>
  3840. <xsl:template match="*" mode="glossdiv.titlepage.recto.mode">
  3841. <!-- if an element isn't found in this mode, -->
  3842. <!-- try the generic titlepage.mode -->
  3843. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3844. </xsl:template>
  3845. <xsl:template match="*" mode="glossdiv.titlepage.verso.mode">
  3846. <!-- if an element isn't found in this mode, -->
  3847. <!-- try the generic titlepage.mode -->
  3848. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3849. </xsl:template>
  3850. <xsl:template match="title" mode="glossdiv.titlepage.recto.auto.mode">
  3851. <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">
  3852. <xsl:call-template name="component.title">
  3853. <xsl:with-param name="node" select="ancestor-or-self::glossdiv[1]"/>
  3854. </xsl:call-template>
  3855. </fo:block>
  3856. </xsl:template>
  3857. <xsl:template match="subtitle" mode="glossdiv.titlepage.recto.auto.mode">
  3858. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" font-family="{$title.fontset}">
  3859. <xsl:apply-templates select="." mode="glossdiv.titlepage.recto.mode"/>
  3860. </fo:block>
  3861. </xsl:template>
  3862. <xsl:template match="itermset" mode="glossdiv.titlepage.recto.auto.mode">
  3863. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style">
  3864. <xsl:apply-templates select="." mode="glossdiv.titlepage.recto.mode"/>
  3865. </fo:block>
  3866. </xsl:template>
  3867. <xsl:template name="index.titlepage.recto">
  3868. <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">
  3869. <xsl:call-template name="component.title">
  3870. <xsl:with-param name="node" select="ancestor-or-self::index[1]"/>
  3871. <xsl:with-param name="pagewide" select="1"/>
  3872. </xsl:call-template></fo:block>
  3873. <xsl:choose>
  3874. <xsl:when test="indexinfo/subtitle">
  3875. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/>
  3876. </xsl:when>
  3877. <xsl:when test="docinfo/subtitle">
  3878. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3879. </xsl:when>
  3880. <xsl:when test="info/subtitle">
  3881. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/>
  3882. </xsl:when>
  3883. <xsl:when test="subtitle">
  3884. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/>
  3885. </xsl:when>
  3886. </xsl:choose>
  3887. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/itermset"/>
  3888. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  3889. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/itermset"/>
  3890. </xsl:template>
  3891. <xsl:template name="index.titlepage.verso">
  3892. </xsl:template>
  3893. <xsl:template name="index.titlepage.separator">
  3894. </xsl:template>
  3895. <xsl:template name="index.titlepage.before.recto">
  3896. </xsl:template>
  3897. <xsl:template name="index.titlepage.before.verso">
  3898. </xsl:template>
  3899. <xsl:template name="index.titlepage">
  3900. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3901. <xsl:variable name="recto.content">
  3902. <xsl:call-template name="index.titlepage.before.recto"/>
  3903. <xsl:call-template name="index.titlepage.recto"/>
  3904. </xsl:variable>
  3905. <xsl:variable name="recto.elements.count">
  3906. <xsl:choose>
  3907. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3908. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3909. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3910. <xsl:otherwise>1</xsl:otherwise>
  3911. </xsl:choose>
  3912. </xsl:variable>
  3913. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3914. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3915. </xsl:if>
  3916. <xsl:variable name="verso.content">
  3917. <xsl:call-template name="index.titlepage.before.verso"/>
  3918. <xsl:call-template name="index.titlepage.verso"/>
  3919. </xsl:variable>
  3920. <xsl:variable name="verso.elements.count">
  3921. <xsl:choose>
  3922. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3923. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3924. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3925. <xsl:otherwise>1</xsl:otherwise>
  3926. </xsl:choose>
  3927. </xsl:variable>
  3928. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3929. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3930. </xsl:if>
  3931. <xsl:call-template name="index.titlepage.separator"/>
  3932. </fo:block>
  3933. </xsl:template>
  3934. <xsl:template match="*" mode="index.titlepage.recto.mode">
  3935. <!-- if an element isn't found in this mode, -->
  3936. <!-- try the generic titlepage.mode -->
  3937. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3938. </xsl:template>
  3939. <xsl:template match="*" mode="index.titlepage.verso.mode">
  3940. <!-- if an element isn't found in this mode, -->
  3941. <!-- try the generic titlepage.mode -->
  3942. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3943. </xsl:template>
  3944. <xsl:template match="subtitle" mode="index.titlepage.recto.auto.mode">
  3945. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" font-family="{$title.fontset}">
  3946. <xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
  3947. </fo:block>
  3948. </xsl:template>
  3949. <xsl:template match="itermset" mode="index.titlepage.recto.auto.mode">
  3950. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style">
  3951. <xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
  3952. </fo:block>
  3953. </xsl:template>
  3954. <xsl:template name="indexdiv.titlepage.recto">
  3955. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style">
  3956. <xsl:call-template name="indexdiv.title">
  3957. <xsl:with-param name="title" select="title"/>
  3958. </xsl:call-template></fo:block>
  3959. <xsl:choose>
  3960. <xsl:when test="indexdivinfo/subtitle">
  3961. <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="indexdivinfo/subtitle"/>
  3962. </xsl:when>
  3963. <xsl:when test="docinfo/subtitle">
  3964. <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3965. </xsl:when>
  3966. <xsl:when test="info/subtitle">
  3967. <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
  3968. </xsl:when>
  3969. <xsl:when test="subtitle">
  3970. <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="subtitle"/>
  3971. </xsl:when>
  3972. </xsl:choose>
  3973. <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="indexdivinfo/itermset"/>
  3974. <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  3975. <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="info/itermset"/>
  3976. </xsl:template>
  3977. <xsl:template name="indexdiv.titlepage.verso">
  3978. </xsl:template>
  3979. <xsl:template name="indexdiv.titlepage.separator">
  3980. </xsl:template>
  3981. <xsl:template name="indexdiv.titlepage.before.recto">
  3982. </xsl:template>
  3983. <xsl:template name="indexdiv.titlepage.before.verso">
  3984. </xsl:template>
  3985. <xsl:template name="indexdiv.titlepage">
  3986. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3987. <xsl:variable name="recto.content">
  3988. <xsl:call-template name="indexdiv.titlepage.before.recto"/>
  3989. <xsl:call-template name="indexdiv.titlepage.recto"/>
  3990. </xsl:variable>
  3991. <xsl:variable name="recto.elements.count">
  3992. <xsl:choose>
  3993. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3994. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3995. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3996. <xsl:otherwise>1</xsl:otherwise>
  3997. </xsl:choose>
  3998. </xsl:variable>
  3999. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4000. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4001. </xsl:if>
  4002. <xsl:variable name="verso.content">
  4003. <xsl:call-template name="indexdiv.titlepage.before.verso"/>
  4004. <xsl:call-template name="indexdiv.titlepage.verso"/>
  4005. </xsl:variable>
  4006. <xsl:variable name="verso.elements.count">
  4007. <xsl:choose>
  4008. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4009. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4010. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4011. <xsl:otherwise>1</xsl:otherwise>
  4012. </xsl:choose>
  4013. </xsl:variable>
  4014. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4015. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4016. </xsl:if>
  4017. <xsl:call-template name="indexdiv.titlepage.separator"/>
  4018. </fo:block>
  4019. </xsl:template>
  4020. <xsl:template match="*" mode="indexdiv.titlepage.recto.mode">
  4021. <!-- if an element isn't found in this mode, -->
  4022. <!-- try the generic titlepage.mode -->
  4023. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4024. </xsl:template>
  4025. <xsl:template match="*" mode="indexdiv.titlepage.verso.mode">
  4026. <!-- if an element isn't found in this mode, -->
  4027. <!-- try the generic titlepage.mode -->
  4028. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4029. </xsl:template>
  4030. <xsl:template match="subtitle" mode="indexdiv.titlepage.recto.auto.mode">
  4031. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style" font-family="{$title.fontset}">
  4032. <xsl:apply-templates select="." mode="indexdiv.titlepage.recto.mode"/>
  4033. </fo:block>
  4034. </xsl:template>
  4035. <xsl:template match="itermset" mode="indexdiv.titlepage.recto.auto.mode">
  4036. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style">
  4037. <xsl:apply-templates select="." mode="indexdiv.titlepage.recto.mode"/>
  4038. </fo:block>
  4039. </xsl:template>
  4040. <xsl:template name="setindex.titlepage.recto">
  4041. <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">
  4042. <xsl:call-template name="component.title">
  4043. <xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/>
  4044. <xsl:with-param name="pagewide" select="1"/>
  4045. </xsl:call-template></fo:block>
  4046. <xsl:choose>
  4047. <xsl:when test="setindexinfo/subtitle">
  4048. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/>
  4049. </xsl:when>
  4050. <xsl:when test="docinfo/subtitle">
  4051. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  4052. </xsl:when>
  4053. <xsl:when test="info/subtitle">
  4054. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/subtitle"/>
  4055. </xsl:when>
  4056. <xsl:when test="subtitle">
  4057. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/>
  4058. </xsl:when>
  4059. </xsl:choose>
  4060. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/itermset"/>
  4061. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  4062. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/itermset"/>
  4063. </xsl:template>
  4064. <xsl:template name="setindex.titlepage.verso">
  4065. </xsl:template>
  4066. <xsl:template name="setindex.titlepage.separator">
  4067. </xsl:template>
  4068. <xsl:template name="setindex.titlepage.before.recto">
  4069. </xsl:template>
  4070. <xsl:template name="setindex.titlepage.before.verso">
  4071. </xsl:template>
  4072. <xsl:template name="setindex.titlepage">
  4073. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4074. <xsl:variable name="recto.content">
  4075. <xsl:call-template name="setindex.titlepage.before.recto"/>
  4076. <xsl:call-template name="setindex.titlepage.recto"/>
  4077. </xsl:variable>
  4078. <xsl:variable name="recto.elements.count">
  4079. <xsl:choose>
  4080. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4081. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4082. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4083. <xsl:otherwise>1</xsl:otherwise>
  4084. </xsl:choose>
  4085. </xsl:variable>
  4086. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4087. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4088. </xsl:if>
  4089. <xsl:variable name="verso.content">
  4090. <xsl:call-template name="setindex.titlepage.before.verso"/>
  4091. <xsl:call-template name="setindex.titlepage.verso"/>
  4092. </xsl:variable>
  4093. <xsl:variable name="verso.elements.count">
  4094. <xsl:choose>
  4095. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4096. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4097. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4098. <xsl:otherwise>1</xsl:otherwise>
  4099. </xsl:choose>
  4100. </xsl:variable>
  4101. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4102. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4103. </xsl:if>
  4104. <xsl:call-template name="setindex.titlepage.separator"/>
  4105. </fo:block>
  4106. </xsl:template>
  4107. <xsl:template match="*" mode="setindex.titlepage.recto.mode">
  4108. <!-- if an element isn't found in this mode, -->
  4109. <!-- try the generic titlepage.mode -->
  4110. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4111. </xsl:template>
  4112. <xsl:template match="*" mode="setindex.titlepage.verso.mode">
  4113. <!-- if an element isn't found in this mode, -->
  4114. <!-- try the generic titlepage.mode -->
  4115. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4116. </xsl:template>
  4117. <xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode">
  4118. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" font-family="{$title.fontset}">
  4119. <xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
  4120. </fo:block>
  4121. </xsl:template>
  4122. <xsl:template match="itermset" mode="setindex.titlepage.recto.auto.mode">
  4123. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style">
  4124. <xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
  4125. </fo:block>
  4126. </xsl:template>
  4127. <xsl:template name="colophon.titlepage.recto">
  4128. <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">
  4129. <xsl:call-template name="component.title">
  4130. <xsl:with-param name="node" select="ancestor-or-self::colophon[1]"/>
  4131. </xsl:call-template></fo:block>
  4132. <xsl:choose>
  4133. <xsl:when test="colophoninfo/subtitle">
  4134. <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="colophoninfo/subtitle"/>
  4135. </xsl:when>
  4136. <xsl:when test="docinfo/subtitle">
  4137. <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  4138. </xsl:when>
  4139. <xsl:when test="info/subtitle">
  4140. <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="info/subtitle"/>
  4141. </xsl:when>
  4142. <xsl:when test="subtitle">
  4143. <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="subtitle"/>
  4144. </xsl:when>
  4145. </xsl:choose>
  4146. <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="colophoninfo/itermset"/>
  4147. <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  4148. <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="info/itermset"/>
  4149. </xsl:template>
  4150. <xsl:template name="colophon.titlepage.verso">
  4151. </xsl:template>
  4152. <xsl:template name="colophon.titlepage.separator">
  4153. </xsl:template>
  4154. <xsl:template name="colophon.titlepage.before.recto">
  4155. </xsl:template>
  4156. <xsl:template name="colophon.titlepage.before.verso">
  4157. </xsl:template>
  4158. <xsl:template name="colophon.titlepage">
  4159. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4160. <xsl:variable name="recto.content">
  4161. <xsl:call-template name="colophon.titlepage.before.recto"/>
  4162. <xsl:call-template name="colophon.titlepage.recto"/>
  4163. </xsl:variable>
  4164. <xsl:variable name="recto.elements.count">
  4165. <xsl:choose>
  4166. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4167. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4168. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4169. <xsl:otherwise>1</xsl:otherwise>
  4170. </xsl:choose>
  4171. </xsl:variable>
  4172. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4173. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4174. </xsl:if>
  4175. <xsl:variable name="verso.content">
  4176. <xsl:call-template name="colophon.titlepage.before.verso"/>
  4177. <xsl:call-template name="colophon.titlepage.verso"/>
  4178. </xsl:variable>
  4179. <xsl:variable name="verso.elements.count">
  4180. <xsl:choose>
  4181. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4182. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4183. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4184. <xsl:otherwise>1</xsl:otherwise>
  4185. </xsl:choose>
  4186. </xsl:variable>
  4187. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4188. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4189. </xsl:if>
  4190. <xsl:call-template name="colophon.titlepage.separator"/>
  4191. </fo:block>
  4192. </xsl:template>
  4193. <xsl:template match="*" mode="colophon.titlepage.recto.mode">
  4194. <!-- if an element isn't found in this mode, -->
  4195. <!-- try the generic titlepage.mode -->
  4196. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4197. </xsl:template>
  4198. <xsl:template match="*" mode="colophon.titlepage.verso.mode">
  4199. <!-- if an element isn't found in this mode, -->
  4200. <!-- try the generic titlepage.mode -->
  4201. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4202. </xsl:template>
  4203. <xsl:template match="subtitle" mode="colophon.titlepage.recto.auto.mode">
  4204. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" font-family="{$title.fontset}">
  4205. <xsl:apply-templates select="." mode="colophon.titlepage.recto.mode"/>
  4206. </fo:block>
  4207. </xsl:template>
  4208. <xsl:template match="itermset" mode="colophon.titlepage.recto.auto.mode">
  4209. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style">
  4210. <xsl:apply-templates select="." mode="colophon.titlepage.recto.mode"/>
  4211. </fo:block>
  4212. </xsl:template>
  4213. <xsl:template name="sidebar.titlepage.recto">
  4214. <xsl:choose>
  4215. <xsl:when test="sidebarinfo/title">
  4216. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/title"/>
  4217. </xsl:when>
  4218. <xsl:when test="docinfo/title">
  4219. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/title"/>
  4220. </xsl:when>
  4221. <xsl:when test="info/title">
  4222. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/title"/>
  4223. </xsl:when>
  4224. <xsl:when test="title">
  4225. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="title"/>
  4226. </xsl:when>
  4227. </xsl:choose>
  4228. <xsl:choose>
  4229. <xsl:when test="sidebarinfo/subtitle">
  4230. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/subtitle"/>
  4231. </xsl:when>
  4232. <xsl:when test="docinfo/subtitle">
  4233. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  4234. </xsl:when>
  4235. <xsl:when test="info/subtitle">
  4236. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/subtitle"/>
  4237. </xsl:when>
  4238. <xsl:when test="subtitle">
  4239. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="subtitle"/>
  4240. </xsl:when>
  4241. </xsl:choose>
  4242. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/itermset"/>
  4243. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/itermset"/>
  4244. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/itermset"/>
  4245. </xsl:template>
  4246. <xsl:template name="sidebar.titlepage.verso">
  4247. </xsl:template>
  4248. <xsl:template name="sidebar.titlepage.separator">
  4249. </xsl:template>
  4250. <xsl:template name="sidebar.titlepage.before.recto">
  4251. </xsl:template>
  4252. <xsl:template name="sidebar.titlepage.before.verso">
  4253. </xsl:template>
  4254. <xsl:template name="sidebar.titlepage">
  4255. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4256. <xsl:variable name="recto.content">
  4257. <xsl:call-template name="sidebar.titlepage.before.recto"/>
  4258. <xsl:call-template name="sidebar.titlepage.recto"/>
  4259. </xsl:variable>
  4260. <xsl:variable name="recto.elements.count">
  4261. <xsl:choose>
  4262. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4263. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4264. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4265. <xsl:otherwise>1</xsl:otherwise>
  4266. </xsl:choose>
  4267. </xsl:variable>
  4268. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4269. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4270. </xsl:if>
  4271. <xsl:variable name="verso.content">
  4272. <xsl:call-template name="sidebar.titlepage.before.verso"/>
  4273. <xsl:call-template name="sidebar.titlepage.verso"/>
  4274. </xsl:variable>
  4275. <xsl:variable name="verso.elements.count">
  4276. <xsl:choose>
  4277. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4278. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4279. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4280. <xsl:otherwise>1</xsl:otherwise>
  4281. </xsl:choose>
  4282. </xsl:variable>
  4283. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4284. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4285. </xsl:if>
  4286. <xsl:call-template name="sidebar.titlepage.separator"/>
  4287. </fo:block>
  4288. </xsl:template>
  4289. <xsl:template match="*" mode="sidebar.titlepage.recto.mode">
  4290. <!-- if an element isn't found in this mode, -->
  4291. <!-- try the generic titlepage.mode -->
  4292. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4293. </xsl:template>
  4294. <xsl:template match="*" mode="sidebar.titlepage.verso.mode">
  4295. <!-- if an element isn't found in this mode, -->
  4296. <!-- try the generic titlepage.mode -->
  4297. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4298. </xsl:template>
  4299. <xsl:template match="title" mode="sidebar.titlepage.recto.auto.mode">
  4300. <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">
  4301. <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
  4302. </fo:block>
  4303. </xsl:template>
  4304. <xsl:template match="subtitle" mode="sidebar.titlepage.recto.auto.mode">
  4305. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sidebar.titlepage.recto.style" font-family="{$title.fontset}">
  4306. <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
  4307. </fo:block>
  4308. </xsl:template>
  4309. <xsl:template match="itermset" mode="sidebar.titlepage.recto.auto.mode">
  4310. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sidebar.titlepage.recto.style">
  4311. <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
  4312. </fo:block>
  4313. </xsl:template>
  4314. <xsl:template name="qandaset.titlepage.recto">
  4315. <xsl:choose>
  4316. <xsl:when test="qandasetinfo/title">
  4317. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/title"/>
  4318. </xsl:when>
  4319. <xsl:when test="blockinfo/title">
  4320. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/title"/>
  4321. </xsl:when>
  4322. <xsl:when test="info/title">
  4323. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/title"/>
  4324. </xsl:when>
  4325. <xsl:when test="title">
  4326. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="title"/>
  4327. </xsl:when>
  4328. </xsl:choose>
  4329. <xsl:choose>
  4330. <xsl:when test="qandasetinfo/subtitle">
  4331. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/subtitle"/>
  4332. </xsl:when>
  4333. <xsl:when test="blockinfo/subtitle">
  4334. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/subtitle"/>
  4335. </xsl:when>
  4336. <xsl:when test="info/subtitle">
  4337. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/subtitle"/>
  4338. </xsl:when>
  4339. <xsl:when test="subtitle">
  4340. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="subtitle"/>
  4341. </xsl:when>
  4342. </xsl:choose>
  4343. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/corpauthor"/>
  4344. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/corpauthor"/>
  4345. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/corpauthor"/>
  4346. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/authorgroup"/>
  4347. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/authorgroup"/>
  4348. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/authorgroup"/>
  4349. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/author"/>
  4350. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/author"/>
  4351. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/author"/>
  4352. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/othercredit"/>
  4353. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/othercredit"/>
  4354. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/othercredit"/>
  4355. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/releaseinfo"/>
  4356. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/releaseinfo"/>
  4357. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  4358. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/copyright"/>
  4359. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/copyright"/>
  4360. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/copyright"/>
  4361. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/legalnotice"/>
  4362. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/legalnotice"/>
  4363. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/legalnotice"/>
  4364. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/pubdate"/>
  4365. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/pubdate"/>
  4366. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/pubdate"/>
  4367. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revision"/>
  4368. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revision"/>
  4369. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revision"/>
  4370. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revhistory"/>
  4371. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revhistory"/>
  4372. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revhistory"/>
  4373. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/abstract"/>
  4374. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/abstract"/>
  4375. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/abstract"/>
  4376. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/itermset"/>
  4377. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/itermset"/>
  4378. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/itermset"/>
  4379. </xsl:template>
  4380. <xsl:template name="qandaset.titlepage.verso">
  4381. </xsl:template>
  4382. <xsl:template name="qandaset.titlepage.separator">
  4383. </xsl:template>
  4384. <xsl:template name="qandaset.titlepage.before.recto">
  4385. </xsl:template>
  4386. <xsl:template name="qandaset.titlepage.before.verso">
  4387. </xsl:template>
  4388. <xsl:template name="qandaset.titlepage">
  4389. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
  4390. <xsl:variable name="recto.content">
  4391. <xsl:call-template name="qandaset.titlepage.before.recto"/>
  4392. <xsl:call-template name="qandaset.titlepage.recto"/>
  4393. </xsl:variable>
  4394. <xsl:variable name="recto.elements.count">
  4395. <xsl:choose>
  4396. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4397. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4398. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4399. <xsl:otherwise>1</xsl:otherwise>
  4400. </xsl:choose>
  4401. </xsl:variable>
  4402. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4403. <fo:block start-indent="0pt" text-align="center"><xsl:copy-of select="$recto.content"/></fo:block>
  4404. </xsl:if>
  4405. <xsl:variable name="verso.content">
  4406. <xsl:call-template name="qandaset.titlepage.before.verso"/>
  4407. <xsl:call-template name="qandaset.titlepage.verso"/>
  4408. </xsl:variable>
  4409. <xsl:variable name="verso.elements.count">
  4410. <xsl:choose>
  4411. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4412. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4413. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4414. <xsl:otherwise>1</xsl:otherwise>
  4415. </xsl:choose>
  4416. </xsl:variable>
  4417. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4418. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4419. </xsl:if>
  4420. <xsl:call-template name="qandaset.titlepage.separator"/>
  4421. </fo:block>
  4422. </xsl:template>
  4423. <xsl:template match="*" mode="qandaset.titlepage.recto.mode">
  4424. <!-- if an element isn't found in this mode, -->
  4425. <!-- try the generic titlepage.mode -->
  4426. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4427. </xsl:template>
  4428. <xsl:template match="*" mode="qandaset.titlepage.verso.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="title" mode="qandaset.titlepage.recto.auto.mode">
  4434. <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">
  4435. <xsl:call-template name="component.title">
  4436. <xsl:with-param name="node" select="ancestor-or-self::qandaset[1]"/>
  4437. </xsl:call-template>
  4438. </fo:block>
  4439. </xsl:template>
  4440. <xsl:template match="subtitle" mode="qandaset.titlepage.recto.auto.mode">
  4441. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style">
  4442. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4443. </fo:block>
  4444. </xsl:template>
  4445. <xsl:template match="corpauthor" mode="qandaset.titlepage.recto.auto.mode">
  4446. <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">
  4447. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4448. </fo:block>
  4449. </xsl:template>
  4450. <xsl:template match="authorgroup" mode="qandaset.titlepage.recto.auto.mode">
  4451. <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">
  4452. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4453. </fo:block>
  4454. </xsl:template>
  4455. <xsl:template match="author" mode="qandaset.titlepage.recto.auto.mode">
  4456. <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">
  4457. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4458. </fo:block>
  4459. </xsl:template>
  4460. <xsl:template match="othercredit" mode="qandaset.titlepage.recto.auto.mode">
  4461. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4462. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4463. </fo:block>
  4464. </xsl:template>
  4465. <xsl:template match="releaseinfo" mode="qandaset.titlepage.recto.auto.mode">
  4466. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4467. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4468. </fo:block>
  4469. </xsl:template>
  4470. <xsl:template match="copyright" mode="qandaset.titlepage.recto.auto.mode">
  4471. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4472. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4473. </fo:block>
  4474. </xsl:template>
  4475. <xsl:template match="legalnotice" mode="qandaset.titlepage.recto.auto.mode">
  4476. <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}">
  4477. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4478. </fo:block>
  4479. </xsl:template>
  4480. <xsl:template match="pubdate" mode="qandaset.titlepage.recto.auto.mode">
  4481. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4482. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4483. </fo:block>
  4484. </xsl:template>
  4485. <xsl:template match="revision" mode="qandaset.titlepage.recto.auto.mode">
  4486. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4487. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4488. </fo:block>
  4489. </xsl:template>
  4490. <xsl:template match="revhistory" mode="qandaset.titlepage.recto.auto.mode">
  4491. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4492. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4493. </fo:block>
  4494. </xsl:template>
  4495. <xsl:template match="abstract" mode="qandaset.titlepage.recto.auto.mode">
  4496. <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}">
  4497. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4498. </fo:block>
  4499. </xsl:template>
  4500. <xsl:template match="itermset" mode="qandaset.titlepage.recto.auto.mode">
  4501. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style">
  4502. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4503. </fo:block>
  4504. </xsl:template>
  4505. <xsl:template name="table.of.contents.titlepage.recto">
  4506. <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" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4507. <xsl:call-template name="gentext">
  4508. <xsl:with-param name="key" select="'TableofContents'"/>
  4509. </xsl:call-template></fo:block>
  4510. </xsl:template>
  4511. <xsl:template name="table.of.contents.titlepage.verso">
  4512. </xsl:template>
  4513. <xsl:template name="table.of.contents.titlepage.separator">
  4514. </xsl:template>
  4515. <xsl:template name="table.of.contents.titlepage.before.recto">
  4516. </xsl:template>
  4517. <xsl:template name="table.of.contents.titlepage.before.verso">
  4518. </xsl:template>
  4519. <xsl:template name="table.of.contents.titlepage">
  4520. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4521. <xsl:variable name="recto.content">
  4522. <xsl:call-template name="table.of.contents.titlepage.before.recto"/>
  4523. <xsl:call-template name="table.of.contents.titlepage.recto"/>
  4524. </xsl:variable>
  4525. <xsl:variable name="recto.elements.count">
  4526. <xsl:choose>
  4527. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4528. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4529. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4530. <xsl:otherwise>1</xsl:otherwise>
  4531. </xsl:choose>
  4532. </xsl:variable>
  4533. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4534. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4535. </xsl:if>
  4536. <xsl:variable name="verso.content">
  4537. <xsl:call-template name="table.of.contents.titlepage.before.verso"/>
  4538. <xsl:call-template name="table.of.contents.titlepage.verso"/>
  4539. </xsl:variable>
  4540. <xsl:variable name="verso.elements.count">
  4541. <xsl:choose>
  4542. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4543. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4544. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4545. <xsl:otherwise>1</xsl:otherwise>
  4546. </xsl:choose>
  4547. </xsl:variable>
  4548. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4549. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4550. </xsl:if>
  4551. <xsl:call-template name="table.of.contents.titlepage.separator"/>
  4552. </fo:block>
  4553. </xsl:template>
  4554. <xsl:template match="*" mode="table.of.contents.titlepage.recto.mode">
  4555. <!-- if an element isn't found in this mode, -->
  4556. <!-- try the generic titlepage.mode -->
  4557. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4558. </xsl:template>
  4559. <xsl:template match="*" mode="table.of.contents.titlepage.verso.mode">
  4560. <!-- if an element isn't found in this mode, -->
  4561. <!-- try the generic titlepage.mode -->
  4562. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4563. </xsl:template>
  4564. <xsl:template name="list.of.tables.titlepage.recto">
  4565. <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" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4566. <xsl:call-template name="gentext">
  4567. <xsl:with-param name="key" select="'ListofTables'"/>
  4568. </xsl:call-template></fo:block>
  4569. </xsl:template>
  4570. <xsl:template name="list.of.tables.titlepage.verso">
  4571. </xsl:template>
  4572. <xsl:template name="list.of.tables.titlepage.separator">
  4573. </xsl:template>
  4574. <xsl:template name="list.of.tables.titlepage.before.recto">
  4575. </xsl:template>
  4576. <xsl:template name="list.of.tables.titlepage.before.verso">
  4577. </xsl:template>
  4578. <xsl:template name="list.of.tables.titlepage">
  4579. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4580. <xsl:variable name="recto.content">
  4581. <xsl:call-template name="list.of.tables.titlepage.before.recto"/>
  4582. <xsl:call-template name="list.of.tables.titlepage.recto"/>
  4583. </xsl:variable>
  4584. <xsl:variable name="recto.elements.count">
  4585. <xsl:choose>
  4586. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4587. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4588. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4589. <xsl:otherwise>1</xsl:otherwise>
  4590. </xsl:choose>
  4591. </xsl:variable>
  4592. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4593. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4594. </xsl:if>
  4595. <xsl:variable name="verso.content">
  4596. <xsl:call-template name="list.of.tables.titlepage.before.verso"/>
  4597. <xsl:call-template name="list.of.tables.titlepage.verso"/>
  4598. </xsl:variable>
  4599. <xsl:variable name="verso.elements.count">
  4600. <xsl:choose>
  4601. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4602. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4603. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4604. <xsl:otherwise>1</xsl:otherwise>
  4605. </xsl:choose>
  4606. </xsl:variable>
  4607. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4608. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4609. </xsl:if>
  4610. <xsl:call-template name="list.of.tables.titlepage.separator"/>
  4611. </fo:block>
  4612. </xsl:template>
  4613. <xsl:template match="*" mode="list.of.tables.titlepage.recto.mode">
  4614. <!-- if an element isn't found in this mode, -->
  4615. <!-- try the generic titlepage.mode -->
  4616. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4617. </xsl:template>
  4618. <xsl:template match="*" mode="list.of.tables.titlepage.verso.mode">
  4619. <!-- if an element isn't found in this mode, -->
  4620. <!-- try the generic titlepage.mode -->
  4621. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4622. </xsl:template>
  4623. <xsl:template name="list.of.figures.titlepage.recto">
  4624. <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" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4625. <xsl:call-template name="gentext">
  4626. <xsl:with-param name="key" select="'ListofFigures'"/>
  4627. </xsl:call-template></fo:block>
  4628. </xsl:template>
  4629. <xsl:template name="list.of.figures.titlepage.verso">
  4630. </xsl:template>
  4631. <xsl:template name="list.of.figures.titlepage.separator">
  4632. </xsl:template>
  4633. <xsl:template name="list.of.figures.titlepage.before.recto">
  4634. </xsl:template>
  4635. <xsl:template name="list.of.figures.titlepage.before.verso">
  4636. </xsl:template>
  4637. <xsl:template name="list.of.figures.titlepage">
  4638. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4639. <xsl:variable name="recto.content">
  4640. <xsl:call-template name="list.of.figures.titlepage.before.recto"/>
  4641. <xsl:call-template name="list.of.figures.titlepage.recto"/>
  4642. </xsl:variable>
  4643. <xsl:variable name="recto.elements.count">
  4644. <xsl:choose>
  4645. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4646. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4647. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4648. <xsl:otherwise>1</xsl:otherwise>
  4649. </xsl:choose>
  4650. </xsl:variable>
  4651. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4652. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4653. </xsl:if>
  4654. <xsl:variable name="verso.content">
  4655. <xsl:call-template name="list.of.figures.titlepage.before.verso"/>
  4656. <xsl:call-template name="list.of.figures.titlepage.verso"/>
  4657. </xsl:variable>
  4658. <xsl:variable name="verso.elements.count">
  4659. <xsl:choose>
  4660. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4661. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4662. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4663. <xsl:otherwise>1</xsl:otherwise>
  4664. </xsl:choose>
  4665. </xsl:variable>
  4666. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4667. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4668. </xsl:if>
  4669. <xsl:call-template name="list.of.figures.titlepage.separator"/>
  4670. </fo:block>
  4671. </xsl:template>
  4672. <xsl:template match="*" mode="list.of.figures.titlepage.recto.mode">
  4673. <!-- if an element isn't found in this mode, -->
  4674. <!-- try the generic titlepage.mode -->
  4675. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4676. </xsl:template>
  4677. <xsl:template match="*" mode="list.of.figures.titlepage.verso.mode">
  4678. <!-- if an element isn't found in this mode, -->
  4679. <!-- try the generic titlepage.mode -->
  4680. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4681. </xsl:template>
  4682. <xsl:template name="list.of.examples.titlepage.recto">
  4683. <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" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4684. <xsl:call-template name="gentext">
  4685. <xsl:with-param name="key" select="'ListofExamples'"/>
  4686. </xsl:call-template></fo:block>
  4687. </xsl:template>
  4688. <xsl:template name="list.of.examples.titlepage.verso">
  4689. </xsl:template>
  4690. <xsl:template name="list.of.examples.titlepage.separator">
  4691. </xsl:template>
  4692. <xsl:template name="list.of.examples.titlepage.before.recto">
  4693. </xsl:template>
  4694. <xsl:template name="list.of.examples.titlepage.before.verso">
  4695. </xsl:template>
  4696. <xsl:template name="list.of.examples.titlepage">
  4697. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4698. <xsl:variable name="recto.content">
  4699. <xsl:call-template name="list.of.examples.titlepage.before.recto"/>
  4700. <xsl:call-template name="list.of.examples.titlepage.recto"/>
  4701. </xsl:variable>
  4702. <xsl:variable name="recto.elements.count">
  4703. <xsl:choose>
  4704. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4705. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4706. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4707. <xsl:otherwise>1</xsl:otherwise>
  4708. </xsl:choose>
  4709. </xsl:variable>
  4710. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4711. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4712. </xsl:if>
  4713. <xsl:variable name="verso.content">
  4714. <xsl:call-template name="list.of.examples.titlepage.before.verso"/>
  4715. <xsl:call-template name="list.of.examples.titlepage.verso"/>
  4716. </xsl:variable>
  4717. <xsl:variable name="verso.elements.count">
  4718. <xsl:choose>
  4719. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4720. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4721. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4722. <xsl:otherwise>1</xsl:otherwise>
  4723. </xsl:choose>
  4724. </xsl:variable>
  4725. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4726. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4727. </xsl:if>
  4728. <xsl:call-template name="list.of.examples.titlepage.separator"/>
  4729. </fo:block>
  4730. </xsl:template>
  4731. <xsl:template match="*" mode="list.of.examples.titlepage.recto.mode">
  4732. <!-- if an element isn't found in this mode, -->
  4733. <!-- try the generic titlepage.mode -->
  4734. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4735. </xsl:template>
  4736. <xsl:template match="*" mode="list.of.examples.titlepage.verso.mode">
  4737. <!-- if an element isn't found in this mode, -->
  4738. <!-- try the generic titlepage.mode -->
  4739. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4740. </xsl:template>
  4741. <xsl:template name="list.of.equations.titlepage.recto">
  4742. <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" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4743. <xsl:call-template name="gentext">
  4744. <xsl:with-param name="key" select="'ListofEquations'"/>
  4745. </xsl:call-template></fo:block>
  4746. </xsl:template>
  4747. <xsl:template name="list.of.equations.titlepage.verso">
  4748. </xsl:template>
  4749. <xsl:template name="list.of.equations.titlepage.separator">
  4750. </xsl:template>
  4751. <xsl:template name="list.of.equations.titlepage.before.recto">
  4752. </xsl:template>
  4753. <xsl:template name="list.of.equations.titlepage.before.verso">
  4754. </xsl:template>
  4755. <xsl:template name="list.of.equations.titlepage">
  4756. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4757. <xsl:variable name="recto.content">
  4758. <xsl:call-template name="list.of.equations.titlepage.before.recto"/>
  4759. <xsl:call-template name="list.of.equations.titlepage.recto"/>
  4760. </xsl:variable>
  4761. <xsl:variable name="recto.elements.count">
  4762. <xsl:choose>
  4763. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4764. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4765. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4766. <xsl:otherwise>1</xsl:otherwise>
  4767. </xsl:choose>
  4768. </xsl:variable>
  4769. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4770. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4771. </xsl:if>
  4772. <xsl:variable name="verso.content">
  4773. <xsl:call-template name="list.of.equations.titlepage.before.verso"/>
  4774. <xsl:call-template name="list.of.equations.titlepage.verso"/>
  4775. </xsl:variable>
  4776. <xsl:variable name="verso.elements.count">
  4777. <xsl:choose>
  4778. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4779. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4780. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4781. <xsl:otherwise>1</xsl:otherwise>
  4782. </xsl:choose>
  4783. </xsl:variable>
  4784. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4785. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4786. </xsl:if>
  4787. <xsl:call-template name="list.of.equations.titlepage.separator"/>
  4788. </fo:block>
  4789. </xsl:template>
  4790. <xsl:template match="*" mode="list.of.equations.titlepage.recto.mode">
  4791. <!-- if an element isn't found in this mode, -->
  4792. <!-- try the generic titlepage.mode -->
  4793. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4794. </xsl:template>
  4795. <xsl:template match="*" mode="list.of.equations.titlepage.verso.mode">
  4796. <!-- if an element isn't found in this mode, -->
  4797. <!-- try the generic titlepage.mode -->
  4798. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4799. </xsl:template>
  4800. <xsl:template name="list.of.procedures.titlepage.recto">
  4801. <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" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4802. <xsl:call-template name="gentext">
  4803. <xsl:with-param name="key" select="'ListofProcedures'"/>
  4804. </xsl:call-template></fo:block>
  4805. </xsl:template>
  4806. <xsl:template name="list.of.procedures.titlepage.verso">
  4807. </xsl:template>
  4808. <xsl:template name="list.of.procedures.titlepage.separator">
  4809. </xsl:template>
  4810. <xsl:template name="list.of.procedures.titlepage.before.recto">
  4811. </xsl:template>
  4812. <xsl:template name="list.of.procedures.titlepage.before.verso">
  4813. </xsl:template>
  4814. <xsl:template name="list.of.procedures.titlepage">
  4815. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4816. <xsl:variable name="recto.content">
  4817. <xsl:call-template name="list.of.procedures.titlepage.before.recto"/>
  4818. <xsl:call-template name="list.of.procedures.titlepage.recto"/>
  4819. </xsl:variable>
  4820. <xsl:variable name="recto.elements.count">
  4821. <xsl:choose>
  4822. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4823. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4824. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4825. <xsl:otherwise>1</xsl:otherwise>
  4826. </xsl:choose>
  4827. </xsl:variable>
  4828. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4829. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4830. </xsl:if>
  4831. <xsl:variable name="verso.content">
  4832. <xsl:call-template name="list.of.procedures.titlepage.before.verso"/>
  4833. <xsl:call-template name="list.of.procedures.titlepage.verso"/>
  4834. </xsl:variable>
  4835. <xsl:variable name="verso.elements.count">
  4836. <xsl:choose>
  4837. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4838. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4839. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4840. <xsl:otherwise>1</xsl:otherwise>
  4841. </xsl:choose>
  4842. </xsl:variable>
  4843. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4844. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4845. </xsl:if>
  4846. <xsl:call-template name="list.of.procedures.titlepage.separator"/>
  4847. </fo:block>
  4848. </xsl:template>
  4849. <xsl:template match="*" mode="list.of.procedures.titlepage.recto.mode">
  4850. <!-- if an element isn't found in this mode, -->
  4851. <!-- try the generic titlepage.mode -->
  4852. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4853. </xsl:template>
  4854. <xsl:template match="*" mode="list.of.procedures.titlepage.verso.mode">
  4855. <!-- if an element isn't found in this mode, -->
  4856. <!-- try the generic titlepage.mode -->
  4857. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4858. </xsl:template>
  4859. <xsl:template name="list.of.unknowns.titlepage.recto">
  4860. <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" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4861. <xsl:call-template name="gentext">
  4862. <xsl:with-param name="key" select="'ListofUnknown'"/>
  4863. </xsl:call-template></fo:block>
  4864. </xsl:template>
  4865. <xsl:template name="list.of.unknowns.titlepage.verso">
  4866. </xsl:template>
  4867. <xsl:template name="list.of.unknowns.titlepage.separator">
  4868. </xsl:template>
  4869. <xsl:template name="list.of.unknowns.titlepage.before.recto">
  4870. </xsl:template>
  4871. <xsl:template name="list.of.unknowns.titlepage.before.verso">
  4872. </xsl:template>
  4873. <xsl:template name="list.of.unknowns.titlepage">
  4874. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4875. <xsl:variable name="recto.content">
  4876. <xsl:call-template name="list.of.unknowns.titlepage.before.recto"/>
  4877. <xsl:call-template name="list.of.unknowns.titlepage.recto"/>
  4878. </xsl:variable>
  4879. <xsl:variable name="recto.elements.count">
  4880. <xsl:choose>
  4881. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4882. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4883. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4884. <xsl:otherwise>1</xsl:otherwise>
  4885. </xsl:choose>
  4886. </xsl:variable>
  4887. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4888. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4889. </xsl:if>
  4890. <xsl:variable name="verso.content">
  4891. <xsl:call-template name="list.of.unknowns.titlepage.before.verso"/>
  4892. <xsl:call-template name="list.of.unknowns.titlepage.verso"/>
  4893. </xsl:variable>
  4894. <xsl:variable name="verso.elements.count">
  4895. <xsl:choose>
  4896. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4897. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4898. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4899. <xsl:otherwise>1</xsl:otherwise>
  4900. </xsl:choose>
  4901. </xsl:variable>
  4902. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4903. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4904. </xsl:if>
  4905. <xsl:call-template name="list.of.unknowns.titlepage.separator"/>
  4906. </fo:block>
  4907. </xsl:template>
  4908. <xsl:template match="*" mode="list.of.unknowns.titlepage.recto.mode">
  4909. <!-- if an element isn't found in this mode, -->
  4910. <!-- try the generic titlepage.mode -->
  4911. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4912. </xsl:template>
  4913. <xsl:template match="*" mode="list.of.unknowns.titlepage.verso.mode">
  4914. <!-- if an element isn't found in this mode, -->
  4915. <!-- try the generic titlepage.mode -->
  4916. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4917. </xsl:template>
  4918. <xsl:template name="component.list.of.tables.titlepage.recto">
  4919. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="component.list.of.tables.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
  4920. <xsl:call-template name="gentext">
  4921. <xsl:with-param name="key" select="'ListofTables'"/>
  4922. </xsl:call-template></fo:block>
  4923. </xsl:template>
  4924. <xsl:template name="component.list.of.tables.titlepage.verso">
  4925. </xsl:template>
  4926. <xsl:template name="component.list.of.tables.titlepage.separator">
  4927. </xsl:template>
  4928. <xsl:template name="component.list.of.tables.titlepage.before.recto">
  4929. </xsl:template>
  4930. <xsl:template name="component.list.of.tables.titlepage.before.verso">
  4931. </xsl:template>
  4932. <xsl:template name="component.list.of.tables.titlepage">
  4933. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4934. <xsl:variable name="recto.content">
  4935. <xsl:call-template name="component.list.of.tables.titlepage.before.recto"/>
  4936. <xsl:call-template name="component.list.of.tables.titlepage.recto"/>
  4937. </xsl:variable>
  4938. <xsl:variable name="recto.elements.count">
  4939. <xsl:choose>
  4940. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4941. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4942. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4943. <xsl:otherwise>1</xsl:otherwise>
  4944. </xsl:choose>
  4945. </xsl:variable>
  4946. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4947. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4948. </xsl:if>
  4949. <xsl:variable name="verso.content">
  4950. <xsl:call-template name="component.list.of.tables.titlepage.before.verso"/>
  4951. <xsl:call-template name="component.list.of.tables.titlepage.verso"/>
  4952. </xsl:variable>
  4953. <xsl:variable name="verso.elements.count">
  4954. <xsl:choose>
  4955. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4956. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4957. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4958. <xsl:otherwise>1</xsl:otherwise>
  4959. </xsl:choose>
  4960. </xsl:variable>
  4961. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4962. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4963. </xsl:if>
  4964. <xsl:call-template name="component.list.of.tables.titlepage.separator"/>
  4965. </fo:block>
  4966. </xsl:template>
  4967. <xsl:template match="*" mode="component.list.of.tables.titlepage.recto.mode">
  4968. <!-- if an element isn't found in this mode, -->
  4969. <!-- try the generic titlepage.mode -->
  4970. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4971. </xsl:template>
  4972. <xsl:template match="*" mode="component.list.of.tables.titlepage.verso.mode">
  4973. <!-- if an element isn't found in this mode, -->
  4974. <!-- try the generic titlepage.mode -->
  4975. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4976. </xsl:template>
  4977. <xsl:template name="component.list.of.figures.titlepage.recto">
  4978. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="component.list.of.figures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
  4979. <xsl:call-template name="gentext">
  4980. <xsl:with-param name="key" select="'ListofFigures'"/>
  4981. </xsl:call-template></fo:block>
  4982. </xsl:template>
  4983. <xsl:template name="component.list.of.figures.titlepage.verso">
  4984. </xsl:template>
  4985. <xsl:template name="component.list.of.figures.titlepage.separator">
  4986. </xsl:template>
  4987. <xsl:template name="component.list.of.figures.titlepage.before.recto">
  4988. </xsl:template>
  4989. <xsl:template name="component.list.of.figures.titlepage.before.verso">
  4990. </xsl:template>
  4991. <xsl:template name="component.list.of.figures.titlepage">
  4992. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4993. <xsl:variable name="recto.content">
  4994. <xsl:call-template name="component.list.of.figures.titlepage.before.recto"/>
  4995. <xsl:call-template name="component.list.of.figures.titlepage.recto"/>
  4996. </xsl:variable>
  4997. <xsl:variable name="recto.elements.count">
  4998. <xsl:choose>
  4999. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  5000. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  5001. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  5002. <xsl:otherwise>1</xsl:otherwise>
  5003. </xsl:choose>
  5004. </xsl:variable>
  5005. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  5006. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  5007. </xsl:if>
  5008. <xsl:variable name="verso.content">
  5009. <xsl:call-template name="component.list.of.figures.titlepage.before.verso"/>
  5010. <xsl:call-template name="component.list.of.figures.titlepage.verso"/>
  5011. </xsl:variable>
  5012. <xsl:variable name="verso.elements.count">
  5013. <xsl:choose>
  5014. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  5015. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  5016. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  5017. <xsl:otherwise>1</xsl:otherwise>
  5018. </xsl:choose>
  5019. </xsl:variable>
  5020. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  5021. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  5022. </xsl:if>
  5023. <xsl:call-template name="component.list.of.figures.titlepage.separator"/>
  5024. </fo:block>
  5025. </xsl:template>
  5026. <xsl:template match="*" mode="component.list.of.figures.titlepage.recto.mode">
  5027. <!-- if an element isn't found in this mode, -->
  5028. <!-- try the generic titlepage.mode -->
  5029. <xsl:apply-templates select="." mode="titlepage.mode"/>
  5030. </xsl:template>
  5031. <xsl:template match="*" mode="component.list.of.figures.titlepage.verso.mode">
  5032. <!-- if an element isn't found in this mode, -->
  5033. <!-- try the generic titlepage.mode -->
  5034. <xsl:apply-templates select="." mode="titlepage.mode"/>
  5035. </xsl:template>
  5036. <xsl:template name="component.list.of.examples.titlepage.recto">
  5037. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="component.list.of.examples.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
  5038. <xsl:call-template name="gentext">
  5039. <xsl:with-param name="key" select="'ListofExamples'"/>
  5040. </xsl:call-template></fo:block>
  5041. </xsl:template>
  5042. <xsl:template name="component.list.of.examples.titlepage.verso">
  5043. </xsl:template>
  5044. <xsl:template name="component.list.of.examples.titlepage.separator">
  5045. </xsl:template>
  5046. <xsl:template name="component.list.of.examples.titlepage.before.recto">
  5047. </xsl:template>
  5048. <xsl:template name="component.list.of.examples.titlepage.before.verso">
  5049. </xsl:template>
  5050. <xsl:template name="component.list.of.examples.titlepage">
  5051. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  5052. <xsl:variable name="recto.content">
  5053. <xsl:call-template name="component.list.of.examples.titlepage.before.recto"/>
  5054. <xsl:call-template name="component.list.of.examples.titlepage.recto"/>
  5055. </xsl:variable>
  5056. <xsl:variable name="recto.elements.count">
  5057. <xsl:choose>
  5058. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  5059. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  5060. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  5061. <xsl:otherwise>1</xsl:otherwise>
  5062. </xsl:choose>
  5063. </xsl:variable>
  5064. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  5065. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  5066. </xsl:if>
  5067. <xsl:variable name="verso.content">
  5068. <xsl:call-template name="component.list.of.examples.titlepage.before.verso"/>
  5069. <xsl:call-template name="component.list.of.examples.titlepage.verso"/>
  5070. </xsl:variable>
  5071. <xsl:variable name="verso.elements.count">
  5072. <xsl:choose>
  5073. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  5074. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  5075. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  5076. <xsl:otherwise>1</xsl:otherwise>
  5077. </xsl:choose>
  5078. </xsl:variable>
  5079. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  5080. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  5081. </xsl:if>
  5082. <xsl:call-template name="component.list.of.examples.titlepage.separator"/>
  5083. </fo:block>
  5084. </xsl:template>
  5085. <xsl:template match="*" mode="component.list.of.examples.titlepage.recto.mode">
  5086. <!-- if an element isn't found in this mode, -->
  5087. <!-- try the generic titlepage.mode -->
  5088. <xsl:apply-templates select="." mode="titlepage.mode"/>
  5089. </xsl:template>
  5090. <xsl:template match="*" mode="component.list.of.examples.titlepage.verso.mode">
  5091. <!-- if an element isn't found in this mode, -->
  5092. <!-- try the generic titlepage.mode -->
  5093. <xsl:apply-templates select="." mode="titlepage.mode"/>
  5094. </xsl:template>
  5095. <xsl:template name="component.list.of.equations.titlepage.recto">
  5096. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="component.list.of.equations.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
  5097. <xsl:call-template name="gentext">
  5098. <xsl:with-param name="key" select="'ListofEquations'"/>
  5099. </xsl:call-template></fo:block>
  5100. </xsl:template>
  5101. <xsl:template name="component.list.of.equations.titlepage.verso">
  5102. </xsl:template>
  5103. <xsl:template name="component.list.of.equations.titlepage.separator">
  5104. </xsl:template>
  5105. <xsl:template name="component.list.of.equations.titlepage.before.recto">
  5106. </xsl:template>
  5107. <xsl:template name="component.list.of.equations.titlepage.before.verso">
  5108. </xsl:template>
  5109. <xsl:template name="component.list.of.equations.titlepage">
  5110. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  5111. <xsl:variable name="recto.content">
  5112. <xsl:call-template name="component.list.of.equations.titlepage.before.recto"/>
  5113. <xsl:call-template name="component.list.of.equations.titlepage.recto"/>
  5114. </xsl:variable>
  5115. <xsl:variable name="recto.elements.count">
  5116. <xsl:choose>
  5117. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  5118. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  5119. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  5120. <xsl:otherwise>1</xsl:otherwise>
  5121. </xsl:choose>
  5122. </xsl:variable>
  5123. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  5124. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  5125. </xsl:if>
  5126. <xsl:variable name="verso.content">
  5127. <xsl:call-template name="component.list.of.equations.titlepage.before.verso"/>
  5128. <xsl:call-template name="component.list.of.equations.titlepage.verso"/>
  5129. </xsl:variable>
  5130. <xsl:variable name="verso.elements.count">
  5131. <xsl:choose>
  5132. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  5133. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  5134. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  5135. <xsl:otherwise>1</xsl:otherwise>
  5136. </xsl:choose>
  5137. </xsl:variable>
  5138. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  5139. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  5140. </xsl:if>
  5141. <xsl:call-template name="component.list.of.equations.titlepage.separator"/>
  5142. </fo:block>
  5143. </xsl:template>
  5144. <xsl:template match="*" mode="component.list.of.equations.titlepage.recto.mode">
  5145. <!-- if an element isn't found in this mode, -->
  5146. <!-- try the generic titlepage.mode -->
  5147. <xsl:apply-templates select="." mode="titlepage.mode"/>
  5148. </xsl:template>
  5149. <xsl:template match="*" mode="component.list.of.equations.titlepage.verso.mode">
  5150. <!-- if an element isn't found in this mode, -->
  5151. <!-- try the generic titlepage.mode -->
  5152. <xsl:apply-templates select="." mode="titlepage.mode"/>
  5153. </xsl:template>
  5154. <xsl:template name="component.list.of.procedures.titlepage.recto">
  5155. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="component.list.of.procedures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
  5156. <xsl:call-template name="gentext">
  5157. <xsl:with-param name="key" select="'ListofProcedures'"/>
  5158. </xsl:call-template></fo:block>
  5159. </xsl:template>
  5160. <xsl:template name="component.list.of.procedures.titlepage.verso">
  5161. </xsl:template>
  5162. <xsl:template name="component.list.of.procedures.titlepage.separator">
  5163. </xsl:template>
  5164. <xsl:template name="component.list.of.procedures.titlepage.before.recto">
  5165. </xsl:template>
  5166. <xsl:template name="component.list.of.procedures.titlepage.before.verso">
  5167. </xsl:template>
  5168. <xsl:template name="component.list.of.procedures.titlepage">
  5169. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  5170. <xsl:variable name="recto.content">
  5171. <xsl:call-template name="component.list.of.procedures.titlepage.before.recto"/>
  5172. <xsl:call-template name="component.list.of.procedures.titlepage.recto"/>
  5173. </xsl:variable>
  5174. <xsl:variable name="recto.elements.count">
  5175. <xsl:choose>
  5176. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  5177. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  5178. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  5179. <xsl:otherwise>1</xsl:otherwise>
  5180. </xsl:choose>
  5181. </xsl:variable>
  5182. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  5183. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  5184. </xsl:if>
  5185. <xsl:variable name="verso.content">
  5186. <xsl:call-template name="component.list.of.procedures.titlepage.before.verso"/>
  5187. <xsl:call-template name="component.list.of.procedures.titlepage.verso"/>
  5188. </xsl:variable>
  5189. <xsl:variable name="verso.elements.count">
  5190. <xsl:choose>
  5191. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  5192. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  5193. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  5194. <xsl:otherwise>1</xsl:otherwise>
  5195. </xsl:choose>
  5196. </xsl:variable>
  5197. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  5198. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  5199. </xsl:if>
  5200. <xsl:call-template name="component.list.of.procedures.titlepage.separator"/>
  5201. </fo:block>
  5202. </xsl:template>
  5203. <xsl:template match="*" mode="component.list.of.procedures.titlepage.recto.mode">
  5204. <!-- if an element isn't found in this mode, -->
  5205. <!-- try the generic titlepage.mode -->
  5206. <xsl:apply-templates select="." mode="titlepage.mode"/>
  5207. </xsl:template>
  5208. <xsl:template match="*" mode="component.list.of.procedures.titlepage.verso.mode">
  5209. <!-- if an element isn't found in this mode, -->
  5210. <!-- try the generic titlepage.mode -->
  5211. <xsl:apply-templates select="." mode="titlepage.mode"/>
  5212. </xsl:template>
  5213. <xsl:template name="component.list.of.unknowns.titlepage.recto">
  5214. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="component.list.of.unknowns.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
  5215. <xsl:call-template name="gentext">
  5216. <xsl:with-param name="key" select="'ListofUnknown'"/>
  5217. </xsl:call-template></fo:block>
  5218. </xsl:template>
  5219. <xsl:template name="component.list.of.unknowns.titlepage.verso">
  5220. </xsl:template>
  5221. <xsl:template name="component.list.of.unknowns.titlepage.separator">
  5222. </xsl:template>
  5223. <xsl:template name="component.list.of.unknowns.titlepage.before.recto">
  5224. </xsl:template>
  5225. <xsl:template name="component.list.of.unknowns.titlepage.before.verso">
  5226. </xsl:template>
  5227. <xsl:template name="component.list.of.unknowns.titlepage">
  5228. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  5229. <xsl:variable name="recto.content">
  5230. <xsl:call-template name="component.list.of.unknowns.titlepage.before.recto"/>
  5231. <xsl:call-template name="component.list.of.unknowns.titlepage.recto"/>
  5232. </xsl:variable>
  5233. <xsl:variable name="recto.elements.count">
  5234. <xsl:choose>
  5235. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  5236. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  5237. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  5238. <xsl:otherwise>1</xsl:otherwise>
  5239. </xsl:choose>
  5240. </xsl:variable>
  5241. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  5242. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  5243. </xsl:if>
  5244. <xsl:variable name="verso.content">
  5245. <xsl:call-template name="component.list.of.unknowns.titlepage.before.verso"/>
  5246. <xsl:call-template name="component.list.of.unknowns.titlepage.verso"/>
  5247. </xsl:variable>
  5248. <xsl:variable name="verso.elements.count">
  5249. <xsl:choose>
  5250. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  5251. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  5252. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  5253. <xsl:otherwise>1</xsl:otherwise>
  5254. </xsl:choose>
  5255. </xsl:variable>
  5256. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  5257. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  5258. </xsl:if>
  5259. <xsl:call-template name="component.list.of.unknowns.titlepage.separator"/>
  5260. </fo:block>
  5261. </xsl:template>
  5262. <xsl:template match="*" mode="component.list.of.unknowns.titlepage.recto.mode">
  5263. <!-- if an element isn't found in this mode, -->
  5264. <!-- try the generic titlepage.mode -->
  5265. <xsl:apply-templates select="." mode="titlepage.mode"/>
  5266. </xsl:template>
  5267. <xsl:template match="*" mode="component.list.of.unknowns.titlepage.verso.mode">
  5268. <!-- if an element isn't found in this mode, -->
  5269. <!-- try the generic titlepage.mode -->
  5270. <xsl:apply-templates select="." mode="titlepage.mode"/>
  5271. </xsl:template>
  5272. </xsl:stylesheet>