Changeset 71:895757141bff
- Timestamp:
- 01/07/12 20:09:44 (14 years ago)
- Author:
- František Kučera <franta-hg@…>
- Branch:
- default
- Message:
-
Funkce pro načítání textových souborů ze vstupního adresáře (vhodné pro @src).
- Location:
- šablona
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r67
|
r71
|
|
| 44 | 44 | <xsl:template match="m:diagram[@src]"> |
| 45 | 45 | <xsl:call-template name="vložDiagram"> |
| 46 | | <xsl:with-param name="zadání" select="unparsed-text(concat('../', $vstup, @src))"/> |
| | 46 | <xsl:with-param name="zadání" select="m:načti-textový-soubor(@src)"/> |
| 47 | 47 | <xsl:with-param name="kompletní" select="not(@kompletní) or @kompletní = 'ano'"/> |
| 48 | 48 | </xsl:call-template> |
-
|
r66
|
r71
|
|
| 98 | 98 | </xsl:template> |
| 99 | 99 | |
| 100 | | <xsl:function name="m:escapuj-url-zachovej-lomítka" as="xs:string"> |
| 101 | | <xsl:param name="cesta"/> |
| 102 | | <xsl:value-of select="replace(encode-for-uri($cesta), '%2F', '/')"/> |
| 103 | | </xsl:function> |
| 104 | | |
| 105 | 100 | <!-- |
| 106 | 101 | Wikipedia |
-
|
r70
|
r71
|
|
| 18 | 18 | --> |
| 19 | 19 | <xsl:stylesheet version="2.0" |
| 20 | | xmlns="http://www.w3.org/1999/xhtml" |
| 21 | | xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro" |
| 22 | | xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 23 | | exclude-result-prefixes="m"> |
| | 20 | xmlns="http://www.w3.org/1999/xhtml" |
| | 21 | xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro" |
| | 22 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| | 23 | exclude-result-prefixes="m"> |
| 24 | 24 | |
| 25 | 25 | <!-- |
| … |
… |
|
| 42 | 42 | <xsl:template match="m:tabulka[@src]"> |
| 43 | 43 | <xsl:call-template name="vykresliTabulku"> |
| 44 | | <xsl:with-param name="zadání" select="unparsed-text(concat('../', $vstup, @src))"/> |
| | 44 | <xsl:with-param name="zadání" select="m:načti-textový-soubor(@src)"/> |
| 45 | 45 | <xsl:with-param name="oddělovač" select="(@oddělovač, ';')[1]"/> |
| 46 | 46 | </xsl:call-template> |
-
|
r61
|
r71
|
|
| 41 | 41 | <xsl:template match="m:pre[@src]"> |
| 42 | 42 | <xsl:call-template name="zvýrazniZdroják"> |
| 43 | | <xsl:with-param name="zdroják" select="unparsed-text(concat('../', $vstup, @src))"/> |
| | 43 | <xsl:with-param name="zdroják" select="m:načti-textový-soubor(@src)"/> |
| 44 | 44 | </xsl:call-template> |
| 45 | 45 | <xsl:if test="@odkaz = 'ano'"> |
-
|
r61
|
r71
|
|
| 71 | 71 | </xsl:template> |
| 72 | 72 | |
| | 73 | <xsl:function name="m:escapuj-url-zachovej-lomítka" as="xs:string"> |
| | 74 | <xsl:param name="cesta"/> |
| | 75 | <xsl:value-of select="replace(encode-for-uri($cesta), '%2F', '/')"/> |
| | 76 | </xsl:function> |
| | 77 | |
| | 78 | <!-- |
| | 79 | Vrací obsah textového souboru ve vstupním adresáři. |
| | 80 | Obvykle jako parametr předáváme atribut „src“. |
| | 81 | --> |
| | 82 | <xsl:function name="m:načti-textový-soubor" as="xs:string"> |
| | 83 | <xsl:param name="soubor"/> |
| | 84 | <xsl:value-of select="unparsed-text(concat($vstup, $soubor))"/> |
| | 85 | </xsl:function> |
| | 86 | |
| 73 | 87 | </xsl:stylesheet> |