132 | | </xsl:template> |
| 132 | </xsl:template> |
| 133 | |
| 134 | <!-- |
| 135 | Makro pro diagramy/grafy |
| 136 | --> |
| 137 | <xsl:template match="m:diagram"> |
| 138 | <xsl:variable name="souborDiagramu" select="j:vytvořDiagram(text(), @orientace = 'vodorovně')"/> |
| 139 | <xsl:choose> |
| 140 | <xsl:when test="$souborDiagramu"> |
| 141 | <div class="diagram"> |
| 142 | <a href="{$souborDiagramu}.svg"> |
| 143 | <img src="{$souborDiagramu}.svg" alt="Diagram {$souborDiagramu}"/> |
| 144 | </a> |
| 145 | <!-- TODO: SVG+PNG |
| 146 | <object data="{$souborDiagramu}.svg" type="image/svg+xml"> |
| 147 | <img src="{$souborDiagramu}.png" alt="Diagram {$souborDiagramu}"/> |
| 148 | </object> |
| 149 | --> |
| 150 | <xsl:if test="@nadpis"> |
| 151 | <p class="nadpis"><xsl:value-of select="@nadpis"/></p> |
| 152 | </xsl:if> |
| 153 | </div> |
| 154 | </xsl:when> |
| 155 | <xsl:otherwise> |
| 156 | <xsl:message terminate="yes">Při vytváření diagramu došlo k chybě.</xsl:message> |
| 157 | </xsl:otherwise> |
| 158 | </xsl:choose> |
| 159 | </xsl:template> |