Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot include XSLT utilities in email XSLT #25

Closed
nickdunn opened this issue Oct 31, 2011 · 3 comments
Closed

Cannot include XSLT utilities in email XSLT #25

nickdunn opened this issue Oct 31, 2011 · 3 comments

Comments

@nickdunn
Copy link

I tried to include another XSLT file in my email template XSLT, but it killed the process. It seemed to resolve the path of my include file relative to the root of my Symphony build, whereas I had expected the internal paths between XSLT documents to honour the hierarchy inside /workspace (i.e. in an email template I'd expect to use ../../utilities/my-utility.xsl.)

@creativedutchmen
Copy link
Collaborator

This has been quite a bit of a problem for me in the past, too.

Do you have any idea where I can set the include path for XML files? Thusfar I have not been able to find it.

@nickdunn
Copy link
Author

I think Symphony gets around this by creating a base XSLT document itself, then loading all other files into it (i.e. the page file). It imports this with the absolute path on disk, and I suppose all subsequent includes would then be relative to it.

https://github.com/symphonycms/symphony-2/blob/master/symphony/lib/toolkit/class.frontendpage.php#L474-477

@kanduvisla
Copy link

You can include XSLT-utilities, but you should include them from your root, like so:

<xsl:import href="workspace/utilities/format-date.xsl" />

However, this is not the correct behavior you would expect (and this import-statement breaks my autocomplete for this specific utility in my IDE). So you should be able to use ../../ and the extension should automagicly deal with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants