XSLT - a mechanism for beginners

    I welcome Habr.
    I’m very pleased to see the XSLT Technology Blog.
    Many are very afraid to start learning XSLT due to the small number of CMS using this technology as a template engine.
    This article will give an example of the XSLT connection mechanism on hosting with PHP4, PHP5.

    At one time, having read about xslt technology, for a long time I could not try it because my knowledge in php was not very strong, there were no free CMS offering it as a template engine at that time.
    Not long “google” in the network I found a mechanism that completely suited me.
    It will allow beginners to taste the technology.
    Understand the examples.
    Arm herself with her and begin to use her intensely.


    This script, for example, will easily allow beginners to make a photo gallery in xml,
    with its output to the site via xslt.

    Description of the archive
    xslt-php4-to-php5.php - adapter ("jumper") for various versions of php.
    class_xslt.php - the class
    index.php itself - an example of a call to
    main.xml - an example of an XML
    menu.xsl - an example of an XSLT


    Call: startTransform ('main.xml', 'menu.xsl'); startTransform ('path_to_xml', 'path_to_xslt); ?> I hope this mechanism allows beginners to master XSLT. The archive can be downloaded here. Examples for training can be taken from http://www.w3schools.com/xsl/default.asp Use, try ...










    Also popular now: