- Track dependency files for each layout XSL files.
- Use correct base path for imports / includes
- Current nanoc (4.11) uses the current directory (project root) for base path of XSLT includes / imports.
href.content = (xsl_dir + href).relative_path_from(current_dir).to_s
fixes this.
- Current nanoc (4.11) uses the current directory (project root) for base path of XSLT includes / imports.
This filter doesn't cache deps for files. Ideally, it is enough to calculate deps only once for each XSL files.
I don't know whether they should be cached or not,
but it might be inefficient to create and edit XML
/ XSLT
objects each time the filter runs...
@xml:base
changes base path for any external references, so it should affect path resolution.
I hope very few people use this attribute...
document()
function of XSLT can cause additional dependencies to other external files.
This wuold be impossible to track correctly, becuase it can be invoked with runtime value.
In case document()
is used (with dynamic argument), the filter should fallback to the mechanism of the current release, i.e. the filter should consider that all XSLT templates are outdated.
I (implementer) don't know about nanoc's internal, but using _context.dependency_tracker.bounce
.
I'm not sure it is really right way.
I'm not Rubyist, and this code won't be beautiful enough...