uof2odf_presentation.xsl 249 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. * This file is part of the LibreOffice project.
  4. *
  5. * This Source Code Form is subject to the terms of the Mozilla Public
  6. * License, v. 2.0. If a copy of the MPL was not distributed with this
  7. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  8. *
  9. * This file incorporates work covered by the following license notice:
  10. *
  11. * Licensed to the Apache Software Foundation (ASF) under one or more
  12. * contributor license agreements. See the NOTICE file distributed
  13. * with this work for additional information regarding copyright
  14. * ownership. The ASF licenses this file to you under the Apache
  15. * License, Version 2.0 (the "License"); you may not use this file
  16. * except in compliance with the License. You may obtain a copy of
  17. * the License at http://www.apache.org/licenses/LICENSE-2.0 .
  18. -->
  19. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:uof="http://schemas.uof.org/cn/2003/uof" xmlns:表="http://schemas.uof.org/cn/2003/uof-spreadsheet" xmlns:演="http://schemas.uof.org/cn/2003/uof-slideshow" xmlns:字="http://schemas.uof.org/cn/2003/uof-wordproc" xmlns:图="http://schemas.uof.org/cn/2003/graph" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" office:version="1.0">
  20. <xsl:output method="xml" indent="no" encoding="UTF-8" version="1.0"/>
  21. <xsl:template match="uof:UOF">
  22. <office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" office:version="1.0">
  23. <xsl:apply-templates select="uof:元数据"/>
  24. <office:settings>
  25. <xsl:variable name="PageNumberFormat" select="/uof:UOF/uof:演示文稿/演:公用处理规则/演:页面设置集/演:页面设置/演:页码格式[1]"/>
  26. <xsl:variable name="proportion">
  27. <xsl:value-of select="substring-before(/uof:UOF/uof:演示文稿/演:公用处理规则/演:显示比例,'%')"/>
  28. </xsl:variable>
  29. <config:config-item-set config:name="ooo:view-settings">
  30. <config:config-item config:name="VisibleAreaTop" config:type="int">0</config:config-item>
  31. <config:config-item config:name="VisibleAreaLeft" config:type="int">0</config:config-item>
  32. <config:config-item config:name="VisibleAreaWidth" config:type="int">14098</config:config-item>
  33. <config:config-item config:name="VisibleAreaHeight" config:type="int">9998</config:config-item>
  34. <config:config-item-map-indexed config:name="Views">
  35. <config:config-item-map-entry>
  36. <config:config-item config:name="ViewId" config:type="string">view1</config:config-item>
  37. <config:config-item config:name="GridIsVisible" config:type="boolean">false</config:config-item>
  38. <config:config-item config:name="GridIsFront" config:type="boolean">false</config:config-item>
  39. <config:config-item config:name="IsSnapToGrid" config:type="boolean">true</config:config-item>
  40. <config:config-item config:name="IsSnapToPageMargins" config:type="boolean">true</config:config-item>
  41. <config:config-item config:name="IsSnapToSnapLines" config:type="boolean">false</config:config-item>
  42. <config:config-item config:name="IsSnapToObjectFrame" config:type="boolean">false</config:config-item>
  43. <config:config-item config:name="IsSnapToObjectPoints" config:type="boolean">false</config:config-item>
  44. <config:config-item config:name="IsPlusHandlesAlwaysVisible" config:type="boolean">false</config:config-item>
  45. <config:config-item config:name="IsFrameDragSingles" config:type="boolean">true</config:config-item>
  46. <config:config-item config:name="EliminatePolyPointLimitAngle" config:type="int">1500</config:config-item>
  47. <config:config-item config:name="IsEliminatePolyPoints" config:type="boolean">false</config:config-item>
  48. <config:config-item config:name="VisibleLayers" config:type="base64Binary">//////////////////////////////////////////8=</config:config-item>
  49. <config:config-item config:name="PrintableLayers" config:type="base64Binary">//////////////////////////////////////////8=</config:config-item>
  50. <config:config-item config:name="LockedLayers" config:type="base64Binary"/>
  51. <config:config-item config:name="NoAttribs" config:type="boolean">false</config:config-item>
  52. <config:config-item config:name="NoColors" config:type="boolean">true</config:config-item>
  53. <config:config-item config:name="RulerIsVisible" config:type="boolean">false</config:config-item>
  54. <config:config-item config:name="PageKind" config:type="short">0</config:config-item>
  55. <config:config-item config:name="SelectedPage" config:type="short">0</config:config-item>
  56. <config:config-item config:name="IsLayerMode" config:type="boolean">false</config:config-item>
  57. <config:config-item config:name="IsDoubleClickTextEdit" config:type="boolean">true</config:config-item>
  58. <config:config-item config:name="IsClickChangeRotation" config:type="boolean">false</config:config-item>
  59. <config:config-item config:name="SlidesPerRow" config:type="short">4</config:config-item>
  60. <config:config-item config:name="EditModeStandard" config:type="int">0</config:config-item>
  61. <config:config-item config:name="EditModeNotes" config:type="int">0</config:config-item>
  62. <config:config-item config:name="EditModeHandout" config:type="int">1</config:config-item>
  63. <config:config-item config:name="VisibleAreaTop" config:type="int">-5402</config:config-item>
  64. <config:config-item config:name="VisibleAreaLeft" config:type="int">-441</config:config-item>
  65. <config:config-item config:name="VisibleAreaWidth" config:type="int">
  66. <xsl:value-of select="(100*13997) div $proportion"/>
  67. </config:config-item>
  68. <config:config-item config:name="VisibleAreaHeight" config:type="int">
  69. <xsl:value-of select="(100*15426) div $proportion"/>
  70. </config:config-item>
  71. <config:config-item config:name="GridCoarseWidth" config:type="int">1000</config:config-item>
  72. <config:config-item config:name="GridCoarseHeight" config:type="int">1000</config:config-item>
  73. <config:config-item config:name="GridFineWidth" config:type="int">500</config:config-item>
  74. <config:config-item config:name="GridFineHeight" config:type="int">500</config:config-item>
  75. <config:config-item config:name="GridSnapWidth" config:type="int">1000</config:config-item>
  76. <config:config-item config:name="GridSnapHeight" config:type="int">1000</config:config-item>
  77. <config:config-item config:name="GridSnapWidthXNumerator" config:type="int">500</config:config-item>
  78. <config:config-item config:name="GridSnapWidthXDenominator" config:type="int">1</config:config-item>
  79. <config:config-item config:name="GridSnapWidthYNumerator" config:type="int">500</config:config-item>
  80. <config:config-item config:name="GridSnapWidthYDenominator" config:type="int">1</config:config-item>
  81. <config:config-item config:name="IsAngleSnapEnabled" config:type="boolean">false</config:config-item>
  82. <config:config-item config:name="SnapAngle" config:type="int">1500</config:config-item>
  83. <config:config-item config:name="ZoomOnPage" config:type="boolean">true</config:config-item>
  84. </config:config-item-map-entry>
  85. </config:config-item-map-indexed>
  86. </config:config-item-set>
  87. <config:config-item-set config:name="ooo:configuration-settings">
  88. <config:config-item config:name="PageNumberFormat" config:type="int">
  89. <xsl:choose>
  90. <xsl:when test="/uof:UOF/uof:演示文稿/演:公用处理规则/演:页面设置集/演:页面设置/演:页码格式">
  91. <xsl:choose>
  92. <xsl:when test="$PageNumberFormat='upper-letter'">0</xsl:when>
  93. <xsl:when test="$PageNumberFormat='lower-letter'">1</xsl:when>
  94. <xsl:when test="$PageNumberFormat='upper-roman'">2</xsl:when>
  95. <xsl:when test="$PageNumberFormat='lower-letter'">3</xsl:when>
  96. <xsl:when test="$PageNumberFormat='decimal'">4</xsl:when>
  97. </xsl:choose>
  98. </xsl:when>
  99. <xsl:otherwise>5</xsl:otherwise>
  100. </xsl:choose>
  101. </config:config-item>
  102. </config:config-item-set>
  103. </office:settings>
  104. <office:scripts/>
  105. <xsl:element name="office:font-face-decls">
  106. <style:font-face style:name="宋体" svg:font-family="宋体" style:font-family-generic="swiss" style:font-pitch="variable"/>
  107. <xsl:apply-templates select="uof:式样集/uof:字体集"/>
  108. </xsl:element>
  109. <office:styles>
  110. <xsl:apply-templates select="uof:演示文稿/演:公用处理规则/演:页面版式集/演:页面版式"/>
  111. <xsl:call-template name="编号字体"/>
  112. <xsl:for-each select="uof:式样集/uof:段落式样">
  113. <xsl:variable name="outline" select="@字:标识符"/>
  114. <xsl:choose>
  115. <xsl:when test="/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号[@字:标识符=$outline]">
  116. <xsl:call-template name="段落式样"/>
  117. </xsl:when>
  118. <xsl:when test="contains($outline,'outline')">
  119. <xsl:call-template name="段落式样"/>
  120. </xsl:when>
  121. </xsl:choose>
  122. </xsl:for-each>
  123. </office:styles>
  124. <office:automatic-styles>
  125. <xsl:apply-templates select="uof:演示文稿/演:公用处理规则/演:配色方案集/演:配色方案"/>
  126. <xsl:apply-templates select="uof:式样集/uof:句式样"/>
  127. <xsl:for-each select="uof:式样集/uof:段落式样">
  128. <xsl:variable name="outline" select="@字:标识符"/>
  129. <xsl:if test="not(/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号[@字:标识符=$outline]) and not(contains($outline,'outline'))">
  130. <xsl:call-template name="段落式样"/>
  131. </xsl:if>
  132. </xsl:for-each>
  133. <xsl:apply-templates select="uof:对象集"/>
  134. <xsl:call-template name="create-page-master">
  135. <xsl:with-param name="impressoptions" select="uof:演示文稿/演:公用处理规则/演:页面设置集/演:页面设置"/>
  136. </xsl:call-template>
  137. <xsl:for-each select="/uof:UOF/uof:对象集/图:图形/图:文本内容/字:段落/字:段落属性/字:自动编号信息">
  138. <xsl:variable name="currlistid" select="@字:编号引用"/>
  139. <xsl:variable name="currlist" select="."/>
  140. <xsl:variable name="rootlist" select="/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号[@字:标识符 =$currlistid]"/>
  141. <xsl:if test="not(ancestor::字:段落/preceding-sibling::字:段落[1]/字:段落属性/字:自动编号信息/@字:编号引用= $currlistid)">
  142. <xsl:element name="text:list-style">
  143. <xsl:attribute name="style:name">List<xsl:value-of select="count(preceding::字:自动编号信息)"/></xsl:attribute>
  144. <xsl:for-each select="$rootlist">
  145. <xsl:call-template name="自动编号"/>
  146. </xsl:for-each>
  147. </xsl:element>
  148. </xsl:if>
  149. </xsl:for-each>
  150. </office:automatic-styles>
  151. <office:master-styles>
  152. <xsl:apply-templates select="uof:演示文稿/演:主体/演:母版集"/>
  153. </office:master-styles>
  154. <office:body>
  155. <office:presentation>
  156. <xsl:apply-templates select="uof:演示文稿/演:主体/演:幻灯片集"/>
  157. <xsl:apply-templates select="uof:演示文稿/演:公用处理规则/演:放映设置"/>
  158. </office:presentation>
  159. </office:body>
  160. </office:document>
  161. </xsl:template>
  162. <xsl:template match="演:放映设置">
  163. <presentation:settings>
  164. <xsl:variable name="start-page">
  165. <xsl:choose>
  166. <xsl:when test="contains(演:幻灯片序列,' ')">
  167. <xsl:value-of select="substring-before(演:幻灯片序列,' ')"/>
  168. </xsl:when>
  169. <xsl:otherwise>
  170. <xsl:value-of select="演:幻灯片序列"/>
  171. </xsl:otherwise>
  172. </xsl:choose>
  173. </xsl:variable>
  174. <xsl:variable name="first-page">
  175. <xsl:value-of select="/uof:UOF/uof:演示文稿/演:主体/演:幻灯片集/演:幻灯片[1]/@演:名称"/>
  176. </xsl:variable>
  177. <xsl:if test="not($start-page = $first-page)">
  178. <xsl:attribute name="presentation:start-page"><xsl:value-of select="$start-page"/></xsl:attribute>
  179. </xsl:if>
  180. <xsl:if test="演:全屏放映='false'">
  181. <xsl:attribute name="presentation:full-screen">false</xsl:attribute>
  182. </xsl:if>
  183. <xsl:if test="演:循环放映='true'">
  184. <xsl:attribute name="presentation:endless">true</xsl:attribute>
  185. </xsl:if>
  186. <xsl:if test="演:放映间隔">
  187. <xsl:attribute name="presentation:pause"><xsl:variable name="OOtime"><xsl:value-of select="substring-after(演:放映间隔,'P0Y0M0DT')"/></xsl:variable><xsl:value-of select="concat('PT',$OOtime)"/></xsl:attribute>
  188. </xsl:if>
  189. <xsl:if test="演:手动方式='true'">
  190. <xsl:attribute name="presentation:force-manual">true</xsl:attribute>
  191. </xsl:if>
  192. <xsl:if test="演:导航帮助='true'">
  193. <xsl:attribute name="presentation:start-with-navigator">true</xsl:attribute>
  194. </xsl:if>
  195. <xsl:if test="演:放映动画='false'">
  196. <xsl:attribute name="presentation:animations">disabled</xsl:attribute>
  197. </xsl:if>
  198. <xsl:if test="演:前端显示='true'">
  199. <xsl:attribute name="presentation:stay-on-top">true</xsl:attribute>
  200. </xsl:if>
  201. </presentation:settings>
  202. </xsl:template>
  203. <xsl:template name="自动编号">
  204. <xsl:for-each select="字:级别">
  205. <xsl:choose>
  206. <xsl:when test="字:项目符号">
  207. <xsl:call-template name="xiangmufuhao">
  208. <xsl:with-param name="biaoshifu" select="../@字:标识符"/>
  209. </xsl:call-template>
  210. </xsl:when>
  211. <xsl:when test="字:图片符号引用">
  212. <xsl:call-template name="imagefuhao">
  213. <xsl:with-param name="biaoshifu" select="../@字:标识符"/>
  214. </xsl:call-template>
  215. </xsl:when>
  216. <xsl:otherwise>
  217. <xsl:call-template name="jibianhao">
  218. <xsl:with-param name="biaoshifu" select="../@字:标识符"/>
  219. </xsl:call-template>
  220. </xsl:otherwise>
  221. </xsl:choose>
  222. </xsl:for-each>
  223. </xsl:template>
  224. <xsl:template name="编号字体">
  225. <xsl:for-each select="/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号">
  226. <xsl:if test="字:级别/字:符号字体">
  227. <xsl:element name="style:style">
  228. <xsl:attribute name="style:name"><xsl:value-of select="concat( @字:标识符,字:级别/@字:级别值)"/></xsl:attribute>
  229. <xsl:attribute name="style:family">text</xsl:attribute>
  230. <xsl:element name="style:text-properties">
  231. <xsl:attribute name="fo:color"><xsl:value-of select="字:级别/字:符号字体/字:字体/@字:颜色"/></xsl:attribute>
  232. <xsl:if test="字:级别/字:符号字体/字:粗体 and 字:级别/字:符号字体/字:粗体/@字:值='true'">
  233. <xsl:attribute name="fo:font-weight">bold</xsl:attribute>
  234. <xsl:attribute name="style:font-style-asian">bold</xsl:attribute>
  235. </xsl:if>
  236. <xsl:variable name="ziti">
  237. <xsl:value-of select="字:级别/字:符号字体/字:字体/@字:中文字体引用"/>
  238. </xsl:variable>
  239. <xsl:for-each select="/uof:UOF/uof:式样集/uof:字体集/uof:字体声明">
  240. <xsl:if test="@uof:标识符=$ziti">
  241. <xsl:attribute name="style:font-name"><xsl:value-of select="@uof:名称"/></xsl:attribute>
  242. </xsl:if>
  243. </xsl:for-each>
  244. <xsl:attribute name="fo:font-style">normal</xsl:attribute>
  245. <xsl:attribute name="style:font-weight-asian">normal</xsl:attribute>
  246. </xsl:element>
  247. </xsl:element>
  248. </xsl:if>
  249. </xsl:for-each>
  250. </xsl:template>
  251. <xsl:template match="uof:对象集">
  252. <xsl:apply-templates select="图:图形"/>
  253. <xsl:apply-templates select="图:图形/图:文本内容/字:段落/字:句/字:句属性" mode="style"/>
  254. </xsl:template>
  255. <xsl:variable name="uofUnit">
  256. <xsl:variable name="uu">
  257. <xsl:value-of select="/uof:UOF/uof:演示文稿/演:公用处理规则/演:度量单位"/>
  258. </xsl:variable>
  259. <xsl:choose>
  260. <xsl:when test="$uu='cm'">cm</xsl:when>
  261. <xsl:when test="$uu='mm'">mm</xsl:when>
  262. <xsl:when test="$uu='pt'">pt</xsl:when>
  263. <xsl:when test="$uu='inch'">inch</xsl:when>
  264. <xsl:otherwise>pt</xsl:otherwise>
  265. </xsl:choose>
  266. </xsl:variable>
  267. <xsl:variable name="other-to-cm-conversion-factor">
  268. <xsl:choose>
  269. <xsl:when test="$uofUnit='cm'">1</xsl:when>
  270. <xsl:when test="$uofUnit='mm'">0.1</xsl:when>
  271. <xsl:when test="$uofUnit='pt'">0.03527</xsl:when>
  272. <xsl:when test="$uofUnit='inch'">2.54</xsl:when>
  273. <xsl:when test="$uofUnit='pica'">0.4233</xsl:when>
  274. <xsl:otherwise>1</xsl:otherwise>
  275. </xsl:choose>
  276. </xsl:variable>
  277. <xsl:key match="/uof:UOF/uof:演示文稿/演:主体/演:母版集/演:母版/uof:锚点 | /uof:UOF/uof:演示文稿/演:主体/演:幻灯片集/演:幻灯片/uof:锚点 | /uof:UOF/uof:演示文稿/演:主体/演:幻灯片集/演:幻灯片/演:幻灯片备注/uof:锚点" name="rel_graphic_name" use="@uof:图形引用"/>
  278. <xsl:template match="图:图形">
  279. <xsl:variable name="random-name">
  280. <xsl:value-of select="generate-id()"/>
  281. </xsl:variable>
  282. <xsl:variable name="draw-name">
  283. <xsl:value-of select="substring($random-name,string-length($random-name)-1)"/>
  284. </xsl:variable>
  285. <xsl:call-template name="graphic-fill">
  286. <xsl:with-param name="draw-name" select="$draw-name"/>
  287. <xsl:with-param name="gradient-name" select="图:预定义图形/图:属性/图:填充/图:渐变"/>
  288. </xsl:call-template>
  289. <xsl:variable name="biaozhifu" select="@图:标识符"/>
  290. <xsl:choose>
  291. <xsl:when test="图:预定义图形/图:属性/图:填充/图:渐变">
  292. <xsl:element name="style:style">
  293. <xsl:attribute name="style:name"><xsl:value-of select="@图:标识符"/></xsl:attribute>
  294. <xsl:attribute name="style:family"><xsl:choose><xsl:when test="图:预定义图形/图:类别='3' or 图:预定义图形/图:类别='67'">presentation</xsl:when><xsl:otherwise>graphic</xsl:otherwise></xsl:choose></xsl:attribute>
  295. <xsl:if test="/uof:UOF/uof:演示文稿/演:主体/演:母版集/演:母版/uof:锚点[@uof:图形引用=$biaozhifu]">
  296. <xsl:variable name="duan" select="图:文本内容/字:段落/字:段落属性/@字:式样引用"/>
  297. <xsl:attribute name="style:parent-style-name"><xsl:value-of select="/uof:UOF/uof:式样集/uof:段落式样[@字:标识符=$duan]/@字:基式样引用"/></xsl:attribute>
  298. </xsl:if>
  299. <xsl:element name="style:graphic-properties">
  300. <xsl:call-template name="process-graphics">
  301. <xsl:with-param name="draw-name" select="$draw-name"/>
  302. </xsl:call-template>
  303. </xsl:element>
  304. </xsl:element>
  305. </xsl:when>
  306. <xsl:otherwise>
  307. <xsl:element name="style:style">
  308. <xsl:attribute name="style:name"><xsl:value-of select="@图:标识符"/></xsl:attribute>
  309. <xsl:attribute name="style:family"><xsl:choose><xsl:when test="图:预定义图形/图:类别='3' or 图:预定义图形/图:类别='67'">presentation</xsl:when><xsl:otherwise>graphic</xsl:otherwise></xsl:choose></xsl:attribute>
  310. <xsl:if test="/uof:UOF/uof:演示文稿/演:主体/演:母版集/演:母版/uof:锚点[@uof:图形引用=$biaozhifu]">
  311. <xsl:variable name="duan" select="图:文本内容/字:段落/字:段落属性/@字:式样引用"/>
  312. <xsl:attribute name="style:parent-style-name"><xsl:value-of select="/uof:UOF/uof:式样集/uof:段落式样[@字:标识符=$duan]/@字:基式样引用"/></xsl:attribute>
  313. </xsl:if>
  314. <xsl:element name="style:graphic-properties">
  315. <xsl:if test="@图:其他对象">
  316. <xsl:attribute name="fo:clip">rect(0cm 0cm 0cm 0cm)</xsl:attribute>
  317. <xsl:attribute name="draw:color-mode">standard</xsl:attribute>
  318. <xsl:attribute name="draw:luminance">0%</xsl:attribute>
  319. <xsl:attribute name="draw:contrast">0%</xsl:attribute>
  320. <xsl:attribute name="draw:gamma">100%</xsl:attribute>
  321. <xsl:attribute name="draw:red">0%</xsl:attribute>
  322. <xsl:attribute name="draw:green">0%</xsl:attribute>
  323. <xsl:attribute name="draw:blue">0%</xsl:attribute>
  324. <xsl:attribute name="draw:image-opacity">100%</xsl:attribute>
  325. <xsl:attribute name="style:mirror">none</xsl:attribute>
  326. </xsl:if>
  327. <xsl:call-template name="process-graphics"/>
  328. </xsl:element>
  329. <xsl:if test="图:文本内容/@图:文字排列方向='vert-r2l' or 图:文本内容/@图:文字排列方向='vert-l2r'">
  330. <xsl:element name="style:paragraph-properties">
  331. <xsl:attribute name="style:writing-mode">tb-rl</xsl:attribute>
  332. </xsl:element>
  333. </xsl:if>
  334. </xsl:element>
  335. </xsl:otherwise>
  336. </xsl:choose>
  337. </xsl:template>
  338. <xsl:template name="process-graphics">
  339. <xsl:param name="draw-name"/>
  340. <xsl:if test="not(key('rel_graphic_name',@图:标识符)/@uof:随动方式='movesize')">
  341. <xsl:attribute name="style:protect"><xsl:choose><xsl:when test="key('rel_graphic_name',@图:标识符)/@uof:随动方式='move'">size</xsl:when><xsl:otherwise>position size</xsl:otherwise></xsl:choose></xsl:attribute>
  342. </xsl:if>
  343. <xsl:choose>
  344. <xsl:when test="not(图:预定义图形/图:属性/图:填充)">
  345. <xsl:attribute name="draw:fill">none</xsl:attribute>
  346. </xsl:when>
  347. <xsl:when test="图:预定义图形/图:属性/图:填充/图:图片">
  348. <xsl:attribute name="draw:fill">bitmap</xsl:attribute>
  349. <xsl:attribute name="draw:fill-image-name"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图片/@图:名称"/></xsl:attribute>
  350. <xsl:if test="not(图:预定义图形/图:属性/图:填充/图:图片/@图:位置='title')">
  351. <xsl:attribute name="style:repeat"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:位置='center'">no-repeat</xsl:when><xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:位置='stretch'">stretch</xsl:when></xsl:choose></xsl:attribute>
  352. </xsl:if>
  353. </xsl:when>
  354. <xsl:when test="图:预定义图形/图:属性/图:填充/图:图案">
  355. <xsl:attribute name="draw:fill">bitmap</xsl:attribute>
  356. <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图案/@图:前景色"/></xsl:attribute>
  357. </xsl:when>
  358. <xsl:when test="图:预定义图形/图:属性/图:填充/图:颜色">
  359. <xsl:attribute name="draw:fill">solid</xsl:attribute>
  360. <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:颜色"/></xsl:attribute>
  361. </xsl:when>
  362. <xsl:when test="图:预定义图形/图:属性/图:填充/图:渐变">
  363. <xsl:attribute name="draw:fill">gradient</xsl:attribute>
  364. <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:渐变/@图:起始色"/></xsl:attribute>
  365. <xsl:attribute name="draw:fill-gradient-name"><xsl:value-of select="concat('Gradient ',$draw-name)"/></xsl:attribute>
  366. </xsl:when>
  367. </xsl:choose>
  368. <xsl:if test="图:预定义图形/图:属性/图:线颜色">
  369. <xsl:attribute name="svg:stroke-color"><xsl:value-of select="图:预定义图形/图:属性/图:线颜色"/></xsl:attribute>
  370. </xsl:if>
  371. <xsl:if test="图:预定义图形/图:属性/图:线型 and not(图:预定义图形/图:属性/图:线型 = 'single') and not(图:预定义图形/图:属性/图:线型 = 'thick')">
  372. <xsl:variable name="linetype" select="图:预定义图形/图:属性/图:线型"/>
  373. <xsl:attribute name="draw:stroke"><xsl:choose><xsl:when test="$linetype='none'">none</xsl:when><xsl:otherwise>dash</xsl:otherwise></xsl:choose></xsl:attribute>
  374. <xsl:attribute name="draw:stroke-dash"><xsl:choose><xsl:when test="$linetype='dot-dot-dash' or $linetype='dash-dot-dot-heavy'">_32__20_Dots_20_1_20_Dash</xsl:when><xsl:when test="$linetype='dash' or $linetype='dashed-heavy'">Ultrafine_20_Dashed</xsl:when><xsl:when test="$linetype='dotted' or $linetype='dotted-heavy'">Ultrafine_20_Dotted_20__28_var_29_</xsl:when><xsl:when test="$linetype='double'">Line_20_with_20_Fine_20_Dots</xsl:when><xsl:when test="$linetype='dot-dash' or $linetype='dash-dot-heavy'">_33__20_Dashes_20_3_20_Dots_20__28_var_29_</xsl:when><xsl:when test="$linetype='wave' or $linetype='wavy-heavy'">Ultrafine_20_2_20_Dots_20_3_20_Dashes</xsl:when><xsl:when test="$linetype='wavy-double'">Fine_20_Dashed_20__28_var_29_</xsl:when><xsl:otherwise>Fine Dashed</xsl:otherwise></xsl:choose></xsl:attribute>
  375. </xsl:if>
  376. <xsl:if test="图:预定义图形/图:属性/图:线粗细">
  377. <xsl:attribute name="svg:stroke-width"><xsl:value-of select="concat(图:预定义图形/图:属性/图:线粗细,$uofUnit)"/></xsl:attribute>
  378. </xsl:if>
  379. <xsl:if test="图:预定义图形/图:属性/图:前端箭头">
  380. <xsl:attribute name="draw:marker-start"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='normal'">Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='open'">Line_20_Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='stealth'">Arrow_20_concave</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='oval'">Circle</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='diamond'">Square_20_45</xsl:when></xsl:choose></xsl:attribute>
  381. <xsl:if test="图:预定义图形/图:属性/图:前端箭头/图:大小">
  382. <xsl:attribute name="draw:marker-start-width"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '1'"><xsl:value-of select="concat('0.05',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '2'"><xsl:value-of select="concat('0.10',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '3'"><xsl:value-of select="concat('0.15',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '4'"><xsl:value-of select="concat('0.20',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '5'"><xsl:value-of select="concat('0.25',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '6'"><xsl:value-of select="concat('0.30',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '7'"><xsl:value-of select="concat('0.35',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:大小 = '8'"><xsl:value-of select="concat('0.40',$uofUnit)"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('0.45',$uofUnit)"/></xsl:otherwise></xsl:choose></xsl:attribute>
  383. </xsl:if>
  384. </xsl:if>
  385. <xsl:if test="图:预定义图形/图:属性/图:后端箭头">
  386. <xsl:attribute name="draw:marker-end"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='normal'">Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='open'">Line_20_Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='stealth'">Arrow_20_concave</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='oval'">Circle</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='diamond'">Square_20_45</xsl:when></xsl:choose></xsl:attribute>
  387. <xsl:if test="图:预定义图形/图:属性/图:后端箭头/图:大小">
  388. <xsl:attribute name="draw:marker-end-width"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '1'"><xsl:value-of select="concat('0.05',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '2'"><xsl:value-of select="concat('0.10',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '3'"><xsl:value-of select="concat('0.15',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '4'"><xsl:value-of select="concat('0.20',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '5'"><xsl:value-of select="concat('0.25',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '6'"><xsl:value-of select="concat('0.30',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '7'"><xsl:value-of select="concat('0.35',$uofUnit)"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:大小 = '8'"><xsl:value-of select="concat('0.40',$uofUnit)"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('0.45',$uofUnit)"/></xsl:otherwise></xsl:choose></xsl:attribute>
  389. </xsl:if>
  390. </xsl:if>
  391. <xsl:if test="图:预定义图形/图:属性/图:透明度">
  392. <xsl:attribute name="draw:opacity"><xsl:variable name="opacity"><xsl:value-of select="./图:预定义图形/图:属性/图:透明度"/></xsl:variable><xsl:value-of select="concat((1 - $opacity)*100,'%')"/></xsl:attribute>
  393. </xsl:if>
  394. <xsl:if test="图:文本内容">
  395. <xsl:for-each select="图:文本内容">
  396. <xsl:if test="@图:上边距">
  397. <xsl:attribute name="fo:padding-top"><xsl:value-of select="concat(@图:上边距,$uofUnit)"/></xsl:attribute>
  398. <xsl:attribute name="fo:padding-bottom"><xsl:value-of select="concat(@图:下边距,$uofUnit)"/></xsl:attribute>
  399. <xsl:attribute name="fo:padding-left"><xsl:value-of select="concat(@图:左边距,$uofUnit)"/></xsl:attribute>
  400. <xsl:attribute name="fo:padding-right"><xsl:value-of select="concat(@图:右边距,$uofUnit)"/></xsl:attribute>
  401. </xsl:if>
  402. <xsl:if test="not(@图:文字排列方向='middle')">
  403. <xsl:variable name="hori-or-vert" select="@图:文字排列方向"/>
  404. <xsl:choose>
  405. <xsl:when test="$hori-or-vert='vert-l2r'">
  406. <xsl:attribute name="draw:textarea-vertical-align">bottom</xsl:attribute>
  407. </xsl:when>
  408. <xsl:when test="$hori-or-vert='hori-l2r'">
  409. <xsl:attribute name="draw:textarea-horizontal-align">left</xsl:attribute>
  410. </xsl:when>
  411. <xsl:when test="$hori-or-vert='hori-r2l'">
  412. <xsl:attribute name="draw:textarea-horizontal-align">right</xsl:attribute>
  413. </xsl:when>
  414. <xsl:otherwise>
  415. <xsl:value-of select="$hori-or-vert"/>
  416. </xsl:otherwise>
  417. </xsl:choose>
  418. </xsl:if>
  419. <xsl:if test="@图:自动换行">
  420. <xsl:attribute name="fo:wrap-option">no-wrap</xsl:attribute>
  421. </xsl:if>
  422. <xsl:attribute name="draw:auto-grow-width"><xsl:choose><xsl:when test="@图:大小适应文字">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute>
  423. </xsl:for-each>
  424. </xsl:if>
  425. </xsl:template>
  426. <xsl:template name="bina_graphic">
  427. <xsl:param name="refGraphic"/>
  428. <xsl:element name="office:binary-data">
  429. <xsl:for-each select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符 = $refGraphic]">
  430. <xsl:value-of select="uof:数据"/>
  431. </xsl:for-each>
  432. </xsl:element>
  433. <text:p/>
  434. </xsl:template>
  435. <xsl:template name="graphic-fill">
  436. <xsl:param name="draw-name"/>
  437. <xsl:param name="gradient-name"/>
  438. <xsl:if test="图:预定义图形/图:属性/图:填充/图:渐变">
  439. <xsl:element name="draw:gradient">
  440. <xsl:attribute name="draw:name"><xsl:value-of select="concat('Gradient ',$draw-name)"/></xsl:attribute>
  441. <xsl:attribute name="draw:style"><xsl:choose><xsl:when test="$gradient-name/@图:种子类型='linear'"><xsl:value-of select="'linear'"/></xsl:when><xsl:when test="$gradient-name/@图:种子类型='radar'"><xsl:value-of select="'radial'"/></xsl:when><xsl:when test="$gradient-name/@图:种子类型='oval'"><xsl:value-of select="'ellipsoid'"/></xsl:when><xsl:when test="$gradient-name/@图:种子类型='square'"><xsl:value-of select="'square'"/></xsl:when><xsl:when test="$gradient-name/@图:种子类型='rectangle'"><xsl:value-of select="'rectangular'"/></xsl:when></xsl:choose></xsl:attribute>
  442. <xsl:attribute name="draw:start-color"><xsl:value-of select="$gradient-name/@图:起始色"/></xsl:attribute>
  443. <xsl:attribute name="draw:end-color"><xsl:value-of select="$gradient-name/@图:终止色"/></xsl:attribute>
  444. <xsl:attribute name="draw:start-intensity"><xsl:value-of select="concat($gradient-name/@图:起始浓度,'%')"/></xsl:attribute>
  445. <xsl:attribute name="draw:end-intensity"><xsl:value-of select="concat($gradient-name/@图:终止浓度,'%')"/></xsl:attribute>
  446. <xsl:attribute name="draw:angle"><xsl:value-of select="$gradient-name/@图:渐变方向 * 10"/></xsl:attribute>
  447. <xsl:attribute name="draw:border"><xsl:value-of select="concat($gradient-name/@图:边界,'%')"/></xsl:attribute>
  448. <xsl:if test="$gradient-name/@图:种子X位置">
  449. <xsl:attribute name="draw:cx"><xsl:value-of select="concat($gradient-name/@图:种子X位置,'%')"/></xsl:attribute>
  450. </xsl:if>
  451. <xsl:if test="$gradient-name/@图:种子Y位置">
  452. <xsl:attribute name="draw:cy"><xsl:value-of select="concat($gradient-name/@图:种子Y位置,'%')"/></xsl:attribute>
  453. </xsl:if>
  454. </xsl:element>
  455. </xsl:if>
  456. <xsl:if test="图:预定义图形/图:属性/图:前端箭头">
  457. <xsl:element name="draw:marker">
  458. <xsl:attribute name="draw:name"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='normal'">Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='open'">Line_20_Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='stealth'">Arrow_20_concave</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='oval'">Circle</xsl:when><xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='diamond'">Square_20_45</xsl:when></xsl:choose></xsl:attribute>
  459. <xsl:choose>
  460. <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='normal'">
  461. <xsl:attribute name="svg:viewBox">0 0 20 30</xsl:attribute>
  462. <xsl:attribute name="svg:d">m10 0-10 30h20z</xsl:attribute>
  463. </xsl:when>
  464. <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='open'">
  465. <xsl:attribute name="svg:viewBox">0 0 1122 2243</xsl:attribute>
  466. <xsl:attribute name="svg:d">m0 2108v17 17l12 42 30 34 38 21 43 4 29-8 30-21 25-26 13-34 343-1532 339 1520 13 42 29 34 39 21 42 4 42-12 34-30 21-42v-39-12l-4 4-440-1998-9-42-25-39-38-25-43-8-42 8-38 25-26 39-8 42z</xsl:attribute>
  467. </xsl:when>
  468. <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='stealth'">
  469. <xsl:attribute name="svg:viewBox">0 0 1131 1580</xsl:attribute>
  470. <xsl:attribute name="svg:d">m1013 1491 118 89-567-1580-564 1580 114-85 136-68 148-46 161-17 161 13 153 46z</xsl:attribute>
  471. </xsl:when>
  472. <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='oval'">
  473. <xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute>
  474. <xsl:attribute name="svg:d">m462 1118-102-29-102-51-93-72-72-93-51-102-29-102-13-105 13-102 29-106 51-102 72-89 93-72 102-50 102-34 106-9 101 9 106 34 98 50 93 72 72 89 51 102 29 106 13 102-13 105-29 102-51 102-72 93-93 72-98 51-106 29-101 13z</xsl:attribute>
  475. </xsl:when>
  476. <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='diamond'">
  477. <xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute>
  478. <xsl:attribute name="svg:d">m0 564 564 567 567-567-567-564z</xsl:attribute>
  479. </xsl:when>
  480. </xsl:choose>
  481. </xsl:element>
  482. </xsl:if>
  483. <xsl:if test="图:预定义图形/图:属性/图:后端箭头">
  484. <xsl:element name="draw:marker">
  485. <xsl:attribute name="draw:name"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='normal'">Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='open'">Line_20_Arrow</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='stealth'">Arrow_20_concave</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='oval'">Circle</xsl:when><xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='diamond'">Square_20_45</xsl:when></xsl:choose></xsl:attribute>
  486. <xsl:choose>
  487. <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='normal'">
  488. <xsl:attribute name="svg:viewBox">0 0 20 30</xsl:attribute>
  489. <xsl:attribute name="svg:d">m10 0-10 30h20z</xsl:attribute>
  490. </xsl:when>
  491. <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='open'">
  492. <xsl:attribute name="svg:viewBox">0 0 1122 2243</xsl:attribute>
  493. <xsl:attribute name="svg:d">m0 2108v17 17l12 42 30 34 38 21 43 4 29-8 30-21 25-26 13-34 343-1532 339 1520 13 42 29 34 39 21 42 4 42-12 34-30 21-42v-39-12l-4 4-440-1998-9-42-25-39-38-25-43-8-42 8-38 25-26 39-8 42z</xsl:attribute>
  494. </xsl:when>
  495. <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='stealth'">
  496. <xsl:attribute name="svg:viewBox">0 0 1131 1580</xsl:attribute>
  497. <xsl:attribute name="svg:d">m1013 1491 118 89-567-1580-564 1580 114-85 136-68 148-46 161-17 161 13 153 46z</xsl:attribute>
  498. </xsl:when>
  499. <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='oval'">
  500. <xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute>
  501. <xsl:attribute name="svg:d">m462 1118-102-29-102-51-93-72-72-93-51-102-29-102-13-105 13-102 29-106 51-102 72-89 93-72 102-50 102-34 106-9 101 9 106 34 98 50 93 72 72 89 51 102 29 106 13 102-13 105-29 102-51 102-72 93-93 72-98 51-106 29-101 13z</xsl:attribute>
  502. </xsl:when>
  503. <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='diamond'">
  504. <xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute>
  505. <xsl:attribute name="svg:d">m0 564 564 567 567-567-567-564z</xsl:attribute>
  506. </xsl:when>
  507. </xsl:choose>
  508. </xsl:element>
  509. </xsl:if>
  510. <xsl:if test="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用 or 图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用">
  511. <xsl:element name="draw:fill-image">
  512. <xsl:attribute name="draw:name"><xsl:choose><xsl:when test="图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图案/@图:类型"/></xsl:when><xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图片/@图:名称"/></xsl:when></xsl:choose></xsl:attribute>
  513. <xsl:call-template name="bina_graphic">
  514. <xsl:with-param name="refGraphic">
  515. <xsl:choose>
  516. <xsl:when test="图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用">
  517. <xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用"/>
  518. </xsl:when>
  519. <xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用">
  520. <xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用"/>
  521. </xsl:when>
  522. </xsl:choose>
  523. </xsl:with-param>
  524. </xsl:call-template>
  525. </xsl:element>
  526. </xsl:if>
  527. <xsl:if test="not(图:预定义图形/图:属性/图:线型='single') and not(图:预定义图形/图:属性/图:线型='thick') and 图:预定义图形/图:属性/图:线型">
  528. <xsl:variable name="line" select="图:预定义图形/图:属性/图:线型"/>
  529. <xsl:element name="draw:stroke-dash">
  530. <xsl:choose>
  531. <xsl:when test="$line='dash-long' or $line='dash-long-heavy'">
  532. <xsl:attribute name="draw:name">Fine_20_Dashed</xsl:attribute>
  533. <xsl:attribute name="draw:display-name">Fine dashed</xsl:attribute>
  534. <xsl:attribute name="draw:style">rect</xsl:attribute>
  535. <xsl:attribute name="draw:dots1">1</xsl:attribute>
  536. <xsl:attribute name="draw:dots1-length">0.508cm</xsl:attribute>
  537. <xsl:attribute name="draw:dots2">1</xsl:attribute>
  538. <xsl:attribute name="draw:dots2-length">0.508cm</xsl:attribute>
  539. <xsl:attribute name="draw:distance">0.508cm</xsl:attribute>
  540. </xsl:when>
  541. <xsl:when test="$line='dot-dot-dash' or $line='dash-dot-dot-heavy'">
  542. <xsl:attribute name="draw:name">_32__20_Dots_20_1_20_Dash</xsl:attribute>
  543. <xsl:attribute name="draw:display-name">2 Dots 1 Dash</xsl:attribute>
  544. <xsl:attribute name="draw:style">rect</xsl:attribute>
  545. <xsl:attribute name="draw:dots1">2</xsl:attribute>
  546. <xsl:attribute name="draw:dots2">1</xsl:attribute>
  547. <xsl:attribute name="draw:dots2-length">0.203cm</xsl:attribute>
  548. <xsl:attribute name="draw:distance">0.203cm</xsl:attribute>
  549. </xsl:when>
  550. <xsl:when test="$line='dash' or $line='dashed-heavy'">
  551. <xsl:attribute name="draw:name">Ultrafine_20_Dashed</xsl:attribute>
  552. <xsl:attribute name="draw:display-name">Ultrafine Dashed</xsl:attribute>
  553. <xsl:attribute name="draw:style">rect</xsl:attribute>
  554. <xsl:attribute name="draw:dots1">1</xsl:attribute>
  555. <xsl:attribute name="draw:dots1-length">0.051cm</xsl:attribute>
  556. <xsl:attribute name="draw:dots2">1</xsl:attribute>
  557. <xsl:attribute name="draw:dots2-length">0.051cm</xsl:attribute>
  558. <xsl:attribute name="draw:distance">0.051cm</xsl:attribute>
  559. </xsl:when>
  560. <xsl:when test="$line='dotted' or $line='dotted-heavy'">
  561. <xsl:attribute name="draw:name">Ultrafine_20_Dotted_20__28_var_29_</xsl:attribute>
  562. <xsl:attribute name="draw:display-name">Ultrafine Dotted (var)</xsl:attribute>
  563. <xsl:attribute name="draw:style">rect</xsl:attribute>
  564. <xsl:attribute name="draw:dots1">1</xsl:attribute>
  565. <xsl:attribute name="draw:distance">50%</xsl:attribute>
  566. </xsl:when>
  567. <xsl:when test="$line='wave' or $line='wavy-heavy'">
  568. <xsl:attribute name="draw:name">Ultrafine_20_2_20_Dots_20_3_20_Dashes</xsl:attribute>
  569. <xsl:attribute name="draw:display-name">Ultrafine 2 Dots 3 Dashes</xsl:attribute>
  570. <xsl:attribute name="draw:style">rect</xsl:attribute>
  571. <xsl:attribute name="draw:dots1">2</xsl:attribute>
  572. <xsl:attribute name="draw:dots1-length">0.051cm</xsl:attribute>
  573. <xsl:attribute name="draw:dots2">3</xsl:attribute>
  574. <xsl:attribute name="draw:dots2-length">0.254cm</xsl:attribute>
  575. <xsl:attribute name="draw:distance">0.127cm</xsl:attribute>
  576. </xsl:when>
  577. <xsl:when test="$line='dot-dash' or $line='dash-dot-heavy'">
  578. <xsl:attribute name="draw:name">_33__20_Dashes_20_3_20_Dots_20__28_var_29_</xsl:attribute>
  579. <xsl:attribute name="draw:display-name">3 Dashes 3 Dots (var)</xsl:attribute>
  580. <xsl:attribute name="draw:style">rect</xsl:attribute>
  581. <xsl:attribute name="draw:dots1">3</xsl:attribute>
  582. <xsl:attribute name="draw:dots1-length">197%</xsl:attribute>
  583. <xsl:attribute name="draw:dots2">3</xsl:attribute>
  584. <xsl:attribute name="draw:distance">100%</xsl:attribute>
  585. </xsl:when>
  586. <xsl:when test="$line='double'">
  587. <xsl:attribute name="draw:name">Line_20_with_20_Fine_20_Dots</xsl:attribute>
  588. <xsl:attribute name="draw:display-name">Line with Fine Dots</xsl:attribute>
  589. <xsl:attribute name="draw:style">rect</xsl:attribute>
  590. <xsl:attribute name="draw:dots1">1</xsl:attribute>
  591. <xsl:attribute name="draw:dots1-length">2.007cm</xsl:attribute>
  592. <xsl:attribute name="draw:dots2">10</xsl:attribute>
  593. <xsl:attribute name="draw:distance">0.152cm</xsl:attribute>
  594. </xsl:when>
  595. <xsl:when test="$line='wavy-double'">
  596. <xsl:attribute name="draw:name">Fine_20_Dashed_20__28_var_29_</xsl:attribute>
  597. <xsl:attribute name="draw:display-name">Fine Dashed (var)</xsl:attribute>
  598. <xsl:attribute name="draw:style">rect</xsl:attribute>
  599. <xsl:attribute name="draw:dots1">1</xsl:attribute>
  600. <xsl:attribute name="draw:dots1-length">197%</xsl:attribute>
  601. <xsl:attribute name="draw:distance">197%</xsl:attribute>
  602. </xsl:when>
  603. <xsl:otherwise>
  604. <xsl:attribute name="draw:name">Fine Dashed</xsl:attribute>
  605. <xsl:attribute name="draw:style">rect</xsl:attribute>
  606. <xsl:attribute name="draw:dots1">1</xsl:attribute>
  607. <xsl:attribute name="draw:dots1-length">0.508cm</xsl:attribute>
  608. <xsl:attribute name="draw:dots2">1</xsl:attribute>
  609. <xsl:attribute name="draw:dots2-length">0.508cm</xsl:attribute>
  610. <xsl:attribute name="draw:distance">0.508cm</xsl:attribute>
  611. </xsl:otherwise>
  612. </xsl:choose>
  613. </xsl:element>
  614. </xsl:if>
  615. </xsl:template>
  616. <xsl:template name="create-page-master">
  617. <xsl:param name="impressoptions"/>
  618. <xsl:for-each select="$impressoptions">
  619. <xsl:element name="style:page-layout">
  620. <xsl:attribute name="style:name"><xsl:call-template name="encode-as-nc-name"><xsl:with-param name="string" select="@演:标识符"/></xsl:call-template></xsl:attribute>
  621. <xsl:element name="style:page-layout-properties">
  622. <xsl:if test="演:纸张/@uof:宽度">
  623. <xsl:attribute name="fo:page-width"><xsl:value-of select="concat(演:纸张/@uof:宽度,$uofUnit)"/></xsl:attribute>
  624. </xsl:if>
  625. <xsl:if test="演:纸张/@uof:高度">
  626. <xsl:attribute name="fo:page-height"><xsl:value-of select="concat((演:纸张/@uof:高度),$uofUnit)"/></xsl:attribute>
  627. </xsl:if>
  628. <xsl:if test="演:页边距">
  629. <xsl:attribute name="fo:margin-top"><xsl:value-of select="concat(演:页边距/@uof:上,$uofUnit)"/></xsl:attribute>
  630. <xsl:attribute name="fo:margin-bottom"><xsl:value-of select="concat(演:页边距/@uof:下,$uofUnit)"/></xsl:attribute>
  631. <xsl:attribute name="fo:margin-left"><xsl:value-of select="concat(演:页边距/@uof:左,$uofUnit)"/></xsl:attribute>
  632. <xsl:attribute name="fo:margin-right"><xsl:value-of select="concat(演:页边距/@uof:右,$uofUnit)"/></xsl:attribute>
  633. </xsl:if>
  634. <xsl:choose>
  635. <xsl:when test="演:纸张方向 = 'landscape'">
  636. <xsl:attribute name="style:print-orientation">landscape</xsl:attribute>
  637. </xsl:when>
  638. <xsl:otherwise>
  639. <xsl:attribute name="style:print-orientation">portrait</xsl:attribute>
  640. </xsl:otherwise>
  641. </xsl:choose>
  642. </xsl:element>
  643. </xsl:element>
  644. </xsl:for-each>
  645. </xsl:template>
  646. <xsl:template name="encode-as-nc-name">
  647. <xsl:param name="string"/>
  648. <xsl:value-of select="translate($string, '. %()/\+', '')"/>
  649. </xsl:template>
  650. <xsl:key name="tianchongmu" match="/uof:UOF/uof:演示文稿/演:主体/演:母版集/演:母版" use="@演:配色方案引用"/>
  651. <xsl:key name="tianchonghuan" match="/uof:UOF/uof:演示文稿/演:主体/演:幻灯片集/演:幻灯片" use="@演:标识符"/>
  652. <xsl:template match="演:配色方案">
  653. <xsl:if test="key('tianchongmu',@演:标识符)/演:背景">
  654. <xsl:for-each select="key('tianchongmu',@演:标识符)/演:背景">
  655. <xsl:call-template name="officestyle"/>
  656. </xsl:for-each>
  657. </xsl:if>
  658. <xsl:if test="key('tianchonghuan',@演:标识符)/演:背景">
  659. <xsl:for-each select="key('tianchonghuan',@演:标识符)/演:背景">
  660. <xsl:call-template name="officestyle"/>
  661. </xsl:for-each>
  662. </xsl:if>
  663. <xsl:element name="style:style">
  664. <xsl:attribute name="style:family">drawing-page</xsl:attribute>
  665. <xsl:attribute name="style:name"><xsl:value-of select="@演:标识符"/></xsl:attribute>
  666. <xsl:element name="style:drawing-page-properties">
  667. <xsl:if test="演:填充">
  668. <xsl:attribute name="draw:fill">solid</xsl:attribute>
  669. <xsl:attribute name="draw:fill-color"><xsl:value-of select="演:背景色"/></xsl:attribute>
  670. </xsl:if>
  671. <xsl:if test="演:背景色">
  672. <xsl:attribute name="draw:background-size">border</xsl:attribute>
  673. </xsl:if>
  674. <xsl:if test="演:阴影">
  675. <xsl:attribute name="draw:shadow">visible</xsl:attribute>
  676. <xsl:attribute name="draw:shadow-color"><xsl:value-of select="演:阴影"/></xsl:attribute>
  677. </xsl:if>
  678. <xsl:if test="演:文本和线条">
  679. <xsl:attribute name="svg:stroke-color"><xsl:value-of select="演:文本和线条"/></xsl:attribute>
  680. </xsl:if>
  681. <xsl:if test="key('tianchongmu',@演:标识符)/演:背景">
  682. <xsl:for-each select="key('tianchongmu',@演:标识符)/演:背景">
  683. <xsl:call-template name="background"/>
  684. </xsl:for-each>
  685. </xsl:if>
  686. <xsl:if test="key('tianchonghuan',@演:标识符)/演:背景">
  687. <xsl:for-each select="key('tianchonghuan',@演:标识符)/演:背景">
  688. <xsl:call-template name="background"/>
  689. </xsl:for-each>
  690. </xsl:if>
  691. </xsl:element>
  692. <xsl:variable name="style-name">
  693. <xsl:value-of select="@演:标识符"/>
  694. </xsl:variable>
  695. <xsl:for-each select="/uof:UOF/uof:演示文稿/演:主体/演:幻灯片集/演:幻灯片[@演:标识符=$style-name]/演:切换">
  696. <style:drawing-page-properties>
  697. <xsl:if test="@演:速度='slow'">
  698. <xsl:attribute name="presentation:transition-speed">slow</xsl:attribute>
  699. </xsl:if>
  700. <xsl:if test="not(@演:效果 = 'none')">
  701. <xsl:variable name="effect">
  702. <xsl:value-of select="@演:效果"/>
  703. </xsl:variable>
  704. <xsl:choose>
  705. <xsl:when test="$effect='box in'">
  706. <xsl:attribute name="smil:type">irisWipe</xsl:attribute>
  707. <xsl:attribute name="smil:subtype">rectangle</xsl:attribute>
  708. <xsl:attribute name="smil:direction">reverse</xsl:attribute>
  709. </xsl:when>
  710. <xsl:when test="$effect='box out'">
  711. <xsl:attribute name="smil:type">irisWipe</xsl:attribute>
  712. <xsl:attribute name="smil:subtype">rectangle</xsl:attribute>
  713. </xsl:when>
  714. <xsl:when test="$effect='checkerboard across'">
  715. <xsl:attribute name="smil:type">checkerBoardWipe</xsl:attribute>
  716. <xsl:attribute name="smil:subtype">across</xsl:attribute>
  717. </xsl:when>
  718. <xsl:when test="$effect='checkerboard down'">
  719. <xsl:attribute name="smil:type">checkerBoardWipe</xsl:attribute>
  720. <xsl:attribute name="smil:subtype">down</xsl:attribute>
  721. </xsl:when>
  722. <xsl:when test="$effect='comb horizontal'">
  723. <xsl:attribute name="smil:type">pushWipe</xsl:attribute>
  724. <xsl:attribute name="smil:subtype">combHorizontal</xsl:attribute>
  725. </xsl:when>
  726. <xsl:when test="$effect='comb vertical'">
  727. <xsl:attribute name="smil:type">pushWipe</xsl:attribute>
  728. <xsl:attribute name="smil:subtype">combVertical</xsl:attribute>
  729. </xsl:when>
  730. <xsl:when test="$effect='uncover down'">
  731. <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
  732. <xsl:attribute name="smil:subtype">fromTop</xsl:attribute>
  733. <xsl:attribute name="smil:direction">reverse</xsl:attribute>
  734. </xsl:when>
  735. <xsl:when test="$effect='uncover left'">
  736. <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
  737. <xsl:attribute name="smil:subtype">fromRight</xsl:attribute>
  738. <xsl:attribute name="smil:direction">reverse</xsl:attribute>
  739. </xsl:when>
  740. <xsl:when test="$effect='uncover right'">
  741. <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
  742. <xsl:attribute name="smil:subtype">fromLeft</xsl:attribute>
  743. <xsl:attribute name="smil:direction">reverse</xsl:attribute>
  744. </xsl:when>
  745. <xsl:when test="$effect='uncover up'">
  746. <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
  747. <xsl:attribute name="smil:subtype">fromBottom</xsl:attribute>
  748. <xsl:attribute name="smil:direction">reverse</xsl:attribute>
  749. </xsl:when>
  750. <xsl:when test="$effect='uncover left-down'">
  751. <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
  752. <xsl:attribute name="smil:subtype">fromTopRight</xsl:attribute>
  753. <xsl:attribute name="smil:direction">reverse</xsl:attribute>
  754. </xsl:when>
  755. <xsl:when test="$effect='uncover left-up'">
  756. <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
  757. <xsl:attribute name="smil:subtype">fromBottomRight</xsl:attribute>
  758. <xsl:attribute name="smil:direction">reverse</xsl:attribute>
  759. </xsl:when>
  760. <xsl:when test="$effect='uncover right-down'">
  761. <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
  762. <xsl:attribute name="smil:subtype">fromTopLeft</xsl:attribute>
  763. <xsl:attribute name="smil:direction">reverse</xsl:attribute>
  764. </xsl:when>
  765. <xsl:when test="$effect='uncover right-up'">
  766. <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
  767. <xsl:attribute name="smil:subtype">fromBottomLeft</xsl:attribute>
  768. <xsl:attribute name="smil:direction">reverse</xsl:attribute>
  769. </xsl:when>
  770. <xsl:when test="$effect='cover down'">
  771. <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
  772. <xsl:attribute name="smil:subtype">fromTop</xsl:attribute>
  773. </xsl:when>
  774. <xsl:when test="$effect='cover left'">
  775. <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
  776. <xsl:attribute name="smil:subtype">fromRight</xsl:attribute>
  777. </xsl:when>
  778. <xsl:when test="$effect='cover right'">
  779. <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
  780. <xsl:attribute name="smil:subtype">fromLeft</xsl:attribute>
  781. </xsl:when>
  782. <xsl:when test="$effect='cover up'">
  783. <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
  784. <xsl:attribute name="smil:subtype">fromBottom</xsl:attribute>
  785. </xsl:when>
  786. <xsl:when test="$effect='cover left-down'">
  787. <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
  788. <xsl:attribute name="smil:subtype">fromTopRight</xsl:attribute>
  789. </xsl:when>
  790. <xsl:when test="$effect='cover left-up'">
  791. <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
  792. <xsl:attribute name="smil:subtype">fromBottomRight</xsl:attribute>
  793. </xsl:when>
  794. <xsl:when test="$effect='cover right-down'">
  795. <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
  796. <xsl:attribute name="smil:subtype">fromTopLeft</xsl:attribute>
  797. </xsl:when>
  798. <xsl:when test="$effect='cover right-up'">
  799. <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
  800. <xsl:attribute name="smil:subtype">fromBottomLeft</xsl:attribute>
  801. </xsl:when>
  802. <xsl:when test="$effect='fade through black'">
  803. <xsl:attribute name="smil:type">fade</xsl:attribute>
  804. <xsl:attribute name="smil:subtype">fadeOverColor</xsl:attribute>
  805. <xsl:attribute name="smil:fadeColor">#000000</xsl:attribute>
  806. </xsl:when>
  807. <xsl:when test="$effect='push down'">
  808. <xsl:attribute name="smil:type">pushWipe</xsl:attribute>
  809. <xsl:attribute name="smil:subtype">fromTop</xsl:attribute>
  810. </xsl:when>
  811. <xsl:when test="$effect='push left'">
  812. <xsl:attribute name="smil:type">pushWipe</xsl:attribute>
  813. <xsl:attribute name="smil:subtype">fromRight</xsl:attribute>
  814. </xsl:when>
  815. <xsl:when test="$effect='push right'">
  816. <xsl:attribute name="smil:type">pushWipe</xsl:attribute>
  817. <xsl:attribute name="smil:subtype">fromLeft</xsl:attribute>
  818. </xsl:when>
  819. <xsl:when test="$effect='push up'">
  820. <xsl:attribute name="smil:type">pushWipe</xsl:attribute>
  821. <xsl:attribute name="smil:subtype">fromBottom</xsl:attribute>
  822. </xsl:when>
  823. <xsl:when test="$effect='random bars horizontal'">
  824. <xsl:attribute name="smil:type">randomBarWipe</xsl:attribute>
  825. <xsl:attribute name="smil:subtype">horizontal</xsl:attribute>
  826. </xsl:when>
  827. <xsl:when test="$effect='random bars vertical'">
  828. <xsl:attribute name="smil:type">randomBarWipe</xsl:attribute>
  829. <xsl:attribute name="smil:subtype">vertical</xsl:attribute>
  830. </xsl:when>
  831. <xsl:when test="$effect='shape circle'">
  832. <xsl:attribute name="smil:type">ellipseWipe</xsl:attribute>
  833. <xsl:attribute name="smil:subtype">circle</xsl:attribute>
  834. </xsl:when>
  835. <xsl:when test="$effect='shape diamond'">
  836. <xsl:attribute name="smil:type">irisWipe</xsl:attribute>
  837. <xsl:attribute name="smil:subtype">diamond</xsl:attribute>
  838. </xsl:when>
  839. <xsl:when test="$effect='shape plus'">
  840. <xsl:attribute name="smil:type">fourBoxWipe</xsl:attribute>
  841. <xsl:attribute name="smil:subtype">cornersOut</xsl:attribute>
  842. </xsl:when>
  843. <xsl:when test="$effect='split horizontal in'">
  844. <xsl:attribute name="smil:type">barnDoorWipe</xsl:attribute>
  845. <xsl:attribute name="smil:subtype">horizontal</xsl:attribute>
  846. <xsl:attribute name="smil:direction">reverse</xsl:attribute>
  847. </xsl:when>
  848. <xsl:when test="$effect='split horizontal out'">
  849. <xsl:attribute name="smil:type">barnDoorWipe</xsl:attribute>
  850. <xsl:attribute name="smil:subtype">horizontal</xsl:attribute>
  851. </xsl:when>
  852. <xsl:when test="$effect='split vertical in'">
  853. <xsl:attribute name="smil:type">barnDoorWipe</xsl:attribute>
  854. <xsl:attribute name="smil:subtype">vertical</xsl:attribute>
  855. <xsl:attribute name="smil:direction">reverse</xsl:attribute>
  856. </xsl:when>
  857. <xsl:when test="$effect='split vertical out'">
  858. <xsl:attribute name="smil:type">barnDoorWipe</xsl:attribute>
  859. <xsl:attribute name="smil:subtype">vertical</xsl:attribute>
  860. </xsl:when>
  861. <xsl:when test="$effect='wedge'">
  862. <xsl:attribute name="smil:type">fanWipe</xsl:attribute>
  863. <xsl:attribute name="smil:subtype">centerTop</xsl:attribute>
  864. </xsl:when>
  865. <xsl:when test="$effect='wheel clockwise – 1 spoke'">
  866. <xsl:attribute name="smil:type">pinWheelWipe</xsl:attribute>
  867. <xsl:attribute name="smil:subtype">oneBlade</xsl:attribute>
  868. </xsl:when>
  869. <xsl:when test="$effect='wheel clockwise – 2 spoke'">
  870. <xsl:attribute name="smil:type">pinWheelWipe</xsl:attribute>
  871. <xsl:attribute name="smil:subtype">twoBladeVertical</xsl:attribute>
  872. </xsl:when>
  873. <xsl:when test="$effect='wheel clockwise – 3 spoke'">
  874. <xsl:attribute name="smil:type">pinWheelWipe</xsl:attribute>
  875. <xsl:attribute name="smil:subtype">threeBlade</xsl:attribute>
  876. </xsl:when>
  877. <xsl:when test="$effect='wheel clockwise – 4 spoke'">
  878. <xsl:attribute name="smil:type">pinWheelWipe</xsl:attribute>
  879. <xsl:attribute name="smil:subtype">fourBlade</xsl:attribute>
  880. </xsl:when>
  881. <xsl:when test="$effect='wheel clockwise – 8 spoke'">
  882. <xsl:attribute name="smil:type">pinWheelWipe</xsl:attribute>
  883. <xsl:attribute name="smil:subtype">eightBlade</xsl:attribute>
  884. </xsl:when>
  885. <xsl:when test="$effect='wipe left'">
  886. <xsl:attribute name="smil:type">barWipe</xsl:attribute>
  887. <xsl:attribute name="smil:subtype">leftToRight</xsl:attribute>
  888. <xsl:attribute name="smil:direction">reverse</xsl:attribute>
  889. </xsl:when>
  890. <xsl:when test="$effect='wipe right'">
  891. <xsl:attribute name="smil:type">barWipe</xsl:attribute>
  892. <xsl:attribute name="smil:subtype">leftToRight</xsl:attribute>
  893. </xsl:when>
  894. <xsl:when test="$effect='wipe up'">
  895. <xsl:attribute name="smil:type">barWipe</xsl:attribute>
  896. <xsl:attribute name="smil:subtype">topToBottom</xsl:attribute>
  897. <xsl:attribute name="smil:direction">reverse</xsl:attribute>
  898. </xsl:when>
  899. <xsl:when test="$effect='wipe down'">
  900. <xsl:attribute name="smil:type">barWipe</xsl:attribute>
  901. <xsl:attribute name="smil:subtype">topToBottom</xsl:attribute>
  902. </xsl:when>
  903. <xsl:when test="$effect='blinds vertical'">
  904. <xsl:attribute name="smil:type">blindsWipe</xsl:attribute>
  905. <xsl:attribute name="smil:subtype">vertical</xsl:attribute>
  906. </xsl:when>
  907. <xsl:when test="$effect='blinds horizontal'">
  908. <xsl:attribute name="smil:type">blindsWipe</xsl:attribute>
  909. <xsl:attribute name="smil:subtype">horizontal</xsl:attribute>
  910. </xsl:when>
  911. <xsl:when test="$effect='dissolve'">
  912. <xsl:attribute name="smil:type">dissolve</xsl:attribute>
  913. </xsl:when>
  914. <xsl:when test="$effect='random transition'">
  915. <xsl:attribute name="smil:type">random</xsl:attribute>
  916. </xsl:when>
  917. </xsl:choose>
  918. </xsl:if>
  919. <xsl:if test="演:方式/演:单击鼠标='false'">
  920. <xsl:attribute name="presentation:transition-type">automatic</xsl:attribute>
  921. </xsl:if>
  922. <xsl:if test="演:方式/演:时间间隔">
  923. <xsl:attribute name="presentation:duration"><xsl:value-of select="concat('PT00H00M',演:方式/演:时间间隔,'S')"/></xsl:attribute>
  924. </xsl:if>
  925. <xsl:if test="(演:声音/@演:预定义声音 and not(演:声音/@演:预定义声音='none')) or 演:声音/@演:自定义声音">
  926. <xsl:choose>
  927. <xsl:when test="演:声音/@演:预定义声音">
  928. <xsl:variable name="voice">
  929. <xsl:value-of select="演:声音/@演:预定义声音"/>
  930. </xsl:variable>
  931. <presentation:sound xlink:type="simple" xlink:show="new" xlink:actuate="onRequest">
  932. <xsl:attribute name="xlink:href"><xsl:choose><xsl:when test="$voice='applause'">../../../../../../../softwware/Redoffcie%203.0/share/gallery/sounds/applause.wav</xsl:when><xsl:when test="$voice='explosion'">../../../../../../../softwware/Redoffcie%203.0/share/gallery/sounds/explos.wav</xsl:when><xsl:when test="$voice='laser'">../../../../../../../softwware/Redoffcie%203.0/share/gallery/sounds/laser.wav</xsl:when><xsl:otherwise><xsl:value-of select="演:声音/@演:预定义声音"/></xsl:otherwise></xsl:choose></xsl:attribute>
  933. </presentation:sound>
  934. </xsl:when>
  935. <xsl:otherwise>
  936. <presentation:sound xlink:type="simple" xlink:show="new" xlink:actuate="onRequest">
  937. <xsl:attribute name="xlink:href"><xsl:value-of select="演:声音/@演:自定义声音"/></xsl:attribute>
  938. </presentation:sound>
  939. </xsl:otherwise>
  940. </xsl:choose>
  941. </xsl:if>
  942. </style:drawing-page-properties>
  943. </xsl:for-each>
  944. </xsl:element>
  945. </xsl:template>
  946. <xsl:template name="officestyle">
  947. <xsl:variable name="random-name">
  948. <xsl:value-of select="generate-id()"/>
  949. </xsl:variable>
  950. <xsl:variable name="draw-name">
  951. <xsl:value-of select="substring($random-name,string-length($random-name)-1)"/>
  952. </xsl:variable>
  953. <xsl:choose>
  954. <xsl:when test="图:渐变">
  955. <xsl:element name="draw:gradient">
  956. <xsl:attribute name="draw:name"><xsl:value-of select="concat('Gradient ',$draw-name)"/></xsl:attribute>
  957. <xsl:attribute name="draw:style"><xsl:choose><xsl:when test="图:渐变/@图:种子类型='linear'"><xsl:value-of select="'linear'"/></xsl:when><xsl:when test="图:渐变/@图:种子类型='radar'"><xsl:value-of select="'radial'"/></xsl:when><xsl:when test="图:渐变/@图:种子类型='oval'"><xsl:value-of select="'ellipsoid'"/></xsl:when><xsl:when test="图:渐变/@图:种子类型='square'"><xsl:value-of select="'square'"/></xsl:when><xsl:when test="图:渐变/@图:种子类型='rectangle'"><xsl:value-of select="'rectangular'"/></xsl:when></xsl:choose></xsl:attribute>
  958. <xsl:attribute name="draw:start-color"><xsl:value-of select="图:渐变/@图:起始色"/></xsl:attribute>
  959. <xsl:attribute name="draw:end-color"><xsl:value-of select="图:渐变/@图:终止色"/></xsl:attribute>
  960. <xsl:attribute name="draw:start-intensity"><xsl:value-of select="concat(图:渐变/@图:起始浓度,'%')"/></xsl:attribute>
  961. <xsl:attribute name="draw:end-intensity"><xsl:value-of select="concat(图:渐变/@图:终止浓度,'%')"/></xsl:attribute>
  962. <xsl:attribute name="draw:angle"><xsl:value-of select="图:渐变/@图:渐变方向 * 10"/></xsl:attribute>
  963. <xsl:attribute name="draw:border"><xsl:value-of select="concat(图:渐变/@图:边界,'%')"/></xsl:attribute>
  964. <xsl:if test="图:渐变/@图:种子X位置">
  965. <xsl:attribute name="draw:cx"><xsl:value-of select="concat(图:渐变/@图:种子X位置,'%')"/></xsl:attribute>
  966. </xsl:if>
  967. <xsl:if test="图:渐变/@图:种子Y位置">
  968. <xsl:attribute name="draw:cy"><xsl:value-of select="concat(图:渐变/@图:种子Y位置,'%')"/></xsl:attribute>
  969. </xsl:if>
  970. </xsl:element>
  971. </xsl:when>
  972. <xsl:when test="图:图片/@图:图形引用 or 图:图案/@图:图形引用">
  973. <xsl:element name="draw:fill-image">
  974. <xsl:attribute name="draw:name"><xsl:choose><xsl:when test="图:图案/@图:图形引用"><xsl:value-of select="图:图案/@图:类型"/></xsl:when><xsl:when test="图:图片/@图:图形引用"><xsl:value-of select="图:图片/@图:名称"/></xsl:when></xsl:choose></xsl:attribute>
  975. <xsl:call-template name="bina_graphic">
  976. <xsl:with-param name="refGraphic">
  977. <xsl:choose>
  978. <xsl:when test="图:图案/@图:图形引用">
  979. <xsl:value-of select="图:图案/@图:图形引用"/>
  980. </xsl:when>
  981. <xsl:when test="图:图片/@图:图形引用">
  982. <xsl:value-of select="图:图片/@图:图形引用"/>
  983. </xsl:when>
  984. </xsl:choose>
  985. </xsl:with-param>
  986. </xsl:call-template>
  987. </xsl:element>
  988. </xsl:when>
  989. </xsl:choose>
  990. </xsl:template>
  991. <xsl:template name="background">
  992. <xsl:variable name="random-name">
  993. <xsl:value-of select="generate-id()"/>
  994. </xsl:variable>
  995. <xsl:variable name="draw-name">
  996. <xsl:value-of select="substring($random-name,string-length($random-name)-1)"/>
  997. </xsl:variable>
  998. <xsl:choose>
  999. <xsl:when test="图:图片">
  1000. <xsl:attribute name="draw:fill">bitmap</xsl:attribute>
  1001. <xsl:attribute name="draw:fill-image-name"><xsl:value-of select="图:图片/@图:名称"/></xsl:attribute>
  1002. <xsl:if test="not(图:图片/@图:位置='title')">
  1003. <xsl:attribute name="style:repeat"><xsl:choose><xsl:when test="图:图片/@图:位置='center'">no-repeat</xsl:when><xsl:when test="图:图片/@图:位置='stretch'">stretch</xsl:when></xsl:choose></xsl:attribute>
  1004. </xsl:if>
  1005. </xsl:when>
  1006. <xsl:when test="图:图案">
  1007. <xsl:attribute name="draw:fill">bitmap</xsl:attribute>
  1008. <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:图案/@图:前景色"/></xsl:attribute>
  1009. </xsl:when>
  1010. <xsl:when test="图:颜色">
  1011. <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:颜色"/></xsl:attribute>
  1012. </xsl:when>
  1013. <xsl:when test="图:渐变">
  1014. <xsl:attribute name="draw:fill">gradient</xsl:attribute>
  1015. <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:渐变/@图:起始色"/></xsl:attribute>
  1016. <xsl:attribute name="draw:fill-gradient-name"><xsl:value-of select="concat('Gradient ',$draw-name)"/></xsl:attribute>
  1017. </xsl:when>
  1018. </xsl:choose>
  1019. </xsl:template>
  1020. <xsl:template match="演:母版集">
  1021. <draw:layer-set>
  1022. <draw:layer draw:name="layout"/>
  1023. <draw:layer draw:name="background"/>
  1024. <draw:layer draw:name="backgroundobjects"/>
  1025. <draw:layer draw:name="controls"/>
  1026. <draw:layer draw:name="measurelines"/>
  1027. </draw:layer-set>
  1028. <xsl:apply-templates select="演:母版"/>
  1029. </xsl:template>
  1030. <xsl:template match="演:母版">
  1031. <xsl:choose>
  1032. <xsl:when test="@演:类型 = 'handout' ">
  1033. <xsl:element name="style:handout-master">
  1034. <xsl:attribute name="style:name"><xsl:value-of select="@演:标识符"/></xsl:attribute>
  1035. <xsl:attribute name="style:page-layout-name"><xsl:value-of select="@演:页面设置引用"/></xsl:attribute>
  1036. <xsl:attribute name="draw:style-name"><xsl:value-of select="@演:配色方案引用"/></xsl:attribute>
  1037. <xsl:for-each select="uof:锚点[@uof:缩略图='true']">
  1038. <draw:page-thumbnail draw:layer="backgroundobjects">
  1039. <xsl:attribute name="svg:width"><xsl:value-of select="concat(@uof:宽度,$uofUnit)"/></xsl:attribute>
  1040. <xsl:attribute name="svg:height"><xsl:value-of select="concat(@uof:高度,$uofUnit)"/></xsl:attribute>
  1041. <xsl:attribute name="svg:x"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute>
  1042. <xsl:attribute name="svg:y"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute>
  1043. </draw:page-thumbnail>
  1044. </xsl:for-each>
  1045. <xsl:apply-templates select="uof:锚点[not(@uof:缩略图='true')]"/>
  1046. </xsl:element>
  1047. </xsl:when>
  1048. <xsl:when test="@演:类型 = 'slide'">
  1049. <xsl:element name="style:master-page">
  1050. <xsl:attribute name="style:name"><xsl:value-of select="@演:标识符"/></xsl:attribute>
  1051. <xsl:attribute name="style:page-layout-name"><xsl:value-of select="@演:页面设置引用"/></xsl:attribute>
  1052. <xsl:attribute name="draw:style-name"><xsl:value-of select="@演:配色方案引用"/></xsl:attribute>
  1053. <xsl:apply-templates select="uof:锚点 "/>
  1054. <xsl:for-each select="/uof:UOF/uof:演示文稿/演:主体/演:母版集/演:母版">
  1055. <xsl:if test="@演:类型 = 'notes'">
  1056. <xsl:element name="presentation:notes">
  1057. <xsl:attribute name="style:page-layout-name"><xsl:value-of select="@演:页面设置引用"/></xsl:attribute>
  1058. <xsl:attribute name="draw:style-name"><xsl:value-of select="@演:配色方案引用"/></xsl:attribute>
  1059. <xsl:apply-templates select="uof:锚点 "/>
  1060. </xsl:element>
  1061. </xsl:if>
  1062. </xsl:for-each>
  1063. </xsl:element>
  1064. </xsl:when>
  1065. </xsl:choose>
  1066. </xsl:template>
  1067. <xsl:template match="uof:句式样">
  1068. <xsl:element name="style:style">
  1069. <xsl:attribute name="style:name"><xsl:value-of select="@字:标识符"/></xsl:attribute>
  1070. <xsl:if test="@字:基式样引用">
  1071. <xsl:attribute name="style:parent-style-name"><xsl:value-of select="@字:基式样引用"/></xsl:attribute>
  1072. </xsl:if>
  1073. <xsl:choose>
  1074. <xsl:when test="ancestor::字:段落式样">
  1075. <xsl:attribute name="style:family">paragraph</xsl:attribute>
  1076. </xsl:when>
  1077. <xsl:otherwise>
  1078. <xsl:attribute name="style:family">text</xsl:attribute>
  1079. </xsl:otherwise>
  1080. </xsl:choose>
  1081. <xsl:element name="style:text-properties">
  1082. <xsl:apply-templates select="*"/>
  1083. </xsl:element>
  1084. </xsl:element>
  1085. </xsl:template>
  1086. <xsl:template name="段落式样">
  1087. <xsl:element name="style:style">
  1088. <xsl:variable name="outline" select="@字:标识符"/>
  1089. <xsl:attribute name="style:family"><xsl:choose><xsl:when test="/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号[@字:标识符=$outline]">presentation</xsl:when><xsl:otherwise>paragraph</xsl:otherwise></xsl:choose></xsl:attribute>
  1090. <xsl:attribute name="style:name"><xsl:value-of select="@字:标识符"/></xsl:attribute>
  1091. <xsl:if test="@字:基式样引用">
  1092. <xsl:attribute name="style:parent-style-name"><xsl:value-of select="@字:基式样引用"/></xsl:attribute>
  1093. </xsl:if>
  1094. <xsl:if test="/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号[@字:标识符=$outline]">
  1095. <xsl:for-each select="/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号[@字:标识符=$outline]">
  1096. <style:graphic-properties draw:stroke="none" draw:fill="none">
  1097. <xsl:element name="text:list-style">
  1098. <xsl:call-template name="自动编号"/>
  1099. </xsl:element>
  1100. </style:graphic-properties>
  1101. </xsl:for-each>
  1102. </xsl:if>
  1103. <xsl:element name="style:paragraph-properties">
  1104. <xsl:if test="字:自动编号信息">
  1105. <xsl:attribute name="text:enable-numbering">true</xsl:attribute>
  1106. </xsl:if>
  1107. <xsl:if test="contains($outline,'title')">
  1108. <xsl:attribute name="fo:text-align">center</xsl:attribute>
  1109. </xsl:if>
  1110. <xsl:call-template name="paragraph-properties"/>
  1111. </xsl:element>
  1112. <xsl:element name="style:text-properties">
  1113. <xsl:apply-templates select="*"/>
  1114. </xsl:element>
  1115. </xsl:element>
  1116. </xsl:template>
  1117. <xsl:template name="paragraph-properties">
  1118. <xsl:choose>
  1119. <xsl:when test="descendant::字:页边距[@uof:左]">
  1120. <xsl:attribute name="fo:margin-left"><xsl:value-of select="number(((descendant::字:页边距/@uof:左)div 10) *1)"/>cm</xsl:attribute>
  1121. </xsl:when>
  1122. <xsl:otherwise>
  1123. <xsl:attribute name="fo:margin-left">0cm</xsl:attribute>
  1124. </xsl:otherwise>
  1125. </xsl:choose>
  1126. <xsl:choose>
  1127. <xsl:when test="descendant::字:页边距[@uof:右]">
  1128. <xsl:attribute name="fo:margin-right"><xsl:value-of select="number(((descendant::字:页边距/@uof:右)div 10) *1)"/>cm</xsl:attribute>
  1129. </xsl:when>
  1130. <xsl:otherwise>
  1131. <xsl:attribute name="fo:margin-right">0cm</xsl:attribute>
  1132. </xsl:otherwise>
  1133. </xsl:choose>
  1134. <xsl:attribute name="fo:text-indent">0cm</xsl:attribute>
  1135. <xsl:call-template name="bidi"/>
  1136. </xsl:template>
  1137. <xsl:template name="bidi">
  1138. </xsl:template>
  1139. <xsl:template name="jibianhao">
  1140. <xsl:param name="biaoshifu"/>
  1141. <xsl:element name="text:list-level-style-number">
  1142. <xsl:variable name="currlevel" select="number(@字:级别值)"/>
  1143. <xsl:attribute name="text:level"><xsl:value-of select="$currlevel"/></xsl:attribute>
  1144. <xsl:attribute name="text:style-name">Numbering Symbols</xsl:attribute>
  1145. <xsl:if test="字:起始编号">
  1146. <xsl:attribute name="text:start-value"><xsl:value-of select="字:起始编号"/></xsl:attribute>
  1147. </xsl:if>
  1148. <xsl:if test="字:正规格式">
  1149. <xsl:attribute name="text:num-regular-exp"><xsl:value-of select="字:正规格式/@值"/></xsl:attribute>
  1150. </xsl:if>
  1151. <xsl:attribute name="text:display-levels"><xsl:value-of select="string-length(字:编号格式表示) - string-length(translate(字:编号格式表示,'%','') )"/></xsl:attribute>
  1152. <xsl:if test="字:编号格式">
  1153. <xsl:call-template name="编号格式"/>
  1154. </xsl:if>
  1155. <xsl:if test="字:编号格式表示">
  1156. <xsl:attribute name="style:num-prefix"><xsl:choose><xsl:when test="number($currlevel) =1"><xsl:value-of select="substring-before(字:编号格式表示,concat('%',$currlevel))"/></xsl:when><xsl:otherwise><xsl:value-of select="substring-after(substring-after( substring-before(字:编号格式表示,concat('%',$currlevel)),concat('%',string(number($currlevel) -1))),'.')"/></xsl:otherwise></xsl:choose></xsl:attribute>
  1157. <xsl:attribute name="style:num-suffix"><xsl:value-of select="substring-after(字:编号格式表示,concat('%',$currlevel))"/></xsl:attribute>
  1158. </xsl:if>
  1159. <xsl:element name="style:list-level-properties">
  1160. <xsl:if test="@字:编号对齐方式">
  1161. <xsl:attribute name="fo:text-align"><xsl:value-of select="@字:编号对齐方式"/></xsl:attribute>
  1162. </xsl:if>
  1163. <xsl:call-template name="suojinleixing"/>
  1164. </xsl:element>
  1165. <xsl:element name="style:text-properties">
  1166. <xsl:if test="字:符号字体">
  1167. <xsl:variable name="Font-ID">
  1168. <xsl:value-of select="字:符号字体/@字:式样引用"/>
  1169. </xsl:variable>
  1170. <xsl:for-each select="/uof:UOF/uof:式样集/uof:句式样">
  1171. <xsl:if test="@字:标识符=$Font-ID">
  1172. <xsl:if test="字:字体/@字:中文字体引用">
  1173. <xsl:attribute name="fo:font-family"><xsl:value-of select="字:字体/@字:中文字体引用"/></xsl:attribute>
  1174. </xsl:if>
  1175. </xsl:if>
  1176. </xsl:for-each>
  1177. <xsl:for-each select="字:符号字体">
  1178. <xsl:apply-templates select="*"/>
  1179. </xsl:for-each>
  1180. </xsl:if>
  1181. </xsl:element>
  1182. </xsl:element>
  1183. </xsl:template>
  1184. <xsl:template name="xiangmufuhao">
  1185. <xsl:param name="biaoshifu"/>
  1186. <xsl:variable name="currlevel" select="number(@字:级别值)"/>
  1187. <xsl:element name="text:list-level-style-bullet">
  1188. <xsl:attribute name="text:level"><xsl:value-of select="$currlevel"/></xsl:attribute>
  1189. <xsl:attribute name="text:style-name"><xsl:value-of select="concat( $biaoshifu,$currlevel)"/></xsl:attribute>
  1190. <xsl:attribute name="style:num-suffix"><xsl:value-of select="substring-after(字:编号格式表示,'%1')"/></xsl:attribute>
  1191. <xsl:attribute name="text:bullet-char"><xsl:value-of select="字:项目符号"/></xsl:attribute>
  1192. <xsl:element name="style:list-level-properties">
  1193. <xsl:if test="@字:编号对齐方式">
  1194. <xsl:attribute name="fo:text-align"><xsl:value-of select="@字:编号对齐方式"/></xsl:attribute>
  1195. </xsl:if>
  1196. <xsl:call-template name="suojinleixing"/>
  1197. </xsl:element>
  1198. <xsl:element name="style:text-properties">
  1199. <xsl:if test="字:符号字体">
  1200. <xsl:variable name="Font-ID">
  1201. <xsl:value-of select="字:符号字体/@字:式样引用"/>
  1202. </xsl:variable>
  1203. <xsl:for-each select="/uof:UOF/uof:式样集/uof:句式样[@字:标识符=$Font-ID]">
  1204. <xsl:if test="字:字体/@字:中文字体引用">
  1205. <xsl:attribute name="fo:font-family"><xsl:value-of select="字:字体/@字:中文字体引用"/></xsl:attribute>
  1206. </xsl:if>
  1207. </xsl:for-each>
  1208. <xsl:for-each select="字:符号字体">
  1209. <xsl:apply-templates select="*"/>
  1210. </xsl:for-each>
  1211. </xsl:if>
  1212. </xsl:element>
  1213. </xsl:element>
  1214. </xsl:template>
  1215. <xsl:template name="suojinleixing">
  1216. <xsl:if test="字:缩进/字:左/字:绝对/@字:值">
  1217. <xsl:attribute name="text:space-before"><xsl:value-of select="concat(number(字:缩进/字:左/字:绝对/@字:值),$uofUnit)"/></xsl:attribute>
  1218. </xsl:if>
  1219. <xsl:if test="字:缩进/字:右/字:绝对/@字:值">
  1220. <xsl:attribute name="text:min-label-width"><xsl:value-of select="concat(number(字:缩进/字:右/字:绝对/@字:值),$uofUnit)"/></xsl:attribute>
  1221. </xsl:if>
  1222. <xsl:if test="字:缩进/字:首行/字:绝对/@字:值">
  1223. <xsl:attribute name="text:min-label-distance"><xsl:value-of select="concat(number(字:缩进/字:首行/字:绝对/@字:值),$uofUnit)"/></xsl:attribute>
  1224. </xsl:if>
  1225. </xsl:template>
  1226. <xsl:template name="imagefuhao">
  1227. <xsl:param name="biaoshifu"/>
  1228. <xsl:variable name="currlevel" select="number(@字:级别值)"/>
  1229. <xsl:element name="text:list-level-style-image" style:vertical-pos="middle" style:vertical-rel="line" fo:width="0.265cm" fo:height="0.265cm">
  1230. <xsl:attribute name="text:level"><xsl:value-of select="$currlevel"/></xsl:attribute>
  1231. <xsl:attribute name="text:style-name"><xsl:value-of select="concat( $biaoshifu,$currlevel)"/></xsl:attribute>
  1232. <xsl:attribute name="style:num-suffix"><xsl:value-of select="substring-after(字:编号格式表示,'%1')"/></xsl:attribute>
  1233. <xsl:if test="字:图片符号引用">
  1234. <xsl:variable name="gid">
  1235. <xsl:value-of select="字:图片符号引用"/>
  1236. </xsl:variable>
  1237. <xsl:element name="office:binary-data">
  1238. <xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$gid]/uof:数据"/>
  1239. </xsl:element>
  1240. </xsl:if>
  1241. <xsl:element name="style:list-level-properties">
  1242. <xsl:attribute name="style:vertical-pos">middle</xsl:attribute>
  1243. <xsl:attribute name="style:vertical-rel">line</xsl:attribute>
  1244. <xsl:attribute name="fo:width"><xsl:value-of select="concat(字:图片符号引用/@字:宽度,$uofUnit)"/></xsl:attribute>
  1245. <xsl:attribute name="fo:height"><xsl:value-of select="concat(字:图片符号引用/@字:高度,$uofUnit)"/></xsl:attribute>
  1246. <xsl:if test="字:符号字体">
  1247. <xsl:variable name="Font-ID">
  1248. <xsl:value-of select="字:符号字体/@字:式样引用"/>
  1249. </xsl:variable>
  1250. <xsl:for-each select="/uof:UOF/uof:式样集/uof:句式样">
  1251. <xsl:if test="@字:标识符=$Font-ID">
  1252. <xsl:if test="字:字体/@字:中文字体引用">
  1253. <xsl:attribute name="fo:font-family"><xsl:value-of select="字:字体/@字:中文字体引用"/></xsl:attribute>
  1254. </xsl:if>
  1255. </xsl:if>
  1256. </xsl:for-each>
  1257. </xsl:if>
  1258. <xsl:call-template name="suojinleixing"/>
  1259. <xsl:if test="@字:编号对齐方式">
  1260. <xsl:attribute name="fo:text-align"><xsl:value-of select="@字:编号对齐方式"/></xsl:attribute>
  1261. </xsl:if>
  1262. </xsl:element>
  1263. <xsl:element name="style:text-properties">
  1264. <xsl:for-each select="字:符号字体">
  1265. <xsl:apply-templates select="*"/>
  1266. </xsl:for-each>
  1267. </xsl:element>
  1268. </xsl:element>
  1269. </xsl:template>
  1270. <xsl:template name="编号格式">
  1271. <xsl:attribute name="style:num-format"><xsl:choose><xsl:when test="string(字:编号格式)='lower-letter'">a</xsl:when><xsl:when test="string(字:编号格式)='upper-letter'">A</xsl:when><xsl:when test="string(字:编号格式)='lower-roman'">i</xsl:when><xsl:when test="string(字:编号格式)='upper-roman'">I</xsl:when><xsl:when test="string(字:编号格式)='decimal-enclosed-circle'">①, ②, ③, ...</xsl:when><xsl:when test="string(字:编号格式)='ideograph-traditional'">甲, 乙, 丙, ...</xsl:when><xsl:when test="string(字:编号格式)='ideograph-zodiac'">子, 丑, 寅, ...</xsl:when><xsl:when test="string(字:编号格式)='chinese-counting'">一, 二, 三, ...</xsl:when><xsl:when test="string(字:编号格式)='chinese-legal-simplified'">壹, 贰, 叁, ...</xsl:when><xsl:otherwise>1</xsl:otherwise></xsl:choose></xsl:attribute>
  1272. </xsl:template>
  1273. <xsl:template match="演:幻灯片集">
  1274. <xsl:for-each select="演:幻灯片">
  1275. <xsl:element name="draw:page">
  1276. <xsl:attribute name="draw:name"><xsl:value-of select="@演:名称"/></xsl:attribute>
  1277. <xsl:attribute name="draw:style-name"><xsl:value-of select="@演:标识符"/></xsl:attribute>
  1278. <xsl:attribute name="draw:master-page-name"><xsl:value-of select="@演:母版引用"/></xsl:attribute>
  1279. <xsl:if test="@演:页面版式引用">
  1280. <xsl:attribute name="presentation:presentation-page-layout-name"><xsl:value-of select="@演:页面版式引用"/></xsl:attribute>
  1281. </xsl:if>
  1282. <office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
  1283. <xsl:apply-templates select="uof:锚点"/>
  1284. <xsl:apply-templates select="演:动画"/>
  1285. <xsl:element name="presentation:notes">
  1286. <xsl:attribute name="draw:style-name">dp2</xsl:attribute>
  1287. <xsl:apply-templates select="./演:幻灯片备注/uof:锚点"/>
  1288. </xsl:element>
  1289. </xsl:element>
  1290. </xsl:for-each>
  1291. </xsl:template>
  1292. <xsl:template match="演:动画">
  1293. <xsl:element name="anim:par">
  1294. <xsl:attribute name="presentation:node-type">timing-root</xsl:attribute>
  1295. <anim:seq presentation:node-type="main-sequence">
  1296. <xsl:for-each select="演:序列">
  1297. <anim:par begin="next">
  1298. <anim:par smil:begin="0s">
  1299. <xsl:variable name="animnodename">anim:par</xsl:variable>
  1300. <xsl:choose>
  1301. <xsl:when test="演:效果//演:其他">
  1302. <xsl:copy-of select="演:效果//演:其他/*"/>
  1303. </xsl:when>
  1304. <xsl:otherwise>
  1305. <xsl:element name="{$animnodename}">
  1306. <xsl:attribute name="smil:fill"><xsl:choose><xsl:when test="演:定时/@演:回卷='true'">remove</xsl:when><xsl:otherwise>hold</xsl:otherwise></xsl:choose></xsl:attribute>
  1307. <xsl:choose>
  1308. <xsl:when test="演:增强/演:动画播放后/@演:播放后隐藏='true'">
  1309. <xsl:attribute name="presentation:preset-property">Direction;Accelerate;Decelerate</xsl:attribute>
  1310. </xsl:when>
  1311. <xsl:when test=".//演:轮子">
  1312. <xsl:attribute name="presentation:preset-property">Spokes</xsl:attribute>
  1313. </xsl:when>
  1314. <xsl:when test="演:效果/演:强调/演:更改填充颜色">
  1315. <xsl:attribute name="presentation:preset-property">FillColor;ColorStyle;Accelerate;Decelerate;AutoReverse</xsl:attribute>
  1316. </xsl:when>
  1317. <xsl:when test="演:效果/演:强调/演:更改字体颜色">
  1318. <xsl:attribute name="presentation:preset-property">CharColor;ColorStyle;Accelerate;Decelerate;AutoReverse</xsl:attribute>
  1319. </xsl:when>
  1320. <xsl:when test="演:效果/演:强调/演:更改字号">
  1321. <xsl:attribute name="presentation:preset-property">CharHeight</xsl:attribute>
  1322. </xsl:when>
  1323. <xsl:when test="演:效果/演:强调/演:更改字形">
  1324. <xsl:attribute name="presentation:preset-property">CharDecoration</xsl:attribute>
  1325. </xsl:when>
  1326. <xsl:when test="演:效果/演:强调/演:陀螺旋">
  1327. <xsl:attribute name="presentation:preset-property">Rotate;Accelerate;Decelerate;AutoReverse</xsl:attribute>
  1328. </xsl:when>
  1329. <xsl:when test="演:效果/演:强调/演:透明">
  1330. <xsl:attribute name="presentation:preset-property">Transparency</xsl:attribute>
  1331. </xsl:when>
  1332. <xsl:when test="演:效果/演:强调/演:更改线条颜色">
  1333. <xsl:attribute name="presentation:preset-property">LineColor;ColorStyle;Accelerate;Decelerate;AutoReverse</xsl:attribute>
  1334. </xsl:when>
  1335. </xsl:choose>
  1336. <xsl:attribute name="presentation:node-type"><xsl:choose><xsl:when test="演:定时/@演:事件='on click'">on-click</xsl:when><xsl:otherwise><xsl:value-of select="演:定时/@演:事件"/></xsl:otherwise></xsl:choose></xsl:attribute>
  1337. <xsl:attribute name="smil:begin"><xsl:value-of select="演:定时/@演:延时"/></xsl:attribute>
  1338. <xsl:choose>
  1339. <xsl:when test="演:定时/@演:重复='until next click' ">
  1340. <xsl:attribute name="smil:repeatCount">indefinite</xsl:attribute>
  1341. <xsl:attribute name="smil:end">next</xsl:attribute>
  1342. </xsl:when>
  1343. <xsl:when test="演:定时/@演:重复='until next slide' ">
  1344. <xsl:attribute name="smil:repeatCount">indefinite</xsl:attribute>
  1345. </xsl:when>
  1346. <xsl:when test="演:定时/@演:重复 !='none'">
  1347. <xsl:attribute name="smil:repeatCount"><xsl:value-of select="演:定时/@演:重复"/></xsl:attribute>
  1348. </xsl:when>
  1349. </xsl:choose>
  1350. <xsl:if test="演:增强/演:动画文本/@演:发送">
  1351. <xsl:attribute name="anim:iterate-type"><xsl:choose><xsl:when test="演:增强/演:动画文本/@演:发送='by word'">by-word</xsl:when><xsl:when test="演:增强/演:动画文本/@演:发送='by letter'">by-letter</xsl:when><xsl:otherwise>all at once</xsl:otherwise></xsl:choose></xsl:attribute>
  1352. </xsl:if>
  1353. <xsl:if test="演:增强/演:动画文本/@演:间隔">
  1354. <xsl:attribute name="anim:iterate-interval"><xsl:value-of select="演:增强/演:动画文本/@演:间隔"/></xsl:attribute>
  1355. </xsl:if>
  1356. <xsl:if test="$animnodename='anim:iterate' ">
  1357. <xsl:attribute name="anim:id"><xsl:value-of select="@演:动画对象"/></xsl:attribute>
  1358. </xsl:if>
  1359. <xsl:apply-templates select="演:效果"/>
  1360. </xsl:element>
  1361. </xsl:otherwise>
  1362. </xsl:choose>
  1363. </anim:par>
  1364. </anim:par>
  1365. </xsl:for-each>
  1366. </anim:seq>
  1367. </xsl:element>
  1368. </xsl:template>
  1369. <xsl:template match="演:效果">
  1370. <xsl:apply-templates select="演:进入 "/>
  1371. <xsl:apply-templates select="演:强调"/>
  1372. <xsl:apply-templates select="演:退出"/>
  1373. </xsl:template>
  1374. <xsl:template match="演:进入">
  1375. <xsl:attribute name="presentation:preset-class">entrance</xsl:attribute>
  1376. <xsl:apply-templates select="." mode="entrance"/>
  1377. </xsl:template>
  1378. <xsl:template match="演:强调">
  1379. <xsl:attribute name="presentation:preset-class">emphasis</xsl:attribute>
  1380. <xsl:apply-templates select="." mode="emphasis"/>
  1381. </xsl:template>
  1382. <xsl:template match="演:退出">
  1383. <xsl:attribute name="presentation:preset-class">exit</xsl:attribute>
  1384. <xsl:apply-templates select="." mode="exit"/>
  1385. </xsl:template>
  1386. <xsl:template name="演速度">
  1387. <xsl:choose>
  1388. <xsl:when test="./@演:速度='very fast' ">0.5s</xsl:when>
  1389. <xsl:when test="./@演:速度='fast'">1s</xsl:when>
  1390. <xsl:when test="./@演:速度='medium'">2s</xsl:when>
  1391. <xsl:when test="./@演:速度='slow'">3s</xsl:when>
  1392. <xsl:when test="./@演:速度='very slow'">5s</xsl:when>
  1393. <xsl:otherwise>1s</xsl:otherwise>
  1394. </xsl:choose>
  1395. </xsl:template>
  1396. <xsl:template match="演:出现" mode="entrance">
  1397. <xsl:attribute name="presentation:preset-id">ooo-entrance-appear</xsl:attribute>
  1398. <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" anim:sub-item="text" smil:attributeName="visibility" smil:to="visible">
  1399. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1400. </anim:set>
  1401. </xsl:template>
  1402. <xsl:template match="演:盒状" mode="entrance">
  1403. <xsl:attribute name="presentation:preset-id">ooo-entrance-box</xsl:attribute>
  1404. <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
  1405. <anim:set smil:begin="0s" smil:dur="0.004s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
  1406. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1407. </anim:set>
  1408. <anim:transitionFilter smil:type="irisWipe" smil:subtype="rectangle" smil:direction="reverse">
  1409. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1410. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1411. </anim:transitionFilter>
  1412. </xsl:template>
  1413. <xsl:template match="演:棋盘" mode="entrance">
  1414. <xsl:attribute name="presentation:preset-id">ooo-entrance-checkerboard</xsl:attribute>
  1415. <xsl:attribute name="presentation:preset-sub-type"><xsl:choose><xsl:when test="@演:方向='down'">downward</xsl:when><xsl:when test="@演:方向='across'">across</xsl:when></xsl:choose></xsl:attribute>
  1416. <anim:set smil:begin="0s" smil:dur="0.004s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
  1417. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1418. </anim:set>
  1419. <anim:transitionFilter smil:dur="2s" anim:sub-item="text" smil:type="checkerBoardWipe" smil:subtype="down">
  1420. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1421. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1422. </anim:transitionFilter>
  1423. </xsl:template>
  1424. <xsl:template match="演:圆形扩展" mode="entrance">
  1425. <xsl:attribute name="presentation:preset-id">ooo-entrance-circle</xsl:attribute>
  1426. <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
  1427. <anim:set smil:begin="0s" smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
  1428. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1429. </anim:set>
  1430. <anim:transitionFilter smil:type="ellipseWipe" smil:subtype="horizontal" smil:direction="reverse">
  1431. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1432. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1433. </anim:transitionFilter>
  1434. </xsl:template>
  1435. <xsl:template match="演:阶梯状" mode="entrance">
  1436. <xsl:attribute name="presentation:preset-id">ooo-entrance-diagonal-squares</xsl:attribute>
  1437. <xsl:attribute name="presentation:preset-sub-type"><xsl:choose><xsl:when test="@演:方向='left down'">left-to-bottom</xsl:when><xsl:when test="@演:方向='left up'">left-to-top</xsl:when><xsl:when test="@演:方向='right down'">right-to-bottom</xsl:when><xsl:when test="@演:方向='right up'">right-to-top</xsl:when></xsl:choose></xsl:attribute>
  1438. <anim:set smil:begin="0s" smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
  1439. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1440. </anim:set>
  1441. <anim:transitionFilter smil:type="waterfallWipe" smil:direction="reverse">
  1442. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1443. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1444. <xsl:attribute name="smil:subtype"><xsl:choose><xsl:when test="@演:方向='left down'">horizontalLeft</xsl:when><xsl:when test="@演:方向='left up'">horizontalLeft</xsl:when><xsl:when test="@演:方向='right down'">horizontalRight</xsl:when><xsl:when test="@演:方向='right up'">horizontalRight</xsl:when></xsl:choose></xsl:attribute>
  1445. </anim:transitionFilter>
  1446. </xsl:template>
  1447. <xsl:template match="演:菱形" mode="entrance">
  1448. <xsl:attribute name="presentation:preset-id">ooo-entrance-diamond</xsl:attribute>
  1449. <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
  1450. <anim:set smil:begin="0s" smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
  1451. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1452. </anim:set>
  1453. <anim:transitionFilter smil:type="irisWipe" smil:subtype="diamond" smil:direction="reverse">
  1454. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1455. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1456. </anim:transitionFilter>
  1457. </xsl:template>
  1458. <xsl:template match="演:内向溶解" mode="entrance">
  1459. <xsl:attribute name="presentation:preset-id">ooo-entrance-dissolve-in</xsl:attribute>
  1460. <anim:set smil:begin="0s" smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
  1461. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1462. </anim:set>
  1463. <anim:transitionFilter smil:type="dissolve" smil:direction="reverse">
  1464. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1465. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1466. </anim:transitionFilter>
  1467. </xsl:template>
  1468. <xsl:template match="演:闪烁一次" mode="entrance">
  1469. <xsl:attribute name="presentation:preset-id">ooo-entrance-flash-once</xsl:attribute>
  1470. <anim:set smil:begin="0s" smil:attributeName="visibility" smil:to="visible">
  1471. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1472. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1473. </anim:set>
  1474. </xsl:template>
  1475. <xsl:template match="演:飞入" mode="entrance">
  1476. <xsl:attribute name="presentation:preset-id">ooo-entrance-fly-in</xsl:attribute>
  1477. <xsl:attribute name="presentation:preset-sub-type"><xsl:choose><xsl:when test="@演:方向= 'from bottom'">from-bottom</xsl:when><xsl:when test="@演:方向 = 'from top-right'">from-top-right</xsl:when><xsl:when test="@演:方向 = 'from top-left'">from-top-left</xsl:when><xsl:when test="@演:方向 = 'from bottom-left'">from-bottom-left</xsl:when><xsl:when test="@演:方向 = 'from bottom-right'">from-bottom-right</xsl:when><xsl:when test="@演:方向 = 'from right'">from-right</xsl:when><xsl:when test="@演:方向 = 'from left'">from-left</xsl:when><xsl:when test="@演:方向 = 'from top'">from-top</xsl:when></xsl:choose></xsl:attribute>
  1478. <anim:set smil:begin="0s" smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
  1479. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1480. </anim:set>
  1481. <xsl:variable name="smilvalueX">
  1482. <xsl:choose>
  1483. <xsl:when test="contains(@演:方向,'right')">1+width/2;x</xsl:when>
  1484. <xsl:when test="contains(@演:方向,'left')">0-width/2;x</xsl:when>
  1485. <xsl:otherwise>x;x</xsl:otherwise>
  1486. </xsl:choose>
  1487. </xsl:variable>
  1488. <xsl:variable name="smilvalueY">
  1489. <xsl:choose>
  1490. <xsl:when test="contains(@演:方向,'bottom')">1+height/2;y</xsl:when>
  1491. <xsl:when test="contains(@演:方向,'top')">0-height/2;y</xsl:when>
  1492. <xsl:otherwise>y;y</xsl:otherwise>
  1493. </xsl:choose>
  1494. </xsl:variable>
  1495. <anim:animate smil:fill="hold" smil:attributeName="x" smil:keyTimes="0;1" presentation:additive="base">
  1496. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1497. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1498. <xsl:attribute name="smil:values"><xsl:value-of select="$smilvalueX"/></xsl:attribute>
  1499. </anim:animate>
  1500. <anim:animate smil:fill="hold" smil:attributeName="y" smil:keyTimes="0;1" presentation:additive="base">
  1501. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1502. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1503. <xsl:attribute name="smil:values"><xsl:value-of select="$smilvalueY"/></xsl:attribute>
  1504. </anim:animate>
  1505. </xsl:template>
  1506. <xsl:template match="演:缓慢飞入" mode="entrance">
  1507. <xsl:attribute name="presentation:preset-id">ooo-entrance-fly-in-slow</xsl:attribute>
  1508. <xsl:attribute name="presentation:preset-sub-type"><xsl:choose><xsl:when test="@演:方向= 'from bottom'">from-bottom</xsl:when><xsl:when test="@演:方向 = 'from right'">from-right</xsl:when><xsl:when test="@演:方向 = 'from left'">from-left</xsl:when><xsl:when test="@演:方向 = 'from top'">from-top</xsl:when></xsl:choose></xsl:attribute>
  1509. <anim:set smil:begin="0s" smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
  1510. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1511. </anim:set>
  1512. <xsl:variable name="smilvalueX">
  1513. <xsl:choose>
  1514. <xsl:when test="contains(@演:方向,'right')">1+width/2;x</xsl:when>
  1515. <xsl:when test="contains(@演:方向,'left')">0-width/2;x</xsl:when>
  1516. <xsl:otherwise>x;x</xsl:otherwise>
  1517. </xsl:choose>
  1518. </xsl:variable>
  1519. <xsl:variable name="smilvalueY">
  1520. <xsl:choose>
  1521. <xsl:when test="contains(@演:方向,'bottom')">1+height/2;y</xsl:when>
  1522. <xsl:when test="contains(@演:方向,'top')">0-height/2;y</xsl:when>
  1523. <xsl:otherwise>y;y</xsl:otherwise>
  1524. </xsl:choose>
  1525. </xsl:variable>
  1526. <anim:animate smil:fill="hold" smil:attributeName="x" smil:keyTimes="0;1" presentation:additive="base">
  1527. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1528. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1529. <xsl:attribute name="smil:values"><xsl:value-of select="$smilvalueX"/></xsl:attribute>
  1530. </anim:animate>
  1531. <anim:animate smil:fill="hold" smil:attributeName="y" smil:keyTimes="0;1" presentation:additive="base">
  1532. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1533. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1534. <xsl:attribute name="smil:values"><xsl:value-of select="$smilvalueY"/></xsl:attribute>
  1535. </anim:animate>
  1536. </xsl:template>
  1537. <xsl:template match="演:切入" mode="entrance">
  1538. <xsl:attribute name="presentation:preset-id">ooo-entrance-peek-in</xsl:attribute>
  1539. <xsl:attribute name="presentation:preset-sub-type"><xsl:choose><xsl:when test="@演:方向= 'from bottom'">from-bottom</xsl:when><xsl:when test="@演:方向 = 'from right'">from-right</xsl:when><xsl:when test="@演:方向 = 'from left'">from-left</xsl:when><xsl:when test="@演:方向 = 'from top'">from-top</xsl:when></xsl:choose></xsl:attribute>
  1540. <anim:set smil:begin="0s" smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
  1541. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1542. </anim:set>
  1543. <anim:transitionFilter smil:type="slideWipe" smil:direction="reverse">
  1544. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1545. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1546. <xsl:attribute name="smil:subtype"><xsl:choose><xsl:when test="@演:方向= 'from bottom'">fromBottom</xsl:when><xsl:when test="@演:方向 = 'from right'">fromRight</xsl:when><xsl:when test="@演:方向 = 'from left'">fromLeft</xsl:when><xsl:when test="@演:方向 = 'from top'">fromTop</xsl:when></xsl:choose></xsl:attribute>
  1547. </anim:transitionFilter>
  1548. </xsl:template>
  1549. <xsl:template match="演:十字形扩展" mode="entrance">
  1550. <xsl:attribute name="presentation:preset-id">ooo-entrance-plus</xsl:attribute>
  1551. <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
  1552. <anim:set smil:begin="0s" smil:dur="0.00025s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
  1553. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1554. </anim:set>
  1555. <anim:transitionFilter smil:type="fourBoxWipe" smil:direction="reverse">
  1556. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1557. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1558. <xsl:attribute name="smil:subtype"><xsl:choose><xsl:when test="@演:方向= 'in'">cornersIn</xsl:when><xsl:when test="@演:方向 = 'out'">cornersOut</xsl:when></xsl:choose></xsl:attribute>
  1559. </anim:transitionFilter>
  1560. </xsl:template>
  1561. <xsl:template match="演:随机线条" mode="entrance">
  1562. <xsl:attribute name="presentation:preset-id">ooo-entrance-bars</xsl:attribute>
  1563. <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
  1564. <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
  1565. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1566. </anim:set>
  1567. <anim:transitionFilter smil:type="randomBarWipe" smil:direction="reverse">
  1568. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1569. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1570. <xsl:attribute name="smil:subtype"><xsl:choose><xsl:when test="@演:方向= 'horizontal'">vertical</xsl:when><xsl:when test="@演:方向 = 'vertical'">horizontal</xsl:when></xsl:choose></xsl:attribute>
  1571. </anim:transitionFilter>
  1572. </xsl:template>
  1573. <xsl:template match="演:劈裂" mode="entrance">
  1574. <xsl:attribute name="presentation:preset-id">ooo-entrance-split</xsl:attribute>
  1575. <xsl:attribute name="presentation:preset-sub-type"><xsl:choose><xsl:when test="@演:方向 = 'horizontal out'">horizontal-out</xsl:when><xsl:when test="@演:方向= 'horizontal in'">horizontal-in</xsl:when><xsl:when test="@演:方向= 'vertical in'">vertical-in</xsl:when><xsl:when test="@演:方向= 'vertical out'">vertical-out</xsl:when></xsl:choose></xsl:attribute>
  1576. <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
  1577. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1578. </anim:set>
  1579. <anim:transitionFilter smil:dur="0.5s" smil:type="barnDoorWipe">
  1580. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1581. <xsl:attribute name="smil:subtype"><xsl:choose><xsl:when test="@演:方向 = 'horizontal out'">horizontal</xsl:when><xsl:when test="@演:方向= 'horizontal in'">horizontal</xsl:when><xsl:when test="@演:方向= 'vertical in'">vertical</xsl:when><xsl:when test="@演:方向= 'vertical out'">vertical</xsl:when></xsl:choose></xsl:attribute>
  1582. </anim:transitionFilter>
  1583. </xsl:template>
  1584. <xsl:template match="演:百叶窗" mode="entrance">
  1585. <xsl:attribute name="presentation:preset-id">ooo-entrance-venetian-blinds</xsl:attribute>
  1586. <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
  1587. <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
  1588. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1589. </anim:set>
  1590. <anim:transitionFilter smil:type="blindsWipe" smil:direction="reverse">
  1591. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1592. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1593. <xsl:attribute name="smil:subtype"><xsl:choose><xsl:when test="@演:方向= 'horizontal'">vertical</xsl:when><xsl:when test="@演:方向 = 'vertical'">horizontal</xsl:when></xsl:choose></xsl:attribute>
  1594. </anim:transitionFilter>
  1595. </xsl:template>
  1596. <xsl:template match="演:扇形展开" mode="entrance">
  1597. <xsl:attribute name="presentation:preset-id">ooo-entrance-wedge</xsl:attribute>
  1598. <anim:set smil:begin="0s" smil:dur="0.0015s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
  1599. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1600. </anim:set>
  1601. <anim:transitionFilter smil:type="fanWipe" smil:subtype="centerTop">
  1602. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1603. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1604. </anim:transitionFilter>
  1605. </xsl:template>
  1606. <xsl:template match="演:轮子" mode="entrance">
  1607. <xsl:attribute name="presentation:preset-id">ooo-entrance-wheel</xsl:attribute>
  1608. <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:辐射状"/></xsl:attribute>
  1609. <anim:set smil:begin="0s" smil:dur="0.00025s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
  1610. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1611. </anim:set>
  1612. <anim:transitionFilter smil:dur="0.5s" smil:type="pinWheelWipe">
  1613. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1614. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1615. <xsl:attribute name="smil:subtype"><xsl:choose><xsl:when test="@演:辐射状='1'">oneBlade</xsl:when><xsl:when test="@演:辐射状='2'">twoBlade</xsl:when><xsl:when test="@演:辐射状='3'">threeBlade</xsl:when><xsl:when test="@演:辐射状='4'">fourBlade</xsl:when><xsl:when test="@演:辐射状='8'">eightBlade</xsl:when></xsl:choose></xsl:attribute>
  1616. </anim:transitionFilter>
  1617. </xsl:template>
  1618. <xsl:template match="演:擦除" mode="entrance">
  1619. <xsl:attribute name="presentation:preset-id">ooo-entrance-wipe</xsl:attribute>
  1620. <xsl:attribute name="presentation:preset-sub-type"><xsl:choose><xsl:when test="@演:速度 = 'from right'">from-right</xsl:when><xsl:when test="@演:速度 = 'from left'">from-left</xsl:when><xsl:when test="@演:速度 = 'from top'">from-top</xsl:when><xsl:when test="@演:速度 = 'from bottom'">from-bottom</xsl:when><xsl:otherwise>from-left</xsl:otherwise></xsl:choose></xsl:attribute>
  1621. <anim:set smil:begin="0s" smil:dur="0.006s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
  1622. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1623. </anim:set>
  1624. <anim:transitionFilter smil:type="barWipe" smil:subtype="leftToRight" smil:direction="reverse">
  1625. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1626. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1627. <xsl:attribute name="smil:subtype"><xsl:choose><xsl:when test="(@演:速度 = 'from right') or (@演:速度 = 'from left')">leftToRight</xsl:when><xsl:when test="(@演:速度 = 'from top') or (@演:速度 = 'from bottom')">topToBottom</xsl:when><xsl:otherwise>leftToRight</xsl:otherwise></xsl:choose></xsl:attribute>
  1628. </anim:transitionFilter>
  1629. </xsl:template>
  1630. <xsl:template match="演:随机效果" mode="entrance">
  1631. <xsl:attribute name="presentation:preset-id">ooo-entrance-random</xsl:attribute>
  1632. <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
  1633. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1634. </anim:set>
  1635. <anim:animate smil:dur="1s" smil:fill="hold" smil:attributeName="width" smil:values="0;width" smil:keyTimes="0;1" presentation:additive="base">
  1636. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1637. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1638. </anim:animate>
  1639. <anim:animate smil:fill="hold" smil:attributeName="height" smil:values="0;height" smil:keyTimes="0;1" presentation:additive="base">
  1640. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1641. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1642. </anim:animate>
  1643. <anim:animate smil:fill="hold" smil:attributeName="rotate" smil:values="90;0" smil:keyTimes="0;1" presentation:additive="base">
  1644. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1645. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1646. </anim:animate>
  1647. <anim:transitionFilter smil:type="fade" smil:subtype="crossfade">
  1648. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1649. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1650. </anim:transitionFilter>
  1651. </xsl:template>
  1652. <xsl:template match="更改填充颜色" mode="emphasis">
  1653. <xsl:attribute name="presentation:preset-id">ooo-emphasis-fill-color</xsl:attribute>
  1654. <xsl:attribute name="presentation:preset-sub-type">2</xsl:attribute>
  1655. <anim:animateColor smil:fill="hold" smil:attributeName="fill-color" presentation:additive="base" anim:color-interpolation="rgb" anim:color-interpolation-direction="clockwise">
  1656. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1657. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1658. <xsl:attribute name="smil:to"><xsl:value-of select="@演:颜色"/></xsl:attribute>
  1659. </anim:animateColor>
  1660. <anim:set smil:dur="0.5s" smil:fill="hold" smil:attributeName="fill" smil:to="solid">
  1661. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1662. </anim:set>
  1663. </xsl:template>
  1664. <xsl:template match="更改字体颜色" mode="emphasis">
  1665. <xsl:attribute name="presentation:preset-id">ooo-emphasis-font-color</xsl:attribute>
  1666. <xsl:attribute name="presentation:preset-sub-type">2</xsl:attribute>
  1667. <anim:animateColor smil:fill="hold" smil:attributeName="fill-color" presentation:additive="base" anim:color-interpolation="rgb" anim:color-interpolation-direction="clockwise">
  1668. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1669. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1670. <xsl:attribute name="smil:to"><xsl:value-of select="@演:颜色"/></xsl:attribute>
  1671. </anim:animateColor>
  1672. </xsl:template>
  1673. <xsl:template match="演:更改字号" mode="emphasis">
  1674. <xsl:attribute name="presentation:preset-id">ooo-emphasis-font-size</xsl:attribute>
  1675. <xsl:attribute name="presentation:preset-sub-type">2</xsl:attribute>
  1676. <anim:animate smil:fill="hold" smil:attributeName="font-size" presentation:additive="base">
  1677. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1678. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1679. <xsl:attribute name="smil:to"><xsl:choose><xsl:when test="@演:预定义尺寸='tiny' ">0.25,1</xsl:when><xsl:when test="@演:预定义尺寸='smaller' ">0.5,1</xsl:when><xsl:when test="@演:预定义尺寸='larger' ">1.5,1</xsl:when><xsl:when test="@演:预定义尺寸='huge' ">4,1</xsl:when><xsl:when test="@演:自定义尺寸"><xsl:value-of select="@演:自定义尺寸"/></xsl:when><xsl:otherwise>1</xsl:otherwise></xsl:choose></xsl:attribute>
  1680. </anim:animate>
  1681. </xsl:template>
  1682. <xsl:template name="emp_font_style">
  1683. <xsl:param name="fontstyle"/>
  1684. <xsl:choose>
  1685. <xsl:when test="contains($fontstyle,' ')">
  1686. <anim:set smil:dur="indefinite" smil:attributeName="font-style">
  1687. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1688. <xsl:attribute name="smil:to"><xsl:value-of select="substring-before($fontstyle,' ')"/></xsl:attribute>
  1689. </anim:set>
  1690. <xsl:variable name="fontstyle1">
  1691. <xsl:choose>
  1692. <xsl:when test="contains($fontstyle,' ')">
  1693. <xsl:value-of select="substring-after($fontstyle,' ')"/>
  1694. </xsl:when>
  1695. <xsl:when test="not($fontstyle=' ')">
  1696. <xsl:value-of select="$fontstyle"/>
  1697. </xsl:when>
  1698. </xsl:choose>
  1699. </xsl:variable>
  1700. <xsl:call-template name="emp_font_style">
  1701. <xsl:with-param name="fontstyle">
  1702. <xsl:value-of select="$fontstyle1"/>
  1703. </xsl:with-param>
  1704. </xsl:call-template>
  1705. </xsl:when>
  1706. <xsl:otherwise>
  1707. </xsl:otherwise>
  1708. </xsl:choose>
  1709. </xsl:template>
  1710. <xsl:template match="演:更改字形" mode="emphasis">
  1711. <xsl:attribute name="presentation:preset-id">ooo-emphasis-font-style</xsl:attribute>
  1712. <xsl:attribute name="presentation:preset-sub-type">1</xsl:attribute>
  1713. <xsl:call-template name="emp_font_style">
  1714. <xsl:with-param name="fontstyle">
  1715. <xsl:value-of select="@演:字形"/>
  1716. </xsl:with-param>
  1717. </xsl:call-template>
  1718. </xsl:template>
  1719. <xsl:template match="演:更改线条颜色" mode="emphasis">
  1720. <xsl:attribute name="presentation:preset-id">ooo-emphasis-line-color</xsl:attribute>
  1721. <xsl:attribute name="presentation:preset-sub-type">2</xsl:attribute>
  1722. <anim:animateColor smil:dur="0s" smil:fill="hold" smil:attributeName="stroke-color" presentation:additive="base" anim:color-interpolation="rgb" anim:color-interpolation-direction="clockwise">
  1723. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1724. <xsl:attribute name="smil:to"><xsl:value-of select="@演:颜色"/></xsl:attribute>
  1725. </anim:animateColor>
  1726. <anim:set smil:dur="0s" smil:fill="hold" anim:sub-item="text" smil:attributeName="stroke" smil:to="solid">
  1727. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1728. </anim:set>
  1729. </xsl:template>
  1730. <xsl:template match="演:陀螺旋" mode="emphasis">
  1731. <xsl:attribute name="presentation:preset-id">ooo-emphasis-spin</xsl:attribute>
  1732. <xsl:attribute name="presentation:preset-sub-type">2</xsl:attribute>
  1733. <anim:animateTransform smil:fill="hold" smil:by="180" presentation:additive="base" svg:type="rotate">
  1734. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1735. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1736. <xsl:attribute name="smil:by"><xsl:choose><xsl:when test="@演:预定义角度='quarter spin'">90</xsl:when><xsl:when test="@演:预定义角度='half spin'">180</xsl:when><xsl:when test="@演:预定义角度='full spin'">360</xsl:when><xsl:when test="@演:预定义角度='two spins'">720 </xsl:when><xsl:when test="@演:自定义角度"><xsl:value-of select="@演:自定义角度"/></xsl:when></xsl:choose></xsl:attribute>
  1737. </anim:animateTransform>
  1738. </xsl:template>
  1739. <xsl:template match="演:透明" mode="emphasis">
  1740. <xsl:attribute name="presentation:preset-id">ooo-emphasis-transparency</xsl:attribute>
  1741. <xsl:attribute name="smil:repeatCount"><xsl:choose><xsl:when test="(@演:期间 = 'until next click') or (@演:期间 ='until next slide') ">indefinite</xsl:when><xsl:when test="@演:期间='2' or @演:期间 ='3' or @演:期间 ='4' or @演:期间 ='5' or @演:期间 ='10'"><xsl:value-of select="@演:期间"/></xsl:when><xsl:otherwise>2</xsl:otherwise></xsl:choose></xsl:attribute>
  1742. <anim:set smil:dur="indefinite" anim:sub-item="text" smil:attributeName="opacity">
  1743. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1744. <xsl:attribute name="smil:to"><xsl:choose><xsl:when test="@演:预定义透明度='25' ">0.25</xsl:when><xsl:when test="@演:预定义透明度='50' ">0.5</xsl:when><xsl:when test="@演:预定义透明度='75' ">0.75</xsl:when><xsl:when test="@演:预定义透明度='100' ">1</xsl:when><xsl:when test="@演:自定义透明度"><xsl:value-of select="@演:自定义透明度"/></xsl:when><xsl:otherwise>1</xsl:otherwise></xsl:choose></xsl:attribute>
  1745. </anim:set>
  1746. </xsl:template>
  1747. <xsl:template match="演:缩放" mode="emphasis">
  1748. <xsl:attribute name="presentation:preset-id">ooo-emphasis-grow-and-shrink</xsl:attribute>
  1749. <anim:animateTransform smil:fill="hold" anim:sub-item="text" presentation:additive="base" svg:type="scale">
  1750. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1751. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1752. <xsl:attribute name="smil:to"><xsl:choose><xsl:when test="@演:预定义尺寸='tiny' ">0.25,1</xsl:when><xsl:when test="@演:预定义尺寸='smaller' ">0.5,1</xsl:when><xsl:when test="@演:预定义尺寸='larger' ">1.5,1</xsl:when><xsl:when test="@演:预定义尺寸='huge' ">4,1</xsl:when><xsl:when test="@演:自定义尺寸"><xsl:value-of select="@演:自定义尺寸"/></xsl:when><xsl:otherwise>0.5,1</xsl:otherwise></xsl:choose></xsl:attribute>
  1753. </anim:animateTransform>
  1754. </xsl:template>
  1755. <xsl:template match="演:盒状" mode="exit">
  1756. <xsl:attribute name="presentation:preset-id">ooo-exit-box</xsl:attribute>
  1757. <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
  1758. <anim:transitionFilter smil:type="irisWipe" smil:subtype="rectangle" smil:direction="reverse" smil:mode="out">
  1759. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1760. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1761. </anim:transitionFilter>
  1762. <anim:set smil:dur="0.004s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
  1763. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  1764. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1765. </anim:set>
  1766. </xsl:template>
  1767. <xsl:template match="演:棋盘" mode="exit">
  1768. <xsl:attribute name="presentation:preset-id">ooo-exit-checkerboard</xsl:attribute>
  1769. <xsl:attribute name="presentation:preset-sub-type"><xsl:choose><xsl:when test="@演:方向='down'">downward</xsl:when><xsl:when test="@演:方向='across'">across</xsl:when></xsl:choose></xsl:attribute>
  1770. <anim:transitionFilter smil:dur="2s" anim:sub-item="text" smil:type="checkerBoardWipe" smil:subtype="down" smil:mode="out">
  1771. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1772. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1773. </anim:transitionFilter>
  1774. <anim:set smil:dur="0.004s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
  1775. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  1776. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1777. </anim:set>
  1778. </xsl:template>
  1779. <xsl:template match="演:圆形扩展" mode="exit">
  1780. <xsl:attribute name="presentation:preset-id">ooo-exit-circle</xsl:attribute>
  1781. <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
  1782. <anim:transitionFilter smil:type="ellipseWipe" smil:subtype="horizontal" smil:direction="reverse" smil:mode="out">
  1783. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1784. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1785. </anim:transitionFilter>
  1786. <anim:set smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
  1787. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  1788. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1789. </anim:set>
  1790. </xsl:template>
  1791. <xsl:template match="演:阶梯状" mode="exit">
  1792. <xsl:attribute name="presentation:preset-id">ooo-exit-diagonal-squares</xsl:attribute>
  1793. <xsl:attribute name="presentation:preset-sub-type"><xsl:choose><xsl:when test="@演:方向='left down'">left-to-bottom</xsl:when><xsl:when test="@演:方向='left up'">left-to-top</xsl:when><xsl:when test="@演:方向='right down'">right-to-bottom</xsl:when><xsl:when test="@演:方向='right up'">right-to-top</xsl:when></xsl:choose></xsl:attribute>
  1794. <anim:transitionFilter smil:type="waterfallWipe" smil:direction="reverse" smil:mode="out">
  1795. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1796. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1797. <xsl:attribute name="smil:subtype"><xsl:choose><xsl:when test="@演:方向='left down'">horizontalLeft</xsl:when><xsl:when test="@演:方向='left up'">horizontalLeft</xsl:when><xsl:when test="@演:方向='right down'">horizontalRight</xsl:when><xsl:when test="@演:方向='right up'">horizontalRight</xsl:when></xsl:choose></xsl:attribute>
  1798. </anim:transitionFilter>
  1799. <anim:set smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
  1800. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  1801. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1802. </anim:set>
  1803. </xsl:template>
  1804. <xsl:template match="演:菱形" mode="exit">
  1805. <xsl:attribute name="presentation:preset-id">ooo-exit-diamond</xsl:attribute>
  1806. <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
  1807. <anim:transitionFilter smil:type="irisWipe" smil:subtype="diamond" smil:direction="reverse" smil:mode="out">
  1808. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1809. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1810. </anim:transitionFilter>
  1811. <anim:set smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
  1812. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  1813. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1814. </anim:set>
  1815. </xsl:template>
  1816. <xsl:template match="演:消失" mode="exit">
  1817. <xsl:attribute name="presentation:preset-id">ooo-exit-disappear</xsl:attribute>
  1818. <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" anim:sub-item="text" smil:attributeName="visibility" smil:to="visible">
  1819. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1820. </anim:set>
  1821. </xsl:template>
  1822. <xsl:template match="演:向外溶解" mode="exit">
  1823. <xsl:attribute name="presentation:preset-id">ooo-exit-dissolve</xsl:attribute>
  1824. <anim:transitionFilter smil:type="dissolve" smil:direction="reverse" smil:mode="out">
  1825. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1826. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1827. </anim:transitionFilter>
  1828. <anim:set smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
  1829. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  1830. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1831. </anim:set>
  1832. </xsl:template>
  1833. <xsl:template match="演:闪烁一次" mode="exit">
  1834. <xsl:attribute name="presentation:preset-id">ooo-exit-flash-once</xsl:attribute>
  1835. <anim:animate smil:attributeName="visibility" smil:values="hidden;visible" smil:keyTimes="0;0.5" smil:calcMode="discrete" presentation:additive="base">
  1836. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1837. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1838. </anim:animate>
  1839. <anim:set smil:dur="0s" smil:attributeName="visibility" smil:to="hidden">
  1840. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  1841. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1842. </anim:set>
  1843. </xsl:template>
  1844. <xsl:template match="演:飞出" mode="exit">
  1845. <xsl:attribute name="presentation:preset-id">ooo-exit-fly-out</xsl:attribute>
  1846. <xsl:attribute name="presentation:preset-sub-type"><xsl:choose><xsl:when test="@演:方向= 'to bottom'">from-bottom</xsl:when><xsl:when test="@演:方向 = 'to top-right'">from-top-right</xsl:when><xsl:when test="@演:方向 = 'to top-left'">from-top-left</xsl:when><xsl:when test="@演:方向 = 'to bottom-left'">from-bottom-left</xsl:when><xsl:when test="@演:方向 = 'to bottom-right'">from-bottom-right</xsl:when><xsl:when test="@演:方向 = 'to right'">from-right</xsl:when><xsl:when test="@演:方向 = 'to left'">from-left</xsl:when><xsl:when test="@演:方向 = 'to top'">from-top</xsl:when></xsl:choose></xsl:attribute>
  1847. <xsl:variable name="smilvalueX">
  1848. <xsl:choose>
  1849. <xsl:when test="contains(@演:方向,'right')">x;1+width/2</xsl:when>
  1850. <xsl:when test="contains(@演:方向,'left')">x;0-width/2</xsl:when>
  1851. <xsl:otherwise>x;x</xsl:otherwise>
  1852. </xsl:choose>
  1853. </xsl:variable>
  1854. <xsl:variable name="smilvalueY">
  1855. <xsl:choose>
  1856. <xsl:when test="contains(@演:方向,'bottom')">y;1+height/2</xsl:when>
  1857. <xsl:when test="contains(@演:方向,'top')">y;0-height/2</xsl:when>
  1858. <xsl:otherwise>y;y</xsl:otherwise>
  1859. </xsl:choose>
  1860. </xsl:variable>
  1861. <anim:animate smil:fill="hold" smil:attributeName="x" smil:keyTimes="0;1" presentation:additive="base">
  1862. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1863. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1864. <xsl:attribute name="smil:values"><xsl:value-of select="$smilvalueX"/></xsl:attribute>
  1865. </anim:animate>
  1866. <anim:animate smil:fill="hold" smil:attributeName="y" smil:keyTimes="0;1" presentation:additive="base">
  1867. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1868. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1869. <xsl:attribute name="smil:values"><xsl:value-of select="$smilvalueY"/></xsl:attribute>
  1870. </anim:animate>
  1871. <anim:set smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
  1872. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  1873. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1874. </anim:set>
  1875. </xsl:template>
  1876. <xsl:template match="演:缓慢移出" mode="exit">
  1877. <xsl:attribute name="presentation:preset-id">ooo-exit-crawl-out</xsl:attribute>
  1878. <xsl:attribute name="presentation:preset-sub-type"><xsl:choose><xsl:when test="@演:方向= 'to bottom'">from-bottom</xsl:when><xsl:when test="@演:方向 = 'to right'">from-right</xsl:when><xsl:when test="@演:方向 = 'to left'">from-left</xsl:when><xsl:when test="@演:方向 = 'to top'">from-top</xsl:when></xsl:choose></xsl:attribute>
  1879. <xsl:variable name="smilvalueX">
  1880. <xsl:choose>
  1881. <xsl:when test="contains(@演:方向,'right')">x;1+width/2</xsl:when>
  1882. <xsl:when test="contains(@演:方向,'left')">x;0-width/2</xsl:when>
  1883. <xsl:otherwise>x;x</xsl:otherwise>
  1884. </xsl:choose>
  1885. </xsl:variable>
  1886. <xsl:variable name="smilvalueY">
  1887. <xsl:choose>
  1888. <xsl:when test="contains(@演:方向,'bottom')">y;1+height/2</xsl:when>
  1889. <xsl:when test="contains(@演:方向,'top')">y;0-height/2</xsl:when>
  1890. <xsl:otherwise>y;y</xsl:otherwise>
  1891. </xsl:choose>
  1892. </xsl:variable>
  1893. <anim:animate smil:fill="hold" smil:attributeName="x" smil:keyTimes="0;1" presentation:additive="base">
  1894. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1895. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1896. <xsl:attribute name="smil:values"><xsl:value-of select="$smilvalueX"/></xsl:attribute>
  1897. </anim:animate>
  1898. <anim:animate smil:fill="hold" smil:attributeName="y" smil:keyTimes="0;1" presentation:additive="base">
  1899. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1900. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1901. <xsl:attribute name="smil:values"><xsl:value-of select="$smilvalueY"/></xsl:attribute>
  1902. </anim:animate>
  1903. <anim:set smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
  1904. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  1905. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1906. </anim:set>
  1907. </xsl:template>
  1908. <xsl:template match="演:切出" mode="exit">
  1909. <xsl:attribute name="presentation:preset-id">ooo-exit-peek-out</xsl:attribute>
  1910. <xsl:attribute name="presentation:preset-sub-type"><xsl:choose><xsl:when test="@演:方向= 'from bottom'">from-bottom</xsl:when><xsl:when test="@演:方向 = 'from right'">from-right</xsl:when><xsl:when test="@演:方向 = 'from left'">from-left</xsl:when><xsl:when test="@演:方向 = 'from top'">from-top</xsl:when></xsl:choose></xsl:attribute>
  1911. <anim:transitionFilter smil:type="slideWipe" smil:direction="reverse" smil:mode="out">
  1912. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1913. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1914. <xsl:attribute name="smil:subtype"><xsl:choose><xsl:when test="@演:方向= 'from bottom'">fromBottom</xsl:when><xsl:when test="@演:方向 = 'from right'">fromRight</xsl:when><xsl:when test="@演:方向 = 'from left'">fromLeft</xsl:when><xsl:when test="@演:方向 = 'from top'">fromTop</xsl:when></xsl:choose></xsl:attribute>
  1915. </anim:transitionFilter>
  1916. <anim:set smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
  1917. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  1918. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1919. </anim:set>
  1920. </xsl:template>
  1921. <xsl:template match="演:十字形扩展" mode="exit">
  1922. <xsl:attribute name="presentation:preset-id">ooo-exit-plus</xsl:attribute>
  1923. <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
  1924. <anim:transitionFilter smil:type="fourBoxWipe" smil:direction="reverse" smil:mode="out">
  1925. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1926. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1927. <xsl:attribute name="smil:subtype"><xsl:choose><xsl:when test="@演:方向= 'in'">cornersIn</xsl:when><xsl:when test="@演:方向 = 'out'">cornersOut</xsl:when></xsl:choose></xsl:attribute>
  1928. </anim:transitionFilter>
  1929. <anim:set smil:dur="0.00025s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
  1930. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  1931. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1932. </anim:set>
  1933. </xsl:template>
  1934. <xsl:template match="演:随机线条" mode="exit">
  1935. <xsl:attribute name="presentation:preset-id">ooo-exit-random-bars</xsl:attribute>
  1936. <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
  1937. <anim:transitionFilter smil:type="randomBarWipe" smil:direction="reverse" smil:mode="out">
  1938. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1939. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1940. <xsl:attribute name="smil:subtype"><xsl:choose><xsl:when test="@演:方向= 'horizontal'">vertical</xsl:when><xsl:when test="@演:方向 = 'vertical'">horizontal</xsl:when></xsl:choose></xsl:attribute>
  1941. </anim:transitionFilter>
  1942. <anim:set smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
  1943. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  1944. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1945. </anim:set>
  1946. </xsl:template>
  1947. <xsl:template match="演:劈裂" mode="exit">
  1948. <xsl:attribute name="presentation:preset-id">ooo-exit-split</xsl:attribute>
  1949. <xsl:attribute name="presentation:preset-sub-type"><xsl:choose><xsl:when test="@演:方向 = 'horizontal out'">horizontal-out</xsl:when><xsl:when test="@演:方向= 'horizontal in'">horizontal-in</xsl:when><xsl:when test="@演:方向= 'vertical in'">vertical-in</xsl:when><xsl:when test="@演:方向= 'vertical out'">vertical-out</xsl:when></xsl:choose></xsl:attribute>
  1950. <anim:transitionFilter smil:dur="0.5s" smil:type="barnDoorWipe" smil:mode="out">
  1951. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1952. <xsl:attribute name="smil:subtype"><xsl:choose><xsl:when test="@演:方向 = 'horizontal out'">horizontal</xsl:when><xsl:when test="@演:方向= 'horizontal in'">horizontal</xsl:when><xsl:when test="@演:方向= 'vertical in'">vertical</xsl:when><xsl:when test="@演:方向= 'vertical out'">vertical</xsl:when></xsl:choose></xsl:attribute>
  1953. </anim:transitionFilter>
  1954. <anim:set smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
  1955. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  1956. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1957. </anim:set>
  1958. </xsl:template>
  1959. <xsl:template match="演:百叶窗" mode="exit">
  1960. <xsl:attribute name="presentation:preset-id">ooo-exit-venetian-blinds</xsl:attribute>
  1961. <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
  1962. <anim:transitionFilter smil:type="blindsWipe" smil:direction="reverse" smil:mode="out">
  1963. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1964. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1965. <xsl:attribute name="smil:subtype"><xsl:choose><xsl:when test="@演:方向= 'horizontal'">vertical</xsl:when><xsl:when test="@演:方向 = 'vertical'">horizontal</xsl:when></xsl:choose></xsl:attribute>
  1966. </anim:transitionFilter>
  1967. <anim:set smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
  1968. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  1969. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1970. </anim:set>
  1971. </xsl:template>
  1972. <xsl:template match="演:扇形展开" mode="exit">
  1973. <xsl:attribute name="presentation:preset-id">ooo-exit-wedge</xsl:attribute>
  1974. <anim:transitionFilter smil:type="fanWipe" smil:subtype="centerTop" smil:mode="out">
  1975. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1976. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1977. </anim:transitionFilter>
  1978. <anim:set smil:dur="0.0015s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
  1979. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  1980. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1981. </anim:set>
  1982. </xsl:template>
  1983. <xsl:template match="演:轮子" mode="exit">
  1984. <xsl:attribute name="presentation:preset-id">ooo-exit-wheel</xsl:attribute>
  1985. <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:辐射状"/></xsl:attribute>
  1986. <anim:transitionFilter smil:dur="0.5s" smil:type="pinWheelWipe" smil:mode="out">
  1987. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1988. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  1989. <xsl:attribute name="smil:subtype"><xsl:choose><xsl:when test="@演:辐射状='1'">oneBlade</xsl:when><xsl:when test="@演:辐射状='2'">twoBlade</xsl:when><xsl:when test="@演:辐射状='3'">threeBlade</xsl:when><xsl:when test="@演:辐射状='4'">fourBlade</xsl:when><xsl:when test="@演:辐射状='8'">eightBlade</xsl:when></xsl:choose></xsl:attribute>
  1990. </anim:transitionFilter>
  1991. <anim:set smil:dur="0.00025s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
  1992. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  1993. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  1994. </anim:set>
  1995. </xsl:template>
  1996. <xsl:template match="演:擦除" mode="exit">
  1997. <xsl:attribute name="presentation:preset-id">ooo-exit-wipe</xsl:attribute>
  1998. <xsl:attribute name="presentation:preset-sub-type"><xsl:choose><xsl:when test="@演:速度 = 'from right'">from-right</xsl:when><xsl:when test="@演:速度 = 'from left'">from-left</xsl:when><xsl:when test="@演:速度 = 'from top'">from-top</xsl:when><xsl:when test="@演:速度 = 'from bottom'">from-bottom</xsl:when><xsl:otherwise>from-left</xsl:otherwise></xsl:choose></xsl:attribute>
  1999. <anim:transitionFilter smil:type="barWipe" smil:subtype="leftToRight" smil:direction="reverse" smil:mode="out">
  2000. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  2001. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  2002. <xsl:attribute name="smil:subtype"><xsl:choose><xsl:when test="(@演:速度 = 'from right') or (@演:速度 = 'from left')">leftToRight</xsl:when><xsl:when test="(@演:速度 = 'from top') or (@演:速度 = 'from bottom')">topToBottom</xsl:when><xsl:otherwise>leftToRight</xsl:otherwise></xsl:choose></xsl:attribute>
  2003. </anim:transitionFilter>
  2004. <anim:set smil:dur="0.006s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
  2005. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  2006. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  2007. </anim:set>
  2008. </xsl:template>
  2009. <xsl:template match="演:随机效果" mode="exit">
  2010. <xsl:attribute name="presentation:preset-id">ooo-exit-random</xsl:attribute>
  2011. <anim:transitionFilter smil:type="fade" smil:subtype="crossfade" smil:mode="out">
  2012. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  2013. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  2014. </anim:transitionFilter>
  2015. <anim:animate smil:attributeName="x" smil:values="x;x" smil:keyTimes="0;1" presentation:additive="base">
  2016. <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
  2017. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  2018. </anim:animate>
  2019. <anim:animate smil:dur="0.1s" smil:decelerate="1" smil:attributeName="y" smil:values="y;y-.03" smil:keyTimes="0;1" presentation:additive="base">
  2020. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  2021. </anim:animate>
  2022. <anim:animate smil:begin="0.1s" smil:dur="0.9s" smil:accelerate="1" smil:attributeName="y" smil:values="y;y+1" smil:keyTimes="0;1" presentation:additive="base">
  2023. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  2024. </anim:animate>
  2025. <anim:set smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
  2026. <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
  2027. <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
  2028. </anim:set>
  2029. </xsl:template>
  2030. <xsl:template match="uof:锚点" name="图形解析">
  2031. <xsl:variable name="tuxing1" select="@uof:图形引用"/>
  2032. <xsl:choose>
  2033. <xsl:when test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]">
  2034. <xsl:if test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/@uof:公共类型='png' or /uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/@uof:公共类型='jpg' or /uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/@uof:公共类型='bmp' or /uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/@uof:公共类型='gif'">
  2035. <xsl:element name="draw:frame">
  2036. <xsl:attribute name="draw:name"><xsl:variable name="pos"><xsl:value-of select="count(preceding::uof:锚点)"/></xsl:variable><xsl:value-of select="concat('图形',$pos)"/></xsl:attribute>
  2037. <xsl:attribute name="presentation:class">graphic</xsl:attribute>
  2038. <xsl:attribute name="presentation:user-transformed">true</xsl:attribute>
  2039. <xsl:attribute name="svg:x"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute>
  2040. <xsl:attribute name="svg:y"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute>
  2041. <xsl:attribute name="svg:width"><xsl:value-of select="concat(@uof:宽度,$uofUnit)"/></xsl:attribute>
  2042. <xsl:attribute name="svg:height"><xsl:value-of select="concat(@uof:高度,$uofUnit)"/></xsl:attribute>
  2043. <xsl:attribute name="draw:layer">layout</xsl:attribute>
  2044. <xsl:if test="../演:动画/演:序列/@演:动画对象=$tuxing1">
  2045. <xsl:attribute name="draw:id"><xsl:value-of select="$tuxing1"/></xsl:attribute>
  2046. </xsl:if>
  2047. <draw:image>
  2048. <xsl:if test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:路径">
  2049. <xsl:attribute name="xlink:href"><xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:路径"/></xsl:attribute>
  2050. </xsl:if>
  2051. <xsl:if test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:路径">
  2052. <xsl:attribute name="xlink:href"><xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:路径"/></xsl:attribute>
  2053. </xsl:if>
  2054. <xsl:if test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:数据">
  2055. <office:binary-data>
  2056. <xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:数据"/>
  2057. </office:binary-data>
  2058. </xsl:if>
  2059. </draw:image>
  2060. </xsl:element>
  2061. </xsl:if>
  2062. </xsl:when>
  2063. <xsl:otherwise>
  2064. <xsl:call-template name="graph">
  2065. <xsl:with-param name="id" select="/uof:UOF/uof:对象集/图:图形[@图:标识符=$tuxing1]"/>
  2066. <xsl:with-param name="groupx" select="0"/>
  2067. <xsl:with-param name="groupy" select="0"/>
  2068. </xsl:call-template>
  2069. </xsl:otherwise>
  2070. </xsl:choose>
  2071. </xsl:template>
  2072. <xsl:template name="graph">
  2073. <xsl:param name="id"/>
  2074. <xsl:param name="groupx"/>
  2075. <xsl:param name="groupy"/>
  2076. <xsl:for-each select="$id">
  2077. <xsl:variable name="tuxing1">
  2078. <xsl:value-of select="图:预定义图形/图:类别"/>
  2079. </xsl:variable>
  2080. <xsl:choose>
  2081. <xsl:when test="$tuxing1='11'">
  2082. <xsl:call-template name="Rectangle">
  2083. <xsl:with-param name="groupx1" select="$groupx"/>
  2084. <xsl:with-param name="groupy1" select="$groupy"/>
  2085. </xsl:call-template>
  2086. </xsl:when>
  2087. <xsl:when test="$tuxing1='19'">
  2088. <xsl:call-template name="Oval">
  2089. <xsl:with-param name="groupx1" select="$groupx"/>
  2090. <xsl:with-param name="groupy1" select="$groupy"/>
  2091. </xsl:call-template>
  2092. </xsl:when>
  2093. <xsl:when test="$tuxing1='61'">
  2094. <xsl:call-template name="Line">
  2095. <xsl:with-param name="groupx1" select="$groupx"/>
  2096. <xsl:with-param name="groupy1" select="$groupy"/>
  2097. </xsl:call-template>
  2098. </xsl:when>
  2099. <xsl:when test="$tuxing1='64'">
  2100. <xsl:call-template name="Curve">
  2101. <xsl:with-param name="groupx1" select="$groupx"/>
  2102. <xsl:with-param name="groupy1" select="$groupy"/>
  2103. </xsl:call-template>
  2104. </xsl:when>
  2105. <xsl:when test="$tuxing1='65'">
  2106. <xsl:call-template name="Freeform">
  2107. <xsl:with-param name="groupx1" select="$groupx"/>
  2108. <xsl:with-param name="groupy1" select="$groupy"/>
  2109. </xsl:call-template>
  2110. </xsl:when>
  2111. <xsl:when test="$tuxing1='66'">
  2112. <xsl:call-template name="Scribble">
  2113. <xsl:with-param name="groupx1" select="$groupx"/>
  2114. <xsl:with-param name="groupy1" select="$groupy"/>
  2115. </xsl:call-template>
  2116. </xsl:when>
  2117. <xsl:when test="$tuxing1='3'">
  2118. <xsl:call-template name="演文本框"/>
  2119. </xsl:when>
  2120. <xsl:when test="$tuxing1='67'">
  2121. <xsl:call-template name="演缩略图"/>
  2122. </xsl:when>
  2123. <xsl:when test="$tuxing1='4'">
  2124. <xsl:element name="draw:g">
  2125. <xsl:variable name="tu">
  2126. <xsl:value-of select="@图:标识符"/>
  2127. </xsl:variable>
  2128. <xsl:attribute name="draw:style-name"><xsl:value-of select="$tu"/></xsl:attribute>
  2129. <xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute>
  2130. <xsl:variable name="this-group-x">
  2131. <xsl:value-of select="key('rel_graphic_name',@图:标识符)/@uof:x坐标"/>
  2132. </xsl:variable>
  2133. <xsl:variable name="this-group-y">
  2134. <xsl:value-of select="key('rel_graphic_name',@图:标识符)/uof:y坐标"/>
  2135. </xsl:variable>
  2136. <xsl:variable name="group-x">
  2137. <xsl:value-of select="number($groupx + $this-group-x)"/>
  2138. </xsl:variable>
  2139. <xsl:variable name="group-y">
  2140. <xsl:value-of select="number($groupy + $this-group-y)"/>
  2141. </xsl:variable>
  2142. <xsl:call-template name="组合图形">
  2143. <xsl:with-param name="zuheliebiao" select="@图:组合列表"/>
  2144. <xsl:with-param name="groupx1" select="$group-x"/>
  2145. <xsl:with-param name="groupy1" select="$group-y"/>
  2146. </xsl:call-template>
  2147. </xsl:element>
  2148. </xsl:when>
  2149. </xsl:choose>
  2150. </xsl:for-each>
  2151. </xsl:template>
  2152. <xsl:template name="common">
  2153. <xsl:param name="groupx"/>
  2154. <xsl:param name="groupy"/>
  2155. <xsl:variable name="tuxing">
  2156. <xsl:value-of select="@图:标识符"/>
  2157. </xsl:variable>
  2158. <xsl:choose>
  2159. <xsl:when test="key('rel_graphic_name',@图:标识符)">
  2160. <xsl:for-each select="key('rel_graphic_name',@图:标识符)">
  2161. <xsl:attribute name="svg:x"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute>
  2162. <xsl:attribute name="svg:y"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute>
  2163. <xsl:attribute name="svg:width"><xsl:value-of select="concat(@uof:宽度,$uofUnit)"/></xsl:attribute>
  2164. <xsl:attribute name="svg:height"><xsl:value-of select="concat(@uof:高度,$uofUnit)"/></xsl:attribute>
  2165. <xsl:attribute name="draw:layer"><xsl:choose><xsl:when test="parent::演:母版">backgroundobjects</xsl:when><xsl:otherwise>layout</xsl:otherwise></xsl:choose></xsl:attribute>
  2166. <xsl:if test="../演:动画/演:序列/@演:动画对象=$tuxing">
  2167. <xsl:attribute name="draw:id"><xsl:value-of select="$tuxing"/></xsl:attribute>
  2168. </xsl:if>
  2169. </xsl:for-each>
  2170. </xsl:when>
  2171. <xsl:otherwise>
  2172. <xsl:variable name="zuheweizhi-x">
  2173. <xsl:value-of select="图:组合位置/@图:x坐标"/>
  2174. </xsl:variable>
  2175. <xsl:variable name="zuheweizhi-y">
  2176. <xsl:value-of select="图:组合位置/@图:y坐标"/>
  2177. </xsl:variable>
  2178. <xsl:attribute name="text:anchor-type">paragraph</xsl:attribute>
  2179. <xsl:attribute name="svg:x"><xsl:value-of select="concat(($groupx + $zuheweizhi-x),$uofUnit)"/></xsl:attribute>
  2180. <xsl:attribute name="svg:y"><xsl:value-of select="concat(($groupy + $zuheweizhi-y),$uofUnit)"/></xsl:attribute>
  2181. <xsl:attribute name="svg:width"><xsl:value-of select="concat(图:预定义图形 /图:属性/图:宽度,$uofUnit)"/></xsl:attribute>
  2182. <xsl:attribute name="svg:height"><xsl:value-of select="concat(图:预定义图形/图:属性 /图:高度,$uofUnit)"/></xsl:attribute>
  2183. <xsl:attribute name="draw:layer">layout</xsl:attribute>
  2184. </xsl:otherwise>
  2185. </xsl:choose>
  2186. <xsl:attribute name="draw:style-name"><xsl:value-of select="@图:标识符"/></xsl:attribute>
  2187. <xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute>
  2188. <xsl:if test="图:预定义图形/图:属性/图:旋转角度 and not(图:预定义图形/图:属性/图:旋转角度='0.0')">
  2189. <xsl:variable name="rotate-angle">
  2190. <xsl:value-of select="(图:预定义图形/图:属性/图:旋转角度 * 2 * 3.14159265 ) div 360"/>
  2191. </xsl:variable>
  2192. <xsl:attribute name="draw:transform"><xsl:value-of select="concat('rotate (',$rotate-angle,') translate (-0.0194027777777778cm 3.317875cm)')"/></xsl:attribute>
  2193. </xsl:if>
  2194. <xsl:if test="图:文本内容">
  2195. <xsl:apply-templates select="图:文本内容/字:段落"/>
  2196. <xsl:apply-templates select="图:文本内容/字:文字表"/>
  2197. </xsl:if>
  2198. </xsl:template>
  2199. <xsl:template name="组合图形">
  2200. <xsl:param name="zuheliebiao"/>
  2201. <xsl:param name="groupx1"/>
  2202. <xsl:param name="groupy1"/>
  2203. <xsl:variable name="x">
  2204. <xsl:value-of select="$groupx1"/>
  2205. </xsl:variable>
  2206. <xsl:variable name="y">
  2207. <xsl:value-of select="$groupy1"/>
  2208. </xsl:variable>
  2209. <xsl:variable name="first-pictures">
  2210. <xsl:value-of select="substring-before($zuheliebiao,',')"/>
  2211. </xsl:variable>
  2212. <xsl:variable name="other-pictures">
  2213. <xsl:value-of select="substring-after($zuheliebiao,',')"/>
  2214. </xsl:variable>
  2215. <xsl:choose>
  2216. <xsl:when test="contains($other-pictures,',')">
  2217. <xsl:call-template name="graph">
  2218. <xsl:with-param name="id" select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $first-pictures]"/>
  2219. <xsl:with-param name="groupx" select="$groupx1"/>
  2220. <xsl:with-param name="groupy" select="$groupy1"/>
  2221. </xsl:call-template>
  2222. <xsl:call-template name="组合图形">
  2223. <xsl:with-param name="zuheliebiao" select="$other-pictures"/>
  2224. <xsl:with-param name="groupx1" select="$x"/>
  2225. <xsl:with-param name="groupy1" select="$y"/>
  2226. </xsl:call-template>
  2227. </xsl:when>
  2228. <xsl:otherwise>
  2229. <xsl:call-template name="graph">
  2230. <xsl:with-param name="id" select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $first-pictures]"/>
  2231. <xsl:with-param name="groupx" select="$groupx1"/>
  2232. <xsl:with-param name="groupy" select="$groupy1"/>
  2233. </xsl:call-template>
  2234. <xsl:call-template name="graph">
  2235. <xsl:with-param name="id" select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $other-pictures]"/>
  2236. <xsl:with-param name="groupx" select="$groupx1"/>
  2237. <xsl:with-param name="groupy" select="$groupy1"/>
  2238. </xsl:call-template>
  2239. </xsl:otherwise>
  2240. </xsl:choose>
  2241. </xsl:template>
  2242. <xsl:template name="Curve">
  2243. <xsl:param name="groupx1"/>
  2244. <xsl:param name="groupy1"/>
  2245. <xsl:element name="draw:path">
  2246. <xsl:variable name="width" select="number(图:预定义图形/图:属性/图:宽度)*1000"/>
  2247. <xsl:variable name="height" select="number(图:预定义图形/图:属性/图:高度)*1000"/>
  2248. <xsl:attribute name="svg:viewBox"><xsl:value-of select="concat('0 0 ',$width, ' ',$height)"/></xsl:attribute>
  2249. <xsl:attribute name="svg:d"><xsl:value-of select="图:预定义图形/图:关键点坐标/@图:路径"/></xsl:attribute>
  2250. <xsl:call-template name="common">
  2251. <xsl:with-param name="groupx" select="$groupx1"/>
  2252. <xsl:with-param name="groupy" select="$groupy1"/>
  2253. </xsl:call-template>
  2254. </xsl:element>
  2255. </xsl:template>
  2256. <xsl:template name="Freeform">
  2257. <xsl:param name="groupx1"/>
  2258. <xsl:param name="groupy1"/>
  2259. <xsl:element name="draw:polygon">
  2260. <xsl:variable name="width" select="number(图:预定义图形/图:属性/图:宽度)*1000"/>
  2261. <xsl:variable name="height" select="number(图:预定义图形/图:属性/图:高度)*1000"/>
  2262. <xsl:attribute name="svg:viewBox"><xsl:value-of select="concat('0 0 ',$width, ' ',$height)"/></xsl:attribute>
  2263. <xsl:attribute name="draw:points"><xsl:call-template name="drawpoints"><xsl:with-param name="points" select="图:预定义图形/图:关键点坐标/@图:路径"/><xsl:with-param name="value"/></xsl:call-template></xsl:attribute>
  2264. <xsl:call-template name="common">
  2265. <xsl:with-param name="groupx" select="$groupx1"/>
  2266. <xsl:with-param name="groupy" select="$groupy1"/>
  2267. </xsl:call-template>
  2268. </xsl:element>
  2269. </xsl:template>
  2270. <xsl:template name="Scribble">
  2271. <xsl:param name="groupx1"/>
  2272. <xsl:param name="groupy1"/>
  2273. <xsl:element name="draw:polyline">
  2274. <xsl:variable name="width" select="number(图:预定义图形/图:属性/图:宽度)*1000"/>
  2275. <xsl:variable name="height" select="number(图:预定义图形/图:属性/图:高度)*1000"/>
  2276. <xsl:attribute name="svg:viewBox"><xsl:value-of select="concat('0 0 ',$width, ' ',$height)"/></xsl:attribute>
  2277. <xsl:attribute name="draw:points"><xsl:call-template name="drawpoints"><xsl:with-param name="points" select="图:预定义图形/图:关键点坐标/@图:路径"/><xsl:with-param name="value"/></xsl:call-template></xsl:attribute>
  2278. <xsl:call-template name="common">
  2279. <xsl:with-param name="groupx" select="$groupx1"/>
  2280. <xsl:with-param name="groupy" select="$groupy1"/>
  2281. </xsl:call-template>
  2282. </xsl:element>
  2283. </xsl:template>
  2284. <xsl:template name="drawpoints">
  2285. <xsl:param name="points"/>
  2286. <xsl:param name="value"/>
  2287. <xsl:variable name="frist-piont">
  2288. <xsl:value-of select="substring-before($points,'lineto')"/>
  2289. </xsl:variable>
  2290. <xsl:variable name="other-points">
  2291. <xsl:value-of select="substring-after($points,'lineto')"/>
  2292. </xsl:variable>
  2293. <xsl:choose>
  2294. <xsl:when test="contains($other-points,'lineto')">
  2295. <xsl:variable name="x-coor">
  2296. <xsl:value-of select="substring-before($frist-piont,' ') * 1000"/>
  2297. </xsl:variable>
  2298. <xsl:variable name="y-coor">
  2299. <xsl:value-of select="substring-after($frist-piont,' ') * 1000"/>
  2300. </xsl:variable>
  2301. <xsl:variable name="all-points">
  2302. <xsl:value-of select="concat($value,$x-coor,',',$y-coor,' ')"/>
  2303. </xsl:variable>
  2304. <xsl:call-template name="drawpoints">
  2305. <xsl:with-param name="points" select="$other-points"/>
  2306. <xsl:with-param name="value" select="$all-points"/>
  2307. </xsl:call-template>
  2308. </xsl:when>
  2309. <xsl:otherwise>
  2310. <xsl:variable name="q-x-coor">
  2311. <xsl:value-of select="substring-before($frist-piont,' ') * 1000"/>
  2312. </xsl:variable>
  2313. <xsl:variable name="q-y-coor">
  2314. <xsl:value-of select="substring-after($frist-piont,' ') * 1000"/>
  2315. </xsl:variable>
  2316. <xsl:variable name="e-x-coor">
  2317. <xsl:value-of select="substring-before($other-points,' ') * 1000"/>
  2318. </xsl:variable>
  2319. <xsl:variable name="e-y-coor">
  2320. <xsl:value-of select="substring-after($other-points,' ') * 1000"/>
  2321. </xsl:variable>
  2322. <xsl:value-of select="concat($value,$q-x-coor,',',$q-y-coor,' ',$e-x-coor,',',$e-y-coor)"/>
  2323. </xsl:otherwise>
  2324. </xsl:choose>
  2325. </xsl:template>
  2326. <xsl:template name="Oval">
  2327. <xsl:param name="groupx1"/>
  2328. <xsl:param name="groupy1"/>
  2329. <xsl:element name="draw:ellipse">
  2330. <xsl:call-template name="common">
  2331. <xsl:with-param name="groupx" select="$groupx1"/>
  2332. <xsl:with-param name="groupy" select="$groupy1"/>
  2333. </xsl:call-template>
  2334. </xsl:element>
  2335. </xsl:template>
  2336. <xsl:template name="Rectangle">
  2337. <xsl:param name="groupx1"/>
  2338. <xsl:param name="groupy1"/>
  2339. <xsl:element name="draw:rect">
  2340. <xsl:call-template name="common">
  2341. <xsl:with-param name="groupx" select="$groupx1"/>
  2342. <xsl:with-param name="groupy" select="$groupy1"/>
  2343. </xsl:call-template>
  2344. </xsl:element>
  2345. </xsl:template>
  2346. <xsl:template name="Line">
  2347. <xsl:param name="groupx1"/>
  2348. <xsl:param name="groupy1"/>
  2349. <xsl:element name="draw:line">
  2350. <xsl:variable name="tuxing1" select="@图:标识符"/>
  2351. <xsl:choose>
  2352. <xsl:when test="key('rel_graphic_name',@图:标识符)">
  2353. <xsl:for-each select="key('rel_graphic_name',@图:标识符)">
  2354. <xsl:attribute name="svg:x1"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute>
  2355. <xsl:attribute name="svg:y1"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute>
  2356. <xsl:attribute name="svg:x2"><xsl:value-of select="concat((@uof:x坐标 + @uof:宽度),$uofUnit)"/></xsl:attribute>
  2357. <xsl:attribute name="svg:y2"><xsl:value-of select="concat((@uof:y坐标 + @uof:高度),$uofUnit)"/></xsl:attribute>
  2358. <xsl:if test="../演:动画/演:序列/@演:动画对象=$tuxing1">
  2359. <xsl:attribute name="draw:id"><xsl:value-of select="$tuxing1"/></xsl:attribute>
  2360. </xsl:if>
  2361. </xsl:for-each>
  2362. </xsl:when>
  2363. <xsl:otherwise>
  2364. <xsl:variable name="zuheweizhi-x">
  2365. <xsl:value-of select="图:组合位置/@图:x坐标"/>
  2366. </xsl:variable>
  2367. <xsl:variable name="zuheweizhi-y">
  2368. <xsl:value-of select="图:组合位置/@图:y坐标"/>
  2369. </xsl:variable>
  2370. <xsl:variable name="hex">
  2371. <xsl:value-of select="concat(number($groupx1 + $zuheweizhi-x),$uofUnit)"/>
  2372. </xsl:variable>
  2373. <xsl:variable name="hey">
  2374. <xsl:value-of select="concat(number($groupy1 + $zuheweizhi-y),$uofUnit)"/>
  2375. </xsl:variable>
  2376. <xsl:attribute name="svg:x1"><xsl:value-of select="$hex"/></xsl:attribute>
  2377. <xsl:attribute name="svg:y1"><xsl:value-of select="$hey"/></xsl:attribute>
  2378. <xsl:attribute name="svg:x2"><xsl:value-of select="concat(($hex + 图:预定义图形/图:属性/图:宽度),$uofUnit)"/></xsl:attribute>
  2379. <xsl:attribute name="svg:y2"><xsl:value-of select="concat(($hey + 图:预定义图形/图:属性/图:高度),$uofUnit)"/></xsl:attribute>
  2380. </xsl:otherwise>
  2381. </xsl:choose>
  2382. <xsl:attribute name="text:anchor-type">paragraph</xsl:attribute>
  2383. <xsl:attribute name="draw:style-name"><xsl:value-of select="$tuxing1"/></xsl:attribute>
  2384. <xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute>
  2385. <xsl:if test="图:预定义图形/图:属性/图:旋转角度 and not(图:预定义图形/图:属性/图:旋转角度='0.0')">
  2386. <xsl:variable name="rotate-angle">
  2387. <xsl:value-of select="(图:预定义图形/图:属性/图:旋转角度 * 2 * 3.14159265 ) div 360"/>
  2388. </xsl:variable>
  2389. <xsl:attribute name="draw:transform"><xsl:value-of select="concat('rotate (',$rotate-angle,') translate (-0.0194027777777778cm 3.317875cm)')"/></xsl:attribute>
  2390. </xsl:if>
  2391. <xsl:if test="图:文本内容">
  2392. <xsl:apply-templates select="图:文本内容/字:段落"/>
  2393. <xsl:apply-templates select="图:文本内容/字:文字表"/>
  2394. </xsl:if>
  2395. </xsl:element>
  2396. </xsl:template>
  2397. <xsl:template name="演文本框">
  2398. <xsl:for-each select="key('rel_graphic_name',@图:标识符)">
  2399. <xsl:variable name="tuxing1" select="@uof:图形引用"/>
  2400. <xsl:element name="draw:frame">
  2401. <xsl:attribute name="svg:x"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute>
  2402. <xsl:attribute name="svg:y"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute>
  2403. <xsl:attribute name="svg:width"><xsl:value-of select="concat(@uof:宽度,$uofUnit)"/></xsl:attribute>
  2404. <xsl:attribute name="svg:height"><xsl:value-of select="concat(@uof:高度,$uofUnit)"/></xsl:attribute>
  2405. <xsl:attribute name="draw:layer"><xsl:choose><xsl:when test="parent::演:母版">backgroundobjects</xsl:when><xsl:otherwise>layout</xsl:otherwise></xsl:choose></xsl:attribute>
  2406. <xsl:if test="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]/图:预定义图形/图:类别 = '3' and (parent::演:幻灯片/@演:配色方案引用) and not(@uof:占位符 = 'graphic')">
  2407. <xsl:attribute name="presentation:style-name"><xsl:value-of select="parent::演:幻灯片/@演:配色方案引用"/></xsl:attribute>
  2408. </xsl:if>
  2409. <xsl:if test="../演:动画/演:序列/@演:动画对象=$tuxing1">
  2410. <xsl:attribute name="draw:id"><xsl:value-of select="$tuxing1"/></xsl:attribute>
  2411. </xsl:if>
  2412. <xsl:if test="not(@uof:占位符 = 'graphic')">
  2413. <xsl:attribute name="presentation:style-name"><xsl:value-of select="@uof:图形引用"/></xsl:attribute>
  2414. </xsl:if>
  2415. <xsl:variable name="placeholdType">
  2416. <xsl:value-of select="@uof:占位符"/>
  2417. </xsl:variable>
  2418. <xsl:if test="@uof:占位符">
  2419. <xsl:attribute name="presentation:class"><xsl:choose><xsl:when test="@uof:占位符 = 'clipart'">graphic</xsl:when><xsl:when test="@uof:占位符 = 'media_clip'">graphic</xsl:when><xsl:when test="@uof:占位符 = 'graphics'">graphic</xsl:when><xsl:when test="@uof:占位符 = 'number'">page_number</xsl:when><xsl:when test="@uof:占位符 = 'centertitle'">title</xsl:when><xsl:when test="@uof:占位符 = 'date'">date-time</xsl:when><xsl:when test="@uof:占位符 = 'vertical_text'">vertical_outline</xsl:when><xsl:when test="@uof:占位符 = 'vertical_subtitle'">vertical_outline</xsl:when><xsl:otherwise><xsl:value-of select="@uof:占位符"/></xsl:otherwise></xsl:choose></xsl:attribute>
  2420. </xsl:if>
  2421. <xsl:for-each select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]">
  2422. <xsl:variable name="leibie">
  2423. <xsl:value-of select="图:预定义图形/图:类别"/>
  2424. </xsl:variable>
  2425. <xsl:if test="图:预定义图形/图:属性/图:旋转角度 and not(图:预定义图形/图:属性/图:旋转角度='0.0')">
  2426. <xsl:variable name="rotate-angle">
  2427. <xsl:value-of select="(图:预定义图形/图:属性/图:旋转角度 * 2 * 3.14159265 ) div 360"/>
  2428. </xsl:variable>
  2429. <xsl:attribute name="draw:transform"><xsl:value-of select="concat('rotate (',$rotate-angle,') translate (-0.0194027777777778cm 3.317875cm)')"/></xsl:attribute>
  2430. </xsl:if>
  2431. <xsl:choose>
  2432. <xsl:when test="图:文本内容 or @图:其他对象">
  2433. <xsl:attribute name="presentation:user-transformed">true</xsl:attribute>
  2434. </xsl:when>
  2435. <xsl:otherwise>
  2436. <xsl:attribute name="presentation:placeholder">true</xsl:attribute>
  2437. </xsl:otherwise>
  2438. </xsl:choose>
  2439. <xsl:choose>
  2440. <xsl:when test="$placeholdType = 'graphic' or $placeholdType = 'clipart' or $placeholdType ='media_clip'">
  2441. <draw:image/>
  2442. </xsl:when>
  2443. <xsl:when test="$placeholdType = 'table' or $placeholdType = 'chart' or $placeholdType ='object'">
  2444. <draw:object/>
  2445. </xsl:when>
  2446. <xsl:otherwise>
  2447. <xsl:element name="draw:text-box">
  2448. <xsl:apply-templates select="图:文本内容/字:段落"/>
  2449. </xsl:element>
  2450. </xsl:otherwise>
  2451. </xsl:choose>
  2452. </xsl:for-each>
  2453. </xsl:element>
  2454. </xsl:for-each>
  2455. </xsl:template>
  2456. <xsl:template name="演缩略图">
  2457. <draw:page-thumbnail>
  2458. <xsl:call-template name="common"/>
  2459. <xsl:attribute name="draw:layer">layout</xsl:attribute>
  2460. <xsl:attribute name="draw:page-number"><xsl:for-each select="../.."><xsl:value-of select="count(preceding-sibling::演:幻灯片) + 1"/></xsl:for-each></xsl:attribute>
  2461. <xsl:attribute name="presentation:class">page</xsl:attribute>
  2462. </draw:page-thumbnail>
  2463. </xsl:template>
  2464. <xsl:template match="演:页面版式">
  2465. <xsl:element name="style:presentation-page-layout">
  2466. <xsl:attribute name="style:name"><xsl:value-of select="@演:标识符"/></xsl:attribute>
  2467. <xsl:apply-templates select="演:占位符" mode="layout"/>
  2468. </xsl:element>
  2469. </xsl:template>
  2470. <xsl:template match="演:占位符" mode="layout">
  2471. <presentation:placeholder>
  2472. <xsl:attribute name="presentation:object"><xsl:choose><xsl:when test="@演:类型='vertical_text'">vertical_outline</xsl:when><xsl:when test="@演:类型='date'">date-time</xsl:when><xsl:when test="@演:类型='number'">page_number</xsl:when><xsl:otherwise><xsl:value-of select="@演:类型"/></xsl:otherwise></xsl:choose></xsl:attribute>
  2473. <xsl:attribute name="svg:x"><xsl:value-of select="concat(uof:锚点/@uof:x坐标,$uofUnit)"/></xsl:attribute>
  2474. <xsl:attribute name="svg:y"><xsl:value-of select="concat(uof:锚点/@uof:y坐标,$uofUnit)"/></xsl:attribute>
  2475. <xsl:attribute name="svg:width"><xsl:value-of select="concat(uof:锚点/@uof:宽度,$uofUnit)"/></xsl:attribute>
  2476. <xsl:attribute name="svg:height"><xsl:value-of select="concat(uof:锚点/@uof:高度,$uofUnit)"/></xsl:attribute>
  2477. </presentation:placeholder>
  2478. </xsl:template>
  2479. <xsl:template match="字:段落">
  2480. <xsl:choose>
  2481. <xsl:when test="字:段落属性/字:自动编号信息">
  2482. <xsl:call-template name="编号解析"/>
  2483. </xsl:when>
  2484. <xsl:when test="字:句/字:分页符">
  2485. <xsl:call-template name="processPageBreaks"/>
  2486. </xsl:when>
  2487. <xsl:when test="string(parent::node()/@uof:locID)='t0107'">
  2488. <xsl:call-template name="jiaozhu"/>
  2489. </xsl:when>
  2490. <xsl:when test="string(parent::node()/@uof:locID)='t0108'">
  2491. <xsl:call-template name="weizhu"/>
  2492. </xsl:when>
  2493. <xsl:otherwise>
  2494. <xsl:call-template name="commonParagraph"/>
  2495. </xsl:otherwise>
  2496. </xsl:choose>
  2497. </xsl:template>
  2498. <xsl:template name="jiaozhu">
  2499. <xsl:element name="text:footnote">
  2500. <xsl:element name="text:footnote-body">
  2501. <xsl:call-template name="commonParagraph"/>
  2502. </xsl:element>
  2503. </xsl:element>
  2504. </xsl:template>
  2505. <xsl:template name="weizhu">
  2506. <xsl:element name="text:endnote">
  2507. <xsl:element name="text:endnote-body">
  2508. <xsl:call-template name="commonParagraph"/>
  2509. </xsl:element>
  2510. </xsl:element>
  2511. </xsl:template>
  2512. <xsl:template name="processPageBreaks">
  2513. <xsl:variable name="pageBreak" select="字:句/字:分页符"/>
  2514. <xsl:call-template name="createSubParagraph">
  2515. <xsl:with-param name="list" select="$pageBreak[1]/preceding-sibling::字:句"/>
  2516. <xsl:with-param name="pageBreak"/>
  2517. <xsl:with-param name="needsPageBreak">false</xsl:with-param>
  2518. </xsl:call-template>
  2519. <xsl:for-each select="$pageBreak">
  2520. <xsl:call-template name="createSubParagraph">
  2521. <xsl:with-param name="list" select="./following-sibling::字:句[preceding::字:句/字:分页符 = '.']"/>
  2522. <xsl:with-param name="pageBreak" select="."/>
  2523. <xsl:with-param name="needsPageBreak">true</xsl:with-param>
  2524. </xsl:call-template>
  2525. </xsl:for-each>
  2526. </xsl:template>
  2527. <xsl:template name="createSubParagraph">
  2528. <xsl:param name="list"/>
  2529. <xsl:param name="pageBreak"/>
  2530. <xsl:param name="needsPageBreak"/>
  2531. <xsl:if test="(count($list) &gt; 0) or ($needsPageBreak ='true') ">
  2532. <xsl:element name="text:p">
  2533. <xsl:choose>
  2534. <xsl:when test="$needsPageBreak = 'true'">
  2535. <xsl:choose>
  2536. <xsl:when test="ancestor::字:段落/字:段落属性">
  2537. <xsl:attribute name="text:style-name">P<xsl:number from="/uof:UOF/uof:演示文稿/演:主体" level="any" count="字:段落属性"/></xsl:attribute>
  2538. </xsl:when>
  2539. <xsl:otherwise>
  2540. <xsl:attribute name="text:style-name">PageBreak</xsl:attribute>
  2541. </xsl:otherwise>
  2542. </xsl:choose>
  2543. </xsl:when>
  2544. </xsl:choose>
  2545. <xsl:if test="$pageBreak">
  2546. <xsl:apply-templates select="$pageBreak"/>
  2547. </xsl:if>
  2548. <xsl:apply-templates select="$list"/>
  2549. </xsl:element>
  2550. </xsl:if>
  2551. </xsl:template>
  2552. <xsl:template match="字:区域开始[@字:类型='bookmark']">
  2553. <text:bookmark-start text:name="{@字:标识符}"/>
  2554. </xsl:template>
  2555. <xsl:template match="字:区域结束[preceding::字:区域开始[1]/@字:类型='bookmark']">
  2556. <text:bookmark-end text:name="{@字:标识符引用}"/>
  2557. </xsl:template>
  2558. <xsl:template match="字:段落/字:域开始">
  2559. <xsl:choose>
  2560. <xsl:when test="@字:类型='CREATEDATE'">
  2561. <xsl:variable name="datestr" select="../字:句/字:文本串"/>
  2562. <xsl:element name="text:date">
  2563. <xsl:attribute name="style:data-style-name">Time<xsl:number from="/uof:UOF/uof:演示文稿/演:主体" level="any" count="字:段落/字:域开始[@字:类型 = 'CREATEDATE']"/></xsl:attribute>
  2564. <xsl:attribute name="text:date-value"><xsl:value-of select="concat(substring-before($datestr,' '),'T',substring-after($datestr,' '))"/></xsl:attribute>
  2565. <xsl:value-of select="$datestr"/>
  2566. </xsl:element>
  2567. </xsl:when>
  2568. </xsl:choose>
  2569. </xsl:template>
  2570. <xsl:template name="commonParagraph">
  2571. <xsl:element name="text:p">
  2572. <xsl:if test="@字:动画标识">
  2573. <xsl:attribute name="text:id"><xsl:value-of select="@字:动画标识"/></xsl:attribute>
  2574. </xsl:if>
  2575. <xsl:call-template name="commonParagraphAttributes"/>
  2576. <xsl:apply-templates/>
  2577. </xsl:element>
  2578. </xsl:template>
  2579. <xsl:template name="commonParagraphAttributes">
  2580. <xsl:choose>
  2581. <xsl:when test="字:段落属性">
  2582. <xsl:attribute name="text:style-name"><xsl:value-of select="字:段落属性/@字:式样引用"/></xsl:attribute>
  2583. </xsl:when>
  2584. <xsl:when test="generate-id(ancestor::字:主体/descendant::字:段落[1]) = generate-id(.)">
  2585. <xsl:variable name="paragraph-number">
  2586. <xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落[字:段落属性]"/>
  2587. </xsl:variable>
  2588. <xsl:attribute name="text:style-name">P<xsl:value-of select="number($paragraph-number)"/>_1</xsl:attribute>
  2589. </xsl:when>
  2590. <xsl:when test="not(字:段落属性) and (descendant::字:分栏符 or ancestor::字:分节/descendant::字:节属性[字:分栏/@字:栏数 &gt; 1])">
  2591. <xsl:attribute name="text:style-name">ColumnBreakPara</xsl:attribute>
  2592. </xsl:when>
  2593. <xsl:when test="字:句">
  2594. <xsl:apply-templates select="字:文本串"/>
  2595. </xsl:when>
  2596. </xsl:choose>
  2597. </xsl:template>
  2598. <xsl:template match="字:段落属性"/>
  2599. <xsl:template match="字:句/字:句属性"/>
  2600. <xsl:template match="字:句属性" mode="style">
  2601. <xsl:element name="style:style">
  2602. <xsl:attribute name="style:name">T<xsl:number from="/uof:UOF/uof:对象集" level="any" count="字:句属性" format="1"/></xsl:attribute>
  2603. <xsl:attribute name="style:family">text</xsl:attribute>
  2604. <xsl:if test="@字:式样引用">
  2605. <xsl:attribute name="style:parent-style-name"><xsl:value-of select="@字:式样引用"/></xsl:attribute>
  2606. </xsl:if>
  2607. <xsl:element name="style:text-properties">
  2608. <xsl:apply-templates select="./*"/>
  2609. </xsl:element>
  2610. </xsl:element>
  2611. </xsl:template>
  2612. <xsl:template match="字:句/字:文本串">
  2613. <xsl:choose>
  2614. <xsl:when test="string(.) = ' ' ">
  2615. <xsl:element name="text:s"/>
  2616. </xsl:when>
  2617. <xsl:when test="contains(.,' ')">
  2618. <xsl:call-template name="replace-spaces">
  2619. <xsl:with-param name="curr-string" select="."/>
  2620. </xsl:call-template>
  2621. </xsl:when>
  2622. <xsl:otherwise>
  2623. <xsl:value-of select="."/>
  2624. </xsl:otherwise>
  2625. </xsl:choose>
  2626. </xsl:template>
  2627. <xsl:template name="replace-spaces">
  2628. <xsl:param name="curr-string"/>
  2629. <xsl:if test="contains($curr-string,' ')">
  2630. <xsl:value-of select="substring-before($curr-string,' ')"/>
  2631. <text:s text:c="2"/>
  2632. <xsl:variable name="next-string" select="substring-after($curr-string,' ')"/>
  2633. <xsl:choose>
  2634. <xsl:when test="contains($next-string, ' ')">
  2635. <xsl:call-template name="replace-spaces">
  2636. <xsl:with-param name="curr-string" select="$next-string"/>
  2637. </xsl:call-template>
  2638. </xsl:when>
  2639. <xsl:otherwise>
  2640. <xsl:value-of select="$next-string"/>
  2641. </xsl:otherwise>
  2642. </xsl:choose>
  2643. </xsl:if>
  2644. </xsl:template>
  2645. <xsl:template match="字:句">
  2646. <xsl:if test="name(following-sibling::*[1])!='字:域结束'">
  2647. <xsl:if test="字:换行符">
  2648. <xsl:element name="text:line-break"/>
  2649. </xsl:if>
  2650. <xsl:variable name="currently-node" select="./字:锚点"/>
  2651. <xsl:choose>
  2652. <xsl:when test="字:句属性//字:隐藏文字/@字:值='true'">
  2653. <text:hidden-text text:is-hidden="true" text:string-value="{.}"/>
  2654. </xsl:when>
  2655. <xsl:when test="字:区域开始[@字:类型='hyperlink']">
  2656. <xsl:element name="text:a">
  2657. <xsl:attribute name="xlink:type">simple</xsl:attribute>
  2658. <xsl:variable name="hyperDest" select="字:区域开始/@字:标识符"/>
  2659. <xsl:attribute name="xlink:href"><xsl:for-each select="/uof:UOF/uof:链接集/uof:超级链接"><xsl:if test="@uof:链源=$hyperDest"><xsl:if test="@uof:目标"><xsl:value-of select="@uof:目标"/></xsl:if><xsl:if test="@uof:书签"><xsl:variable name="bookmarkDest" select="@uof:书签"/><xsl:for-each select="/uof:UOF/uof:书签集/uof:书签"><xsl:if test="@uof:名称=$bookmarkDest"><xsl:value-of select="concat('#',uof:文本位置/@字:区域引用)"/></xsl:if></xsl:for-each></xsl:if></xsl:if></xsl:for-each></xsl:attribute>
  2660. <xsl:apply-templates select="字:文本串"/>
  2661. </xsl:element>
  2662. </xsl:when>
  2663. <xsl:when test="(preceding-sibling::字:句) or (字:句属性)or(字:区域开始)">
  2664. <xsl:element name="text:span">
  2665. <xsl:choose>
  2666. <xsl:when test="字:区域开始[@字:类型='annotation']">
  2667. <xsl:variable name="ref_comment">
  2668. <xsl:value-of select="字:区域开始/@字:标识符"/>
  2669. </xsl:variable>
  2670. <xsl:apply-templates/>
  2671. <xsl:apply-templates select="/uof:UOF/uof:文字处理/字:公用处理规则/字:批注集/字:批注[@字:区域引用 = $ref_comment]"/>
  2672. </xsl:when>
  2673. <xsl:otherwise>
  2674. <xsl:variable name="stylenum">
  2675. <xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:句" format="1"/>
  2676. </xsl:variable>
  2677. <xsl:attribute name="text:style-name"><xsl:value-of select="字:句属性/@字:式样引用"/></xsl:attribute>
  2678. <xsl:apply-templates/>
  2679. </xsl:otherwise>
  2680. </xsl:choose>
  2681. </xsl:element>
  2682. </xsl:when>
  2683. <xsl:otherwise>
  2684. <xsl:apply-templates/>
  2685. </xsl:otherwise>
  2686. </xsl:choose>
  2687. </xsl:if>
  2688. </xsl:template>
  2689. <xsl:template match="node()[name() = '字:位置']">
  2690. <xsl:variable name="height">100% </xsl:variable>
  2691. <xsl:variable name="position">
  2692. <xsl:choose>
  2693. <xsl:when test="parent::字:句属性//字:位置">
  2694. <xsl:value-of select="concat( parent::字:句属性//字:位置, '%')"/>
  2695. </xsl:when>
  2696. </xsl:choose>
  2697. </xsl:variable>
  2698. <xsl:attribute name="style:text-position"><xsl:value-of select="concat(concat( $position, ' '), $height)"/></xsl:attribute>
  2699. </xsl:template>
  2700. <xsl:template match="字:字体">
  2701. <xsl:if test="@字:字号">
  2702. <xsl:attribute name="fo:font-size"><xsl:value-of select="@字:字号"/>pt</xsl:attribute>
  2703. <xsl:attribute name="style:font-size-asian"><xsl:value-of select="@字:字号"/>pt</xsl:attribute>
  2704. <xsl:attribute name="style:font-size-complex"><xsl:value-of select="@字:字号"/>pt</xsl:attribute>
  2705. </xsl:if>
  2706. <xsl:if test="@字:相对字号 and self::node( )[not(parent::字:句属性)]">
  2707. <xsl:variable name="stylename" select="parent::node()/@字:基式样引用"/>
  2708. <xsl:variable name="zihao">
  2709. <xsl:for-each select="/uof:UOF/uof:式样集//uof:段落式样[@字:标识符=$stylename]">
  2710. <xsl:value-of select="字:字体/@字:字号"/>
  2711. </xsl:for-each>
  2712. </xsl:variable>
  2713. <xsl:variable name="font-size" select="@字:相对字号"/>
  2714. <xsl:attribute name="fo:font-size"><xsl:value-of select="($zihao * $font-size div 100)"/>pt</xsl:attribute>
  2715. <xsl:attribute name="style:font-size-asian"><xsl:value-of select="($zihao * $font-size div 100)"/>pt</xsl:attribute>
  2716. <xsl:attribute name="style:font-size-complex"><xsl:value-of select="($zihao * $font-size div 100)"/>pt</xsl:attribute>
  2717. </xsl:if>
  2718. <xsl:if test="@字:颜色">
  2719. <xsl:attribute name="fo:color"><xsl:value-of select="string(@字:颜色)"/></xsl:attribute>
  2720. </xsl:if>
  2721. <xsl:if test="@字:中文字体引用">
  2722. <xsl:attribute name="style:font-name-asian"><xsl:value-of select="@字:中文字体引用"/></xsl:attribute>
  2723. </xsl:if>
  2724. <xsl:if test="@字:西文字体引用">
  2725. <xsl:attribute name="style:font-name"><xsl:value-of select="@字:西文字体引用"/></xsl:attribute>
  2726. </xsl:if>
  2727. </xsl:template>
  2728. <xsl:template match="字:斜体">
  2729. <xsl:if test="@字:值='true'">
  2730. <xsl:attribute name="fo:font-style">italic</xsl:attribute>
  2731. <xsl:attribute name="fo:font-style-asian">italic</xsl:attribute>
  2732. <xsl:attribute name="style:font-style-asian">italic</xsl:attribute>
  2733. <xsl:attribute name="style:font-style-complex">italic</xsl:attribute>
  2734. </xsl:if>
  2735. </xsl:template>
  2736. <xsl:template match="字:粗体">
  2737. <xsl:if test="@字:值='true'">
  2738. <xsl:attribute name="fo:font-weight">bold</xsl:attribute>
  2739. <xsl:attribute name="fo:font-weight-asian">bold</xsl:attribute>
  2740. <xsl:attribute name="style:font-weight-asian">bold</xsl:attribute>
  2741. <xsl:attribute name="style:font-weight-complex">bold</xsl:attribute>
  2742. </xsl:if>
  2743. </xsl:template>
  2744. <xsl:template match="字:下划线">
  2745. <xsl:choose>
  2746. <xsl:when test="@字:字下划线 = 'true'">
  2747. <xsl:attribute name="style:text-underline">single</xsl:attribute>
  2748. <xsl:attribute name="style:text-underline-color">font-color</xsl:attribute>
  2749. <xsl:attribute name="fo:score-spaces">false</xsl:attribute>
  2750. </xsl:when>
  2751. <xsl:when test="@字:类型 = 'thick'">
  2752. <xsl:attribute name="style:text-underline">bold</xsl:attribute>
  2753. </xsl:when>
  2754. <xsl:when test="@字:类型 = 'dotted-heavy'">
  2755. <xsl:attribute name="style:text-underline">bold-dotted</xsl:attribute>
  2756. </xsl:when>
  2757. <xsl:when test="@字:类型 = 'dashed-heavy'">
  2758. <xsl:attribute name="style:text-underline">bold-dash</xsl:attribute>
  2759. </xsl:when>
  2760. <xsl:when test="@字:类型 = 'dash-long'">
  2761. <xsl:attribute name="style:text-underline">long-dash</xsl:attribute>
  2762. </xsl:when>
  2763. <xsl:when test="@字:类型 = 'dash-long-heavy'">
  2764. <xsl:attribute name="style:text-underline">bold-long-dash</xsl:attribute>
  2765. </xsl:when>
  2766. <xsl:when test="@字:类型 = 'dash-dot-heavy'">
  2767. <xsl:attribute name="style:text-underline">bold-dot-dash</xsl:attribute>
  2768. </xsl:when>
  2769. <xsl:when test="@字:类型 = 'dash-dot-dot-heavy'">
  2770. <xsl:attribute name="style:text-underline">bold-dot-dot-dash</xsl:attribute>
  2771. </xsl:when>
  2772. <xsl:when test="@字:类型 = 'wavy-heavy'">
  2773. <xsl:attribute name="style:text-underline">bold-wave</xsl:attribute>
  2774. </xsl:when>
  2775. <xsl:when test="@字:类型 = 'wavy-double'">
  2776. <xsl:attribute name="style:text-underline">double-wave</xsl:attribute>
  2777. </xsl:when>
  2778. <xsl:otherwise>
  2779. <xsl:attribute name="style:text-underline"><xsl:value-of select="@字:类型"/></xsl:attribute>
  2780. </xsl:otherwise>
  2781. </xsl:choose>
  2782. <xsl:if test="@字:颜色 and not(@字:颜色 = 'auto')">
  2783. <xsl:attribute name="style:text-underline-color"><xsl:value-of select="concat( '#', @字:颜色)"/></xsl:attribute>
  2784. </xsl:if>
  2785. </xsl:template>
  2786. <xsl:template match="字:阴影">
  2787. <xsl:attribute name="style:text-shadow">1pt 1pt</xsl:attribute>
  2788. <xsl:attribute name="fo:text-shadow">1pt 1pt</xsl:attribute>
  2789. </xsl:template>
  2790. <xsl:template match="字:删除线">
  2791. <xsl:choose>
  2792. <xsl:when test="@字:类型 = 'single' ">
  2793. <xsl:attribute name="style:text-crossing-out">single-line</xsl:attribute>
  2794. </xsl:when>
  2795. <xsl:when test="@字类型 = 'double'">
  2796. <xsl:attribute name="style:text-crossing-out">double-line</xsl:attribute>
  2797. </xsl:when>
  2798. </xsl:choose>
  2799. </xsl:template>
  2800. <xsl:template match="字:突出显示">
  2801. <xsl:attribute name="fo:text-transform">uppercase</xsl:attribute>
  2802. <xsl:attribute name="fo:text-background-color"><xsl:value-of select="string(@字:颜色)"/></xsl:attribute>
  2803. </xsl:template>
  2804. <xsl:template match="@字:颜色[not(.='auto')]">
  2805. <xsl:attribute name="fo:color">#<xsl:value-of select="."/></xsl:attribute>
  2806. </xsl:template>
  2807. <xsl:template match="字:浮雕">
  2808. <xsl:attribute name="style:font-relief">embossed</xsl:attribute>
  2809. </xsl:template>
  2810. <xsl:template match="字:外框">
  2811. <xsl:attribute name="style:text-outline">true</xsl:attribute>
  2812. </xsl:template>
  2813. <xsl:template match="字:缩放">
  2814. <xsl:attribute name="style:text-scale"><xsl:value-of select="@字:字号"/></xsl:attribute>
  2815. </xsl:template>
  2816. <xsl:template match="字:字符间距[parent::字:句属性]">
  2817. <xsl:attribute name="fo:letter-spacing"><xsl:value-of select="concat( floor(number(字:字符间距 div 1440) * 2540) div 1000, 'cm')"/></xsl:attribute>
  2818. </xsl:template>
  2819. <xsl:template match="uof:字体集">
  2820. <xsl:if test="not(uof:字体声明[@uof:名称='StarSymbol'])">
  2821. <style:font-face style:name="StarSymbol" svg:font-family="StarSymbol" style:font-charset="x-symbol"/>
  2822. </xsl:if>
  2823. <xsl:for-each select="uof:字体声明">
  2824. <xsl:element name="style:font-face">
  2825. <xsl:attribute name="style:name"><xsl:value-of select="@uof:名称"/></xsl:attribute>
  2826. <xsl:attribute name="svg:font-family"><xsl:value-of select="@uof:字体族"/></xsl:attribute>
  2827. <xsl:if test="@uof:字符集 = '02'">
  2828. <xsl:attribute name="style:font-charset">x-symbol</xsl:attribute>
  2829. </xsl:if>
  2830. <xsl:if test="@uof:字体族">
  2831. <xsl:choose>
  2832. <xsl:when test="@uof:字体族 = 'Swiss'">
  2833. <xsl:attribute name="style:font-family-generic">swiss</xsl:attribute>
  2834. </xsl:when>
  2835. <xsl:when test="@uof:字体族 ='Modern'">
  2836. <xsl:attribute name="style:font-family-generic">modern</xsl:attribute>
  2837. </xsl:when>
  2838. <xsl:when test="@uof:字体族='Roman'">
  2839. <xsl:attribute name="style:font-family-generic">roman</xsl:attribute>
  2840. </xsl:when>
  2841. <xsl:when test="@uof:字体族 ='Script'">
  2842. <xsl:attribute name="style:font-family-generic">script</xsl:attribute>
  2843. </xsl:when>
  2844. <xsl:when test="@uof:字体族 ='Decorative'">
  2845. <xsl:attribute name="style:font-family-generic">decorative</xsl:attribute>
  2846. </xsl:when>
  2847. <xsl:when test="@uof:字体族 ='System'">
  2848. <xsl:attribute name="style:font-family-generic">system</xsl:attribute>
  2849. </xsl:when>
  2850. <xsl:otherwise>
  2851. <xsl:attribute name="style:font-family-generic">system</xsl:attribute>
  2852. </xsl:otherwise>
  2853. </xsl:choose>
  2854. </xsl:if>
  2855. <xsl:attribute name="style:font-pitch">12</xsl:attribute>
  2856. </xsl:element>
  2857. </xsl:for-each>
  2858. <xsl:apply-templates select="uof:字体声明"/>
  2859. </xsl:template>
  2860. <xsl:template match="uof:元数据">
  2861. <office:meta>
  2862. <meta:generator>UOFText 2004</meta:generator>
  2863. <dc:title>
  2864. <xsl:value-of select="uof:标题"/>
  2865. </dc:title>
  2866. <dc:description>
  2867. <xsl:value-of select="uof:摘要"/>
  2868. </dc:description>
  2869. <dc:subject>
  2870. <xsl:value-of select="uof:主题"/>
  2871. </dc:subject>
  2872. <meta:initial-creator>
  2873. <xsl:value-of select="uof:作者"/>
  2874. </meta:initial-creator>
  2875. <meta:creation-date>
  2876. <xsl:value-of select="substring-before( uof:创建日期, 'Z')"/>
  2877. </meta:creation-date>
  2878. <dc:creator>
  2879. <xsl:value-of select="uof:最后作者"/>
  2880. </dc:creator>
  2881. <dc:date>
  2882. <xsl:value-of select="substring-before( uof:编辑时间, 'Z')"/>
  2883. </dc:date>
  2884. <meta:printed-by/>
  2885. <meta:print-date/>
  2886. <meta:keywords>
  2887. <meta:keyword>
  2888. <xsl:value-of select="uof:关键字集/uof:关键字"/>
  2889. </meta:keyword>
  2890. </meta:keywords>
  2891. <dc:language/>
  2892. <meta:editing-cycles>
  2893. <xsl:value-of select="uof:编辑次数"/>
  2894. </meta:editing-cycles>
  2895. <meta:editing-duration>
  2896. <xsl:if test="uof:编辑时间">
  2897. <xsl:value-of select="concat('PT', floor(uof:编辑时间 div 60), 'H', uof:编辑时间 mod 60, 'M0S')"/>
  2898. </xsl:if>
  2899. </meta:editing-duration>
  2900. <meta:user-defined meta:name="Category">
  2901. <xsl:value-of select="uof:分类"/>
  2902. </meta:user-defined>
  2903. <meta:user-defined meta:name="Manager">
  2904. <xsl:value-of select="uof:经理名称"/>
  2905. </meta:user-defined>
  2906. <meta:user-defined meta:name="Company">
  2907. <xsl:value-of select="uof:公司名称"/>
  2908. </meta:user-defined>
  2909. <meta:user-defined meta:name="Version">
  2910. <xsl:value-of select="uof:创建应用程序"/>
  2911. </meta:user-defined>
  2912. <xsl:if test="uof:文档模板|child::*[@uof:locID='u0013']">
  2913. <meta:template xlink:type="simple" xlink:actuate="onRequest" xlink:href="{child::*[@uof:locID='u0013']}"/>
  2914. </xsl:if>
  2915. <xsl:if test="uof:用户自定义元数据集/uof:用户自定义元数据|child::*[@uof:locID='u0016']/*[@uof:locID='u0017']">
  2916. <xsl:for-each select="uof:用户自定义元数据集/uof:用户自定义元数据|child::*[@uof:locID='u0016']/*[@uof:locID='u0017']">
  2917. <xsl:element name="meta:user-defined">
  2918. <xsl:attribute name="meta:name"><xsl:value-of select="@uof:名称"/></xsl:attribute>
  2919. </xsl:element>
  2920. </xsl:for-each>
  2921. </xsl:if>
  2922. <meta:document-statistic meta:page-count="{child::*[@uof:locID='u0020']}" meta:paragraph-count="{child::*[@uof:locID='u0025']}" meta:word-count="{child::*[@uof:locID='u0023']}" meta:object-count="{child::*[@uof:locID='u0026']}" meta:character-count="{child::*[@uof:locID='u0021']}"/>
  2923. <meta:document-statistic/>
  2924. </office:meta>
  2925. </xsl:template>
  2926. <xsl:template match="uof:用户自定义元数据集">
  2927. <xsl:for-each select="node()[@名称]">
  2928. <meta:user-defined meta:name="{name()}">
  2929. <xsl:value-of select="."/>
  2930. </meta:user-defined>
  2931. </xsl:for-each>
  2932. </xsl:template>
  2933. <xsl:template name="parse-range">
  2934. <xsl:param name="range-value"/>
  2935. <xsl:param name="last"/>
  2936. <xsl:variable name="first-pit">
  2937. <xsl:choose>
  2938. <xsl:when test="contains($range-value,',')">
  2939. <xsl:value-of select="substring-before($range-value,',')"/>
  2940. </xsl:when>
  2941. <xsl:otherwise>
  2942. <xsl:value-of select="$range-value"/>
  2943. </xsl:otherwise>
  2944. </xsl:choose>
  2945. </xsl:variable>
  2946. <xsl:variable name="current">
  2947. <xsl:choose>
  2948. <xsl:when test="contains($first-pit,':')">
  2949. <xsl:variable name="R-start" select="substring-before(substring-after($first-pit,'R'),'C')"/>
  2950. <xsl:variable name="C-start" select="substring-before(substring-after($first-pit,'C'),':')"/>
  2951. <xsl:variable name="second-pit" select="substring-after($first-pit,':')"/>
  2952. <xsl:variable name="R-end" select="substring-before(substring-after($second-pit,'R'),'C')"/>
  2953. <xsl:variable name="C-end" select="substring-after($second-pit,'C')"/>
  2954. <xsl:variable name="the-str">
  2955. <xsl:call-template name="condition-rc-str">
  2956. <xsl:with-param name="r-start" select="$R-start"/>
  2957. <xsl:with-param name="r-end" select="$R-end"/>
  2958. <xsl:with-param name="c-start" select="$C-start"/>
  2959. <xsl:with-param name="c-end" select="$C-end"/>
  2960. <xsl:with-param name="last" select="''"/>
  2961. </xsl:call-template>
  2962. </xsl:variable>
  2963. <xsl:value-of select="$the-str"/>
  2964. </xsl:when>
  2965. <xsl:otherwise>
  2966. <xsl:value-of select="concat($first-pit,',')"/>
  2967. </xsl:otherwise>
  2968. </xsl:choose>
  2969. </xsl:variable>
  2970. <xsl:choose>
  2971. <xsl:when test="contains($range-value,',')">
  2972. <xsl:call-template name="parse-range">
  2973. <xsl:with-param name="range-value" select="substring-after($range-value,',')"/>
  2974. <xsl:with-param name="last" select="concat($last,$current)"/>
  2975. </xsl:call-template>
  2976. </xsl:when>
  2977. <xsl:otherwise>
  2978. <xsl:value-of select="concat($last,$current)"/>
  2979. </xsl:otherwise>
  2980. </xsl:choose>
  2981. </xsl:template>
  2982. <xsl:template name="condition-rc-str">
  2983. <xsl:param name="r-start"/>
  2984. <xsl:param name="r-end"/>
  2985. <xsl:param name="c-start"/>
  2986. <xsl:param name="c-end"/>
  2987. <xsl:param name="last"/>
  2988. <xsl:variable name="current">
  2989. <xsl:call-template name="condition-c-str">
  2990. <xsl:with-param name="rc-str" select="concat('R',$r-start)"/>
  2991. <xsl:with-param name="start" select="$c-start"/>
  2992. <xsl:with-param name="end" select="$c-end"/>
  2993. <xsl:with-param name="last" select="''"/>
  2994. </xsl:call-template>
  2995. </xsl:variable>
  2996. <xsl:if test="$r-start &lt; $r-end">
  2997. <xsl:call-template name="condition-rc-str">
  2998. <xsl:with-param name="r-start" select="$r-start + 1"/>
  2999. <xsl:with-param name="r-end" select="$r-end"/>
  3000. <xsl:with-param name="c-start" select="$c-start"/>
  3001. <xsl:with-param name="c-end" select="$c-end"/>
  3002. <xsl:with-param name="last" select="concat($last,$current)"/>
  3003. </xsl:call-template>
  3004. </xsl:if>
  3005. <xsl:if test="$r-start = $r-end">
  3006. <xsl:value-of select="concat($last,$current)"/>
  3007. </xsl:if>
  3008. </xsl:template>
  3009. <xsl:template name="condition-c-str">
  3010. <xsl:param name="rc-str"/>
  3011. <xsl:param name="start"/>
  3012. <xsl:param name="end"/>
  3013. <xsl:param name="last"/>
  3014. <xsl:variable name="current" select="concat($rc-str,'C',$start,',')"/>
  3015. <xsl:if test="$start &lt; $end">
  3016. <xsl:call-template name="condition-c-str">
  3017. <xsl:with-param name="rc-str" select="$rc-str"/>
  3018. <xsl:with-param name="start" select="$start + 1"/>
  3019. <xsl:with-param name="end" select="$end"/>
  3020. <xsl:with-param name="last" select="concat($last,$current)"/>
  3021. </xsl:call-template>
  3022. </xsl:if>
  3023. <xsl:if test="$start = $end">
  3024. <xsl:value-of select="concat($last,$current)"/>
  3025. </xsl:if>
  3026. </xsl:template>
  3027. <xsl:template name="condition-str">
  3028. <xsl:param name="param-str"/>
  3029. <xsl:choose>
  3030. <xsl:when test="contains($param-str,'(')">
  3031. <xsl:call-template name="condition-str">
  3032. <xsl:with-param name="param-str" select="substring-after($param-str,'(')"/>
  3033. </xsl:call-template>
  3034. </xsl:when>
  3035. <xsl:otherwise>
  3036. <xsl:value-of select="substring-before($param-str,':')"/>
  3037. </xsl:otherwise>
  3038. </xsl:choose>
  3039. </xsl:template>
  3040. <xsl:template name="encode-as-cell-range-address">
  3041. <xsl:param name="string"/>
  3042. <xsl:value-of select="$string"/>
  3043. </xsl:template>
  3044. <xsl:template name="encode-as-cell-address">
  3045. <xsl:param name="string"/>
  3046. <xsl:value-of select="$string"/>
  3047. </xsl:template>
  3048. <xsl:param name="dpi" select="111"/>
  3049. <xsl:param name="centimeter-in-mm" select="10"/>
  3050. <xsl:param name="inch-in-mm" select="25.4"/>
  3051. <xsl:param name="didot-point-in-mm" select="0.376065"/>
  3052. <xsl:param name="pica-in-mm" select="4.2333333"/>
  3053. <xsl:param name="point-in-mm" select="0.3527778"/>
  3054. <xsl:param name="twip-in-mm" select="0.017636684"/>
  3055. <xsl:param name="pixel-in-mm" select="$inch-in-mm div $dpi"/>
  3056. <!-- ***** MEASUREMENT CONVERSIONS *****
  3057. PARAM 'value'
  3058. The measure to be converted.
  3059. The current measure is judged by a substring (e.g. 'mm', 'cm', 'in', 'pica'...)
  3060. directly added to the number.
  3061. PARAM 'rounding-factor'
  3062. Is used for the rounding of decimal places.
  3063. The parameter number is the product of 1 and some '10', where
  3064. every zero represents a decimal place.
  3065. For example, providing as parameter:
  3066. <xsl:param name="rounding-factor" select="10000" />
  3067. Gives by default four decimal places.
  3068. To round two decimal places, basically the following is done:
  3069. <xsl:value-of select="round(100 * value) div 100"/>
  3070. RETURN The converted number, by default rounded to four decimal places.
  3071. In case the input measure could not be matched the same value is
  3072. returned and a warning message is written out.
  3073. MEASURE LIST:
  3074. * 1 millimeter (mm), the basic measure
  3075. * 1 centimeter (cm) = 10 mm
  3076. * 1 inch (in) = 25.4 mm
  3077. While the English have already seen the light (read: the metric system), the US
  3078. remains loyal to this medieval system.
  3079. * 1 point (pt) = 0.35277777.. mm
  3080. Sometimes called PostScript point (ppt), as when Adobe created PostScript, they added their own system of points.
  3081. There are exactly 72 PostScript points in 1 inch.
  3082. * 1 twip = twentieth of a (PostScript) point
  3083. A twip (twentieth of a point) is a 1/20th of a PostScript point, a traditional measure in printing.
  3084. * 1 didot point (dpt) = 0.376065 mm
  3085. Didot point after the French typographer Firmin Didot (1764-1836).
  3086. More details under
  3087. http://www.unc.edu/~rowlett/units/dictP.html:
  3088. "A unit of length used by typographers and printers. When printing was done
  3089. from hand-set metal type, one point represented the smallest element of type
  3090. that could be handled, roughly 1/64 inch. Eventually, the point was standardized
  3091. in Britain and America as exactly 1/72.27 = 0.013 837 inch, which is
  3092. about 0.35 mm (351.46 micrometers). In continental Europe, typographers
  3093. traditionally used a slightly larger point of 0.014 83 inch (about
  3094. 1/72 pouce, 0.377 mm, or roughly 1/67 English inch), called a Didot point
  3095. after the French typographer Firmin Didot (1764-1836). In the U.S.,
  3096. Adobe software defines the point to be exactly 1/72 inch (0.013 888 9 inch
  3097. or 0.352 777 8 millimeters) and TeX software uses a slightly smaller point
  3098. of 0.351 459 8035 mm. The German standards agency DIN has proposed that
  3099. all these units be replaced by multiples of 0.25 millimeters (1/101.6 inch).
  3100. * 1 pica = 4.233333 mm
  3101. 1/6 inch or 12 points
  3102. * 1 pixel (px) = 0.26458333.. mm (relative to 'DPI', here: 96 dpi)
  3103. Most pictures have the 96 dpi resolution, but the dpi variable may vary by stylesheet parameter
  3104. -->
  3105. <!-- changing measure to mm -->
  3106. <xsl:template name="convert2mm">
  3107. <xsl:param name="value"/>
  3108. <xsl:param name="rounding-factor" select="10000"/>
  3109. <xsl:choose>
  3110. <xsl:when test="contains($value, 'mm')">
  3111. <xsl:value-of select="substring-before($value, 'mm')"/>
  3112. </xsl:when>
  3113. <xsl:when test="contains($value, 'cm')">
  3114. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm' ) * $centimeter-in-mm)) div $rounding-factor"/>
  3115. </xsl:when>
  3116. <xsl:when test="contains($value, 'in')">
  3117. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in' ) * $inch-in-mm)) div $rounding-factor"/>
  3118. </xsl:when>
  3119. <xsl:when test="contains($value, 'pt')">
  3120. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') * $point-in-mm)) div $rounding-factor"/>
  3121. </xsl:when>
  3122. <xsl:when test="contains($value, 'twip')">
  3123. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') * $twip-in-mm)) div $rounding-factor"/>
  3124. </xsl:when>
  3125. <xsl:when test="contains($value, 'dpt')">
  3126. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') * $didot-point-in-mm)) div $rounding-factor"/>
  3127. </xsl:when>
  3128. <xsl:when test="contains($value, 'pica')">
  3129. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') * $pica-in-mm)) div $rounding-factor"/>
  3130. </xsl:when>
  3131. <xsl:when test="contains($value, 'px')">
  3132. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') * $pixel-in-mm)) div $rounding-factor"/>
  3133. </xsl:when>
  3134. <xsl:otherwise>
  3135. <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'mm'!</xsl:message>
  3136. <xsl:value-of select="$value"/>
  3137. </xsl:otherwise>
  3138. </xsl:choose>
  3139. </xsl:template>
  3140. <!-- changing measure to cm -->
  3141. <xsl:template name="convert2cm">
  3142. <xsl:param name="value"/>
  3143. <xsl:param name="rounding-factor" select="10000"/>
  3144. <xsl:choose>
  3145. <xsl:when test="contains($value, 'mm')">
  3146. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $centimeter-in-mm)) div $rounding-factor"/>
  3147. </xsl:when>
  3148. <xsl:when test="contains($value, 'cm')">
  3149. <xsl:value-of select="substring-before($value, 'cm')"/>
  3150. </xsl:when>
  3151. <xsl:when test="contains($value, 'in')">
  3152. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $centimeter-in-mm * $inch-in-mm)) div $rounding-factor"/>
  3153. </xsl:when>
  3154. <xsl:when test="contains($value, 'pt')">
  3155. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $centimeter-in-mm * $point-in-mm)) div $rounding-factor"/>
  3156. </xsl:when>
  3157. <xsl:when test="contains($value, 'dpt')">
  3158. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $centimeter-in-mm * $didot-point-in-mm)) div $rounding-factor"/>
  3159. </xsl:when>
  3160. <xsl:when test="contains($value, 'pica')">
  3161. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $centimeter-in-mm * $pica-in-mm)) div $rounding-factor"/>
  3162. </xsl:when>
  3163. <xsl:when test="contains($value, 'twip')">
  3164. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $centimeter-in-mm * $twip-in-mm)) div $rounding-factor"/>
  3165. </xsl:when>
  3166. <xsl:when test="contains($value, 'px')">
  3167. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $centimeter-in-mm * $pixel-in-mm)) div $rounding-factor"/>
  3168. </xsl:when>
  3169. <xsl:otherwise>
  3170. <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'cm'!</xsl:message>
  3171. <xsl:value-of select="$value"/>
  3172. </xsl:otherwise>
  3173. </xsl:choose>
  3174. </xsl:template>
  3175. <!-- changing measure to inch (cp. section comment) -->
  3176. <xsl:template name="convert2in">
  3177. <xsl:param name="value"/>
  3178. <xsl:param name="rounding-factor" select="10000"/>
  3179. <xsl:choose>
  3180. <xsl:when test="contains($value, 'mm')">
  3181. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $inch-in-mm)) div $rounding-factor"/>
  3182. </xsl:when>
  3183. <xsl:when test="contains($value, 'cm')">
  3184. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $inch-in-mm * $centimeter-in-mm)) div $rounding-factor"/>
  3185. </xsl:when>
  3186. <xsl:when test="contains($value, 'in')">
  3187. <xsl:value-of select="substring-before($value, 'in')"/>
  3188. </xsl:when>
  3189. <xsl:when test="contains($value, 'pt')">
  3190. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $inch-in-mm * $point-in-mm)) div $rounding-factor"/>
  3191. </xsl:when>
  3192. <xsl:when test="contains($value, 'dpt')">
  3193. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $inch-in-mm * $didot-point-in-mm)) div $rounding-factor"/>
  3194. </xsl:when>
  3195. <xsl:when test="contains($value, 'pica')">
  3196. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $inch-in-mm * $pica-in-mm)) div $rounding-factor"/>
  3197. </xsl:when>
  3198. <xsl:when test="contains($value, 'twip')">
  3199. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $inch-in-mm * $twip-in-mm)) div $rounding-factor"/>
  3200. </xsl:when>
  3201. <xsl:when test="contains($value, 'px')">
  3202. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $inch-in-mm * $pixel-in-mm)) div $rounding-factor"/>
  3203. </xsl:when>
  3204. <xsl:otherwise>
  3205. <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'in'!</xsl:message>
  3206. <xsl:value-of select="$value"/>
  3207. </xsl:otherwise>
  3208. </xsl:choose>
  3209. </xsl:template>
  3210. <!-- changing measure to dpt (cp. section comment) -->
  3211. <xsl:template name="convert2dpt">
  3212. <xsl:param name="value"/>
  3213. <xsl:param name="rounding-factor" select="10000"/>
  3214. <xsl:choose>
  3215. <xsl:when test="contains($value, 'mm')">
  3216. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $didot-point-in-mm)) div $rounding-factor"/>
  3217. </xsl:when>
  3218. <xsl:when test="contains($value, 'cm')">
  3219. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $didot-point-in-mm * $centimeter-in-mm)) div $rounding-factor"/>
  3220. </xsl:when>
  3221. <xsl:when test="contains($value, 'in')">
  3222. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $didot-point-in-mm * $inch-in-mm)) div $rounding-factor"/>
  3223. </xsl:when>
  3224. <xsl:when test="contains($value, 'pt')">
  3225. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $didot-point-in-mm * $point-in-mm)) div $rounding-factor"/>
  3226. </xsl:when>
  3227. <xsl:when test="contains($value, 'dpt')">
  3228. <xsl:value-of select="substring-before($value, 'dpt')"/>
  3229. </xsl:when>
  3230. <xsl:when test="contains($value, 'pica')">
  3231. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $didot-point-in-mm * $pica-in-mm)) div $rounding-factor"/>
  3232. </xsl:when>
  3233. <xsl:when test="contains($value, 'twip')">
  3234. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $didot-point-in-mm * $twip-in-mm)) div $rounding-factor"/>
  3235. </xsl:when>
  3236. <xsl:when test="contains($value, 'px')">
  3237. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $didot-point-in-mm * $pixel-in-mm)) div $rounding-factor"/>
  3238. </xsl:when>
  3239. <xsl:otherwise>
  3240. <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'dpt'!</xsl:message>
  3241. <xsl:value-of select="$value"/>
  3242. </xsl:otherwise>
  3243. </xsl:choose>
  3244. </xsl:template>
  3245. <!-- changing measure to pica (cp. section comment) -->
  3246. <xsl:template name="convert2pica">
  3247. <xsl:param name="value"/>
  3248. <xsl:param name="rounding-factor" select="10000"/>
  3249. <xsl:choose>
  3250. <xsl:when test="contains($value, 'mm')">
  3251. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $pica-in-mm)) div $rounding-factor"/>
  3252. </xsl:when>
  3253. <xsl:when test="contains($value, 'cm')">
  3254. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $pica-in-mm * $centimeter-in-mm)) div $rounding-factor"/>
  3255. </xsl:when>
  3256. <xsl:when test="contains($value, 'in')">
  3257. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $pica-in-mm * $inch-in-mm)) div $rounding-factor"/>
  3258. </xsl:when>
  3259. <xsl:when test="contains($value, 'pt')">
  3260. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $pica-in-mm * $point-in-mm)) div $rounding-factor"/>
  3261. </xsl:when>
  3262. <xsl:when test="contains($value, 'dpt')">
  3263. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $pica-in-mm * $didot-point-in-mm)) div $rounding-factor"/>
  3264. </xsl:when>
  3265. <xsl:when test="contains($value, 'pica')">
  3266. <xsl:value-of select="substring-before($value, 'pica')"/>
  3267. </xsl:when>
  3268. <xsl:when test="contains($value, 'twip')">
  3269. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $pica-in-mm * $twip-in-mm)) div $rounding-factor"/>
  3270. </xsl:when>
  3271. <xsl:when test="contains($value, 'px')">
  3272. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $pica-in-mm * $pixel-in-mm)) div $rounding-factor"/>
  3273. </xsl:when>
  3274. <xsl:otherwise>
  3275. <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'pica'!</xsl:message>
  3276. <xsl:value-of select="$value"/>
  3277. </xsl:otherwise>
  3278. </xsl:choose>
  3279. </xsl:template>
  3280. <!-- changing measure to pt (cp. section comment) -->
  3281. <xsl:template name="convert2pt">
  3282. <xsl:param name="value"/>
  3283. <xsl:param name="rounding-factor" select="10000"/>
  3284. <xsl:choose>
  3285. <xsl:when test="contains($value, 'mm')">
  3286. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $point-in-mm)) div $rounding-factor"/>
  3287. </xsl:when>
  3288. <xsl:when test="contains($value, 'cm')">
  3289. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $point-in-mm * $centimeter-in-mm)) div $rounding-factor"/>
  3290. </xsl:when>
  3291. <xsl:when test="contains($value, 'in')">
  3292. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $point-in-mm * $inch-in-mm)) div $rounding-factor"/>
  3293. </xsl:when>
  3294. <xsl:when test="contains($value, 'pt')">
  3295. <xsl:value-of select="substring-before($value, 'pt')"/>
  3296. </xsl:when>
  3297. <xsl:when test="contains($value, 'dpt')">
  3298. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $point-in-mm * $didot-point-in-mm)) div $rounding-factor"/>
  3299. </xsl:when>
  3300. <xsl:when test="contains($value, 'pica')">
  3301. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $point-in-mm * $pica-in-mm)) div $rounding-factor"/>
  3302. </xsl:when>
  3303. <xsl:when test="contains($value, 'twip')">
  3304. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $point-in-mm * $twip-in-mm)) div $rounding-factor"/>
  3305. </xsl:when>
  3306. <xsl:when test="contains($value, 'px')">
  3307. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $point-in-mm * $pixel-in-mm)) div $rounding-factor"/>
  3308. </xsl:when>
  3309. <xsl:otherwise>
  3310. <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'pt'!</xsl:message>
  3311. <xsl:value-of select="$value"/>
  3312. </xsl:otherwise>
  3313. </xsl:choose>
  3314. </xsl:template>
  3315. <xsl:template name="编号解析">
  3316. <xsl:variable name="bianhao">
  3317. <xsl:value-of select="字:段落属性/字:自动编号信息/@字:编号引用"/>
  3318. </xsl:variable>
  3319. <xsl:variable name="bianhaojibie">
  3320. <xsl:value-of select="字:段落属性/字:自动编号信息/@字:编号级别"/>
  3321. </xsl:variable>
  3322. <xsl:variable name="isxiangmuorisimage">
  3323. <xsl:for-each select="/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号">
  3324. <xsl:choose>
  3325. <xsl:when test="$bianhao=@字:标识符">
  3326. <xsl:choose>
  3327. <xsl:when test="字:级别[@字:级别值= (number($bianhaojibie))]/字:项目符号">true</xsl:when>
  3328. <xsl:when test="字:级别[@字:级别值= (number($bianhaojibie))]/字:图片符号引用">true</xsl:when>
  3329. <xsl:otherwise>false</xsl:otherwise>
  3330. </xsl:choose>
  3331. </xsl:when>
  3332. <xsl:otherwise>false</xsl:otherwise>
  3333. </xsl:choose>
  3334. </xsl:for-each>
  3335. </xsl:variable>
  3336. <xsl:choose>
  3337. <xsl:when test="$isxiangmuorisimage='true'">
  3338. <xsl:call-template name="无序"/>
  3339. </xsl:when>
  3340. <xsl:otherwise>
  3341. <xsl:call-template name="有序"/>
  3342. </xsl:otherwise>
  3343. </xsl:choose>
  3344. </xsl:template>
  3345. <xsl:template name="有序">
  3346. <xsl:variable name="currlistid" select="字:段落属性/字:自动编号信息/@字:编号引用"/>
  3347. <xsl:variable name="currlistlvl" select="字:段落属性/字:自动编号信息/@字:编号级别"/>
  3348. <xsl:variable name="firstoccur" select="/descendant::字:段落属性[字:自动编号信息/@字:编号引用 = $currlistid][1]"/>
  3349. <xsl:element name="text:list">
  3350. <xsl:attribute name="text:style-name">List<xsl:value-of select="count($firstoccur/preceding::字:自动编号信息)"/></xsl:attribute>
  3351. <xsl:if test="字:段落属性/字:自动编号信息/@字:重新编号">
  3352. <xsl:attribute name="text:continue-numbering"><xsl:choose><xsl:when test="字:段落属性/字:自动编号信息/@字:重新编号='true'">false</xsl:when><xsl:otherwise>true</xsl:otherwise></xsl:choose></xsl:attribute>
  3353. </xsl:if>
  3354. <xsl:element name="text:list-item">
  3355. <xsl:call-template name="ordered-levels">
  3356. <xsl:with-param name="level" select="$currlistlvl -1"/>
  3357. </xsl:call-template>
  3358. </xsl:element>
  3359. </xsl:element>
  3360. </xsl:template>
  3361. <xsl:template name="ordered-levels">
  3362. <xsl:param name="level"/>
  3363. <xsl:choose>
  3364. <xsl:when test="$level = '0'">
  3365. <xsl:call-template name="commonParagraph"/>
  3366. </xsl:when>
  3367. <xsl:otherwise>
  3368. <xsl:element name="text:list">
  3369. <xsl:element name="text:list-item">
  3370. <xsl:call-template name="ordered-levels">
  3371. <xsl:with-param name="level" select="$level -1"/>
  3372. </xsl:call-template>
  3373. </xsl:element>
  3374. </xsl:element>
  3375. </xsl:otherwise>
  3376. </xsl:choose>
  3377. </xsl:template>
  3378. <xsl:template name="无序">
  3379. <xsl:variable name="currlistid" select="字:段落属性/字:自动编号信息/@字:编号引用"/>
  3380. <xsl:variable name="currlistlvl" select="字:段落属性/字:自动编号信息/@字:编号级别"/>
  3381. <xsl:variable name="firstoccur" select="/descendant::字:段落属性[字:自动编号信息/@字:编号引用 = $currlistid][1]"/>
  3382. <xsl:element name="text:list">
  3383. <xsl:attribute name="text:style-name">List<xsl:value-of select="count($firstoccur/preceding::字:自动编号信息)"/></xsl:attribute>
  3384. <xsl:element name="text:list-item">
  3385. <xsl:call-template name="unordered-levels">
  3386. <xsl:with-param name="level" select="$currlistlvl -1"/>
  3387. </xsl:call-template>
  3388. </xsl:element>
  3389. </xsl:element>
  3390. </xsl:template>
  3391. <xsl:template name="unordered-levels">
  3392. <xsl:param name="level"/>
  3393. <xsl:choose>
  3394. <xsl:when test="$level = '0'">
  3395. <xsl:call-template name="commonParagraph"/>
  3396. </xsl:when>
  3397. <xsl:otherwise>
  3398. <xsl:element name="text:list">
  3399. <xsl:element name="text:list-item">
  3400. <xsl:call-template name="unordered-levels">
  3401. <xsl:with-param name="level" select="$level -1"/>
  3402. </xsl:call-template>
  3403. </xsl:element>
  3404. </xsl:element>
  3405. </xsl:otherwise>
  3406. </xsl:choose>
  3407. </xsl:template>
  3408. <!-- changing measure to pt (cp. section comment) -->
  3409. <xsl:template name="convert2twip">
  3410. <xsl:param name="value"/>
  3411. <xsl:param name="rounding-factor" select="10000"/>
  3412. <xsl:choose>
  3413. <xsl:when test="contains($value, 'mm')">
  3414. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $twip-in-mm)) div $rounding-factor"/>
  3415. </xsl:when>
  3416. <xsl:when test="contains($value, 'cm')">
  3417. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $twip-in-mm * $centimeter-in-mm)) div $rounding-factor"/>
  3418. </xsl:when>
  3419. <xsl:when test="contains($value, 'in')">
  3420. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $twip-in-mm * $inch-in-mm)) div $rounding-factor"/>
  3421. </xsl:when>
  3422. <xsl:when test="contains($value, 'pt')">
  3423. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $twip-in-mm * $point-in-mm)) div $rounding-factor"/>
  3424. </xsl:when>
  3425. <xsl:when test="contains($value, 'dpt')">
  3426. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $twip-in-mm * $didot-point-in-mm)) div $rounding-factor"/>
  3427. </xsl:when>
  3428. <xsl:when test="contains($value, 'pica')">
  3429. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $twip-in-mm * $pica-in-mm)) div $rounding-factor"/>
  3430. </xsl:when>
  3431. <xsl:when test="contains($value, 'twip')">
  3432. <xsl:value-of select="substring-before($value, 'twip')"/>
  3433. </xsl:when>
  3434. <xsl:when test="contains($value, 'px')">
  3435. <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $twip-in-mm * $pixel-in-mm)) div $rounding-factor"/>
  3436. </xsl:when>
  3437. <xsl:otherwise>
  3438. <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'twip'!</xsl:message>
  3439. <xsl:value-of select="$value"/>
  3440. </xsl:otherwise>
  3441. </xsl:choose>
  3442. </xsl:template>
  3443. <!-- changing measure to pixel by via parameter provided dpi (dots per inch) standard factor (cp. section comment) -->
  3444. <xsl:template name="convert2px">
  3445. <xsl:param name="value"/>
  3446. <xsl:choose>
  3447. <xsl:when test="contains($value, 'mm')">
  3448. <xsl:value-of select="round(number(substring-before($value, 'mm')) div $pixel-in-mm)"/>
  3449. </xsl:when>
  3450. <xsl:when test="contains($value, 'cm')">
  3451. <xsl:value-of select="round(number(substring-before($value, 'cm')) div $pixel-in-mm * $centimeter-in-mm)"/>
  3452. </xsl:when>
  3453. <xsl:when test="contains($value, 'in')">
  3454. <xsl:value-of select="round(number(substring-before($value, 'in')) div $pixel-in-mm * $inch-in-mm)"/>
  3455. </xsl:when>
  3456. <xsl:when test="contains($value, 'pt')">
  3457. <xsl:value-of select="round(number(substring-before($value, 'pt')) div $pixel-in-mm * $point-in-mm)"/>
  3458. </xsl:when>
  3459. <xsl:when test="contains($value, 'dpt')">
  3460. <xsl:value-of select="round(number(substring-before($value, 'dpt')) div $pixel-in-mm * $didot-point-in-mm)"/>
  3461. </xsl:when>
  3462. <xsl:when test="contains($value, 'pica')">
  3463. <xsl:value-of select="round(number(substring-before($value, 'pica')) div $pixel-in-mm * $pica-in-mm)"/>
  3464. </xsl:when>
  3465. <xsl:when test="contains($value, 'twip')">
  3466. <xsl:value-of select="round(number(substring-before($value, 'twip')) div $pixel-in-mm * $twip-in-mm)"/>
  3467. </xsl:when>
  3468. <xsl:when test="contains($value, 'px')">
  3469. <xsl:value-of select="$value"/>
  3470. </xsl:when>
  3471. <xsl:otherwise>
  3472. <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'px'!</xsl:message>
  3473. <xsl:value-of select="$value"/>
  3474. </xsl:otherwise>
  3475. </xsl:choose>
  3476. </xsl:template>
  3477. </xsl:stylesheet>