| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- -->
- <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">
- <xsl:output method="xml" indent="no" encoding="UTF-8" version="1.0"/>
- <xsl:template match="uof:UOF">
- <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">
- <xsl:apply-templates select="uof:元数据"/>
- <office:settings>
- <xsl:variable name="PageNumberFormat" select="/uof:UOF/uof:演示文稿/演:公用处理规则/演:页面设置集/演:页面设置/演:页码格式[1]"/>
- <xsl:variable name="proportion">
- <xsl:value-of select="substring-before(/uof:UOF/uof:演示文稿/演:公用处理规则/演:显示比例,'%')"/>
- </xsl:variable>
- <config:config-item-set config:name="ooo:view-settings">
- <config:config-item config:name="VisibleAreaTop" config:type="int">0</config:config-item>
- <config:config-item config:name="VisibleAreaLeft" config:type="int">0</config:config-item>
- <config:config-item config:name="VisibleAreaWidth" config:type="int">14098</config:config-item>
- <config:config-item config:name="VisibleAreaHeight" config:type="int">9998</config:config-item>
- <config:config-item-map-indexed config:name="Views">
- <config:config-item-map-entry>
- <config:config-item config:name="ViewId" config:type="string">view1</config:config-item>
- <config:config-item config:name="GridIsVisible" config:type="boolean">false</config:config-item>
- <config:config-item config:name="GridIsFront" config:type="boolean">false</config:config-item>
- <config:config-item config:name="IsSnapToGrid" config:type="boolean">true</config:config-item>
- <config:config-item config:name="IsSnapToPageMargins" config:type="boolean">true</config:config-item>
- <config:config-item config:name="IsSnapToSnapLines" config:type="boolean">false</config:config-item>
- <config:config-item config:name="IsSnapToObjectFrame" config:type="boolean">false</config:config-item>
- <config:config-item config:name="IsSnapToObjectPoints" config:type="boolean">false</config:config-item>
- <config:config-item config:name="IsPlusHandlesAlwaysVisible" config:type="boolean">false</config:config-item>
- <config:config-item config:name="IsFrameDragSingles" config:type="boolean">true</config:config-item>
- <config:config-item config:name="EliminatePolyPointLimitAngle" config:type="int">1500</config:config-item>
- <config:config-item config:name="IsEliminatePolyPoints" config:type="boolean">false</config:config-item>
- <config:config-item config:name="VisibleLayers" config:type="base64Binary">//////////////////////////////////////////8=</config:config-item>
- <config:config-item config:name="PrintableLayers" config:type="base64Binary">//////////////////////////////////////////8=</config:config-item>
- <config:config-item config:name="LockedLayers" config:type="base64Binary"/>
- <config:config-item config:name="NoAttribs" config:type="boolean">false</config:config-item>
- <config:config-item config:name="NoColors" config:type="boolean">true</config:config-item>
- <config:config-item config:name="RulerIsVisible" config:type="boolean">false</config:config-item>
- <config:config-item config:name="PageKind" config:type="short">0</config:config-item>
- <config:config-item config:name="SelectedPage" config:type="short">0</config:config-item>
- <config:config-item config:name="IsLayerMode" config:type="boolean">false</config:config-item>
- <config:config-item config:name="IsDoubleClickTextEdit" config:type="boolean">true</config:config-item>
- <config:config-item config:name="IsClickChangeRotation" config:type="boolean">false</config:config-item>
- <config:config-item config:name="SlidesPerRow" config:type="short">4</config:config-item>
- <config:config-item config:name="EditModeStandard" config:type="int">0</config:config-item>
- <config:config-item config:name="EditModeNotes" config:type="int">0</config:config-item>
- <config:config-item config:name="EditModeHandout" config:type="int">1</config:config-item>
- <config:config-item config:name="VisibleAreaTop" config:type="int">-5402</config:config-item>
- <config:config-item config:name="VisibleAreaLeft" config:type="int">-441</config:config-item>
- <config:config-item config:name="VisibleAreaWidth" config:type="int">
- <xsl:value-of select="(100*13997) div $proportion"/>
- </config:config-item>
- <config:config-item config:name="VisibleAreaHeight" config:type="int">
- <xsl:value-of select="(100*15426) div $proportion"/>
- </config:config-item>
- <config:config-item config:name="GridCoarseWidth" config:type="int">1000</config:config-item>
- <config:config-item config:name="GridCoarseHeight" config:type="int">1000</config:config-item>
- <config:config-item config:name="GridFineWidth" config:type="int">500</config:config-item>
- <config:config-item config:name="GridFineHeight" config:type="int">500</config:config-item>
- <config:config-item config:name="GridSnapWidth" config:type="int">1000</config:config-item>
- <config:config-item config:name="GridSnapHeight" config:type="int">1000</config:config-item>
- <config:config-item config:name="GridSnapWidthXNumerator" config:type="int">500</config:config-item>
- <config:config-item config:name="GridSnapWidthXDenominator" config:type="int">1</config:config-item>
- <config:config-item config:name="GridSnapWidthYNumerator" config:type="int">500</config:config-item>
- <config:config-item config:name="GridSnapWidthYDenominator" config:type="int">1</config:config-item>
- <config:config-item config:name="IsAngleSnapEnabled" config:type="boolean">false</config:config-item>
- <config:config-item config:name="SnapAngle" config:type="int">1500</config:config-item>
- <config:config-item config:name="ZoomOnPage" config:type="boolean">true</config:config-item>
- </config:config-item-map-entry>
- </config:config-item-map-indexed>
- </config:config-item-set>
- <config:config-item-set config:name="ooo:configuration-settings">
- <config:config-item config:name="PageNumberFormat" config:type="int">
- <xsl:choose>
- <xsl:when test="/uof:UOF/uof:演示文稿/演:公用处理规则/演:页面设置集/演:页面设置/演:页码格式">
- <xsl:choose>
- <xsl:when test="$PageNumberFormat='upper-letter'">0</xsl:when>
- <xsl:when test="$PageNumberFormat='lower-letter'">1</xsl:when>
- <xsl:when test="$PageNumberFormat='upper-roman'">2</xsl:when>
- <xsl:when test="$PageNumberFormat='lower-letter'">3</xsl:when>
- <xsl:when test="$PageNumberFormat='decimal'">4</xsl:when>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>5</xsl:otherwise>
- </xsl:choose>
- </config:config-item>
- </config:config-item-set>
- </office:settings>
- <office:scripts/>
- <xsl:element name="office:font-face-decls">
- <style:font-face style:name="宋体" svg:font-family="宋体" style:font-family-generic="swiss" style:font-pitch="variable"/>
- <xsl:apply-templates select="uof:式样集/uof:字体集"/>
- </xsl:element>
- <office:styles>
- <xsl:apply-templates select="uof:演示文稿/演:公用处理规则/演:页面版式集/演:页面版式"/>
- <xsl:call-template name="编号字体"/>
- <xsl:for-each select="uof:式样集/uof:段落式样">
- <xsl:variable name="outline" select="@字:标识符"/>
- <xsl:choose>
- <xsl:when test="/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号[@字:标识符=$outline]">
- <xsl:call-template name="段落式样"/>
- </xsl:when>
- <xsl:when test="contains($outline,'outline')">
- <xsl:call-template name="段落式样"/>
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- </office:styles>
- <office:automatic-styles>
- <xsl:apply-templates select="uof:演示文稿/演:公用处理规则/演:配色方案集/演:配色方案"/>
- <xsl:apply-templates select="uof:式样集/uof:句式样"/>
- <xsl:for-each select="uof:式样集/uof:段落式样">
- <xsl:variable name="outline" select="@字:标识符"/>
- <xsl:if test="not(/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号[@字:标识符=$outline]) and not(contains($outline,'outline'))">
- <xsl:call-template name="段落式样"/>
- </xsl:if>
- </xsl:for-each>
- <xsl:apply-templates select="uof:对象集"/>
- <xsl:call-template name="create-page-master">
- <xsl:with-param name="impressoptions" select="uof:演示文稿/演:公用处理规则/演:页面设置集/演:页面设置"/>
- </xsl:call-template>
- <xsl:for-each select="/uof:UOF/uof:对象集/图:图形/图:文本内容/字:段落/字:段落属性/字:自动编号信息">
- <xsl:variable name="currlistid" select="@字:编号引用"/>
- <xsl:variable name="currlist" select="."/>
- <xsl:variable name="rootlist" select="/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号[@字:标识符 =$currlistid]"/>
- <xsl:if test="not(ancestor::字:段落/preceding-sibling::字:段落[1]/字:段落属性/字:自动编号信息/@字:编号引用= $currlistid)">
- <xsl:element name="text:list-style">
- <xsl:attribute name="style:name">List<xsl:value-of select="count(preceding::字:自动编号信息)"/></xsl:attribute>
- <xsl:for-each select="$rootlist">
- <xsl:call-template name="自动编号"/>
- </xsl:for-each>
- </xsl:element>
- </xsl:if>
- </xsl:for-each>
- </office:automatic-styles>
- <office:master-styles>
- <xsl:apply-templates select="uof:演示文稿/演:主体/演:母版集"/>
- </office:master-styles>
- <office:body>
- <office:presentation>
- <xsl:apply-templates select="uof:演示文稿/演:主体/演:幻灯片集"/>
- <xsl:apply-templates select="uof:演示文稿/演:公用处理规则/演:放映设置"/>
- </office:presentation>
- </office:body>
- </office:document>
- </xsl:template>
- <xsl:template match="演:放映设置">
- <presentation:settings>
- <xsl:variable name="start-page">
- <xsl:choose>
- <xsl:when test="contains(演:幻灯片序列,' ')">
- <xsl:value-of select="substring-before(演:幻灯片序列,' ')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="演:幻灯片序列"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="first-page">
- <xsl:value-of select="/uof:UOF/uof:演示文稿/演:主体/演:幻灯片集/演:幻灯片[1]/@演:名称"/>
- </xsl:variable>
- <xsl:if test="not($start-page = $first-page)">
- <xsl:attribute name="presentation:start-page"><xsl:value-of select="$start-page"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="演:全屏放映='false'">
- <xsl:attribute name="presentation:full-screen">false</xsl:attribute>
- </xsl:if>
- <xsl:if test="演:循环放映='true'">
- <xsl:attribute name="presentation:endless">true</xsl:attribute>
- </xsl:if>
- <xsl:if test="演:放映间隔">
- <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>
- </xsl:if>
- <xsl:if test="演:手动方式='true'">
- <xsl:attribute name="presentation:force-manual">true</xsl:attribute>
- </xsl:if>
- <xsl:if test="演:导航帮助='true'">
- <xsl:attribute name="presentation:start-with-navigator">true</xsl:attribute>
- </xsl:if>
- <xsl:if test="演:放映动画='false'">
- <xsl:attribute name="presentation:animations">disabled</xsl:attribute>
- </xsl:if>
- <xsl:if test="演:前端显示='true'">
- <xsl:attribute name="presentation:stay-on-top">true</xsl:attribute>
- </xsl:if>
- </presentation:settings>
- </xsl:template>
- <xsl:template name="自动编号">
- <xsl:for-each select="字:级别">
- <xsl:choose>
- <xsl:when test="字:项目符号">
- <xsl:call-template name="xiangmufuhao">
- <xsl:with-param name="biaoshifu" select="../@字:标识符"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="字:图片符号引用">
- <xsl:call-template name="imagefuhao">
- <xsl:with-param name="biaoshifu" select="../@字:标识符"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="jibianhao">
- <xsl:with-param name="biaoshifu" select="../@字:标识符"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="编号字体">
- <xsl:for-each select="/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号">
- <xsl:if test="字:级别/字:符号字体">
- <xsl:element name="style:style">
- <xsl:attribute name="style:name"><xsl:value-of select="concat( @字:标识符,字:级别/@字:级别值)"/></xsl:attribute>
- <xsl:attribute name="style:family">text</xsl:attribute>
- <xsl:element name="style:text-properties">
- <xsl:attribute name="fo:color"><xsl:value-of select="字:级别/字:符号字体/字:字体/@字:颜色"/></xsl:attribute>
- <xsl:if test="字:级别/字:符号字体/字:粗体 and 字:级别/字:符号字体/字:粗体/@字:值='true'">
- <xsl:attribute name="fo:font-weight">bold</xsl:attribute>
- <xsl:attribute name="style:font-style-asian">bold</xsl:attribute>
- </xsl:if>
- <xsl:variable name="ziti">
- <xsl:value-of select="字:级别/字:符号字体/字:字体/@字:中文字体引用"/>
- </xsl:variable>
- <xsl:for-each select="/uof:UOF/uof:式样集/uof:字体集/uof:字体声明">
- <xsl:if test="@uof:标识符=$ziti">
- <xsl:attribute name="style:font-name"><xsl:value-of select="@uof:名称"/></xsl:attribute>
- </xsl:if>
- </xsl:for-each>
- <xsl:attribute name="fo:font-style">normal</xsl:attribute>
- <xsl:attribute name="style:font-weight-asian">normal</xsl:attribute>
- </xsl:element>
- </xsl:element>
- </xsl:if>
- </xsl:for-each>
- </xsl:template>
- <xsl:template match="uof:对象集">
- <xsl:apply-templates select="图:图形"/>
- <xsl:apply-templates select="图:图形/图:文本内容/字:段落/字:句/字:句属性" mode="style"/>
- </xsl:template>
- <xsl:variable name="uofUnit">
- <xsl:variable name="uu">
- <xsl:value-of select="/uof:UOF/uof:演示文稿/演:公用处理规则/演:度量单位"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$uu='cm'">cm</xsl:when>
- <xsl:when test="$uu='mm'">mm</xsl:when>
- <xsl:when test="$uu='pt'">pt</xsl:when>
- <xsl:when test="$uu='inch'">inch</xsl:when>
- <xsl:otherwise>pt</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="other-to-cm-conversion-factor">
- <xsl:choose>
- <xsl:when test="$uofUnit='cm'">1</xsl:when>
- <xsl:when test="$uofUnit='mm'">0.1</xsl:when>
- <xsl:when test="$uofUnit='pt'">0.03527</xsl:when>
- <xsl:when test="$uofUnit='inch'">2.54</xsl:when>
- <xsl:when test="$uofUnit='pica'">0.4233</xsl:when>
- <xsl:otherwise>1</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:key match="/uof:UOF/uof:演示文稿/演:主体/演:母版集/演:母版/uof:锚点 | /uof:UOF/uof:演示文稿/演:主体/演:幻灯片集/演:幻灯片/uof:锚点 | /uof:UOF/uof:演示文稿/演:主体/演:幻灯片集/演:幻灯片/演:幻灯片备注/uof:锚点" name="rel_graphic_name" use="@uof:图形引用"/>
- <xsl:template match="图:图形">
- <xsl:variable name="random-name">
- <xsl:value-of select="generate-id()"/>
- </xsl:variable>
- <xsl:variable name="draw-name">
- <xsl:value-of select="substring($random-name,string-length($random-name)-1)"/>
- </xsl:variable>
- <xsl:call-template name="graphic-fill">
- <xsl:with-param name="draw-name" select="$draw-name"/>
- <xsl:with-param name="gradient-name" select="图:预定义图形/图:属性/图:填充/图:渐变"/>
- </xsl:call-template>
- <xsl:variable name="biaozhifu" select="@图:标识符"/>
- <xsl:choose>
- <xsl:when test="图:预定义图形/图:属性/图:填充/图:渐变">
- <xsl:element name="style:style">
- <xsl:attribute name="style:name"><xsl:value-of select="@图:标识符"/></xsl:attribute>
- <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>
- <xsl:if test="/uof:UOF/uof:演示文稿/演:主体/演:母版集/演:母版/uof:锚点[@uof:图形引用=$biaozhifu]">
- <xsl:variable name="duan" select="图:文本内容/字:段落/字:段落属性/@字:式样引用"/>
- <xsl:attribute name="style:parent-style-name"><xsl:value-of select="/uof:UOF/uof:式样集/uof:段落式样[@字:标识符=$duan]/@字:基式样引用"/></xsl:attribute>
- </xsl:if>
- <xsl:element name="style:graphic-properties">
- <xsl:call-template name="process-graphics">
- <xsl:with-param name="draw-name" select="$draw-name"/>
- </xsl:call-template>
- </xsl:element>
- </xsl:element>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="style:style">
- <xsl:attribute name="style:name"><xsl:value-of select="@图:标识符"/></xsl:attribute>
- <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>
- <xsl:if test="/uof:UOF/uof:演示文稿/演:主体/演:母版集/演:母版/uof:锚点[@uof:图形引用=$biaozhifu]">
- <xsl:variable name="duan" select="图:文本内容/字:段落/字:段落属性/@字:式样引用"/>
- <xsl:attribute name="style:parent-style-name"><xsl:value-of select="/uof:UOF/uof:式样集/uof:段落式样[@字:标识符=$duan]/@字:基式样引用"/></xsl:attribute>
- </xsl:if>
- <xsl:element name="style:graphic-properties">
- <xsl:if test="@图:其他对象">
- <xsl:attribute name="fo:clip">rect(0cm 0cm 0cm 0cm)</xsl:attribute>
- <xsl:attribute name="draw:color-mode">standard</xsl:attribute>
- <xsl:attribute name="draw:luminance">0%</xsl:attribute>
- <xsl:attribute name="draw:contrast">0%</xsl:attribute>
- <xsl:attribute name="draw:gamma">100%</xsl:attribute>
- <xsl:attribute name="draw:red">0%</xsl:attribute>
- <xsl:attribute name="draw:green">0%</xsl:attribute>
- <xsl:attribute name="draw:blue">0%</xsl:attribute>
- <xsl:attribute name="draw:image-opacity">100%</xsl:attribute>
- <xsl:attribute name="style:mirror">none</xsl:attribute>
- </xsl:if>
- <xsl:call-template name="process-graphics"/>
- </xsl:element>
- <xsl:if test="图:文本内容/@图:文字排列方向='vert-r2l' or 图:文本内容/@图:文字排列方向='vert-l2r'">
- <xsl:element name="style:paragraph-properties">
- <xsl:attribute name="style:writing-mode">tb-rl</xsl:attribute>
- </xsl:element>
- </xsl:if>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="process-graphics">
- <xsl:param name="draw-name"/>
- <xsl:if test="not(key('rel_graphic_name',@图:标识符)/@uof:随动方式='movesize')">
- <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>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="not(图:预定义图形/图:属性/图:填充)">
- <xsl:attribute name="draw:fill">none</xsl:attribute>
- </xsl:when>
- <xsl:when test="图:预定义图形/图:属性/图:填充/图:图片">
- <xsl:attribute name="draw:fill">bitmap</xsl:attribute>
- <xsl:attribute name="draw:fill-image-name"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图片/@图:名称"/></xsl:attribute>
- <xsl:if test="not(图:预定义图形/图:属性/图:填充/图:图片/@图:位置='title')">
- <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>
- </xsl:if>
- </xsl:when>
- <xsl:when test="图:预定义图形/图:属性/图:填充/图:图案">
- <xsl:attribute name="draw:fill">bitmap</xsl:attribute>
- <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图案/@图:前景色"/></xsl:attribute>
- </xsl:when>
- <xsl:when test="图:预定义图形/图:属性/图:填充/图:颜色">
- <xsl:attribute name="draw:fill">solid</xsl:attribute>
- <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:颜色"/></xsl:attribute>
- </xsl:when>
- <xsl:when test="图:预定义图形/图:属性/图:填充/图:渐变">
- <xsl:attribute name="draw:fill">gradient</xsl:attribute>
- <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:预定义图形/图:属性/图:填充/图:渐变/@图:起始色"/></xsl:attribute>
- <xsl:attribute name="draw:fill-gradient-name"><xsl:value-of select="concat('Gradient ',$draw-name)"/></xsl:attribute>
- </xsl:when>
- </xsl:choose>
- <xsl:if test="图:预定义图形/图:属性/图:线颜色">
- <xsl:attribute name="svg:stroke-color"><xsl:value-of select="图:预定义图形/图:属性/图:线颜色"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="图:预定义图形/图:属性/图:线型 and not(图:预定义图形/图:属性/图:线型 = 'single') and not(图:预定义图形/图:属性/图:线型 = 'thick')">
- <xsl:variable name="linetype" select="图:预定义图形/图:属性/图:线型"/>
- <xsl:attribute name="draw:stroke"><xsl:choose><xsl:when test="$linetype='none'">none</xsl:when><xsl:otherwise>dash</xsl:otherwise></xsl:choose></xsl:attribute>
- <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>
- </xsl:if>
- <xsl:if test="图:预定义图形/图:属性/图:线粗细">
- <xsl:attribute name="svg:stroke-width"><xsl:value-of select="concat(图:预定义图形/图:属性/图:线粗细,$uofUnit)"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="图:预定义图形/图:属性/图:前端箭头">
- <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>
- <xsl:if test="图:预定义图形/图:属性/图:前端箭头/图:大小">
- <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>
- </xsl:if>
- </xsl:if>
- <xsl:if test="图:预定义图形/图:属性/图:后端箭头">
- <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>
- <xsl:if test="图:预定义图形/图:属性/图:后端箭头/图:大小">
- <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>
- </xsl:if>
- </xsl:if>
- <xsl:if test="图:预定义图形/图:属性/图:透明度">
- <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>
- </xsl:if>
- <xsl:if test="图:文本内容">
- <xsl:for-each select="图:文本内容">
- <xsl:if test="@图:上边距">
- <xsl:attribute name="fo:padding-top"><xsl:value-of select="concat(@图:上边距,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="fo:padding-bottom"><xsl:value-of select="concat(@图:下边距,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="fo:padding-left"><xsl:value-of select="concat(@图:左边距,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="fo:padding-right"><xsl:value-of select="concat(@图:右边距,$uofUnit)"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="not(@图:文字排列方向='middle')">
- <xsl:variable name="hori-or-vert" select="@图:文字排列方向"/>
- <xsl:choose>
- <xsl:when test="$hori-or-vert='vert-l2r'">
- <xsl:attribute name="draw:textarea-vertical-align">bottom</xsl:attribute>
- </xsl:when>
- <xsl:when test="$hori-or-vert='hori-l2r'">
- <xsl:attribute name="draw:textarea-horizontal-align">left</xsl:attribute>
- </xsl:when>
- <xsl:when test="$hori-or-vert='hori-r2l'">
- <xsl:attribute name="draw:textarea-horizontal-align">right</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$hori-or-vert"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- <xsl:if test="@图:自动换行">
- <xsl:attribute name="fo:wrap-option">no-wrap</xsl:attribute>
- </xsl:if>
- <xsl:attribute name="draw:auto-grow-width"><xsl:choose><xsl:when test="@图:大小适应文字">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:attribute>
- </xsl:for-each>
- </xsl:if>
- </xsl:template>
- <xsl:template name="bina_graphic">
- <xsl:param name="refGraphic"/>
- <xsl:element name="office:binary-data">
- <xsl:for-each select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符 = $refGraphic]">
- <xsl:value-of select="uof:数据"/>
- </xsl:for-each>
- </xsl:element>
- <text:p/>
- </xsl:template>
- <xsl:template name="graphic-fill">
- <xsl:param name="draw-name"/>
- <xsl:param name="gradient-name"/>
- <xsl:if test="图:预定义图形/图:属性/图:填充/图:渐变">
- <xsl:element name="draw:gradient">
- <xsl:attribute name="draw:name"><xsl:value-of select="concat('Gradient ',$draw-name)"/></xsl:attribute>
- <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>
- <xsl:attribute name="draw:start-color"><xsl:value-of select="$gradient-name/@图:起始色"/></xsl:attribute>
- <xsl:attribute name="draw:end-color"><xsl:value-of select="$gradient-name/@图:终止色"/></xsl:attribute>
- <xsl:attribute name="draw:start-intensity"><xsl:value-of select="concat($gradient-name/@图:起始浓度,'%')"/></xsl:attribute>
- <xsl:attribute name="draw:end-intensity"><xsl:value-of select="concat($gradient-name/@图:终止浓度,'%')"/></xsl:attribute>
- <xsl:attribute name="draw:angle"><xsl:value-of select="$gradient-name/@图:渐变方向 * 10"/></xsl:attribute>
- <xsl:attribute name="draw:border"><xsl:value-of select="concat($gradient-name/@图:边界,'%')"/></xsl:attribute>
- <xsl:if test="$gradient-name/@图:种子X位置">
- <xsl:attribute name="draw:cx"><xsl:value-of select="concat($gradient-name/@图:种子X位置,'%')"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="$gradient-name/@图:种子Y位置">
- <xsl:attribute name="draw:cy"><xsl:value-of select="concat($gradient-name/@图:种子Y位置,'%')"/></xsl:attribute>
- </xsl:if>
- </xsl:element>
- </xsl:if>
- <xsl:if test="图:预定义图形/图:属性/图:前端箭头">
- <xsl:element name="draw:marker">
- <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>
- <xsl:choose>
- <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='normal'">
- <xsl:attribute name="svg:viewBox">0 0 20 30</xsl:attribute>
- <xsl:attribute name="svg:d">m10 0-10 30h20z</xsl:attribute>
- </xsl:when>
- <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='open'">
- <xsl:attribute name="svg:viewBox">0 0 1122 2243</xsl:attribute>
- <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>
- </xsl:when>
- <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='stealth'">
- <xsl:attribute name="svg:viewBox">0 0 1131 1580</xsl:attribute>
- <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>
- </xsl:when>
- <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='oval'">
- <xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute>
- <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>
- </xsl:when>
- <xsl:when test="图:预定义图形/图:属性/图:前端箭头/图:式样='diamond'">
- <xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute>
- <xsl:attribute name="svg:d">m0 564 564 567 567-567-567-564z</xsl:attribute>
- </xsl:when>
- </xsl:choose>
- </xsl:element>
- </xsl:if>
- <xsl:if test="图:预定义图形/图:属性/图:后端箭头">
- <xsl:element name="draw:marker">
- <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>
- <xsl:choose>
- <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='normal'">
- <xsl:attribute name="svg:viewBox">0 0 20 30</xsl:attribute>
- <xsl:attribute name="svg:d">m10 0-10 30h20z</xsl:attribute>
- </xsl:when>
- <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='open'">
- <xsl:attribute name="svg:viewBox">0 0 1122 2243</xsl:attribute>
- <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>
- </xsl:when>
- <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='stealth'">
- <xsl:attribute name="svg:viewBox">0 0 1131 1580</xsl:attribute>
- <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>
- </xsl:when>
- <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='oval'">
- <xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute>
- <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>
- </xsl:when>
- <xsl:when test="图:预定义图形/图:属性/图:后端箭头/图:式样='diamond'">
- <xsl:attribute name="svg:viewBox">0 0 1131 1131</xsl:attribute>
- <xsl:attribute name="svg:d">m0 564 564 567 567-567-567-564z</xsl:attribute>
- </xsl:when>
- </xsl:choose>
- </xsl:element>
- </xsl:if>
- <xsl:if test="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用 or 图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用">
- <xsl:element name="draw:fill-image">
- <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>
- <xsl:call-template name="bina_graphic">
- <xsl:with-param name="refGraphic">
- <xsl:choose>
- <xsl:when test="图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用">
- <xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图案/@图:图形引用"/>
- </xsl:when>
- <xsl:when test="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用">
- <xsl:value-of select="图:预定义图形/图:属性/图:填充/图:图片/@图:图形引用"/>
- </xsl:when>
- </xsl:choose>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:element>
- </xsl:if>
- <xsl:if test="not(图:预定义图形/图:属性/图:线型='single') and not(图:预定义图形/图:属性/图:线型='thick') and 图:预定义图形/图:属性/图:线型">
- <xsl:variable name="line" select="图:预定义图形/图:属性/图:线型"/>
- <xsl:element name="draw:stroke-dash">
- <xsl:choose>
- <xsl:when test="$line='dash-long' or $line='dash-long-heavy'">
- <xsl:attribute name="draw:name">Fine_20_Dashed</xsl:attribute>
- <xsl:attribute name="draw:display-name">Fine dashed</xsl:attribute>
- <xsl:attribute name="draw:style">rect</xsl:attribute>
- <xsl:attribute name="draw:dots1">1</xsl:attribute>
- <xsl:attribute name="draw:dots1-length">0.508cm</xsl:attribute>
- <xsl:attribute name="draw:dots2">1</xsl:attribute>
- <xsl:attribute name="draw:dots2-length">0.508cm</xsl:attribute>
- <xsl:attribute name="draw:distance">0.508cm</xsl:attribute>
- </xsl:when>
- <xsl:when test="$line='dot-dot-dash' or $line='dash-dot-dot-heavy'">
- <xsl:attribute name="draw:name">_32__20_Dots_20_1_20_Dash</xsl:attribute>
- <xsl:attribute name="draw:display-name">2 Dots 1 Dash</xsl:attribute>
- <xsl:attribute name="draw:style">rect</xsl:attribute>
- <xsl:attribute name="draw:dots1">2</xsl:attribute>
- <xsl:attribute name="draw:dots2">1</xsl:attribute>
- <xsl:attribute name="draw:dots2-length">0.203cm</xsl:attribute>
- <xsl:attribute name="draw:distance">0.203cm</xsl:attribute>
- </xsl:when>
- <xsl:when test="$line='dash' or $line='dashed-heavy'">
- <xsl:attribute name="draw:name">Ultrafine_20_Dashed</xsl:attribute>
- <xsl:attribute name="draw:display-name">Ultrafine Dashed</xsl:attribute>
- <xsl:attribute name="draw:style">rect</xsl:attribute>
- <xsl:attribute name="draw:dots1">1</xsl:attribute>
- <xsl:attribute name="draw:dots1-length">0.051cm</xsl:attribute>
- <xsl:attribute name="draw:dots2">1</xsl:attribute>
- <xsl:attribute name="draw:dots2-length">0.051cm</xsl:attribute>
- <xsl:attribute name="draw:distance">0.051cm</xsl:attribute>
- </xsl:when>
- <xsl:when test="$line='dotted' or $line='dotted-heavy'">
- <xsl:attribute name="draw:name">Ultrafine_20_Dotted_20__28_var_29_</xsl:attribute>
- <xsl:attribute name="draw:display-name">Ultrafine Dotted (var)</xsl:attribute>
- <xsl:attribute name="draw:style">rect</xsl:attribute>
- <xsl:attribute name="draw:dots1">1</xsl:attribute>
- <xsl:attribute name="draw:distance">50%</xsl:attribute>
- </xsl:when>
- <xsl:when test="$line='wave' or $line='wavy-heavy'">
- <xsl:attribute name="draw:name">Ultrafine_20_2_20_Dots_20_3_20_Dashes</xsl:attribute>
- <xsl:attribute name="draw:display-name">Ultrafine 2 Dots 3 Dashes</xsl:attribute>
- <xsl:attribute name="draw:style">rect</xsl:attribute>
- <xsl:attribute name="draw:dots1">2</xsl:attribute>
- <xsl:attribute name="draw:dots1-length">0.051cm</xsl:attribute>
- <xsl:attribute name="draw:dots2">3</xsl:attribute>
- <xsl:attribute name="draw:dots2-length">0.254cm</xsl:attribute>
- <xsl:attribute name="draw:distance">0.127cm</xsl:attribute>
- </xsl:when>
- <xsl:when test="$line='dot-dash' or $line='dash-dot-heavy'">
- <xsl:attribute name="draw:name">_33__20_Dashes_20_3_20_Dots_20__28_var_29_</xsl:attribute>
- <xsl:attribute name="draw:display-name">3 Dashes 3 Dots (var)</xsl:attribute>
- <xsl:attribute name="draw:style">rect</xsl:attribute>
- <xsl:attribute name="draw:dots1">3</xsl:attribute>
- <xsl:attribute name="draw:dots1-length">197%</xsl:attribute>
- <xsl:attribute name="draw:dots2">3</xsl:attribute>
- <xsl:attribute name="draw:distance">100%</xsl:attribute>
- </xsl:when>
- <xsl:when test="$line='double'">
- <xsl:attribute name="draw:name">Line_20_with_20_Fine_20_Dots</xsl:attribute>
- <xsl:attribute name="draw:display-name">Line with Fine Dots</xsl:attribute>
- <xsl:attribute name="draw:style">rect</xsl:attribute>
- <xsl:attribute name="draw:dots1">1</xsl:attribute>
- <xsl:attribute name="draw:dots1-length">2.007cm</xsl:attribute>
- <xsl:attribute name="draw:dots2">10</xsl:attribute>
- <xsl:attribute name="draw:distance">0.152cm</xsl:attribute>
- </xsl:when>
- <xsl:when test="$line='wavy-double'">
- <xsl:attribute name="draw:name">Fine_20_Dashed_20__28_var_29_</xsl:attribute>
- <xsl:attribute name="draw:display-name">Fine Dashed (var)</xsl:attribute>
- <xsl:attribute name="draw:style">rect</xsl:attribute>
- <xsl:attribute name="draw:dots1">1</xsl:attribute>
- <xsl:attribute name="draw:dots1-length">197%</xsl:attribute>
- <xsl:attribute name="draw:distance">197%</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="draw:name">Fine Dashed</xsl:attribute>
- <xsl:attribute name="draw:style">rect</xsl:attribute>
- <xsl:attribute name="draw:dots1">1</xsl:attribute>
- <xsl:attribute name="draw:dots1-length">0.508cm</xsl:attribute>
- <xsl:attribute name="draw:dots2">1</xsl:attribute>
- <xsl:attribute name="draw:dots2-length">0.508cm</xsl:attribute>
- <xsl:attribute name="draw:distance">0.508cm</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:element>
- </xsl:if>
- </xsl:template>
- <xsl:template name="create-page-master">
- <xsl:param name="impressoptions"/>
- <xsl:for-each select="$impressoptions">
- <xsl:element name="style:page-layout">
- <xsl:attribute name="style:name"><xsl:call-template name="encode-as-nc-name"><xsl:with-param name="string" select="@演:标识符"/></xsl:call-template></xsl:attribute>
- <xsl:element name="style:page-layout-properties">
- <xsl:if test="演:纸张/@uof:宽度">
- <xsl:attribute name="fo:page-width"><xsl:value-of select="concat(演:纸张/@uof:宽度,$uofUnit)"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="演:纸张/@uof:高度">
- <xsl:attribute name="fo:page-height"><xsl:value-of select="concat((演:纸张/@uof:高度),$uofUnit)"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="演:页边距">
- <xsl:attribute name="fo:margin-top"><xsl:value-of select="concat(演:页边距/@uof:上,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="fo:margin-bottom"><xsl:value-of select="concat(演:页边距/@uof:下,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="fo:margin-left"><xsl:value-of select="concat(演:页边距/@uof:左,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="fo:margin-right"><xsl:value-of select="concat(演:页边距/@uof:右,$uofUnit)"/></xsl:attribute>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="演:纸张方向 = 'landscape'">
- <xsl:attribute name="style:print-orientation">landscape</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="style:print-orientation">portrait</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:element>
- </xsl:element>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="encode-as-nc-name">
- <xsl:param name="string"/>
- <xsl:value-of select="translate($string, '. %()/\+', '')"/>
- </xsl:template>
- <xsl:key name="tianchongmu" match="/uof:UOF/uof:演示文稿/演:主体/演:母版集/演:母版" use="@演:配色方案引用"/>
- <xsl:key name="tianchonghuan" match="/uof:UOF/uof:演示文稿/演:主体/演:幻灯片集/演:幻灯片" use="@演:标识符"/>
- <xsl:template match="演:配色方案">
- <xsl:if test="key('tianchongmu',@演:标识符)/演:背景">
- <xsl:for-each select="key('tianchongmu',@演:标识符)/演:背景">
- <xsl:call-template name="officestyle"/>
- </xsl:for-each>
- </xsl:if>
- <xsl:if test="key('tianchonghuan',@演:标识符)/演:背景">
- <xsl:for-each select="key('tianchonghuan',@演:标识符)/演:背景">
- <xsl:call-template name="officestyle"/>
- </xsl:for-each>
- </xsl:if>
- <xsl:element name="style:style">
- <xsl:attribute name="style:family">drawing-page</xsl:attribute>
- <xsl:attribute name="style:name"><xsl:value-of select="@演:标识符"/></xsl:attribute>
- <xsl:element name="style:drawing-page-properties">
- <xsl:if test="演:填充">
- <xsl:attribute name="draw:fill">solid</xsl:attribute>
- <xsl:attribute name="draw:fill-color"><xsl:value-of select="演:背景色"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="演:背景色">
- <xsl:attribute name="draw:background-size">border</xsl:attribute>
- </xsl:if>
- <xsl:if test="演:阴影">
- <xsl:attribute name="draw:shadow">visible</xsl:attribute>
- <xsl:attribute name="draw:shadow-color"><xsl:value-of select="演:阴影"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="演:文本和线条">
- <xsl:attribute name="svg:stroke-color"><xsl:value-of select="演:文本和线条"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="key('tianchongmu',@演:标识符)/演:背景">
- <xsl:for-each select="key('tianchongmu',@演:标识符)/演:背景">
- <xsl:call-template name="background"/>
- </xsl:for-each>
- </xsl:if>
- <xsl:if test="key('tianchonghuan',@演:标识符)/演:背景">
- <xsl:for-each select="key('tianchonghuan',@演:标识符)/演:背景">
- <xsl:call-template name="background"/>
- </xsl:for-each>
- </xsl:if>
- </xsl:element>
- <xsl:variable name="style-name">
- <xsl:value-of select="@演:标识符"/>
- </xsl:variable>
- <xsl:for-each select="/uof:UOF/uof:演示文稿/演:主体/演:幻灯片集/演:幻灯片[@演:标识符=$style-name]/演:切换">
- <style:drawing-page-properties>
- <xsl:if test="@演:速度='slow'">
- <xsl:attribute name="presentation:transition-speed">slow</xsl:attribute>
- </xsl:if>
- <xsl:if test="not(@演:效果 = 'none')">
- <xsl:variable name="effect">
- <xsl:value-of select="@演:效果"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$effect='box in'">
- <xsl:attribute name="smil:type">irisWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">rectangle</xsl:attribute>
- <xsl:attribute name="smil:direction">reverse</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='box out'">
- <xsl:attribute name="smil:type">irisWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">rectangle</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='checkerboard across'">
- <xsl:attribute name="smil:type">checkerBoardWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">across</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='checkerboard down'">
- <xsl:attribute name="smil:type">checkerBoardWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">down</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='comb horizontal'">
- <xsl:attribute name="smil:type">pushWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">combHorizontal</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='comb vertical'">
- <xsl:attribute name="smil:type">pushWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">combVertical</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='uncover down'">
- <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromTop</xsl:attribute>
- <xsl:attribute name="smil:direction">reverse</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='uncover left'">
- <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromRight</xsl:attribute>
- <xsl:attribute name="smil:direction">reverse</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='uncover right'">
- <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromLeft</xsl:attribute>
- <xsl:attribute name="smil:direction">reverse</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='uncover up'">
- <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromBottom</xsl:attribute>
- <xsl:attribute name="smil:direction">reverse</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='uncover left-down'">
- <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromTopRight</xsl:attribute>
- <xsl:attribute name="smil:direction">reverse</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='uncover left-up'">
- <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromBottomRight</xsl:attribute>
- <xsl:attribute name="smil:direction">reverse</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='uncover right-down'">
- <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromTopLeft</xsl:attribute>
- <xsl:attribute name="smil:direction">reverse</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='uncover right-up'">
- <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromBottomLeft</xsl:attribute>
- <xsl:attribute name="smil:direction">reverse</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='cover down'">
- <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromTop</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='cover left'">
- <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromRight</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='cover right'">
- <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromLeft</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='cover up'">
- <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromBottom</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='cover left-down'">
- <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromTopRight</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='cover left-up'">
- <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromBottomRight</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='cover right-down'">
- <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromTopLeft</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='cover right-up'">
- <xsl:attribute name="smil:type">slideWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromBottomLeft</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='fade through black'">
- <xsl:attribute name="smil:type">fade</xsl:attribute>
- <xsl:attribute name="smil:subtype">fadeOverColor</xsl:attribute>
- <xsl:attribute name="smil:fadeColor">#000000</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='push down'">
- <xsl:attribute name="smil:type">pushWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromTop</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='push left'">
- <xsl:attribute name="smil:type">pushWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromRight</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='push right'">
- <xsl:attribute name="smil:type">pushWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromLeft</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='push up'">
- <xsl:attribute name="smil:type">pushWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fromBottom</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='random bars horizontal'">
- <xsl:attribute name="smil:type">randomBarWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">horizontal</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='random bars vertical'">
- <xsl:attribute name="smil:type">randomBarWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">vertical</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='shape circle'">
- <xsl:attribute name="smil:type">ellipseWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">circle</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='shape diamond'">
- <xsl:attribute name="smil:type">irisWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">diamond</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='shape plus'">
- <xsl:attribute name="smil:type">fourBoxWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">cornersOut</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='split horizontal in'">
- <xsl:attribute name="smil:type">barnDoorWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">horizontal</xsl:attribute>
- <xsl:attribute name="smil:direction">reverse</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='split horizontal out'">
- <xsl:attribute name="smil:type">barnDoorWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">horizontal</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='split vertical in'">
- <xsl:attribute name="smil:type">barnDoorWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">vertical</xsl:attribute>
- <xsl:attribute name="smil:direction">reverse</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='split vertical out'">
- <xsl:attribute name="smil:type">barnDoorWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">vertical</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='wedge'">
- <xsl:attribute name="smil:type">fanWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">centerTop</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='wheel clockwise – 1 spoke'">
- <xsl:attribute name="smil:type">pinWheelWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">oneBlade</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='wheel clockwise – 2 spoke'">
- <xsl:attribute name="smil:type">pinWheelWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">twoBladeVertical</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='wheel clockwise – 3 spoke'">
- <xsl:attribute name="smil:type">pinWheelWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">threeBlade</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='wheel clockwise – 4 spoke'">
- <xsl:attribute name="smil:type">pinWheelWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">fourBlade</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='wheel clockwise – 8 spoke'">
- <xsl:attribute name="smil:type">pinWheelWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">eightBlade</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='wipe left'">
- <xsl:attribute name="smil:type">barWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">leftToRight</xsl:attribute>
- <xsl:attribute name="smil:direction">reverse</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='wipe right'">
- <xsl:attribute name="smil:type">barWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">leftToRight</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='wipe up'">
- <xsl:attribute name="smil:type">barWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">topToBottom</xsl:attribute>
- <xsl:attribute name="smil:direction">reverse</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='wipe down'">
- <xsl:attribute name="smil:type">barWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">topToBottom</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='blinds vertical'">
- <xsl:attribute name="smil:type">blindsWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">vertical</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='blinds horizontal'">
- <xsl:attribute name="smil:type">blindsWipe</xsl:attribute>
- <xsl:attribute name="smil:subtype">horizontal</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='dissolve'">
- <xsl:attribute name="smil:type">dissolve</xsl:attribute>
- </xsl:when>
- <xsl:when test="$effect='random transition'">
- <xsl:attribute name="smil:type">random</xsl:attribute>
- </xsl:when>
- </xsl:choose>
- </xsl:if>
- <xsl:if test="演:方式/演:单击鼠标='false'">
- <xsl:attribute name="presentation:transition-type">automatic</xsl:attribute>
- </xsl:if>
- <xsl:if test="演:方式/演:时间间隔">
- <xsl:attribute name="presentation:duration"><xsl:value-of select="concat('PT00H00M',演:方式/演:时间间隔,'S')"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="(演:声音/@演:预定义声音 and not(演:声音/@演:预定义声音='none')) or 演:声音/@演:自定义声音">
- <xsl:choose>
- <xsl:when test="演:声音/@演:预定义声音">
- <xsl:variable name="voice">
- <xsl:value-of select="演:声音/@演:预定义声音"/>
- </xsl:variable>
- <presentation:sound xlink:type="simple" xlink:show="new" xlink:actuate="onRequest">
- <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>
- </presentation:sound>
- </xsl:when>
- <xsl:otherwise>
- <presentation:sound xlink:type="simple" xlink:show="new" xlink:actuate="onRequest">
- <xsl:attribute name="xlink:href"><xsl:value-of select="演:声音/@演:自定义声音"/></xsl:attribute>
- </presentation:sound>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </style:drawing-page-properties>
- </xsl:for-each>
- </xsl:element>
- </xsl:template>
- <xsl:template name="officestyle">
- <xsl:variable name="random-name">
- <xsl:value-of select="generate-id()"/>
- </xsl:variable>
- <xsl:variable name="draw-name">
- <xsl:value-of select="substring($random-name,string-length($random-name)-1)"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="图:渐变">
- <xsl:element name="draw:gradient">
- <xsl:attribute name="draw:name"><xsl:value-of select="concat('Gradient ',$draw-name)"/></xsl:attribute>
- <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>
- <xsl:attribute name="draw:start-color"><xsl:value-of select="图:渐变/@图:起始色"/></xsl:attribute>
- <xsl:attribute name="draw:end-color"><xsl:value-of select="图:渐变/@图:终止色"/></xsl:attribute>
- <xsl:attribute name="draw:start-intensity"><xsl:value-of select="concat(图:渐变/@图:起始浓度,'%')"/></xsl:attribute>
- <xsl:attribute name="draw:end-intensity"><xsl:value-of select="concat(图:渐变/@图:终止浓度,'%')"/></xsl:attribute>
- <xsl:attribute name="draw:angle"><xsl:value-of select="图:渐变/@图:渐变方向 * 10"/></xsl:attribute>
- <xsl:attribute name="draw:border"><xsl:value-of select="concat(图:渐变/@图:边界,'%')"/></xsl:attribute>
- <xsl:if test="图:渐变/@图:种子X位置">
- <xsl:attribute name="draw:cx"><xsl:value-of select="concat(图:渐变/@图:种子X位置,'%')"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="图:渐变/@图:种子Y位置">
- <xsl:attribute name="draw:cy"><xsl:value-of select="concat(图:渐变/@图:种子Y位置,'%')"/></xsl:attribute>
- </xsl:if>
- </xsl:element>
- </xsl:when>
- <xsl:when test="图:图片/@图:图形引用 or 图:图案/@图:图形引用">
- <xsl:element name="draw:fill-image">
- <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>
- <xsl:call-template name="bina_graphic">
- <xsl:with-param name="refGraphic">
- <xsl:choose>
- <xsl:when test="图:图案/@图:图形引用">
- <xsl:value-of select="图:图案/@图:图形引用"/>
- </xsl:when>
- <xsl:when test="图:图片/@图:图形引用">
- <xsl:value-of select="图:图片/@图:图形引用"/>
- </xsl:when>
- </xsl:choose>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:element>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="background">
- <xsl:variable name="random-name">
- <xsl:value-of select="generate-id()"/>
- </xsl:variable>
- <xsl:variable name="draw-name">
- <xsl:value-of select="substring($random-name,string-length($random-name)-1)"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="图:图片">
- <xsl:attribute name="draw:fill">bitmap</xsl:attribute>
- <xsl:attribute name="draw:fill-image-name"><xsl:value-of select="图:图片/@图:名称"/></xsl:attribute>
- <xsl:if test="not(图:图片/@图:位置='title')">
- <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>
- </xsl:if>
- </xsl:when>
- <xsl:when test="图:图案">
- <xsl:attribute name="draw:fill">bitmap</xsl:attribute>
- <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:图案/@图:前景色"/></xsl:attribute>
- </xsl:when>
- <xsl:when test="图:颜色">
- <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:颜色"/></xsl:attribute>
- </xsl:when>
- <xsl:when test="图:渐变">
- <xsl:attribute name="draw:fill">gradient</xsl:attribute>
- <xsl:attribute name="draw:fill-color"><xsl:value-of select="图:渐变/@图:起始色"/></xsl:attribute>
- <xsl:attribute name="draw:fill-gradient-name"><xsl:value-of select="concat('Gradient ',$draw-name)"/></xsl:attribute>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="演:母版集">
- <draw:layer-set>
- <draw:layer draw:name="layout"/>
- <draw:layer draw:name="background"/>
- <draw:layer draw:name="backgroundobjects"/>
- <draw:layer draw:name="controls"/>
- <draw:layer draw:name="measurelines"/>
- </draw:layer-set>
- <xsl:apply-templates select="演:母版"/>
- </xsl:template>
- <xsl:template match="演:母版">
- <xsl:choose>
- <xsl:when test="@演:类型 = 'handout' ">
- <xsl:element name="style:handout-master">
- <xsl:attribute name="style:name"><xsl:value-of select="@演:标识符"/></xsl:attribute>
- <xsl:attribute name="style:page-layout-name"><xsl:value-of select="@演:页面设置引用"/></xsl:attribute>
- <xsl:attribute name="draw:style-name"><xsl:value-of select="@演:配色方案引用"/></xsl:attribute>
- <xsl:for-each select="uof:锚点[@uof:缩略图='true']">
- <draw:page-thumbnail draw:layer="backgroundobjects">
- <xsl:attribute name="svg:width"><xsl:value-of select="concat(@uof:宽度,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:height"><xsl:value-of select="concat(@uof:高度,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:x"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:y"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute>
- </draw:page-thumbnail>
- </xsl:for-each>
- <xsl:apply-templates select="uof:锚点[not(@uof:缩略图='true')]"/>
- </xsl:element>
- </xsl:when>
- <xsl:when test="@演:类型 = 'slide'">
- <xsl:element name="style:master-page">
- <xsl:attribute name="style:name"><xsl:value-of select="@演:标识符"/></xsl:attribute>
- <xsl:attribute name="style:page-layout-name"><xsl:value-of select="@演:页面设置引用"/></xsl:attribute>
- <xsl:attribute name="draw:style-name"><xsl:value-of select="@演:配色方案引用"/></xsl:attribute>
- <xsl:apply-templates select="uof:锚点 "/>
- <xsl:for-each select="/uof:UOF/uof:演示文稿/演:主体/演:母版集/演:母版">
- <xsl:if test="@演:类型 = 'notes'">
- <xsl:element name="presentation:notes">
- <xsl:attribute name="style:page-layout-name"><xsl:value-of select="@演:页面设置引用"/></xsl:attribute>
- <xsl:attribute name="draw:style-name"><xsl:value-of select="@演:配色方案引用"/></xsl:attribute>
- <xsl:apply-templates select="uof:锚点 "/>
- </xsl:element>
- </xsl:if>
- </xsl:for-each>
- </xsl:element>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="uof:句式样">
- <xsl:element name="style:style">
- <xsl:attribute name="style:name"><xsl:value-of select="@字:标识符"/></xsl:attribute>
- <xsl:if test="@字:基式样引用">
- <xsl:attribute name="style:parent-style-name"><xsl:value-of select="@字:基式样引用"/></xsl:attribute>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="ancestor::字:段落式样">
- <xsl:attribute name="style:family">paragraph</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="style:family">text</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:element name="style:text-properties">
- <xsl:apply-templates select="*"/>
- </xsl:element>
- </xsl:element>
- </xsl:template>
- <xsl:template name="段落式样">
- <xsl:element name="style:style">
- <xsl:variable name="outline" select="@字:标识符"/>
- <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>
- <xsl:attribute name="style:name"><xsl:value-of select="@字:标识符"/></xsl:attribute>
- <xsl:if test="@字:基式样引用">
- <xsl:attribute name="style:parent-style-name"><xsl:value-of select="@字:基式样引用"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号[@字:标识符=$outline]">
- <xsl:for-each select="/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号[@字:标识符=$outline]">
- <style:graphic-properties draw:stroke="none" draw:fill="none">
- <xsl:element name="text:list-style">
- <xsl:call-template name="自动编号"/>
- </xsl:element>
- </style:graphic-properties>
- </xsl:for-each>
- </xsl:if>
- <xsl:element name="style:paragraph-properties">
- <xsl:if test="字:自动编号信息">
- <xsl:attribute name="text:enable-numbering">true</xsl:attribute>
- </xsl:if>
- <xsl:if test="contains($outline,'title')">
- <xsl:attribute name="fo:text-align">center</xsl:attribute>
- </xsl:if>
- <xsl:call-template name="paragraph-properties"/>
- </xsl:element>
- <xsl:element name="style:text-properties">
- <xsl:apply-templates select="*"/>
- </xsl:element>
- </xsl:element>
- </xsl:template>
- <xsl:template name="paragraph-properties">
- <xsl:choose>
- <xsl:when test="descendant::字:页边距[@uof:左]">
- <xsl:attribute name="fo:margin-left"><xsl:value-of select="number(((descendant::字:页边距/@uof:左)div 10) *1)"/>cm</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="fo:margin-left">0cm</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="descendant::字:页边距[@uof:右]">
- <xsl:attribute name="fo:margin-right"><xsl:value-of select="number(((descendant::字:页边距/@uof:右)div 10) *1)"/>cm</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="fo:margin-right">0cm</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:attribute name="fo:text-indent">0cm</xsl:attribute>
- <xsl:call-template name="bidi"/>
- </xsl:template>
- <xsl:template name="bidi">
- </xsl:template>
- <xsl:template name="jibianhao">
- <xsl:param name="biaoshifu"/>
- <xsl:element name="text:list-level-style-number">
- <xsl:variable name="currlevel" select="number(@字:级别值)"/>
- <xsl:attribute name="text:level"><xsl:value-of select="$currlevel"/></xsl:attribute>
- <xsl:attribute name="text:style-name">Numbering Symbols</xsl:attribute>
- <xsl:if test="字:起始编号">
- <xsl:attribute name="text:start-value"><xsl:value-of select="字:起始编号"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="字:正规格式">
- <xsl:attribute name="text:num-regular-exp"><xsl:value-of select="字:正规格式/@值"/></xsl:attribute>
- </xsl:if>
- <xsl:attribute name="text:display-levels"><xsl:value-of select="string-length(字:编号格式表示) - string-length(translate(字:编号格式表示,'%','') )"/></xsl:attribute>
- <xsl:if test="字:编号格式">
- <xsl:call-template name="编号格式"/>
- </xsl:if>
- <xsl:if test="字:编号格式表示">
- <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>
- <xsl:attribute name="style:num-suffix"><xsl:value-of select="substring-after(字:编号格式表示,concat('%',$currlevel))"/></xsl:attribute>
- </xsl:if>
- <xsl:element name="style:list-level-properties">
- <xsl:if test="@字:编号对齐方式">
- <xsl:attribute name="fo:text-align"><xsl:value-of select="@字:编号对齐方式"/></xsl:attribute>
- </xsl:if>
- <xsl:call-template name="suojinleixing"/>
- </xsl:element>
- <xsl:element name="style:text-properties">
- <xsl:if test="字:符号字体">
- <xsl:variable name="Font-ID">
- <xsl:value-of select="字:符号字体/@字:式样引用"/>
- </xsl:variable>
- <xsl:for-each select="/uof:UOF/uof:式样集/uof:句式样">
- <xsl:if test="@字:标识符=$Font-ID">
- <xsl:if test="字:字体/@字:中文字体引用">
- <xsl:attribute name="fo:font-family"><xsl:value-of select="字:字体/@字:中文字体引用"/></xsl:attribute>
- </xsl:if>
- </xsl:if>
- </xsl:for-each>
- <xsl:for-each select="字:符号字体">
- <xsl:apply-templates select="*"/>
- </xsl:for-each>
- </xsl:if>
- </xsl:element>
- </xsl:element>
- </xsl:template>
- <xsl:template name="xiangmufuhao">
- <xsl:param name="biaoshifu"/>
- <xsl:variable name="currlevel" select="number(@字:级别值)"/>
- <xsl:element name="text:list-level-style-bullet">
- <xsl:attribute name="text:level"><xsl:value-of select="$currlevel"/></xsl:attribute>
- <xsl:attribute name="text:style-name"><xsl:value-of select="concat( $biaoshifu,$currlevel)"/></xsl:attribute>
- <xsl:attribute name="style:num-suffix"><xsl:value-of select="substring-after(字:编号格式表示,'%1')"/></xsl:attribute>
- <xsl:attribute name="text:bullet-char"><xsl:value-of select="字:项目符号"/></xsl:attribute>
- <xsl:element name="style:list-level-properties">
- <xsl:if test="@字:编号对齐方式">
- <xsl:attribute name="fo:text-align"><xsl:value-of select="@字:编号对齐方式"/></xsl:attribute>
- </xsl:if>
- <xsl:call-template name="suojinleixing"/>
- </xsl:element>
- <xsl:element name="style:text-properties">
- <xsl:if test="字:符号字体">
- <xsl:variable name="Font-ID">
- <xsl:value-of select="字:符号字体/@字:式样引用"/>
- </xsl:variable>
- <xsl:for-each select="/uof:UOF/uof:式样集/uof:句式样[@字:标识符=$Font-ID]">
- <xsl:if test="字:字体/@字:中文字体引用">
- <xsl:attribute name="fo:font-family"><xsl:value-of select="字:字体/@字:中文字体引用"/></xsl:attribute>
- </xsl:if>
- </xsl:for-each>
- <xsl:for-each select="字:符号字体">
- <xsl:apply-templates select="*"/>
- </xsl:for-each>
- </xsl:if>
- </xsl:element>
- </xsl:element>
- </xsl:template>
- <xsl:template name="suojinleixing">
- <xsl:if test="字:缩进/字:左/字:绝对/@字:值">
- <xsl:attribute name="text:space-before"><xsl:value-of select="concat(number(字:缩进/字:左/字:绝对/@字:值),$uofUnit)"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="字:缩进/字:右/字:绝对/@字:值">
- <xsl:attribute name="text:min-label-width"><xsl:value-of select="concat(number(字:缩进/字:右/字:绝对/@字:值),$uofUnit)"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="字:缩进/字:首行/字:绝对/@字:值">
- <xsl:attribute name="text:min-label-distance"><xsl:value-of select="concat(number(字:缩进/字:首行/字:绝对/@字:值),$uofUnit)"/></xsl:attribute>
- </xsl:if>
- </xsl:template>
- <xsl:template name="imagefuhao">
- <xsl:param name="biaoshifu"/>
- <xsl:variable name="currlevel" select="number(@字:级别值)"/>
- <xsl:element name="text:list-level-style-image" style:vertical-pos="middle" style:vertical-rel="line" fo:width="0.265cm" fo:height="0.265cm">
- <xsl:attribute name="text:level"><xsl:value-of select="$currlevel"/></xsl:attribute>
- <xsl:attribute name="text:style-name"><xsl:value-of select="concat( $biaoshifu,$currlevel)"/></xsl:attribute>
- <xsl:attribute name="style:num-suffix"><xsl:value-of select="substring-after(字:编号格式表示,'%1')"/></xsl:attribute>
- <xsl:if test="字:图片符号引用">
- <xsl:variable name="gid">
- <xsl:value-of select="字:图片符号引用"/>
- </xsl:variable>
- <xsl:element name="office:binary-data">
- <xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$gid]/uof:数据"/>
- </xsl:element>
- </xsl:if>
- <xsl:element name="style:list-level-properties">
- <xsl:attribute name="style:vertical-pos">middle</xsl:attribute>
- <xsl:attribute name="style:vertical-rel">line</xsl:attribute>
- <xsl:attribute name="fo:width"><xsl:value-of select="concat(字:图片符号引用/@字:宽度,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="fo:height"><xsl:value-of select="concat(字:图片符号引用/@字:高度,$uofUnit)"/></xsl:attribute>
- <xsl:if test="字:符号字体">
- <xsl:variable name="Font-ID">
- <xsl:value-of select="字:符号字体/@字:式样引用"/>
- </xsl:variable>
- <xsl:for-each select="/uof:UOF/uof:式样集/uof:句式样">
- <xsl:if test="@字:标识符=$Font-ID">
- <xsl:if test="字:字体/@字:中文字体引用">
- <xsl:attribute name="fo:font-family"><xsl:value-of select="字:字体/@字:中文字体引用"/></xsl:attribute>
- </xsl:if>
- </xsl:if>
- </xsl:for-each>
- </xsl:if>
- <xsl:call-template name="suojinleixing"/>
- <xsl:if test="@字:编号对齐方式">
- <xsl:attribute name="fo:text-align"><xsl:value-of select="@字:编号对齐方式"/></xsl:attribute>
- </xsl:if>
- </xsl:element>
- <xsl:element name="style:text-properties">
- <xsl:for-each select="字:符号字体">
- <xsl:apply-templates select="*"/>
- </xsl:for-each>
- </xsl:element>
- </xsl:element>
- </xsl:template>
- <xsl:template name="编号格式">
- <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>
- </xsl:template>
- <xsl:template match="演:幻灯片集">
- <xsl:for-each select="演:幻灯片">
- <xsl:element name="draw:page">
- <xsl:attribute name="draw:name"><xsl:value-of select="@演:名称"/></xsl:attribute>
- <xsl:attribute name="draw:style-name"><xsl:value-of select="@演:标识符"/></xsl:attribute>
- <xsl:attribute name="draw:master-page-name"><xsl:value-of select="@演:母版引用"/></xsl:attribute>
- <xsl:if test="@演:页面版式引用">
- <xsl:attribute name="presentation:presentation-page-layout-name"><xsl:value-of select="@演:页面版式引用"/></xsl:attribute>
- </xsl:if>
- <office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
- <xsl:apply-templates select="uof:锚点"/>
- <xsl:apply-templates select="演:动画"/>
- <xsl:element name="presentation:notes">
- <xsl:attribute name="draw:style-name">dp2</xsl:attribute>
- <xsl:apply-templates select="./演:幻灯片备注/uof:锚点"/>
- </xsl:element>
- </xsl:element>
- </xsl:for-each>
- </xsl:template>
- <xsl:template match="演:动画">
- <xsl:element name="anim:par">
- <xsl:attribute name="presentation:node-type">timing-root</xsl:attribute>
- <anim:seq presentation:node-type="main-sequence">
- <xsl:for-each select="演:序列">
- <anim:par begin="next">
- <anim:par smil:begin="0s">
- <xsl:variable name="animnodename">anim:par</xsl:variable>
- <xsl:choose>
- <xsl:when test="演:效果//演:其他">
- <xsl:copy-of select="演:效果//演:其他/*"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="{$animnodename}">
- <xsl:attribute name="smil:fill"><xsl:choose><xsl:when test="演:定时/@演:回卷='true'">remove</xsl:when><xsl:otherwise>hold</xsl:otherwise></xsl:choose></xsl:attribute>
- <xsl:choose>
- <xsl:when test="演:增强/演:动画播放后/@演:播放后隐藏='true'">
- <xsl:attribute name="presentation:preset-property">Direction;Accelerate;Decelerate</xsl:attribute>
- </xsl:when>
- <xsl:when test=".//演:轮子">
- <xsl:attribute name="presentation:preset-property">Spokes</xsl:attribute>
- </xsl:when>
- <xsl:when test="演:效果/演:强调/演:更改填充颜色">
- <xsl:attribute name="presentation:preset-property">FillColor;ColorStyle;Accelerate;Decelerate;AutoReverse</xsl:attribute>
- </xsl:when>
- <xsl:when test="演:效果/演:强调/演:更改字体颜色">
- <xsl:attribute name="presentation:preset-property">CharColor;ColorStyle;Accelerate;Decelerate;AutoReverse</xsl:attribute>
- </xsl:when>
- <xsl:when test="演:效果/演:强调/演:更改字号">
- <xsl:attribute name="presentation:preset-property">CharHeight</xsl:attribute>
- </xsl:when>
- <xsl:when test="演:效果/演:强调/演:更改字形">
- <xsl:attribute name="presentation:preset-property">CharDecoration</xsl:attribute>
- </xsl:when>
- <xsl:when test="演:效果/演:强调/演:陀螺旋">
- <xsl:attribute name="presentation:preset-property">Rotate;Accelerate;Decelerate;AutoReverse</xsl:attribute>
- </xsl:when>
- <xsl:when test="演:效果/演:强调/演:透明">
- <xsl:attribute name="presentation:preset-property">Transparency</xsl:attribute>
- </xsl:when>
- <xsl:when test="演:效果/演:强调/演:更改线条颜色">
- <xsl:attribute name="presentation:preset-property">LineColor;ColorStyle;Accelerate;Decelerate;AutoReverse</xsl:attribute>
- </xsl:when>
- </xsl:choose>
- <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>
- <xsl:attribute name="smil:begin"><xsl:value-of select="演:定时/@演:延时"/></xsl:attribute>
- <xsl:choose>
- <xsl:when test="演:定时/@演:重复='until next click' ">
- <xsl:attribute name="smil:repeatCount">indefinite</xsl:attribute>
- <xsl:attribute name="smil:end">next</xsl:attribute>
- </xsl:when>
- <xsl:when test="演:定时/@演:重复='until next slide' ">
- <xsl:attribute name="smil:repeatCount">indefinite</xsl:attribute>
- </xsl:when>
- <xsl:when test="演:定时/@演:重复 !='none'">
- <xsl:attribute name="smil:repeatCount"><xsl:value-of select="演:定时/@演:重复"/></xsl:attribute>
- </xsl:when>
- </xsl:choose>
- <xsl:if test="演:增强/演:动画文本/@演:发送">
- <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>
- </xsl:if>
- <xsl:if test="演:增强/演:动画文本/@演:间隔">
- <xsl:attribute name="anim:iterate-interval"><xsl:value-of select="演:增强/演:动画文本/@演:间隔"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="$animnodename='anim:iterate' ">
- <xsl:attribute name="anim:id"><xsl:value-of select="@演:动画对象"/></xsl:attribute>
- </xsl:if>
- <xsl:apply-templates select="演:效果"/>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </anim:par>
- </anim:par>
- </xsl:for-each>
- </anim:seq>
- </xsl:element>
- </xsl:template>
- <xsl:template match="演:效果">
- <xsl:apply-templates select="演:进入 "/>
- <xsl:apply-templates select="演:强调"/>
- <xsl:apply-templates select="演:退出"/>
- </xsl:template>
- <xsl:template match="演:进入">
- <xsl:attribute name="presentation:preset-class">entrance</xsl:attribute>
- <xsl:apply-templates select="." mode="entrance"/>
- </xsl:template>
- <xsl:template match="演:强调">
- <xsl:attribute name="presentation:preset-class">emphasis</xsl:attribute>
- <xsl:apply-templates select="." mode="emphasis"/>
- </xsl:template>
- <xsl:template match="演:退出">
- <xsl:attribute name="presentation:preset-class">exit</xsl:attribute>
- <xsl:apply-templates select="." mode="exit"/>
- </xsl:template>
- <xsl:template name="演速度">
- <xsl:choose>
- <xsl:when test="./@演:速度='very fast' ">0.5s</xsl:when>
- <xsl:when test="./@演:速度='fast'">1s</xsl:when>
- <xsl:when test="./@演:速度='medium'">2s</xsl:when>
- <xsl:when test="./@演:速度='slow'">3s</xsl:when>
- <xsl:when test="./@演:速度='very slow'">5s</xsl:when>
- <xsl:otherwise>1s</xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="演:出现" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-appear</xsl:attribute>
- <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" anim:sub-item="text" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:盒状" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-box</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
- <anim:set smil:begin="0s" smil:dur="0.004s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- <anim:transitionFilter smil:type="irisWipe" smil:subtype="rectangle" smil:direction="reverse">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:transitionFilter>
- </xsl:template>
- <xsl:template match="演:棋盘" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-checkerboard</xsl:attribute>
- <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>
- <anim:set smil:begin="0s" smil:dur="0.004s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- <anim:transitionFilter smil:dur="2s" anim:sub-item="text" smil:type="checkerBoardWipe" smil:subtype="down">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:transitionFilter>
- </xsl:template>
- <xsl:template match="演:圆形扩展" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-circle</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
- <anim:set smil:begin="0s" smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- <anim:transitionFilter smil:type="ellipseWipe" smil:subtype="horizontal" smil:direction="reverse">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:transitionFilter>
- </xsl:template>
- <xsl:template match="演:阶梯状" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-diagonal-squares</xsl:attribute>
- <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>
- <anim:set smil:begin="0s" smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- <anim:transitionFilter smil:type="waterfallWipe" smil:direction="reverse">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <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>
- </anim:transitionFilter>
- </xsl:template>
- <xsl:template match="演:菱形" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-diamond</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
- <anim:set smil:begin="0s" smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- <anim:transitionFilter smil:type="irisWipe" smil:subtype="diamond" smil:direction="reverse">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:transitionFilter>
- </xsl:template>
- <xsl:template match="演:内向溶解" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-dissolve-in</xsl:attribute>
- <anim:set smil:begin="0s" smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- <anim:transitionFilter smil:type="dissolve" smil:direction="reverse">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:transitionFilter>
- </xsl:template>
- <xsl:template match="演:闪烁一次" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-flash-once</xsl:attribute>
- <anim:set smil:begin="0s" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:飞入" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-fly-in</xsl:attribute>
- <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>
- <anim:set smil:begin="0s" smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- <xsl:variable name="smilvalueX">
- <xsl:choose>
- <xsl:when test="contains(@演:方向,'right')">1+width/2;x</xsl:when>
- <xsl:when test="contains(@演:方向,'left')">0-width/2;x</xsl:when>
- <xsl:otherwise>x;x</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="smilvalueY">
- <xsl:choose>
- <xsl:when test="contains(@演:方向,'bottom')">1+height/2;y</xsl:when>
- <xsl:when test="contains(@演:方向,'top')">0-height/2;y</xsl:when>
- <xsl:otherwise>y;y</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <anim:animate smil:fill="hold" smil:attributeName="x" smil:keyTimes="0;1" presentation:additive="base">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:values"><xsl:value-of select="$smilvalueX"/></xsl:attribute>
- </anim:animate>
- <anim:animate smil:fill="hold" smil:attributeName="y" smil:keyTimes="0;1" presentation:additive="base">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:values"><xsl:value-of select="$smilvalueY"/></xsl:attribute>
- </anim:animate>
- </xsl:template>
- <xsl:template match="演:缓慢飞入" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-fly-in-slow</xsl:attribute>
- <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>
- <anim:set smil:begin="0s" smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- <xsl:variable name="smilvalueX">
- <xsl:choose>
- <xsl:when test="contains(@演:方向,'right')">1+width/2;x</xsl:when>
- <xsl:when test="contains(@演:方向,'left')">0-width/2;x</xsl:when>
- <xsl:otherwise>x;x</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="smilvalueY">
- <xsl:choose>
- <xsl:when test="contains(@演:方向,'bottom')">1+height/2;y</xsl:when>
- <xsl:when test="contains(@演:方向,'top')">0-height/2;y</xsl:when>
- <xsl:otherwise>y;y</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <anim:animate smil:fill="hold" smil:attributeName="x" smil:keyTimes="0;1" presentation:additive="base">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:values"><xsl:value-of select="$smilvalueX"/></xsl:attribute>
- </anim:animate>
- <anim:animate smil:fill="hold" smil:attributeName="y" smil:keyTimes="0;1" presentation:additive="base">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:values"><xsl:value-of select="$smilvalueY"/></xsl:attribute>
- </anim:animate>
- </xsl:template>
- <xsl:template match="演:切入" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-peek-in</xsl:attribute>
- <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>
- <anim:set smil:begin="0s" smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- <anim:transitionFilter smil:type="slideWipe" smil:direction="reverse">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <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>
- </anim:transitionFilter>
- </xsl:template>
- <xsl:template match="演:十字形扩展" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-plus</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
- <anim:set smil:begin="0s" smil:dur="0.00025s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- <anim:transitionFilter smil:type="fourBoxWipe" smil:direction="reverse">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <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>
- </anim:transitionFilter>
- </xsl:template>
- <xsl:template match="演:随机线条" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-bars</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
- <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- <anim:transitionFilter smil:type="randomBarWipe" smil:direction="reverse">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <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>
- </anim:transitionFilter>
- </xsl:template>
- <xsl:template match="演:劈裂" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-split</xsl:attribute>
- <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>
- <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- <anim:transitionFilter smil:dur="0.5s" smil:type="barnDoorWipe">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <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>
- </anim:transitionFilter>
- </xsl:template>
- <xsl:template match="演:百叶窗" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-venetian-blinds</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
- <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- <anim:transitionFilter smil:type="blindsWipe" smil:direction="reverse">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <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>
- </anim:transitionFilter>
- </xsl:template>
- <xsl:template match="演:扇形展开" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-wedge</xsl:attribute>
- <anim:set smil:begin="0s" smil:dur="0.0015s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- <anim:transitionFilter smil:type="fanWipe" smil:subtype="centerTop">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- </anim:transitionFilter>
- </xsl:template>
- <xsl:template match="演:轮子" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-wheel</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:辐射状"/></xsl:attribute>
- <anim:set smil:begin="0s" smil:dur="0.00025s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- <anim:transitionFilter smil:dur="0.5s" smil:type="pinWheelWipe">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <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>
- </anim:transitionFilter>
- </xsl:template>
- <xsl:template match="演:擦除" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-wipe</xsl:attribute>
- <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>
- <anim:set smil:begin="0s" smil:dur="0.006s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- <anim:transitionFilter smil:type="barWipe" smil:subtype="leftToRight" smil:direction="reverse">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <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>
- </anim:transitionFilter>
- </xsl:template>
- <xsl:template match="演:随机效果" mode="entrance">
- <xsl:attribute name="presentation:preset-id">ooo-entrance-random</xsl:attribute>
- <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- <anim:animate smil:dur="1s" smil:fill="hold" smil:attributeName="width" smil:values="0;width" smil:keyTimes="0;1" presentation:additive="base">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- </anim:animate>
- <anim:animate smil:fill="hold" smil:attributeName="height" smil:values="0;height" smil:keyTimes="0;1" presentation:additive="base">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- </anim:animate>
- <anim:animate smil:fill="hold" smil:attributeName="rotate" smil:values="90;0" smil:keyTimes="0;1" presentation:additive="base">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- </anim:animate>
- <anim:transitionFilter smil:type="fade" smil:subtype="crossfade">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- </anim:transitionFilter>
- </xsl:template>
- <xsl:template match="更改填充颜色" mode="emphasis">
- <xsl:attribute name="presentation:preset-id">ooo-emphasis-fill-color</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type">2</xsl:attribute>
- <anim:animateColor smil:fill="hold" smil:attributeName="fill-color" presentation:additive="base" anim:color-interpolation="rgb" anim:color-interpolation-direction="clockwise">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:to"><xsl:value-of select="@演:颜色"/></xsl:attribute>
- </anim:animateColor>
- <anim:set smil:dur="0.5s" smil:fill="hold" smil:attributeName="fill" smil:to="solid">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="更改字体颜色" mode="emphasis">
- <xsl:attribute name="presentation:preset-id">ooo-emphasis-font-color</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type">2</xsl:attribute>
- <anim:animateColor smil:fill="hold" smil:attributeName="fill-color" presentation:additive="base" anim:color-interpolation="rgb" anim:color-interpolation-direction="clockwise">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:to"><xsl:value-of select="@演:颜色"/></xsl:attribute>
- </anim:animateColor>
- </xsl:template>
- <xsl:template match="演:更改字号" mode="emphasis">
- <xsl:attribute name="presentation:preset-id">ooo-emphasis-font-size</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type">2</xsl:attribute>
- <anim:animate smil:fill="hold" smil:attributeName="font-size" presentation:additive="base">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <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>
- </anim:animate>
- </xsl:template>
- <xsl:template name="emp_font_style">
- <xsl:param name="fontstyle"/>
- <xsl:choose>
- <xsl:when test="contains($fontstyle,' ')">
- <anim:set smil:dur="indefinite" smil:attributeName="font-style">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:to"><xsl:value-of select="substring-before($fontstyle,' ')"/></xsl:attribute>
- </anim:set>
- <xsl:variable name="fontstyle1">
- <xsl:choose>
- <xsl:when test="contains($fontstyle,' ')">
- <xsl:value-of select="substring-after($fontstyle,' ')"/>
- </xsl:when>
- <xsl:when test="not($fontstyle=' ')">
- <xsl:value-of select="$fontstyle"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:call-template name="emp_font_style">
- <xsl:with-param name="fontstyle">
- <xsl:value-of select="$fontstyle1"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="演:更改字形" mode="emphasis">
- <xsl:attribute name="presentation:preset-id">ooo-emphasis-font-style</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type">1</xsl:attribute>
- <xsl:call-template name="emp_font_style">
- <xsl:with-param name="fontstyle">
- <xsl:value-of select="@演:字形"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="演:更改线条颜色" mode="emphasis">
- <xsl:attribute name="presentation:preset-id">ooo-emphasis-line-color</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type">2</xsl:attribute>
- <anim:animateColor smil:dur="0s" smil:fill="hold" smil:attributeName="stroke-color" presentation:additive="base" anim:color-interpolation="rgb" anim:color-interpolation-direction="clockwise">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:to"><xsl:value-of select="@演:颜色"/></xsl:attribute>
- </anim:animateColor>
- <anim:set smil:dur="0s" smil:fill="hold" anim:sub-item="text" smil:attributeName="stroke" smil:to="solid">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:陀螺旋" mode="emphasis">
- <xsl:attribute name="presentation:preset-id">ooo-emphasis-spin</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type">2</xsl:attribute>
- <anim:animateTransform smil:fill="hold" smil:by="180" presentation:additive="base" svg:type="rotate">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <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>
- </anim:animateTransform>
- </xsl:template>
- <xsl:template match="演:透明" mode="emphasis">
- <xsl:attribute name="presentation:preset-id">ooo-emphasis-transparency</xsl:attribute>
- <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>
- <anim:set smil:dur="indefinite" anim:sub-item="text" smil:attributeName="opacity">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <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>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:缩放" mode="emphasis">
- <xsl:attribute name="presentation:preset-id">ooo-emphasis-grow-and-shrink</xsl:attribute>
- <anim:animateTransform smil:fill="hold" anim:sub-item="text" presentation:additive="base" svg:type="scale">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <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>
- </anim:animateTransform>
- </xsl:template>
- <xsl:template match="演:盒状" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-box</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
- <anim:transitionFilter smil:type="irisWipe" smil:subtype="rectangle" smil:direction="reverse" smil:mode="out">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:transitionFilter>
- <anim:set smil:dur="0.004s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:棋盘" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-checkerboard</xsl:attribute>
- <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>
- <anim:transitionFilter smil:dur="2s" anim:sub-item="text" smil:type="checkerBoardWipe" smil:subtype="down" smil:mode="out">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:transitionFilter>
- <anim:set smil:dur="0.004s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:圆形扩展" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-circle</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
- <anim:transitionFilter smil:type="ellipseWipe" smil:subtype="horizontal" smil:direction="reverse" smil:mode="out">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:transitionFilter>
- <anim:set smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:阶梯状" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-diagonal-squares</xsl:attribute>
- <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>
- <anim:transitionFilter smil:type="waterfallWipe" smil:direction="reverse" smil:mode="out">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <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>
- </anim:transitionFilter>
- <anim:set smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:菱形" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-diamond</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
- <anim:transitionFilter smil:type="irisWipe" smil:subtype="diamond" smil:direction="reverse" smil:mode="out">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:transitionFilter>
- <anim:set smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:消失" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-disappear</xsl:attribute>
- <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" anim:sub-item="text" smil:attributeName="visibility" smil:to="visible">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:向外溶解" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-dissolve</xsl:attribute>
- <anim:transitionFilter smil:type="dissolve" smil:direction="reverse" smil:mode="out">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:transitionFilter>
- <anim:set smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:闪烁一次" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-flash-once</xsl:attribute>
- <anim:animate smil:attributeName="visibility" smil:values="hidden;visible" smil:keyTimes="0;0.5" smil:calcMode="discrete" presentation:additive="base">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:animate>
- <anim:set smil:dur="0s" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:飞出" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-fly-out</xsl:attribute>
- <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>
- <xsl:variable name="smilvalueX">
- <xsl:choose>
- <xsl:when test="contains(@演:方向,'right')">x;1+width/2</xsl:when>
- <xsl:when test="contains(@演:方向,'left')">x;0-width/2</xsl:when>
- <xsl:otherwise>x;x</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="smilvalueY">
- <xsl:choose>
- <xsl:when test="contains(@演:方向,'bottom')">y;1+height/2</xsl:when>
- <xsl:when test="contains(@演:方向,'top')">y;0-height/2</xsl:when>
- <xsl:otherwise>y;y</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <anim:animate smil:fill="hold" smil:attributeName="x" smil:keyTimes="0;1" presentation:additive="base">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:values"><xsl:value-of select="$smilvalueX"/></xsl:attribute>
- </anim:animate>
- <anim:animate smil:fill="hold" smil:attributeName="y" smil:keyTimes="0;1" presentation:additive="base">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:values"><xsl:value-of select="$smilvalueY"/></xsl:attribute>
- </anim:animate>
- <anim:set smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:缓慢移出" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-crawl-out</xsl:attribute>
- <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>
- <xsl:variable name="smilvalueX">
- <xsl:choose>
- <xsl:when test="contains(@演:方向,'right')">x;1+width/2</xsl:when>
- <xsl:when test="contains(@演:方向,'left')">x;0-width/2</xsl:when>
- <xsl:otherwise>x;x</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="smilvalueY">
- <xsl:choose>
- <xsl:when test="contains(@演:方向,'bottom')">y;1+height/2</xsl:when>
- <xsl:when test="contains(@演:方向,'top')">y;0-height/2</xsl:when>
- <xsl:otherwise>y;y</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <anim:animate smil:fill="hold" smil:attributeName="x" smil:keyTimes="0;1" presentation:additive="base">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:values"><xsl:value-of select="$smilvalueX"/></xsl:attribute>
- </anim:animate>
- <anim:animate smil:fill="hold" smil:attributeName="y" smil:keyTimes="0;1" presentation:additive="base">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:values"><xsl:value-of select="$smilvalueY"/></xsl:attribute>
- </anim:animate>
- <anim:set smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:切出" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-peek-out</xsl:attribute>
- <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>
- <anim:transitionFilter smil:type="slideWipe" smil:direction="reverse" smil:mode="out">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <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>
- </anim:transitionFilter>
- <anim:set smil:dur="0.0005s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:十字形扩展" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-plus</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
- <anim:transitionFilter smil:type="fourBoxWipe" smil:direction="reverse" smil:mode="out">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <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>
- </anim:transitionFilter>
- <anim:set smil:dur="0.00025s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:随机线条" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-random-bars</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
- <anim:transitionFilter smil:type="randomBarWipe" smil:direction="reverse" smil:mode="out">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <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>
- </anim:transitionFilter>
- <anim:set smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:劈裂" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-split</xsl:attribute>
- <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>
- <anim:transitionFilter smil:dur="0.5s" smil:type="barnDoorWipe" smil:mode="out">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <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>
- </anim:transitionFilter>
- <anim:set smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:百叶窗" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-venetian-blinds</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:方向"/></xsl:attribute>
- <anim:transitionFilter smil:type="blindsWipe" smil:direction="reverse" smil:mode="out">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <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>
- </anim:transitionFilter>
- <anim:set smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:扇形展开" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-wedge</xsl:attribute>
- <anim:transitionFilter smil:type="fanWipe" smil:subtype="centerTop" smil:mode="out">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- </anim:transitionFilter>
- <anim:set smil:dur="0.0015s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:轮子" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-wheel</xsl:attribute>
- <xsl:attribute name="presentation:preset-sub-type"><xsl:value-of select="@演:辐射状"/></xsl:attribute>
- <anim:transitionFilter smil:dur="0.5s" smil:type="pinWheelWipe" smil:mode="out">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <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>
- </anim:transitionFilter>
- <anim:set smil:dur="0.00025s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:擦除" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-wipe</xsl:attribute>
- <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>
- <anim:transitionFilter smil:type="barWipe" smil:subtype="leftToRight" smil:direction="reverse" smil:mode="out">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <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>
- </anim:transitionFilter>
- <anim:set smil:dur="0.006s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="演:随机效果" mode="exit">
- <xsl:attribute name="presentation:preset-id">ooo-exit-random</xsl:attribute>
- <anim:transitionFilter smil:type="fade" smil:subtype="crossfade" smil:mode="out">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:transitionFilter>
- <anim:animate smil:attributeName="x" smil:values="x;x" smil:keyTimes="0;1" presentation:additive="base">
- <xsl:attribute name="smil:dur"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:animate>
- <anim:animate smil:dur="0.1s" smil:decelerate="1" smil:attributeName="y" smil:values="y;y-.03" smil:keyTimes="0;1" presentation:additive="base">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:animate>
- <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">
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:animate>
- <anim:set smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="hidden">
- <xsl:attribute name="smil:begin"><xsl:call-template name="演速度"/></xsl:attribute>
- <xsl:attribute name="smil:targetElement"><xsl:value-of select="ancestor::演:序列/@演:动画对象"/></xsl:attribute>
- </anim:set>
- </xsl:template>
- <xsl:template match="uof:锚点" name="图形解析">
- <xsl:variable name="tuxing1" select="@uof:图形引用"/>
- <xsl:choose>
- <xsl:when test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]">
- <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'">
- <xsl:element name="draw:frame">
- <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>
- <xsl:attribute name="presentation:class">graphic</xsl:attribute>
- <xsl:attribute name="presentation:user-transformed">true</xsl:attribute>
- <xsl:attribute name="svg:x"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:y"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:width"><xsl:value-of select="concat(@uof:宽度,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:height"><xsl:value-of select="concat(@uof:高度,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="draw:layer">layout</xsl:attribute>
- <xsl:if test="../演:动画/演:序列/@演:动画对象=$tuxing1">
- <xsl:attribute name="draw:id"><xsl:value-of select="$tuxing1"/></xsl:attribute>
- </xsl:if>
- <draw:image>
- <xsl:if test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:路径">
- <xsl:attribute name="xlink:href"><xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:路径"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:路径">
- <xsl:attribute name="xlink:href"><xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:路径"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:数据">
- <office:binary-data>
- <xsl:value-of select="/uof:UOF/uof:对象集/uof:其他对象[@uof:标识符=$tuxing1]/uof:数据"/>
- </office:binary-data>
- </xsl:if>
- </draw:image>
- </xsl:element>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="graph">
- <xsl:with-param name="id" select="/uof:UOF/uof:对象集/图:图形[@图:标识符=$tuxing1]"/>
- <xsl:with-param name="groupx" select="0"/>
- <xsl:with-param name="groupy" select="0"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="graph">
- <xsl:param name="id"/>
- <xsl:param name="groupx"/>
- <xsl:param name="groupy"/>
- <xsl:for-each select="$id">
- <xsl:variable name="tuxing1">
- <xsl:value-of select="图:预定义图形/图:类别"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$tuxing1='11'">
- <xsl:call-template name="Rectangle">
- <xsl:with-param name="groupx1" select="$groupx"/>
- <xsl:with-param name="groupy1" select="$groupy"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$tuxing1='19'">
- <xsl:call-template name="Oval">
- <xsl:with-param name="groupx1" select="$groupx"/>
- <xsl:with-param name="groupy1" select="$groupy"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$tuxing1='61'">
- <xsl:call-template name="Line">
- <xsl:with-param name="groupx1" select="$groupx"/>
- <xsl:with-param name="groupy1" select="$groupy"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$tuxing1='64'">
- <xsl:call-template name="Curve">
- <xsl:with-param name="groupx1" select="$groupx"/>
- <xsl:with-param name="groupy1" select="$groupy"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$tuxing1='65'">
- <xsl:call-template name="Freeform">
- <xsl:with-param name="groupx1" select="$groupx"/>
- <xsl:with-param name="groupy1" select="$groupy"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$tuxing1='66'">
- <xsl:call-template name="Scribble">
- <xsl:with-param name="groupx1" select="$groupx"/>
- <xsl:with-param name="groupy1" select="$groupy"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$tuxing1='3'">
- <xsl:call-template name="演文本框"/>
- </xsl:when>
- <xsl:when test="$tuxing1='67'">
- <xsl:call-template name="演缩略图"/>
- </xsl:when>
- <xsl:when test="$tuxing1='4'">
- <xsl:element name="draw:g">
- <xsl:variable name="tu">
- <xsl:value-of select="@图:标识符"/>
- </xsl:variable>
- <xsl:attribute name="draw:style-name"><xsl:value-of select="$tu"/></xsl:attribute>
- <xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute>
- <xsl:variable name="this-group-x">
- <xsl:value-of select="key('rel_graphic_name',@图:标识符)/@uof:x坐标"/>
- </xsl:variable>
- <xsl:variable name="this-group-y">
- <xsl:value-of select="key('rel_graphic_name',@图:标识符)/uof:y坐标"/>
- </xsl:variable>
- <xsl:variable name="group-x">
- <xsl:value-of select="number($groupx + $this-group-x)"/>
- </xsl:variable>
- <xsl:variable name="group-y">
- <xsl:value-of select="number($groupy + $this-group-y)"/>
- </xsl:variable>
- <xsl:call-template name="组合图形">
- <xsl:with-param name="zuheliebiao" select="@图:组合列表"/>
- <xsl:with-param name="groupx1" select="$group-x"/>
- <xsl:with-param name="groupy1" select="$group-y"/>
- </xsl:call-template>
- </xsl:element>
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="common">
- <xsl:param name="groupx"/>
- <xsl:param name="groupy"/>
- <xsl:variable name="tuxing">
- <xsl:value-of select="@图:标识符"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="key('rel_graphic_name',@图:标识符)">
- <xsl:for-each select="key('rel_graphic_name',@图:标识符)">
- <xsl:attribute name="svg:x"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:y"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:width"><xsl:value-of select="concat(@uof:宽度,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:height"><xsl:value-of select="concat(@uof:高度,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="draw:layer"><xsl:choose><xsl:when test="parent::演:母版">backgroundobjects</xsl:when><xsl:otherwise>layout</xsl:otherwise></xsl:choose></xsl:attribute>
- <xsl:if test="../演:动画/演:序列/@演:动画对象=$tuxing">
- <xsl:attribute name="draw:id"><xsl:value-of select="$tuxing"/></xsl:attribute>
- </xsl:if>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="zuheweizhi-x">
- <xsl:value-of select="图:组合位置/@图:x坐标"/>
- </xsl:variable>
- <xsl:variable name="zuheweizhi-y">
- <xsl:value-of select="图:组合位置/@图:y坐标"/>
- </xsl:variable>
- <xsl:attribute name="text:anchor-type">paragraph</xsl:attribute>
- <xsl:attribute name="svg:x"><xsl:value-of select="concat(($groupx + $zuheweizhi-x),$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:y"><xsl:value-of select="concat(($groupy + $zuheweizhi-y),$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:width"><xsl:value-of select="concat(图:预定义图形 /图:属性/图:宽度,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:height"><xsl:value-of select="concat(图:预定义图形/图:属性 /图:高度,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="draw:layer">layout</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:attribute name="draw:style-name"><xsl:value-of select="@图:标识符"/></xsl:attribute>
- <xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute>
- <xsl:if test="图:预定义图形/图:属性/图:旋转角度 and not(图:预定义图形/图:属性/图:旋转角度='0.0')">
- <xsl:variable name="rotate-angle">
- <xsl:value-of select="(图:预定义图形/图:属性/图:旋转角度 * 2 * 3.14159265 ) div 360"/>
- </xsl:variable>
- <xsl:attribute name="draw:transform"><xsl:value-of select="concat('rotate (',$rotate-angle,') translate (-0.0194027777777778cm 3.317875cm)')"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="图:文本内容">
- <xsl:apply-templates select="图:文本内容/字:段落"/>
- <xsl:apply-templates select="图:文本内容/字:文字表"/>
- </xsl:if>
- </xsl:template>
- <xsl:template name="组合图形">
- <xsl:param name="zuheliebiao"/>
- <xsl:param name="groupx1"/>
- <xsl:param name="groupy1"/>
- <xsl:variable name="x">
- <xsl:value-of select="$groupx1"/>
- </xsl:variable>
- <xsl:variable name="y">
- <xsl:value-of select="$groupy1"/>
- </xsl:variable>
- <xsl:variable name="first-pictures">
- <xsl:value-of select="substring-before($zuheliebiao,',')"/>
- </xsl:variable>
- <xsl:variable name="other-pictures">
- <xsl:value-of select="substring-after($zuheliebiao,',')"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="contains($other-pictures,',')">
- <xsl:call-template name="graph">
- <xsl:with-param name="id" select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $first-pictures]"/>
- <xsl:with-param name="groupx" select="$groupx1"/>
- <xsl:with-param name="groupy" select="$groupy1"/>
- </xsl:call-template>
- <xsl:call-template name="组合图形">
- <xsl:with-param name="zuheliebiao" select="$other-pictures"/>
- <xsl:with-param name="groupx1" select="$x"/>
- <xsl:with-param name="groupy1" select="$y"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="graph">
- <xsl:with-param name="id" select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $first-pictures]"/>
- <xsl:with-param name="groupx" select="$groupx1"/>
- <xsl:with-param name="groupy" select="$groupy1"/>
- </xsl:call-template>
- <xsl:call-template name="graph">
- <xsl:with-param name="id" select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $other-pictures]"/>
- <xsl:with-param name="groupx" select="$groupx1"/>
- <xsl:with-param name="groupy" select="$groupy1"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="Curve">
- <xsl:param name="groupx1"/>
- <xsl:param name="groupy1"/>
- <xsl:element name="draw:path">
- <xsl:variable name="width" select="number(图:预定义图形/图:属性/图:宽度)*1000"/>
- <xsl:variable name="height" select="number(图:预定义图形/图:属性/图:高度)*1000"/>
- <xsl:attribute name="svg:viewBox"><xsl:value-of select="concat('0 0 ',$width, ' ',$height)"/></xsl:attribute>
- <xsl:attribute name="svg:d"><xsl:value-of select="图:预定义图形/图:关键点坐标/@图:路径"/></xsl:attribute>
- <xsl:call-template name="common">
- <xsl:with-param name="groupx" select="$groupx1"/>
- <xsl:with-param name="groupy" select="$groupy1"/>
- </xsl:call-template>
- </xsl:element>
- </xsl:template>
- <xsl:template name="Freeform">
- <xsl:param name="groupx1"/>
- <xsl:param name="groupy1"/>
- <xsl:element name="draw:polygon">
- <xsl:variable name="width" select="number(图:预定义图形/图:属性/图:宽度)*1000"/>
- <xsl:variable name="height" select="number(图:预定义图形/图:属性/图:高度)*1000"/>
- <xsl:attribute name="svg:viewBox"><xsl:value-of select="concat('0 0 ',$width, ' ',$height)"/></xsl:attribute>
- <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>
- <xsl:call-template name="common">
- <xsl:with-param name="groupx" select="$groupx1"/>
- <xsl:with-param name="groupy" select="$groupy1"/>
- </xsl:call-template>
- </xsl:element>
- </xsl:template>
- <xsl:template name="Scribble">
- <xsl:param name="groupx1"/>
- <xsl:param name="groupy1"/>
- <xsl:element name="draw:polyline">
- <xsl:variable name="width" select="number(图:预定义图形/图:属性/图:宽度)*1000"/>
- <xsl:variable name="height" select="number(图:预定义图形/图:属性/图:高度)*1000"/>
- <xsl:attribute name="svg:viewBox"><xsl:value-of select="concat('0 0 ',$width, ' ',$height)"/></xsl:attribute>
- <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>
- <xsl:call-template name="common">
- <xsl:with-param name="groupx" select="$groupx1"/>
- <xsl:with-param name="groupy" select="$groupy1"/>
- </xsl:call-template>
- </xsl:element>
- </xsl:template>
- <xsl:template name="drawpoints">
- <xsl:param name="points"/>
- <xsl:param name="value"/>
- <xsl:variable name="frist-piont">
- <xsl:value-of select="substring-before($points,'lineto')"/>
- </xsl:variable>
- <xsl:variable name="other-points">
- <xsl:value-of select="substring-after($points,'lineto')"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="contains($other-points,'lineto')">
- <xsl:variable name="x-coor">
- <xsl:value-of select="substring-before($frist-piont,' ') * 1000"/>
- </xsl:variable>
- <xsl:variable name="y-coor">
- <xsl:value-of select="substring-after($frist-piont,' ') * 1000"/>
- </xsl:variable>
- <xsl:variable name="all-points">
- <xsl:value-of select="concat($value,$x-coor,',',$y-coor,' ')"/>
- </xsl:variable>
- <xsl:call-template name="drawpoints">
- <xsl:with-param name="points" select="$other-points"/>
- <xsl:with-param name="value" select="$all-points"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="q-x-coor">
- <xsl:value-of select="substring-before($frist-piont,' ') * 1000"/>
- </xsl:variable>
- <xsl:variable name="q-y-coor">
- <xsl:value-of select="substring-after($frist-piont,' ') * 1000"/>
- </xsl:variable>
- <xsl:variable name="e-x-coor">
- <xsl:value-of select="substring-before($other-points,' ') * 1000"/>
- </xsl:variable>
- <xsl:variable name="e-y-coor">
- <xsl:value-of select="substring-after($other-points,' ') * 1000"/>
- </xsl:variable>
- <xsl:value-of select="concat($value,$q-x-coor,',',$q-y-coor,' ',$e-x-coor,',',$e-y-coor)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="Oval">
- <xsl:param name="groupx1"/>
- <xsl:param name="groupy1"/>
- <xsl:element name="draw:ellipse">
- <xsl:call-template name="common">
- <xsl:with-param name="groupx" select="$groupx1"/>
- <xsl:with-param name="groupy" select="$groupy1"/>
- </xsl:call-template>
- </xsl:element>
- </xsl:template>
- <xsl:template name="Rectangle">
- <xsl:param name="groupx1"/>
- <xsl:param name="groupy1"/>
- <xsl:element name="draw:rect">
- <xsl:call-template name="common">
- <xsl:with-param name="groupx" select="$groupx1"/>
- <xsl:with-param name="groupy" select="$groupy1"/>
- </xsl:call-template>
- </xsl:element>
- </xsl:template>
- <xsl:template name="Line">
- <xsl:param name="groupx1"/>
- <xsl:param name="groupy1"/>
- <xsl:element name="draw:line">
- <xsl:variable name="tuxing1" select="@图:标识符"/>
- <xsl:choose>
- <xsl:when test="key('rel_graphic_name',@图:标识符)">
- <xsl:for-each select="key('rel_graphic_name',@图:标识符)">
- <xsl:attribute name="svg:x1"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:y1"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:x2"><xsl:value-of select="concat((@uof:x坐标 + @uof:宽度),$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:y2"><xsl:value-of select="concat((@uof:y坐标 + @uof:高度),$uofUnit)"/></xsl:attribute>
- <xsl:if test="../演:动画/演:序列/@演:动画对象=$tuxing1">
- <xsl:attribute name="draw:id"><xsl:value-of select="$tuxing1"/></xsl:attribute>
- </xsl:if>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="zuheweizhi-x">
- <xsl:value-of select="图:组合位置/@图:x坐标"/>
- </xsl:variable>
- <xsl:variable name="zuheweizhi-y">
- <xsl:value-of select="图:组合位置/@图:y坐标"/>
- </xsl:variable>
- <xsl:variable name="hex">
- <xsl:value-of select="concat(number($groupx1 + $zuheweizhi-x),$uofUnit)"/>
- </xsl:variable>
- <xsl:variable name="hey">
- <xsl:value-of select="concat(number($groupy1 + $zuheweizhi-y),$uofUnit)"/>
- </xsl:variable>
- <xsl:attribute name="svg:x1"><xsl:value-of select="$hex"/></xsl:attribute>
- <xsl:attribute name="svg:y1"><xsl:value-of select="$hey"/></xsl:attribute>
- <xsl:attribute name="svg:x2"><xsl:value-of select="concat(($hex + 图:预定义图形/图:属性/图:宽度),$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:y2"><xsl:value-of select="concat(($hey + 图:预定义图形/图:属性/图:高度),$uofUnit)"/></xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:attribute name="text:anchor-type">paragraph</xsl:attribute>
- <xsl:attribute name="draw:style-name"><xsl:value-of select="$tuxing1"/></xsl:attribute>
- <xsl:attribute name="draw:z-index"><xsl:value-of select="@图:层次"/></xsl:attribute>
- <xsl:if test="图:预定义图形/图:属性/图:旋转角度 and not(图:预定义图形/图:属性/图:旋转角度='0.0')">
- <xsl:variable name="rotate-angle">
- <xsl:value-of select="(图:预定义图形/图:属性/图:旋转角度 * 2 * 3.14159265 ) div 360"/>
- </xsl:variable>
- <xsl:attribute name="draw:transform"><xsl:value-of select="concat('rotate (',$rotate-angle,') translate (-0.0194027777777778cm 3.317875cm)')"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="图:文本内容">
- <xsl:apply-templates select="图:文本内容/字:段落"/>
- <xsl:apply-templates select="图:文本内容/字:文字表"/>
- </xsl:if>
- </xsl:element>
- </xsl:template>
- <xsl:template name="演文本框">
- <xsl:for-each select="key('rel_graphic_name',@图:标识符)">
- <xsl:variable name="tuxing1" select="@uof:图形引用"/>
- <xsl:element name="draw:frame">
- <xsl:attribute name="svg:x"><xsl:value-of select="concat(@uof:x坐标,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:y"><xsl:value-of select="concat(@uof:y坐标,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:width"><xsl:value-of select="concat(@uof:宽度,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:height"><xsl:value-of select="concat(@uof:高度,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="draw:layer"><xsl:choose><xsl:when test="parent::演:母版">backgroundobjects</xsl:when><xsl:otherwise>layout</xsl:otherwise></xsl:choose></xsl:attribute>
- <xsl:if test="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]/图:预定义图形/图:类别 = '3' and (parent::演:幻灯片/@演:配色方案引用) and not(@uof:占位符 = 'graphic')">
- <xsl:attribute name="presentation:style-name"><xsl:value-of select="parent::演:幻灯片/@演:配色方案引用"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="../演:动画/演:序列/@演:动画对象=$tuxing1">
- <xsl:attribute name="draw:id"><xsl:value-of select="$tuxing1"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="not(@uof:占位符 = 'graphic')">
- <xsl:attribute name="presentation:style-name"><xsl:value-of select="@uof:图形引用"/></xsl:attribute>
- </xsl:if>
- <xsl:variable name="placeholdType">
- <xsl:value-of select="@uof:占位符"/>
- </xsl:variable>
- <xsl:if test="@uof:占位符">
- <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>
- </xsl:if>
- <xsl:for-each select="/uof:UOF/uof:对象集/图:图形[@图:标识符 = $tuxing1]">
- <xsl:variable name="leibie">
- <xsl:value-of select="图:预定义图形/图:类别"/>
- </xsl:variable>
- <xsl:if test="图:预定义图形/图:属性/图:旋转角度 and not(图:预定义图形/图:属性/图:旋转角度='0.0')">
- <xsl:variable name="rotate-angle">
- <xsl:value-of select="(图:预定义图形/图:属性/图:旋转角度 * 2 * 3.14159265 ) div 360"/>
- </xsl:variable>
- <xsl:attribute name="draw:transform"><xsl:value-of select="concat('rotate (',$rotate-angle,') translate (-0.0194027777777778cm 3.317875cm)')"/></xsl:attribute>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="图:文本内容 or @图:其他对象">
- <xsl:attribute name="presentation:user-transformed">true</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="presentation:placeholder">true</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="$placeholdType = 'graphic' or $placeholdType = 'clipart' or $placeholdType ='media_clip'">
- <draw:image/>
- </xsl:when>
- <xsl:when test="$placeholdType = 'table' or $placeholdType = 'chart' or $placeholdType ='object'">
- <draw:object/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="draw:text-box">
- <xsl:apply-templates select="图:文本内容/字:段落"/>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:element>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="演缩略图">
- <draw:page-thumbnail>
- <xsl:call-template name="common"/>
- <xsl:attribute name="draw:layer">layout</xsl:attribute>
- <xsl:attribute name="draw:page-number"><xsl:for-each select="../.."><xsl:value-of select="count(preceding-sibling::演:幻灯片) + 1"/></xsl:for-each></xsl:attribute>
- <xsl:attribute name="presentation:class">page</xsl:attribute>
- </draw:page-thumbnail>
- </xsl:template>
- <xsl:template match="演:页面版式">
- <xsl:element name="style:presentation-page-layout">
- <xsl:attribute name="style:name"><xsl:value-of select="@演:标识符"/></xsl:attribute>
- <xsl:apply-templates select="演:占位符" mode="layout"/>
- </xsl:element>
- </xsl:template>
- <xsl:template match="演:占位符" mode="layout">
- <presentation:placeholder>
- <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>
- <xsl:attribute name="svg:x"><xsl:value-of select="concat(uof:锚点/@uof:x坐标,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:y"><xsl:value-of select="concat(uof:锚点/@uof:y坐标,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:width"><xsl:value-of select="concat(uof:锚点/@uof:宽度,$uofUnit)"/></xsl:attribute>
- <xsl:attribute name="svg:height"><xsl:value-of select="concat(uof:锚点/@uof:高度,$uofUnit)"/></xsl:attribute>
- </presentation:placeholder>
- </xsl:template>
- <xsl:template match="字:段落">
- <xsl:choose>
- <xsl:when test="字:段落属性/字:自动编号信息">
- <xsl:call-template name="编号解析"/>
- </xsl:when>
- <xsl:when test="字:句/字:分页符">
- <xsl:call-template name="processPageBreaks"/>
- </xsl:when>
- <xsl:when test="string(parent::node()/@uof:locID)='t0107'">
- <xsl:call-template name="jiaozhu"/>
- </xsl:when>
- <xsl:when test="string(parent::node()/@uof:locID)='t0108'">
- <xsl:call-template name="weizhu"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="commonParagraph"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="jiaozhu">
- <xsl:element name="text:footnote">
- <xsl:element name="text:footnote-body">
- <xsl:call-template name="commonParagraph"/>
- </xsl:element>
- </xsl:element>
- </xsl:template>
- <xsl:template name="weizhu">
- <xsl:element name="text:endnote">
- <xsl:element name="text:endnote-body">
- <xsl:call-template name="commonParagraph"/>
- </xsl:element>
- </xsl:element>
- </xsl:template>
- <xsl:template name="processPageBreaks">
- <xsl:variable name="pageBreak" select="字:句/字:分页符"/>
- <xsl:call-template name="createSubParagraph">
- <xsl:with-param name="list" select="$pageBreak[1]/preceding-sibling::字:句"/>
- <xsl:with-param name="pageBreak"/>
- <xsl:with-param name="needsPageBreak">false</xsl:with-param>
- </xsl:call-template>
- <xsl:for-each select="$pageBreak">
- <xsl:call-template name="createSubParagraph">
- <xsl:with-param name="list" select="./following-sibling::字:句[preceding::字:句/字:分页符 = '.']"/>
- <xsl:with-param name="pageBreak" select="."/>
- <xsl:with-param name="needsPageBreak">true</xsl:with-param>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="createSubParagraph">
- <xsl:param name="list"/>
- <xsl:param name="pageBreak"/>
- <xsl:param name="needsPageBreak"/>
- <xsl:if test="(count($list) > 0) or ($needsPageBreak ='true') ">
- <xsl:element name="text:p">
- <xsl:choose>
- <xsl:when test="$needsPageBreak = 'true'">
- <xsl:choose>
- <xsl:when test="ancestor::字:段落/字:段落属性">
- <xsl:attribute name="text:style-name">P<xsl:number from="/uof:UOF/uof:演示文稿/演:主体" level="any" count="字:段落属性"/></xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="text:style-name">PageBreak</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- <xsl:if test="$pageBreak">
- <xsl:apply-templates select="$pageBreak"/>
- </xsl:if>
- <xsl:apply-templates select="$list"/>
- </xsl:element>
- </xsl:if>
- </xsl:template>
- <xsl:template match="字:区域开始[@字:类型='bookmark']">
- <text:bookmark-start text:name="{@字:标识符}"/>
- </xsl:template>
- <xsl:template match="字:区域结束[preceding::字:区域开始[1]/@字:类型='bookmark']">
- <text:bookmark-end text:name="{@字:标识符引用}"/>
- </xsl:template>
- <xsl:template match="字:段落/字:域开始">
- <xsl:choose>
- <xsl:when test="@字:类型='CREATEDATE'">
- <xsl:variable name="datestr" select="../字:句/字:文本串"/>
- <xsl:element name="text:date">
- <xsl:attribute name="style:data-style-name">Time<xsl:number from="/uof:UOF/uof:演示文稿/演:主体" level="any" count="字:段落/字:域开始[@字:类型 = 'CREATEDATE']"/></xsl:attribute>
- <xsl:attribute name="text:date-value"><xsl:value-of select="concat(substring-before($datestr,' '),'T',substring-after($datestr,' '))"/></xsl:attribute>
- <xsl:value-of select="$datestr"/>
- </xsl:element>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="commonParagraph">
- <xsl:element name="text:p">
- <xsl:if test="@字:动画标识">
- <xsl:attribute name="text:id"><xsl:value-of select="@字:动画标识"/></xsl:attribute>
- </xsl:if>
- <xsl:call-template name="commonParagraphAttributes"/>
- <xsl:apply-templates/>
- </xsl:element>
- </xsl:template>
- <xsl:template name="commonParagraphAttributes">
- <xsl:choose>
- <xsl:when test="字:段落属性">
- <xsl:attribute name="text:style-name"><xsl:value-of select="字:段落属性/@字:式样引用"/></xsl:attribute>
- </xsl:when>
- <xsl:when test="generate-id(ancestor::字:主体/descendant::字:段落[1]) = generate-id(.)">
- <xsl:variable name="paragraph-number">
- <xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:段落[字:段落属性]"/>
- </xsl:variable>
- <xsl:attribute name="text:style-name">P<xsl:value-of select="number($paragraph-number)"/>_1</xsl:attribute>
- </xsl:when>
- <xsl:when test="not(字:段落属性) and (descendant::字:分栏符 or ancestor::字:分节/descendant::字:节属性[字:分栏/@字:栏数 > 1])">
- <xsl:attribute name="text:style-name">ColumnBreakPara</xsl:attribute>
- </xsl:when>
- <xsl:when test="字:句">
- <xsl:apply-templates select="字:文本串"/>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="字:段落属性"/>
- <xsl:template match="字:句/字:句属性"/>
- <xsl:template match="字:句属性" mode="style">
- <xsl:element name="style:style">
- <xsl:attribute name="style:name">T<xsl:number from="/uof:UOF/uof:对象集" level="any" count="字:句属性" format="1"/></xsl:attribute>
- <xsl:attribute name="style:family">text</xsl:attribute>
- <xsl:if test="@字:式样引用">
- <xsl:attribute name="style:parent-style-name"><xsl:value-of select="@字:式样引用"/></xsl:attribute>
- </xsl:if>
- <xsl:element name="style:text-properties">
- <xsl:apply-templates select="./*"/>
- </xsl:element>
- </xsl:element>
- </xsl:template>
- <xsl:template match="字:句/字:文本串">
- <xsl:choose>
- <xsl:when test="string(.) = ' ' ">
- <xsl:element name="text:s"/>
- </xsl:when>
- <xsl:when test="contains(.,' ')">
- <xsl:call-template name="replace-spaces">
- <xsl:with-param name="curr-string" select="."/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="replace-spaces">
- <xsl:param name="curr-string"/>
- <xsl:if test="contains($curr-string,' ')">
- <xsl:value-of select="substring-before($curr-string,' ')"/>
- <text:s text:c="2"/>
- <xsl:variable name="next-string" select="substring-after($curr-string,' ')"/>
- <xsl:choose>
- <xsl:when test="contains($next-string, ' ')">
- <xsl:call-template name="replace-spaces">
- <xsl:with-param name="curr-string" select="$next-string"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$next-string"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:template>
- <xsl:template match="字:句">
- <xsl:if test="name(following-sibling::*[1])!='字:域结束'">
- <xsl:if test="字:换行符">
- <xsl:element name="text:line-break"/>
- </xsl:if>
- <xsl:variable name="currently-node" select="./字:锚点"/>
- <xsl:choose>
- <xsl:when test="字:句属性//字:隐藏文字/@字:值='true'">
- <text:hidden-text text:is-hidden="true" text:string-value="{.}"/>
- </xsl:when>
- <xsl:when test="字:区域开始[@字:类型='hyperlink']">
- <xsl:element name="text:a">
- <xsl:attribute name="xlink:type">simple</xsl:attribute>
- <xsl:variable name="hyperDest" select="字:区域开始/@字:标识符"/>
- <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>
- <xsl:apply-templates select="字:文本串"/>
- </xsl:element>
- </xsl:when>
- <xsl:when test="(preceding-sibling::字:句) or (字:句属性)or(字:区域开始)">
- <xsl:element name="text:span">
- <xsl:choose>
- <xsl:when test="字:区域开始[@字:类型='annotation']">
- <xsl:variable name="ref_comment">
- <xsl:value-of select="字:区域开始/@字:标识符"/>
- </xsl:variable>
- <xsl:apply-templates/>
- <xsl:apply-templates select="/uof:UOF/uof:文字处理/字:公用处理规则/字:批注集/字:批注[@字:区域引用 = $ref_comment]"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="stylenum">
- <xsl:number from="/uof:UOF/uof:文字处理/字:主体" level="any" count="字:句" format="1"/>
- </xsl:variable>
- <xsl:attribute name="text:style-name"><xsl:value-of select="字:句属性/@字:式样引用"/></xsl:attribute>
- <xsl:apply-templates/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:element>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:template>
- <xsl:template match="node()[name() = '字:位置']">
- <xsl:variable name="height">100% </xsl:variable>
- <xsl:variable name="position">
- <xsl:choose>
- <xsl:when test="parent::字:句属性//字:位置">
- <xsl:value-of select="concat( parent::字:句属性//字:位置, '%')"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:attribute name="style:text-position"><xsl:value-of select="concat(concat( $position, ' '), $height)"/></xsl:attribute>
- </xsl:template>
- <xsl:template match="字:字体">
- <xsl:if test="@字:字号">
- <xsl:attribute name="fo:font-size"><xsl:value-of select="@字:字号"/>pt</xsl:attribute>
- <xsl:attribute name="style:font-size-asian"><xsl:value-of select="@字:字号"/>pt</xsl:attribute>
- <xsl:attribute name="style:font-size-complex"><xsl:value-of select="@字:字号"/>pt</xsl:attribute>
- </xsl:if>
- <xsl:if test="@字:相对字号 and self::node( )[not(parent::字:句属性)]">
- <xsl:variable name="stylename" select="parent::node()/@字:基式样引用"/>
- <xsl:variable name="zihao">
- <xsl:for-each select="/uof:UOF/uof:式样集//uof:段落式样[@字:标识符=$stylename]">
- <xsl:value-of select="字:字体/@字:字号"/>
- </xsl:for-each>
- </xsl:variable>
- <xsl:variable name="font-size" select="@字:相对字号"/>
- <xsl:attribute name="fo:font-size"><xsl:value-of select="($zihao * $font-size div 100)"/>pt</xsl:attribute>
- <xsl:attribute name="style:font-size-asian"><xsl:value-of select="($zihao * $font-size div 100)"/>pt</xsl:attribute>
- <xsl:attribute name="style:font-size-complex"><xsl:value-of select="($zihao * $font-size div 100)"/>pt</xsl:attribute>
- </xsl:if>
- <xsl:if test="@字:颜色">
- <xsl:attribute name="fo:color"><xsl:value-of select="string(@字:颜色)"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@字:中文字体引用">
- <xsl:attribute name="style:font-name-asian"><xsl:value-of select="@字:中文字体引用"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@字:西文字体引用">
- <xsl:attribute name="style:font-name"><xsl:value-of select="@字:西文字体引用"/></xsl:attribute>
- </xsl:if>
- </xsl:template>
- <xsl:template match="字:斜体">
- <xsl:if test="@字:值='true'">
- <xsl:attribute name="fo:font-style">italic</xsl:attribute>
- <xsl:attribute name="fo:font-style-asian">italic</xsl:attribute>
- <xsl:attribute name="style:font-style-asian">italic</xsl:attribute>
- <xsl:attribute name="style:font-style-complex">italic</xsl:attribute>
- </xsl:if>
- </xsl:template>
- <xsl:template match="字:粗体">
- <xsl:if test="@字:值='true'">
- <xsl:attribute name="fo:font-weight">bold</xsl:attribute>
- <xsl:attribute name="fo:font-weight-asian">bold</xsl:attribute>
- <xsl:attribute name="style:font-weight-asian">bold</xsl:attribute>
- <xsl:attribute name="style:font-weight-complex">bold</xsl:attribute>
- </xsl:if>
- </xsl:template>
- <xsl:template match="字:下划线">
- <xsl:choose>
- <xsl:when test="@字:字下划线 = 'true'">
- <xsl:attribute name="style:text-underline">single</xsl:attribute>
- <xsl:attribute name="style:text-underline-color">font-color</xsl:attribute>
- <xsl:attribute name="fo:score-spaces">false</xsl:attribute>
- </xsl:when>
- <xsl:when test="@字:类型 = 'thick'">
- <xsl:attribute name="style:text-underline">bold</xsl:attribute>
- </xsl:when>
- <xsl:when test="@字:类型 = 'dotted-heavy'">
- <xsl:attribute name="style:text-underline">bold-dotted</xsl:attribute>
- </xsl:when>
- <xsl:when test="@字:类型 = 'dashed-heavy'">
- <xsl:attribute name="style:text-underline">bold-dash</xsl:attribute>
- </xsl:when>
- <xsl:when test="@字:类型 = 'dash-long'">
- <xsl:attribute name="style:text-underline">long-dash</xsl:attribute>
- </xsl:when>
- <xsl:when test="@字:类型 = 'dash-long-heavy'">
- <xsl:attribute name="style:text-underline">bold-long-dash</xsl:attribute>
- </xsl:when>
- <xsl:when test="@字:类型 = 'dash-dot-heavy'">
- <xsl:attribute name="style:text-underline">bold-dot-dash</xsl:attribute>
- </xsl:when>
- <xsl:when test="@字:类型 = 'dash-dot-dot-heavy'">
- <xsl:attribute name="style:text-underline">bold-dot-dot-dash</xsl:attribute>
- </xsl:when>
- <xsl:when test="@字:类型 = 'wavy-heavy'">
- <xsl:attribute name="style:text-underline">bold-wave</xsl:attribute>
- </xsl:when>
- <xsl:when test="@字:类型 = 'wavy-double'">
- <xsl:attribute name="style:text-underline">double-wave</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="style:text-underline"><xsl:value-of select="@字:类型"/></xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="@字:颜色 and not(@字:颜色 = 'auto')">
- <xsl:attribute name="style:text-underline-color"><xsl:value-of select="concat( '#', @字:颜色)"/></xsl:attribute>
- </xsl:if>
- </xsl:template>
- <xsl:template match="字:阴影">
- <xsl:attribute name="style:text-shadow">1pt 1pt</xsl:attribute>
- <xsl:attribute name="fo:text-shadow">1pt 1pt</xsl:attribute>
- </xsl:template>
- <xsl:template match="字:删除线">
- <xsl:choose>
- <xsl:when test="@字:类型 = 'single' ">
- <xsl:attribute name="style:text-crossing-out">single-line</xsl:attribute>
- </xsl:when>
- <xsl:when test="@字类型 = 'double'">
- <xsl:attribute name="style:text-crossing-out">double-line</xsl:attribute>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="字:突出显示">
- <xsl:attribute name="fo:text-transform">uppercase</xsl:attribute>
- <xsl:attribute name="fo:text-background-color"><xsl:value-of select="string(@字:颜色)"/></xsl:attribute>
- </xsl:template>
- <xsl:template match="@字:颜色[not(.='auto')]">
- <xsl:attribute name="fo:color">#<xsl:value-of select="."/></xsl:attribute>
- </xsl:template>
- <xsl:template match="字:浮雕">
- <xsl:attribute name="style:font-relief">embossed</xsl:attribute>
- </xsl:template>
- <xsl:template match="字:外框">
- <xsl:attribute name="style:text-outline">true</xsl:attribute>
- </xsl:template>
- <xsl:template match="字:缩放">
- <xsl:attribute name="style:text-scale"><xsl:value-of select="@字:字号"/></xsl:attribute>
- </xsl:template>
- <xsl:template match="字:字符间距[parent::字:句属性]">
- <xsl:attribute name="fo:letter-spacing"><xsl:value-of select="concat( floor(number(字:字符间距 div 1440) * 2540) div 1000, 'cm')"/></xsl:attribute>
- </xsl:template>
- <xsl:template match="uof:字体集">
- <xsl:if test="not(uof:字体声明[@uof:名称='StarSymbol'])">
- <style:font-face style:name="StarSymbol" svg:font-family="StarSymbol" style:font-charset="x-symbol"/>
- </xsl:if>
- <xsl:for-each select="uof:字体声明">
- <xsl:element name="style:font-face">
- <xsl:attribute name="style:name"><xsl:value-of select="@uof:名称"/></xsl:attribute>
- <xsl:attribute name="svg:font-family"><xsl:value-of select="@uof:字体族"/></xsl:attribute>
- <xsl:if test="@uof:字符集 = '02'">
- <xsl:attribute name="style:font-charset">x-symbol</xsl:attribute>
- </xsl:if>
- <xsl:if test="@uof:字体族">
- <xsl:choose>
- <xsl:when test="@uof:字体族 = 'Swiss'">
- <xsl:attribute name="style:font-family-generic">swiss</xsl:attribute>
- </xsl:when>
- <xsl:when test="@uof:字体族 ='Modern'">
- <xsl:attribute name="style:font-family-generic">modern</xsl:attribute>
- </xsl:when>
- <xsl:when test="@uof:字体族='Roman'">
- <xsl:attribute name="style:font-family-generic">roman</xsl:attribute>
- </xsl:when>
- <xsl:when test="@uof:字体族 ='Script'">
- <xsl:attribute name="style:font-family-generic">script</xsl:attribute>
- </xsl:when>
- <xsl:when test="@uof:字体族 ='Decorative'">
- <xsl:attribute name="style:font-family-generic">decorative</xsl:attribute>
- </xsl:when>
- <xsl:when test="@uof:字体族 ='System'">
- <xsl:attribute name="style:font-family-generic">system</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="style:font-family-generic">system</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- <xsl:attribute name="style:font-pitch">12</xsl:attribute>
- </xsl:element>
- </xsl:for-each>
- <xsl:apply-templates select="uof:字体声明"/>
- </xsl:template>
- <xsl:template match="uof:元数据">
- <office:meta>
- <meta:generator>UOFText 2004</meta:generator>
- <dc:title>
- <xsl:value-of select="uof:标题"/>
- </dc:title>
- <dc:description>
- <xsl:value-of select="uof:摘要"/>
- </dc:description>
- <dc:subject>
- <xsl:value-of select="uof:主题"/>
- </dc:subject>
- <meta:initial-creator>
- <xsl:value-of select="uof:作者"/>
- </meta:initial-creator>
- <meta:creation-date>
- <xsl:value-of select="substring-before( uof:创建日期, 'Z')"/>
- </meta:creation-date>
- <dc:creator>
- <xsl:value-of select="uof:最后作者"/>
- </dc:creator>
- <dc:date>
- <xsl:value-of select="substring-before( uof:编辑时间, 'Z')"/>
- </dc:date>
- <meta:printed-by/>
- <meta:print-date/>
- <meta:keywords>
- <meta:keyword>
- <xsl:value-of select="uof:关键字集/uof:关键字"/>
- </meta:keyword>
- </meta:keywords>
- <dc:language/>
- <meta:editing-cycles>
- <xsl:value-of select="uof:编辑次数"/>
- </meta:editing-cycles>
- <meta:editing-duration>
- <xsl:if test="uof:编辑时间">
- <xsl:value-of select="concat('PT', floor(uof:编辑时间 div 60), 'H', uof:编辑时间 mod 60, 'M0S')"/>
- </xsl:if>
- </meta:editing-duration>
- <meta:user-defined meta:name="Category">
- <xsl:value-of select="uof:分类"/>
- </meta:user-defined>
- <meta:user-defined meta:name="Manager">
- <xsl:value-of select="uof:经理名称"/>
- </meta:user-defined>
- <meta:user-defined meta:name="Company">
- <xsl:value-of select="uof:公司名称"/>
- </meta:user-defined>
- <meta:user-defined meta:name="Version">
- <xsl:value-of select="uof:创建应用程序"/>
- </meta:user-defined>
- <xsl:if test="uof:文档模板|child::*[@uof:locID='u0013']">
- <meta:template xlink:type="simple" xlink:actuate="onRequest" xlink:href="{child::*[@uof:locID='u0013']}"/>
- </xsl:if>
- <xsl:if test="uof:用户自定义元数据集/uof:用户自定义元数据|child::*[@uof:locID='u0016']/*[@uof:locID='u0017']">
- <xsl:for-each select="uof:用户自定义元数据集/uof:用户自定义元数据|child::*[@uof:locID='u0016']/*[@uof:locID='u0017']">
- <xsl:element name="meta:user-defined">
- <xsl:attribute name="meta:name"><xsl:value-of select="@uof:名称"/></xsl:attribute>
- </xsl:element>
- </xsl:for-each>
- </xsl:if>
- <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']}"/>
- <meta:document-statistic/>
- </office:meta>
- </xsl:template>
- <xsl:template match="uof:用户自定义元数据集">
- <xsl:for-each select="node()[@名称]">
- <meta:user-defined meta:name="{name()}">
- <xsl:value-of select="."/>
- </meta:user-defined>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="parse-range">
- <xsl:param name="range-value"/>
- <xsl:param name="last"/>
- <xsl:variable name="first-pit">
- <xsl:choose>
- <xsl:when test="contains($range-value,',')">
- <xsl:value-of select="substring-before($range-value,',')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$range-value"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="current">
- <xsl:choose>
- <xsl:when test="contains($first-pit,':')">
- <xsl:variable name="R-start" select="substring-before(substring-after($first-pit,'R'),'C')"/>
- <xsl:variable name="C-start" select="substring-before(substring-after($first-pit,'C'),':')"/>
- <xsl:variable name="second-pit" select="substring-after($first-pit,':')"/>
- <xsl:variable name="R-end" select="substring-before(substring-after($second-pit,'R'),'C')"/>
- <xsl:variable name="C-end" select="substring-after($second-pit,'C')"/>
- <xsl:variable name="the-str">
- <xsl:call-template name="condition-rc-str">
- <xsl:with-param name="r-start" select="$R-start"/>
- <xsl:with-param name="r-end" select="$R-end"/>
- <xsl:with-param name="c-start" select="$C-start"/>
- <xsl:with-param name="c-end" select="$C-end"/>
- <xsl:with-param name="last" select="''"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="$the-str"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($first-pit,',')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="contains($range-value,',')">
- <xsl:call-template name="parse-range">
- <xsl:with-param name="range-value" select="substring-after($range-value,',')"/>
- <xsl:with-param name="last" select="concat($last,$current)"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($last,$current)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="condition-rc-str">
- <xsl:param name="r-start"/>
- <xsl:param name="r-end"/>
- <xsl:param name="c-start"/>
- <xsl:param name="c-end"/>
- <xsl:param name="last"/>
- <xsl:variable name="current">
- <xsl:call-template name="condition-c-str">
- <xsl:with-param name="rc-str" select="concat('R',$r-start)"/>
- <xsl:with-param name="start" select="$c-start"/>
- <xsl:with-param name="end" select="$c-end"/>
- <xsl:with-param name="last" select="''"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:if test="$r-start < $r-end">
- <xsl:call-template name="condition-rc-str">
- <xsl:with-param name="r-start" select="$r-start + 1"/>
- <xsl:with-param name="r-end" select="$r-end"/>
- <xsl:with-param name="c-start" select="$c-start"/>
- <xsl:with-param name="c-end" select="$c-end"/>
- <xsl:with-param name="last" select="concat($last,$current)"/>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="$r-start = $r-end">
- <xsl:value-of select="concat($last,$current)"/>
- </xsl:if>
- </xsl:template>
- <xsl:template name="condition-c-str">
- <xsl:param name="rc-str"/>
- <xsl:param name="start"/>
- <xsl:param name="end"/>
- <xsl:param name="last"/>
- <xsl:variable name="current" select="concat($rc-str,'C',$start,',')"/>
- <xsl:if test="$start < $end">
- <xsl:call-template name="condition-c-str">
- <xsl:with-param name="rc-str" select="$rc-str"/>
- <xsl:with-param name="start" select="$start + 1"/>
- <xsl:with-param name="end" select="$end"/>
- <xsl:with-param name="last" select="concat($last,$current)"/>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="$start = $end">
- <xsl:value-of select="concat($last,$current)"/>
- </xsl:if>
- </xsl:template>
- <xsl:template name="condition-str">
- <xsl:param name="param-str"/>
- <xsl:choose>
- <xsl:when test="contains($param-str,'(')">
- <xsl:call-template name="condition-str">
- <xsl:with-param name="param-str" select="substring-after($param-str,'(')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="substring-before($param-str,':')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="encode-as-cell-range-address">
- <xsl:param name="string"/>
- <xsl:value-of select="$string"/>
- </xsl:template>
- <xsl:template name="encode-as-cell-address">
- <xsl:param name="string"/>
- <xsl:value-of select="$string"/>
- </xsl:template>
- <xsl:param name="dpi" select="111"/>
- <xsl:param name="centimeter-in-mm" select="10"/>
- <xsl:param name="inch-in-mm" select="25.4"/>
- <xsl:param name="didot-point-in-mm" select="0.376065"/>
- <xsl:param name="pica-in-mm" select="4.2333333"/>
- <xsl:param name="point-in-mm" select="0.3527778"/>
- <xsl:param name="twip-in-mm" select="0.017636684"/>
- <xsl:param name="pixel-in-mm" select="$inch-in-mm div $dpi"/>
- <!-- ***** MEASUREMENT CONVERSIONS *****
- PARAM 'value'
- The measure to be converted.
- The current measure is judged by a substring (e.g. 'mm', 'cm', 'in', 'pica'...)
- directly added to the number.
- PARAM 'rounding-factor'
- Is used for the rounding of decimal places.
- The parameter number is the product of 1 and some '10', where
- every zero represents a decimal place.
- For example, providing as parameter:
- <xsl:param name="rounding-factor" select="10000" />
- Gives by default four decimal places.
- To round two decimal places, basically the following is done:
- <xsl:value-of select="round(100 * value) div 100"/>
- RETURN The converted number, by default rounded to four decimal places.
- In case the input measure could not be matched the same value is
- returned and a warning message is written out.
- MEASURE LIST:
- * 1 millimeter (mm), the basic measure
- * 1 centimeter (cm) = 10 mm
- * 1 inch (in) = 25.4 mm
- While the English have already seen the light (read: the metric system), the US
- remains loyal to this medieval system.
- * 1 point (pt) = 0.35277777.. mm
- Sometimes called PostScript point (ppt), as when Adobe created PostScript, they added their own system of points.
- There are exactly 72 PostScript points in 1 inch.
- * 1 twip = twentieth of a (PostScript) point
- A twip (twentieth of a point) is a 1/20th of a PostScript point, a traditional measure in printing.
- * 1 didot point (dpt) = 0.376065 mm
- Didot point after the French typographer Firmin Didot (1764-1836).
- More details under
- http://www.unc.edu/~rowlett/units/dictP.html:
- "A unit of length used by typographers and printers. When printing was done
- from hand-set metal type, one point represented the smallest element of type
- that could be handled, roughly 1/64 inch. Eventually, the point was standardized
- in Britain and America as exactly 1/72.27 = 0.013 837 inch, which is
- about 0.35 mm (351.46 micrometers). In continental Europe, typographers
- traditionally used a slightly larger point of 0.014 83 inch (about
- 1/72 pouce, 0.377 mm, or roughly 1/67 English inch), called a Didot point
- after the French typographer Firmin Didot (1764-1836). In the U.S.,
- Adobe software defines the point to be exactly 1/72 inch (0.013 888 9 inch
- or 0.352 777 8 millimeters) and TeX software uses a slightly smaller point
- of 0.351 459 8035 mm. The German standards agency DIN has proposed that
- all these units be replaced by multiples of 0.25 millimeters (1/101.6 inch).
- * 1 pica = 4.233333 mm
- 1/6 inch or 12 points
- * 1 pixel (px) = 0.26458333.. mm (relative to 'DPI', here: 96 dpi)
- Most pictures have the 96 dpi resolution, but the dpi variable may vary by stylesheet parameter
- -->
- <!-- changing measure to mm -->
- <xsl:template name="convert2mm">
- <xsl:param name="value"/>
- <xsl:param name="rounding-factor" select="10000"/>
- <xsl:choose>
- <xsl:when test="contains($value, 'mm')">
- <xsl:value-of select="substring-before($value, 'mm')"/>
- </xsl:when>
- <xsl:when test="contains($value, 'cm')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm' ) * $centimeter-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'in')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in' ) * $inch-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'pt')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') * $point-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'twip')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') * $twip-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'dpt')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') * $didot-point-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'pica')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') * $pica-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'px')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') * $pixel-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'mm'!</xsl:message>
- <xsl:value-of select="$value"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!-- changing measure to cm -->
- <xsl:template name="convert2cm">
- <xsl:param name="value"/>
- <xsl:param name="rounding-factor" select="10000"/>
- <xsl:choose>
- <xsl:when test="contains($value, 'mm')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $centimeter-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'cm')">
- <xsl:value-of select="substring-before($value, 'cm')"/>
- </xsl:when>
- <xsl:when test="contains($value, 'in')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $centimeter-in-mm * $inch-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'pt')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $centimeter-in-mm * $point-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'dpt')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $centimeter-in-mm * $didot-point-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'pica')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $centimeter-in-mm * $pica-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'twip')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $centimeter-in-mm * $twip-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'px')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $centimeter-in-mm * $pixel-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'cm'!</xsl:message>
- <xsl:value-of select="$value"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!-- changing measure to inch (cp. section comment) -->
- <xsl:template name="convert2in">
- <xsl:param name="value"/>
- <xsl:param name="rounding-factor" select="10000"/>
- <xsl:choose>
- <xsl:when test="contains($value, 'mm')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $inch-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'cm')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $inch-in-mm * $centimeter-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'in')">
- <xsl:value-of select="substring-before($value, 'in')"/>
- </xsl:when>
- <xsl:when test="contains($value, 'pt')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $inch-in-mm * $point-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'dpt')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $inch-in-mm * $didot-point-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'pica')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $inch-in-mm * $pica-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'twip')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $inch-in-mm * $twip-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'px')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $inch-in-mm * $pixel-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'in'!</xsl:message>
- <xsl:value-of select="$value"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!-- changing measure to dpt (cp. section comment) -->
- <xsl:template name="convert2dpt">
- <xsl:param name="value"/>
- <xsl:param name="rounding-factor" select="10000"/>
- <xsl:choose>
- <xsl:when test="contains($value, 'mm')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $didot-point-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'cm')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $didot-point-in-mm * $centimeter-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'in')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $didot-point-in-mm * $inch-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'pt')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $didot-point-in-mm * $point-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'dpt')">
- <xsl:value-of select="substring-before($value, 'dpt')"/>
- </xsl:when>
- <xsl:when test="contains($value, 'pica')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $didot-point-in-mm * $pica-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'twip')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $didot-point-in-mm * $twip-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'px')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $didot-point-in-mm * $pixel-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'dpt'!</xsl:message>
- <xsl:value-of select="$value"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!-- changing measure to pica (cp. section comment) -->
- <xsl:template name="convert2pica">
- <xsl:param name="value"/>
- <xsl:param name="rounding-factor" select="10000"/>
- <xsl:choose>
- <xsl:when test="contains($value, 'mm')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $pica-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'cm')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $pica-in-mm * $centimeter-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'in')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $pica-in-mm * $inch-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'pt')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $pica-in-mm * $point-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'dpt')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $pica-in-mm * $didot-point-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'pica')">
- <xsl:value-of select="substring-before($value, 'pica')"/>
- </xsl:when>
- <xsl:when test="contains($value, 'twip')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $pica-in-mm * $twip-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'px')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $pica-in-mm * $pixel-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'pica'!</xsl:message>
- <xsl:value-of select="$value"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!-- changing measure to pt (cp. section comment) -->
- <xsl:template name="convert2pt">
- <xsl:param name="value"/>
- <xsl:param name="rounding-factor" select="10000"/>
- <xsl:choose>
- <xsl:when test="contains($value, 'mm')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $point-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'cm')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $point-in-mm * $centimeter-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'in')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $point-in-mm * $inch-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'pt')">
- <xsl:value-of select="substring-before($value, 'pt')"/>
- </xsl:when>
- <xsl:when test="contains($value, 'dpt')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $point-in-mm * $didot-point-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'pica')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $point-in-mm * $pica-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'twip')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'twip') div $point-in-mm * $twip-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'px')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $point-in-mm * $pixel-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'pt'!</xsl:message>
- <xsl:value-of select="$value"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="编号解析">
- <xsl:variable name="bianhao">
- <xsl:value-of select="字:段落属性/字:自动编号信息/@字:编号引用"/>
- </xsl:variable>
- <xsl:variable name="bianhaojibie">
- <xsl:value-of select="字:段落属性/字:自动编号信息/@字:编号级别"/>
- </xsl:variable>
- <xsl:variable name="isxiangmuorisimage">
- <xsl:for-each select="/uof:UOF/uof:式样集/uof:自动编号集/字:自动编号">
- <xsl:choose>
- <xsl:when test="$bianhao=@字:标识符">
- <xsl:choose>
- <xsl:when test="字:级别[@字:级别值= (number($bianhaojibie))]/字:项目符号">true</xsl:when>
- <xsl:when test="字:级别[@字:级别值= (number($bianhaojibie))]/字:图片符号引用">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$isxiangmuorisimage='true'">
- <xsl:call-template name="无序"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="有序"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="有序">
- <xsl:variable name="currlistid" select="字:段落属性/字:自动编号信息/@字:编号引用"/>
- <xsl:variable name="currlistlvl" select="字:段落属性/字:自动编号信息/@字:编号级别"/>
- <xsl:variable name="firstoccur" select="/descendant::字:段落属性[字:自动编号信息/@字:编号引用 = $currlistid][1]"/>
- <xsl:element name="text:list">
- <xsl:attribute name="text:style-name">List<xsl:value-of select="count($firstoccur/preceding::字:自动编号信息)"/></xsl:attribute>
- <xsl:if test="字:段落属性/字:自动编号信息/@字:重新编号">
- <xsl:attribute name="text:continue-numbering"><xsl:choose><xsl:when test="字:段落属性/字:自动编号信息/@字:重新编号='true'">false</xsl:when><xsl:otherwise>true</xsl:otherwise></xsl:choose></xsl:attribute>
- </xsl:if>
- <xsl:element name="text:list-item">
- <xsl:call-template name="ordered-levels">
- <xsl:with-param name="level" select="$currlistlvl -1"/>
- </xsl:call-template>
- </xsl:element>
- </xsl:element>
- </xsl:template>
- <xsl:template name="ordered-levels">
- <xsl:param name="level"/>
- <xsl:choose>
- <xsl:when test="$level = '0'">
- <xsl:call-template name="commonParagraph"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="text:list">
- <xsl:element name="text:list-item">
- <xsl:call-template name="ordered-levels">
- <xsl:with-param name="level" select="$level -1"/>
- </xsl:call-template>
- </xsl:element>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="无序">
- <xsl:variable name="currlistid" select="字:段落属性/字:自动编号信息/@字:编号引用"/>
- <xsl:variable name="currlistlvl" select="字:段落属性/字:自动编号信息/@字:编号级别"/>
- <xsl:variable name="firstoccur" select="/descendant::字:段落属性[字:自动编号信息/@字:编号引用 = $currlistid][1]"/>
- <xsl:element name="text:list">
- <xsl:attribute name="text:style-name">List<xsl:value-of select="count($firstoccur/preceding::字:自动编号信息)"/></xsl:attribute>
- <xsl:element name="text:list-item">
- <xsl:call-template name="unordered-levels">
- <xsl:with-param name="level" select="$currlistlvl -1"/>
- </xsl:call-template>
- </xsl:element>
- </xsl:element>
- </xsl:template>
- <xsl:template name="unordered-levels">
- <xsl:param name="level"/>
- <xsl:choose>
- <xsl:when test="$level = '0'">
- <xsl:call-template name="commonParagraph"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="text:list">
- <xsl:element name="text:list-item">
- <xsl:call-template name="unordered-levels">
- <xsl:with-param name="level" select="$level -1"/>
- </xsl:call-template>
- </xsl:element>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!-- changing measure to pt (cp. section comment) -->
- <xsl:template name="convert2twip">
- <xsl:param name="value"/>
- <xsl:param name="rounding-factor" select="10000"/>
- <xsl:choose>
- <xsl:when test="contains($value, 'mm')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'mm') div $twip-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'cm')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'cm') div $twip-in-mm * $centimeter-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'in')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'in') div $twip-in-mm * $inch-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'pt')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pt') div $twip-in-mm * $point-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'dpt')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'dpt') div $twip-in-mm * $didot-point-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'pica')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'pica') div $twip-in-mm * $pica-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:when test="contains($value, 'twip')">
- <xsl:value-of select="substring-before($value, 'twip')"/>
- </xsl:when>
- <xsl:when test="contains($value, 'px')">
- <xsl:value-of select="round($rounding-factor * number(substring-before($value, 'px') div $twip-in-mm * $pixel-in-mm)) div $rounding-factor"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'twip'!</xsl:message>
- <xsl:value-of select="$value"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!-- changing measure to pixel by via parameter provided dpi (dots per inch) standard factor (cp. section comment) -->
- <xsl:template name="convert2px">
- <xsl:param name="value"/>
- <xsl:choose>
- <xsl:when test="contains($value, 'mm')">
- <xsl:value-of select="round(number(substring-before($value, 'mm')) div $pixel-in-mm)"/>
- </xsl:when>
- <xsl:when test="contains($value, 'cm')">
- <xsl:value-of select="round(number(substring-before($value, 'cm')) div $pixel-in-mm * $centimeter-in-mm)"/>
- </xsl:when>
- <xsl:when test="contains($value, 'in')">
- <xsl:value-of select="round(number(substring-before($value, 'in')) div $pixel-in-mm * $inch-in-mm)"/>
- </xsl:when>
- <xsl:when test="contains($value, 'pt')">
- <xsl:value-of select="round(number(substring-before($value, 'pt')) div $pixel-in-mm * $point-in-mm)"/>
- </xsl:when>
- <xsl:when test="contains($value, 'dpt')">
- <xsl:value-of select="round(number(substring-before($value, 'dpt')) div $pixel-in-mm * $didot-point-in-mm)"/>
- </xsl:when>
- <xsl:when test="contains($value, 'pica')">
- <xsl:value-of select="round(number(substring-before($value, 'pica')) div $pixel-in-mm * $pica-in-mm)"/>
- </xsl:when>
- <xsl:when test="contains($value, 'twip')">
- <xsl:value-of select="round(number(substring-before($value, 'twip')) div $pixel-in-mm * $twip-in-mm)"/>
- </xsl:when>
- <xsl:when test="contains($value, 'px')">
- <xsl:value-of select="$value"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>measure_conversion.xsl: Find no conversion for <xsl:value-of select="$value"/> to 'px'!</xsl:message>
- <xsl:value-of select="$value"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- </xsl:stylesheet>
|