Using inline processing instructions with XSLT module?


#1

Is it possible to return an XML document (for example from FastCGI)
which contains a processing instruction, and have the XSLT module locate
and apply the XSL file?

For example; if the FastCGI app returns:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/xsl/basic.xsl"?>

…then would/could the XSLT module load the file based on the current
“root” set in the server section of the config file?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,1905,1905#msg-1905


#2

On Mon, May 11, 2009 at 01:15:41PM -0400, digitala wrote:

Is it possible to return an XML document (for example from FastCGI) which contains a processing instruction, and have the XSLT module locate and apply the XSL file?

For example; if the FastCGI app returns:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/xsl/basic.xsl"?>

…then would/could the XSLT module load the file based on the current “root” set in the server section of the config file?

No, currently stylesheets are proccessed on configuraiton stage.
One of the reasons why it was implemented so because a stylesheet
may have remote includes that may block for long time, etc.


#3

On 11-May-09, at 10:15 AM, digitala wrote:

Is it possible to return an XML document (for example from FastCGI)
which contains a processing instruction, and have the XSLT module
locate and apply the XSL file?

Are you currently using XSLT in nginx to serve XML files returned from
FastCGI? I’ve tried doing that in my environment, and nginx just
returns the XML raw.


#4

On Tue, May 12, 2009 at 03:29:29AM -0400, digitala wrote:

Not yet - I was going to play with setting “xslt_types process/xml;” and have my fastcgi app return that content type, but I would’ve preferred to be able to set a processing instruction to allow separation of stylesheets into “logged out”/“logged in” sets.

Igor; is the functionality for parsing Processing Instructions planned?

Currently - no.


#5

Not yet - I was going to play with setting “xslt_types process/xml;” and
have my fastcgi app return that content type, but I would’ve preferred
to be able to set a processing instruction to allow separation of
stylesheets into “logged out”/“logged in” sets.

Igor; is the functionality for parsing Processing Instructions planned?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,1905,1942#msg-1942


#6

Can we vote for this feature ?
If it is security risk, may be sandbox it to local location only

Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,1905,265887#msg-265887