~mfisch/yelp-xsl/update-to-3.8.1

« back to all changes in this revision

Viewing changes to xslt/mallard/html/mal2html-svg.xsl

  • Committer: Package Import Robot
  • Author(s): Michael Biebl
  • Date: 2012-03-17 15:12:22 UTC
  • mfrom: (1.1.16) (11.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20120317151222-pnzcgh4actzfkwdb
Tags: 3.3.3-1
New upstream development release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
</xsl:template>
86
86
 
87
87
<xsl:template mode="mal2html.block.mode" match="svg:svg">
 
88
  <xsl:variable name="if"><xsl:call-template name="mal.if.test"/></xsl:variable><xsl:if test="$if != ''">
88
89
  <xsl:variable name="id">
89
90
    <xsl:choose>
90
91
      <xsl:when test="@xml:id">
91
92
        <xsl:value-of select="@xml:id"/>
92
93
      </xsl:when>
 
94
      <xsl:when test="@id">
 
95
        <xsl:value-of select="@id"/>
 
96
      </xsl:when>
93
97
      <xsl:otherwise>
94
98
        <xsl:value-of select="generate-id(.)"/>
95
99
      </xsl:otherwise>
97
101
  </xsl:variable>
98
102
  <xsl:choose>
99
103
    <xsl:when test="$html.xhtml">
100
 
      <div class="svg">
 
104
      <div>
 
105
        <xsl:attribute name="class">
 
106
          <xsl:text>svg</xsl:text>
 
107
          <xsl:if test="$if != 'true'">
 
108
            <xsl:text> if-if </xsl:text>
 
109
            <xsl:value-of select="$if"/>
 
110
          </xsl:if>
 
111
        </xsl:attribute>
101
112
        <xsl:apply-templates mode="mal2html.svg.mode" select="."/>
102
113
      </div>
103
114
    </xsl:when>
104
115
    <xsl:otherwise>
105
 
      <div class="svg">
 
116
      <div>
 
117
        <xsl:attribute name="class">
 
118
          <xsl:text>svg</xsl:text>
 
119
          <xsl:if test="$if != 'true'">
 
120
            <xsl:text> if-if </xsl:text>
 
121
            <xsl:value-of select="$if"/>
 
122
          </xsl:if>
 
123
        </xsl:attribute>
106
124
        <object data="{$id}.svg" type="image/svg+xml">
107
125
          <xsl:copy-of select="@width"/>
108
126
          <xsl:copy-of select="@height"/>
113
131
      </exsl:document>
114
132
    </xsl:otherwise>
115
133
  </xsl:choose>
 
134
</xsl:if>
116
135
</xsl:template>
117
136
 
118
137
</xsl:stylesheet>