Jump to content

ShotokanTuning

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ShotokanTuning's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi keeB, Thanks a lot for the reply. I've worked with XSLT before, just never used php together with xslt. How to expect a variable and apply it in the template? For example, I know of <xsl:param name="parameter"/> but I don't know how to use this with php. How to send that param to the xslt? My biggest question is how to have the user type the url, catch that url with a php file/code and have it build a html page from the hidden xml file in the url. With other words if I have for example the url "http://www.website.com/article/news.php" I want to catch that url (and every other url with the pattern http://www.website.com/article/*.php) with some php code. That php code needs to be able to grab the xml file, in this case in the directory article take the file with the name "news.xml" and convert it to a html page. Thank you kindly, ST
  2. 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.
  3. I've a couple directories filled with thousands of xml files. I'm expected to generate, menu's with html links from each directory. I was thinking of using scandir() for that. Also all these xml files should be reachable with their filename in the url. For example in the article directory the xml file named news.xml should be reachable like this: http://www.website.com/article/news.php 2nd example in the articles directory the xml file named helpwithjeans.xml should be reachable like this: http://www.website.com/article/helpwithjeans.php?l=0 3rd example in the products directory the xml file named bluray.xml should be reachable like this: http://www.website.com/product/bluray.php?l=1 How to read what url is typed and process it by going to the right xml file? After that the xml still needs to be converted to one of several specific html formats. Something like using the parameter "l" see in above examples (2nd and 3rd) to know which layout is desired and which xml elements to grab. How can this be handled? And if there is multiple options, what do you suggest is a good way to handle this. Thanks for pointing me in the right direction! I was thinking XSLT might be the way to convert the xml to html but I don't know how to use the "l" parameter from the url (if I'm heading int hat direction) in the XSLT and that would really be needed. I'm really open to any input. Everything may help. Thanks a lot.
×
×
  • 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.