XSLT, one XML file and differing URIs

dvdnginx nginx-forum at nginx.us
Wed Mar 19 10:48:25 UTC 2014


Hello,

 I was wondering if anyone could put on the right path to do the following,

So in it's simplest form, lets say I have one file "chapter.xml" in
directory A

/A/chapter.xml

I want to use nginx XSLT processing ability to "present" this file based on
different URIs, so

If someone accesses /A/ it presents chapter.xml using XSLT file chapter.xsl,
if someone accesses  /A/sec1/ it presents chapter.xml using XSLT file
sec.xsl and passes it parameter 1, if someone accesses /A/sec2/ it presents
chapter.xml using XSLT file sec.xsl and passes it parameter 2.

etc.

I can achieve the first one as follows

  location /A/ {;
          xslt_stylesheet chapter.xsl;
          index  chapter.xml
        }

but I'm stuck on /A/sec1 /A/sec2 etc 

Thanks,

 Dave

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



More information about the nginx mailing list