| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" |
| 3 |
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" |
| 4 |
xmlns:h="http://www.w3.org/1999/xhtml"> |
| 5 |
<xsl:output method="xml" indent="no"/> |
| 6 |
|
| 7 |
<xsl:template match="clientAnchor"> |
| 8 |
<g transform="translate({*/left},{*/top})"> |
| 9 |
<rect width="{number(*/right)-number(*/left)}" |
| 10 |
height="{number(*/bottom)-number(*/top)}" fill="green" style="opacity:0.5"/> |
| 11 |
<text y="1em">client</text> |
| 12 |
</g> |
| 13 |
</xsl:template> |
| 14 |
|
| 15 |
<xsl:template match="childAnchor"> |
| 16 |
<g transform="translate({xLeft},{yTop})"> |
| 17 |
<rect width="{number(xRight)-number(xLeft)+1}" |
| 18 |
height="{number(yBottom)-number(yTop)+1}" fill="blue" style="opacity:0.5"/> |
| 19 |
<text y="1em">child</text> |
| 20 |
</g> |
| 21 |
</xsl:template> |
| 22 |
|
| 23 |
<xsl:template name="getX"> |
| 24 |
<xsl:choose> |
| 25 |
<xsl:when test="clientAnchor/*/left"><xsl:value-of |
| 26 |
select="number(clientAnchor/*/left)"/></xsl:when> |
| 27 |
<xsl:otherwise><xsl:value-of select="number(childAnchor/xLeft)"/></xsl:otherwise> |
| 28 |
</xsl:choose> |
| 29 |
</xsl:template> |
| 30 |
|
| 31 |
<xsl:template name="getY"> |
| 32 |
<xsl:choose> |
| 33 |
<xsl:when test="clientAnchor/*/left"><xsl:value-of |
| 34 |
select="number(clientAnchor/*/top)"/></xsl:when> |
| 35 |
<xsl:otherwise><xsl:value-of select="number(childAnchor/yTop)"/></xsl:otherwise> |
| 36 |
</xsl:choose> |
| 37 |
</xsl:template> |
| 38 |
|
| 39 |
<xsl:template name="getWidth"> |
| 40 |
<xsl:choose> |
| 41 |
<xsl:when test="clientAnchor/*/left"><xsl:value-of |
| 42 |
select="number(clientAnchor/*/right)-number(clientAnchor/*/left)"/></xsl:when> |
| 43 |
<xsl:otherwise><xsl:value-of |
| 44 |
select="number(childAnchor/xRight)-number(childAnchor/xLeft)"/></xsl:otherwise> |
| 45 |
</xsl:choose> |
| 46 |
</xsl:template> |
| 47 |
|
| 48 |
<xsl:template name="getHeight"> |
| 49 |
<xsl:choose> |
| 50 |
<xsl:when test="clientAnchor/*/left"><xsl:value-of |
| 51 |
select="number(clientAnchor/*/bottom)-number(clientAnchor/*/top)"/></xsl:when> |
| 52 |
<xsl:otherwise><xsl:value-of |
| 53 |
select="number(childAnchor/yBottom)-number(childAnchor/yTop)"/></xsl:otherwise> |
| 54 |
</xsl:choose> |
| 55 |
</xsl:template> |
| 56 |
|
| 57 |
<xsl:template name="getY1"> |
| 58 |
<xsl:variable name="y"><xsl:call-template name="getY"/></xsl:variable> |
| 59 |
<xsl:variable name="h"><xsl:call-template name="getHeight"/></xsl:variable> |
| 60 |
<xsl:choose> |
| 61 |
<xsl:when test="shapeProp/fFlipV='true'"><xsl:value-of select="$y+$h"/></xsl:when> |
| 62 |
<xsl:otherwise><xsl:value-of select="$y"/></xsl:otherwise> |
| 63 |
</xsl:choose> |
| 64 |
</xsl:template> |
| 65 |
|
| 66 |
<xsl:template name="getY2"> |
| 67 |
<xsl:variable name="y"><xsl:call-template name="getY"/></xsl:variable> |
| 68 |
<xsl:variable name="h"><xsl:call-template name="getHeight"/></xsl:variable> |
| 69 |
<xsl:choose> |
| 70 |
<xsl:when test="shapeProp/fFlipV='true'"><xsl:value-of select="$y"/></xsl:when> |
| 71 |
<xsl:otherwise><xsl:value-of select="$y+$h"/></xsl:otherwise> |
| 72 |
</xsl:choose> |
| 73 |
</xsl:template> |
| 74 |
|
| 75 |
<xsl:template name="getMasterId"> |
| 76 |
<xsl:if test="slideAtom/masterIdRef"><xsl:value-of select="slideAtom/masterIdRef"/></xsl:if> |
| 77 |
<xsl:for-each select=".."> |
| 78 |
<xsl:call-template name="getMasterId"/> |
| 79 |
</xsl:for-each> |
| 80 |
</xsl:template> |
| 81 |
|
| 82 |
<xsl:template name="getColor"> |
| 83 |
<xsl:value-of select="concat('rgb(',red,',',green,',',blue,')')"/> |
| 84 |
</xsl:template> |
| 85 |
|
| 86 |
<xsl:template match="*[@type='ColorIndexStruct']"> |
| 87 |
<xsl:value-of select="concat('rgb(',red,',',green,',',blue,')')"/> |
| 88 |
</xsl:template> |
| 89 |
|
| 90 |
<xsl:template name="getSpacing"> |
| 91 |
<xsl:choose> |
| 92 |
<xsl:when test=".<0"><xsl:value-of select="-node()"/></xsl:when> |
| 93 |
<xsl:when test=".<=13200"><xsl:value-of select="node()"/>ex</xsl:when> |
| 94 |
<xsl:otherwise>0</xsl:otherwise> |
| 95 |
</xsl:choose> |
| 96 |
</xsl:template> |
| 97 |
|
| 98 |
<xsl:variable name="hexDigits" select="'0123456789ABCDEF'" /> |
| 99 |
<xsl:template name="toHex"> |
| 100 |
<xsl:param name="decimalNumber" /> |
| 101 |
<xsl:if test="$decimalNumber >= 16"> |
| 102 |
<xsl:call-template name="toHex"> |
| 103 |
<xsl:with-param name="decimalNumber" select="floor($decimalNumber div 16)" /> |
| 104 |
</xsl:call-template> |
| 105 |
</xsl:if> |
| 106 |
<xsl:value-of select="substring($hexDigits, ($decimalNumber mod 16) + 1, 1)" /> |
| 107 |
</xsl:template> |
| 108 |
|
| 109 |
<xsl:template match="pf[@type='TextPFException']"> |
| 110 |
<xsl:if test="masks/wordWrap='false'">white-space: pre-wrap;</xsl:if><!-- or 'pre'? --> |
| 111 |
<xsl:if test="textAlignment='0'">text-align: left;</xsl:if> |
| 112 |
<xsl:if test="textAlignment='1'">text-align: center;</xsl:if> |
| 113 |
<xsl:if test="textAlignment='2'">text-align: right;</xsl:if> |
| 114 |
<xsl:if test="textAlignment='3'">text-align: justify;</xsl:if> |
| 115 |
<!-- todo: figure out the right units here --> |
| 116 |
<xsl:if test="indent">margin-left: <xsl:value-of select="indent"/>pt;</xsl:if> |
| 117 |
</xsl:template> |
| 118 |
|
| 119 |
<xsl:template name="PFBefore"> |
| 120 |
</xsl:template> |
| 121 |
|
| 122 |
<xsl:template name="PFBulletBefore"> |
| 123 |
<xsl:variable name="char"> |
| 124 |
<xsl:call-template name="toHex"> |
| 125 |
<xsl:with-param name="decimalNumber" select="bulletChar"/> |
| 126 |
</xsl:call-template> |
| 127 |
</xsl:variable> |
| 128 |
<xsl:call-template name="PFBefore"/> |
| 129 |
<xsl:if test="bulletChar">content: '\<xsl:value-of select="$char"/>';</xsl:if> |
| 130 |
</xsl:template> |
| 131 |
|
| 132 |
<xsl:template match="cf[@type='TextCFException']"> |
| 133 |
<xsl:if test="masks/bold='true'">font-weight: bold;</xsl:if> |
| 134 |
<xsl:if test="masks/bold='false'">font-weight: normal;</xsl:if> |
| 135 |
<xsl:if test="masks/italic='true'">font-style: italic;</xsl:if> |
| 136 |
<xsl:if test="masks/italic='false'">font-style: normal;</xsl:if> |
| 137 |
<xsl:if test="masks/underline='true'">text-decoration: underline;</xsl:if> |
| 138 |
<xsl:if test="masks/underline='false'">text-decoration: none;</xsl:if> |
| 139 |
<xsl:if test="fontSize">font-size: <xsl:value-of select="fontSize * 100 div 12"/>%;</xsl:if> |
| 140 |
<xsl:if test="color">color: <xsl:apply-templates select="color"/>;</xsl:if> |
| 141 |
<xsl:apply-templates select="fontRef"/> |
| 142 |
</xsl:template> |
| 143 |
|
| 144 |
<xsl:template match="lfFaceName"> |
| 145 |
font-family:'<xsl:value-of select="substring-before(node(),'%')"/>'; |
| 146 |
</xsl:template> |
| 147 |
|
| 148 |
<xsl:template match="ansiFontRef|fontRef"> |
| 149 |
<xsl:variable name="ref" select="number(node())"/> |
| 150 |
<xsl:value-of select="$ref"/><xsl:choose> |
| 151 |
<xsl:when test="$ref<count(//rgFontCollectionEntry)"> |
| 152 |
<xsl:apply-templates |
| 153 |
select="//rgFontCollectionEntry[position()=($ref+1)]/fontEntityAtom/lfFaceName"/> |
| 154 |
</xsl:when> |
| 155 |
<xsl:otherwise> |
| 156 |
<xsl:apply-templates select="//rgFontCollectionEntry[position()=1]/fontEntityAtom/lfFaceName"/> |
| 157 |
</xsl:otherwise> |
| 158 |
</xsl:choose> |
| 159 |
</xsl:template> |
| 160 |
|
| 161 |
<xsl:template name="CFRun"> |
| 162 |
<xsl:param name="offset"/> |
| 163 |
<xsl:param name="text"/> |
| 164 |
<xsl:param name="ccount" select="1"/> |
| 165 |
<xsl:param name="start" select="1"/> |
| 166 |
<xsl:variable name="style"> |
| 167 |
<xsl:apply-templates select="style/rgTextCFRun[position()=$ccount]/cf"/> |
| 168 |
</xsl:variable> |
| 169 |
<xsl:variable name="len" select="style/rgTextCFRun[position()=$ccount]/count"/> |
| 170 |
<xsl:variable name="subtext" select="substring($text, $start - $offset+1, $len)"/> |
| 171 |
|
| 172 |
<!-- loop over all CFRun elements --> |
| 173 |
<xsl:if test="$ccount<=count(style/rgTextCFRun)"> |
| 174 |
<xsl:if test="string-length($subtext)"> |
| 175 |
<h:span style='{$style}'> |
| 176 |
<xsl:value-of select="$subtext"/> |
| 177 |
</h:span> |
| 178 |
</xsl:if> |
| 179 |
<xsl:call-template name="CFRun"> |
| 180 |
<xsl:with-param name="offset" select="$offset"/> |
| 181 |
<xsl:with-param name="text" select="$text"/> |
| 182 |
<xsl:with-param name="ccount" select="$ccount+1"/> |
| 183 |
<xsl:with-param name="start" select="$start+$len"/> |
| 184 |
</xsl:call-template> |
| 185 |
</xsl:if> |
| 186 |
</xsl:template> |
| 187 |
|
| 188 |
<xsl:template name="getClass"> |
| 189 |
<xsl:param name="indent" /> |
| 190 |
<xsl:variable name="type" select="textHeaderAtom/textType"/> |
| 191 |
<xsl:variable name="class" select="concat('texttype', $type, 'lstLvl',($indent+1))"/> |
| 192 |
<xsl:choose> |
| 193 |
<xsl:when test="bulletFlags/fHasBullet='false'"> |
| 194 |
<xsl:value-of select="$class"/> |
| 195 |
</xsl:when> |
| 196 |
<xsl:otherwise> |
| 197 |
<xsl:value-of select="concat($class, ' ', $class, 'Bullet')"/> |
| 198 |
</xsl:otherwise> |
| 199 |
</xsl:choose> |
| 200 |
</xsl:template> |
| 201 |
|
| 202 |
<xsl:template name="getBullet"> |
| 203 |
<!-- very simple for now, we just write 'O'. this needs to be expanded to get either the defined |
| 204 |
bullet character or the inherited bullet character --> |
| 205 |
<xsl:variable name="char"> |
| 206 |
<xsl:call-template name="toHex"> |
| 207 |
<xsl:with-param name="decimalNumber" select="bulletChar"/> |
| 208 |
</xsl:call-template> |
| 209 |
</xsl:variable> |
| 210 |
<xsl:if test="bulletFlags/fHasBullet='true'">O </xsl:if> |
| 211 |
</xsl:template> |
| 212 |
|
| 213 |
<xsl:template match="*[@type='TextContainer']"> |
| 214 |
<xsl:param name="pcount" select="1"/> |
| 215 |
<xsl:param name="start" select="1"/> |
| 216 |
<xsl:variable name="indent" select="style/rgTextPFRun[position()=$pcount]/indentLevel"/> |
| 217 |
<xsl:variable name="type" select="textHeaderAtom/textType"/> |
| 218 |
<xsl:variable name="class" select="concat('texttype', $type, 'lstLvl', ($indent+1))"/> |
| 219 |
<xsl:variable name="style"> |
| 220 |
<xsl:apply-templates select="style/rgTextPFRun[position()=$pcount]/pf"/> |
| 221 |
</xsl:variable> |
| 222 |
<xsl:variable name="len" select="style/rgTextPFRun[position()=$pcount]/count"/> |
| 223 |
<xsl:variable name="text" select="substring(text/textChars, $start, $len)"/> |
| 224 |
|
| 225 |
<xsl:if test="$pcount<=count(style/rgTextPFRun)"> |
| 226 |
<xsl:if test="string-length($text)"> |
| 227 |
<h:p style="{$style}" class="{$class}"> |
| 228 |
<!-- bullet is put in the text, using css is too hard --> |
| 229 |
<xsl:for-each select="style/rgTextPFRun[position()=$pcount]/pf"> |
| 230 |
<xsl:call-template name="getBullet"> |
| 231 |
<xsl:with-param name="indent" select="indent"/> |
| 232 |
</xsl:call-template> |
| 233 |
</xsl:for-each> |
| 234 |
<xsl:call-template name="CFRun"> |
| 235 |
<xsl:with-param name="offset" select="$start"/> |
| 236 |
<xsl:with-param name="text" select="$text"/> |
| 237 |
</xsl:call-template> |
| 238 |
</h:p> |
| 239 |
</xsl:if> |
| 240 |
<xsl:apply-templates select="."> |
| 241 |
<xsl:with-param name="pcount" select="$pcount+1"/> |
| 242 |
<xsl:with-param name="start" select="$start+$len"/> |
| 243 |
</xsl:apply-templates> |
| 244 |
</xsl:if> |
| 245 |
</xsl:template> |
| 246 |
|
| 247 |
<xsl:template match="lineWidth"> |
| 248 |
stroke-width: <xsl:value-of select="node() div 1587.5"/>; |
| 249 |
</xsl:template> |
| 250 |
|
| 251 |
<xsl:template match="lineJoinStyle"> |
| 252 |
stroke-linejoin: <xsl:choose> |
| 253 |
<xsl:when test="node()=0">bevel</xsl:when> |
| 254 |
<xsl:when test="node()=1">miter</xsl:when> |
| 255 |
<xsl:when test="node()=2">round</xsl:when> |
| 256 |
</xsl:choose>; |
| 257 |
</xsl:template> |
| 258 |
|
| 259 |
<xsl:template match="lineColor"> |
| 260 |
stroke: <xsl:call-template name="getColor"/>; |
| 261 |
</xsl:template> |
| 262 |
|
| 263 |
<xsl:template match="fillColor"> |
| 264 |
fill: <xsl:call-template name="getColor"/>; |
| 265 |
</xsl:template> |
| 266 |
|
| 267 |
<xsl:template match="*[@type='OfficeArtFOPT']"> |
| 268 |
<xsl:apply-templates select="fopt/anon/lineWidth"/> |
| 269 |
<xsl:apply-templates select="fopt/anon/lineJoinStyle"/> |
| 270 |
<xsl:apply-templates select="fopt/anon/lineColor"/> |
| 271 |
<xsl:apply-templates select="fopt/anon/fillColor"/> |
| 272 |
</xsl:template> |
| 273 |
|
| 274 |
<!-- general shape placeholder --> |
| 275 |
<xsl:template match="*[@type='OfficeArtSpContainer']"> |
| 276 |
<xsl:variable name="x"><xsl:call-template name="getX"/></xsl:variable> |
| 277 |
<xsl:variable name="y"><xsl:call-template name="getY"/></xsl:variable> |
| 278 |
<xsl:variable name="w"><xsl:call-template name="getWidth"/></xsl:variable> |
| 279 |
<xsl:variable name="h"><xsl:call-template name="getHeight"/></xsl:variable> |
| 280 |
<xsl:variable name="slideNumber" |
| 281 |
select="count(../../../../../../../preceding-sibling::*/*/*[@type='SlideContainer']/..)+1"/> |
| 282 |
<xsl:variable name="boxNumber" select="count(../preceding-sibling::*)-1"/> |
| 283 |
<g transform="translate({$x}, {$y})"> |
| 284 |
<rect width="{$w}" height="{$h}" fill="green" opacity="0.5"/> |
| 285 |
<foreignObject width="{$w}" height="{$h}"><h:body> |
| 286 |
<xsl:apply-templates |
| 287 |
select="//anon[anon/slideList][last()]/anon/slideList/rgChildRec[position()=$slideNumber]/atoms[position()=$boxNumber]"/> |
| 288 |
</h:body></foreignObject> |
| 289 |
</g> |
| 290 |
</xsl:template> |
| 291 |
|
| 292 |
<!-- text boxes --> |
| 293 |
<xsl:template match="*[@type='OfficeArtSpContainer'][shapeProp/rh/recInstance=202]"> |
| 294 |
<xsl:variable name="x"><xsl:call-template name="getX"/></xsl:variable> |
| 295 |
<xsl:variable name="y"><xsl:call-template name="getY"/></xsl:variable> |
| 296 |
<xsl:variable name="w"><xsl:call-template name="getWidth"/></xsl:variable> |
| 297 |
<xsl:variable name="h"><xsl:call-template name="getHeight"/></xsl:variable> |
| 298 |
<xsl:variable name="style"><xsl:apply-templates select="shapePrimaryOptions"/></xsl:variable> |
| 299 |
<g transform="translate({$x},{$y})" style="{$style}"> |
| 300 |
<rect width="{$w}" height="{$h}" /> |
| 301 |
<foreignObject width="{$w}" height="{$h}" > |
| 302 |
<h:body><xsl:apply-templates select=".//*[@type='TextContainer']"/></h:body> |
| 303 |
</foreignObject> |
| 304 |
</g> |
| 305 |
</xsl:template> |
| 306 |
|
| 307 |
<!-- lines --> |
| 308 |
<xsl:template match="*[@type='OfficeArtSpContainer'][shapeProp/rh/recInstance=20]"> |
| 309 |
<xsl:variable name="x"><xsl:call-template name="getX"/></xsl:variable> |
| 310 |
<xsl:variable name="y"><xsl:call-template name="getY"/></xsl:variable> |
| 311 |
<xsl:variable name="w"><xsl:call-template name="getWidth"/></xsl:variable> |
| 312 |
<xsl:variable name="h"><xsl:call-template name="getHeight"/></xsl:variable> |
| 313 |
<xsl:variable name="y1"><xsl:call-template name="getY1"/></xsl:variable> |
| 314 |
<xsl:variable name="y2"><xsl:call-template name="getY2"/></xsl:variable> |
| 315 |
<xsl:variable name="style"><xsl:apply-templates select="shapePrimaryOptions"/></xsl:variable> |
| 316 |
<xsl:variable name="start" |
| 317 |
select="shapePrimaryOptions/fopt/anon[@type='LineStartArrowhead']/lineStartArrowhead='1'"/> |
| 318 |
<xsl:variable name="end" |
| 319 |
select="shapePrimaryOptions/fopt/anon[@type='LineEndArrowhead']/lineEndArrowhead='1'"/> |
| 320 |
<g style="{$style}"> |
| 321 |
<line x1="{$x}" y1="{$y1}" x2="{$x+$w}" y2="{$y2}"> |
| 322 |
<xsl:if test="$start"> |
| 323 |
<xsl:attribute name="marker-start">url(#msArrowStart_20_5)</xsl:attribute> |
| 324 |
</xsl:if> |
| 325 |
<xsl:if test="$end"> |
| 326 |
<xsl:attribute name="marker-end">url(#msArrowEnd_20_5)</xsl:attribute> |
| 327 |
</xsl:if> |
| 328 |
</line> |
| 329 |
</g> |
| 330 |
</xsl:template> |
| 331 |
|
| 332 |
<xsl:template match="*[@type='OfficeArtSpgrContainer']"> |
| 333 |
<xsl:param name="x" select="rgfb/anon/clientAnchor/*/left"/> |
| 334 |
<xsl:param name="y" select="rgfb/anon/clientAnchor/*/top"/> |
| 335 |
<xsl:param name="width" select="number(rgfb/anon/clientAnchor/*/right)-$x"/> |
| 336 |
<xsl:param name="height" select="number(rgfb/anon/clientAnchor/*/bottom)-$y"/> |
| 337 |
<xsl:param name="vx" select="rgfb/anon/shapeGroup/xLeft"/> |
| 338 |
<xsl:param name="vy" select="rgfb/anon/shapeGroup/yTop"/> |
| 339 |
<xsl:param name="vwidth" select="number(rgfb/anon/shapeGroup/xRight)-$vx"/> |
| 340 |
<xsl:param name="vheight" select="number(rgfb/anon/shapeGroup/yBottom)-$vy"/> |
| 341 |
<xsl:variable name="scale" select="$vwidth div $width"/> |
| 342 |
<xsl:choose> |
| 343 |
<!-- if the first OfficeArtSpContainer has a clientAnchor, a new coordinate system is introduced. |
| 344 |
--> |
| 345 |
<xsl:when test="rgfb[position()=1]/anon/clientAnchor"> |
| 346 |
<svg overflow="visible" x="{$x}" y="{$y}" width="{$width}" |
| 347 |
height="{$height}" viewBox="{$vx} {$vy} {$vwidth} {$vheight}" |
| 348 |
font-size="{100*$scale}%"> |
| 349 |
<xsl:apply-templates select="rgfb[position()>1]/anon"/> |
| 350 |
</svg> |
| 351 |
</xsl:when> |
| 352 |
<xsl:otherwise> |
| 353 |
<g> |
| 354 |
<xsl:apply-templates select="rgfb[position()>1]/anon"/> |
| 355 |
</g> |
| 356 |
</xsl:otherwise> |
| 357 |
</xsl:choose> |
| 358 |
</xsl:template> |
| 359 |
|
| 360 |
<!-- slide container --> |
| 361 |
<xsl:template match="*[@type='SlideContainer']"> |
| 362 |
<!-- width and height in inches --> |
| 363 |
<xsl:param name="width" select="//documentAtom/slideSize/x"/> |
| 364 |
<xsl:param name="height" select="//documentAtom/slideSize/y"/> |
| 365 |
<xsl:param name="x" select="'0.5in'"/> |
| 366 |
<xsl:param name="y" select="concat(0.5 + (position()-1)*1.1*$height div 576,'in')"/> |
| 367 |
<svg x="{$x}" y="{$y}" width="{$width div 576.0}in" height="{$height div 576.0}in" |
| 368 |
viewBox="0 0 {$width} {$height}" overflow="visible" font-size="96" |
| 369 |
stroke-width='6'> |
| 370 |
<!-- slide canvas --> |
| 371 |
<rect width="{$width}" height="{$height}" fill="white" stroke="black" stroke-width="10" /> |
| 372 |
<xsl:apply-templates select="drawing/OfficeArtDg/groupShape"/> |
| 373 |
</svg> |
| 374 |
</xsl:template> |
| 375 |
|
| 376 |
<xsl:template match="*[@type='TextMasterStyleAtom']"> |
| 377 |
<xsl:param name="prefix"/> |
| 378 |
.<xsl:value-of select="$prefix"/>lstLvl1 { |
| 379 |
<xsl:apply-templates select="lstLvl1/pf"/> |
| 380 |
<xsl:apply-templates select="lstLvl1/cf"/> |
| 381 |
} |
| 382 |
.<xsl:value-of select="$prefix"/>lstLvl1:before { |
| 383 |
<xsl:for-each select="lstLvl1/pf"> |
| 384 |
<xsl:call-template name="PFBefore"/> |
| 385 |
</xsl:for-each> |
| 386 |
} |
| 387 |
.<xsl:value-of select="$prefix"/>lstLvl1Bullet:before { |
| 388 |
<xsl:for-each select="lstLvl1/pf"> |
| 389 |
<xsl:call-template name="PFBulletBefore"/> |
| 390 |
</xsl:for-each> |
| 391 |
} |
| 392 |
.<xsl:value-of select="$prefix"/>lstLvl2 { |
| 393 |
<xsl:apply-templates select="lstLvl2/pf"/> |
| 394 |
<xsl:apply-templates select="lstLvl2/cf"/> |
| 395 |
} |
| 396 |
.<xsl:value-of select="$prefix"/>lstLvl2:before { |
| 397 |
<xsl:for-each select="lstLvl2/pf"> |
| 398 |
<xsl:call-template name="PFBefore"/> |
| 399 |
</xsl:for-each> |
| 400 |
} |
| 401 |
.<xsl:value-of select="$prefix"/>lstLvl3 { |
| 402 |
<xsl:apply-templates select="lstLvl3/pf"/> |
| 403 |
<xsl:apply-templates select="lstLvl3/cf"/> |
| 404 |
} |
| 405 |
.<xsl:value-of select="$prefix"/>lstLvl3:before { |
| 406 |
<xsl:for-each select="lstLvl3/pf"> |
| 407 |
<xsl:call-template name="PFBefore"/> |
| 408 |
</xsl:for-each> |
| 409 |
} |
| 410 |
.<xsl:value-of select="$prefix"/>lstLvl4 { |
| 411 |
<xsl:apply-templates select="lstLvl4/pf"/> |
| 412 |
<xsl:apply-templates select="lstLvl4/cf"/> |
| 413 |
} |
| 414 |
.<xsl:value-of select="$prefix"/>lstLvl4:before { |
| 415 |
<xsl:for-each select="lstLvl4/pf"> |
| 416 |
<xsl:call-template name="PFBefore"/> |
| 417 |
</xsl:for-each> |
| 418 |
} |
| 419 |
.<xsl:value-of select="$prefix"/>lstLvl5 { |
| 420 |
<xsl:apply-templates select="lstLvl5/pf"/> |
| 421 |
<xsl:apply-templates select="lstLvl5/cf"/> |
| 422 |
} |
| 423 |
.<xsl:value-of select="$prefix"/>lstLvl5:before { |
| 424 |
<xsl:for-each select="lstLvl5/pf"> |
| 425 |
<xsl:call-template name="PFBefore"/> |
| 426 |
</xsl:for-each> |
| 427 |
} |
| 428 |
</xsl:template> |
| 429 |
|
| 430 |
<xsl:template match="/"> |
| 431 |
<xsl:variable name="scale" select="0.4"/> |
| 432 |
<xsl:variable name="numSlides" |
| 433 |
select="count(ppt/PowerPointStructs/anon/anon/anon[@type='SlideContainer'])"/> |
| 434 |
<xsl:variable name="width" select="//documentAtom/slideSize/x"/> |
| 435 |
<xsl:variable name="height" select="//documentAtom/slideSize/y"/> |
| 436 |
<xsl:variable name="pstyle"> |
| 437 |
<xsl:apply-templates select="//textPFDefaultsAtom/pf"/> |
| 438 |
</xsl:variable> |
| 439 |
<xsl:variable name="cstyle"> |
| 440 |
<xsl:apply-templates select="//textCFDefaultsAtom/cf"/> |
| 441 |
</xsl:variable> |
| 442 |
<svg width="{100+$scale*(1+$width div 576)}in" |
| 443 |
height="{100+0.5+1.1*$scale*$numSlides*$height div 576}in" |
| 444 |
stroke="black" fill="white" style="{$pstyle}{$cstyle}"> |
| 445 |
<defs> |
| 446 |
<style type="text/css"> |
| 447 |
* { border: 0; margin: 0; padding: 0; } |
| 448 |
<xsl:apply-templates select="//textMasterStyleAtom"/> |
| 449 |
<xsl:for-each select="//rgTextMasterStyle"> |
| 450 |
<xsl:apply-templates select="."> |
| 451 |
<xsl:with-param name="prefix" select="concat('texttype',position()-1)"/> |
| 452 |
</xsl:apply-templates> |
| 453 |
</xsl:for-each> |
| 454 |
</style> |
| 455 |
<marker id="msArrowStart_20_5" viewBox="0 0 10 10" refX="0" refY="5" |
| 456 |
markerUnits="strokeWidth" markerWidth="20" markerHeight="8" orient="auto"> |
| 457 |
<path d="M 10 0 L 0 5 L 10 10 z" /> |
| 458 |
</marker> |
| 459 |
<marker id="msArrowEnd_20_5" viewBox="0 0 10 10" refX="10" refY="5" |
| 460 |
markerUnits="strokeWidth" markerWidth="20" markerHeight="8" orient="auto"> |
| 461 |
<path d="M 0 0 L 10 5 L 0 10 z" /> |
| 462 |
</marker> |
| 463 |
</defs> |
| 464 |
<text x="10" y="20">Welcome to this presentation</text> |
| 465 |
<g transform="scale({$scale},{$scale})"> |
| 466 |
<xsl:apply-templates |
| 467 |
select="ppt/PowerPointStructs/anon/anon/anon[@type='SlideContainer']"/> |
| 468 |
</g> |
| 469 |
</svg> |
| 470 |
</xsl:template> |
| 471 |
</xsl:stylesheet> |