Jump to content

PHP handling patterns in the url (keywords: pipeline sitemap xml xslt)


ShotokanTuning

Recommended Posts

Hi my fellow developers,

 

I'm used to program using sitemap(s) based on so called pipelines. Where a pattern in the url is used to handle the request in the right way.

 

Is it possible to use this or similar setup when programming in php?

 


<map:match pattern="articleList">
   <map:generate src="xqueries/articleList.xq" type="xquery"/>
   <map:transform src="stylesheets/articleList.xsl"/>
   <map:call resource="html-layout"/>
</map:match>

<map:match pattern="*articles/*.php">
   <map:generate src="articles/{2}.xml" type="xquery"/>
   <map:transform src="stylesheets/article.xsl"/>
   <map:call resource="html-layout"/>
</map:match>

 

So for example I have a "article" directory with xml files.

 

Whenever an address like for example article/article1.php is in the url, I want to take the xml file named "article1.xml" and convert the xml to html by using for example a xslt or xsl file. And for example article/phpbeginnerhelp.php is in the url, I want to take the xml file named "phpbeginnerhelp.xml" and convert the xml to html by using for example a xslt or xsl file.

 

Thanks for helping and explaining. I really appreciate it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.