-
Notifications
You must be signed in to change notification settings - Fork 68
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
Resolve includes/imports #19
Comments
I think libxslt has some mechanisms for these kind of things. But I suspect it would be quite complicated and honestly I have no plan to look into it soon. Of course as usual, a pull request would be very welcome. |
you can load your xslt file as a xml document, xpath into it to find your special includes and do in-place replacement. |
There are two possible hooks which could be used for this: Note that the function pointer variables used for both the hooks described above aren't thread-local, so we can't set it per stylesheet, but would have to set it for the whole process. We could of course replace it with a small function which examines some thread-local varibale and delegates to the default implementation (which is static but which can be read from the If we hook in with the |
If my xslt/xml files are stored in a DB, is it possible to customize the include/import resolution of XSLT files so that I can pass the XSLT's requested includes from the database.
Pseudo example:
xslt.resolver = function(fileName) {
var buffer;
// read file content into buffer from DB
return buffer;
}
The text was updated successfully, but these errors were encountered: