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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.