titlepage.templates.xsl 246 KB

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