D
D
Dmitry Tsirulnikov2015-01-10 20:05:16
PHP
Dmitry Tsirulnikov, 2015-01-10 20:05:16

XSLT how to set base paths to templates?

Tell me how you can set up the base path for templates in xslt, googling did not help.
Or how to insert data from xml instead of the path to the template in xsl:import

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Boldyrev, 2015-01-11
@usetester

The XSLT defines a path relative to the template in which the import statement resides.
Substitution in import paths from variables or xpath is not possible, as far as I understand.
So we need to change the template selection logic...
To get data from xml, you can use the document() function. Its use is well described here: www.artlebedev.ru/tools/technogrette/xslt/multilang There you can just take the path from the variable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question