[xslt] One proposal for dynamic xsl:includes



I've looked through the source code of libxslt a little, and think I 
have a way to make dynamic xsl:included possible.

The trick would require specific calls into libxslt outside of the xsl 
file itself, but it could allow tools based on libxslt to provide some 
dynamic abilities to xsl:includes.

In documents.c, within the xsltLoadStyleDocument function, there is 
logic to loop through the style->docList to make sure that we don't 
process the same file twice.

Is there a call that places a pre-parsed xsl file on the docList, and 
associates it with a file name? If so, it seems feasible to add some 
random document to the docList and give it the name you know will appear 
in the xsl:include. Then, when you process the base xsl document, it 
will use the pre-parsed file on the docList in the include.

Does this make any sense?




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]