web app with php, xml, xsl, css

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • petermichaux@yahoo.com

    web app with php, xml, xsl, css

    Hi,

    I'm interested in building database web applications. A perfect example
    of what I want to do would be an e-commerce website with php, xml, xsl,
    css, pear db and mysql. I understand the basics of the technology parts
    seperately but I would like to read about integrating them and managing
    the files (directory structure). Any books or sites that cover this
    integration?

    Thank you,
    Peter

  • Tony Marston

    #2
    Re: web app with php, xml, xsl, css

    I have a sample application available for download at
    http://www.tonymarston.net/php-mysql...plication.html which is built
    with PHP using XML, XSL, XHTML, CSS and MySQL. I don't use PEAR DB as I have
    my own database abstraction layer.

    There is plenty of documentation on my site which explains the thought
    processes behind this architecture. It may be of some use to you.

    --
    Tony Marston

    This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL




    <petermichaux@y ahoo.com> wrote in message
    news:1119303788 .648764.156080@ g44g2000cwa.goo glegroups.com.. .[color=blue]
    > Hi,
    >
    > I'm interested in building database web applications. A perfect example
    > of what I want to do would be an e-commerce website with php, xml, xsl,
    > css, pear db and mysql. I understand the basics of the technology parts
    > seperately but I would like to read about integrating them and managing
    > the files (directory structure). Any books or sites that cover this
    > integration?
    >
    > Thank you,
    > Peter
    >[/color]


    Comment

    • RC

      #3
      Re: web app with php, xml, xsl, css

      petermichaux@ya hoo.com wrote:
      Any books or sites that cover this[color=blue]
      > integration?[/color]

      O'Reilly books and/or Teacher Yourself xxxx in ## Weeks/Days

      Comment

      • petermichaux@yahoo.com

        #4
        Re: web app with php, xml, xsl, css

        RC,

        I haven't seen any O'Reilly books or Teach Yourself books that cover
        the integration fo these technologies. Did I miss something?

        Thanks,
        Peter

        Comment

        • Malcolm Dew-Jones

          #5
          Re: web app with php, xml, xsl, css

          petermichaux@ya hoo.com wrote:
          : RC,

          : I haven't seen any O'Reilly books or Teach Yourself books that cover
          : the integration fo these technologies. Did I miss something?

          Php has an xml parsing library, so read the manual for that. Other than
          that there isn't really anything to "integrate" .

          Xml is just text, so php can output it without any "integratio n" required.

          There isn't anything to integrate between php and css either, they are
          simply different things, kind of like asking to integrate php and your
          mouse.

          xsl-fo is just xml. xsl-t is used to transform xml. Unless you are
          asking php to do the transform then php has nothing to do with it. Since
          php doesn't have a built in library that I know of to do xslt transforms,
          (though you can read the php manuals, ver 4 and ver 5 to be sure), then
          "integratio n" consists of calling an external program when you need it,
          which has nothing to do with xsl per se.

          So, I think the reason you haven't see a book to cover this is because
          there isn't really anything to "integrate" . If you have a reason to use
          xml, or xsl, or css, then examine the tools php provides and use them to
          best effect, exactly as you would with any other programming task.



          --

          This space not for rent.

          Comment

          • petermichaux@yahoo.com

            #6
            Re: web app with php, xml, xsl, css

            Hi Malcolm,

            I grew up next door to a Malcolm Dew-Jones.

            I think I figured out what I was after. I've attached it below.

            Thanks,
            Peter

            <?php

            //Step 1: Generate the xml string. This could be generated dynamically
            by querying a database

            $xmlString = "<collectio n>";
            $xmlString .= "<cd>";
            $xmlString .= "<title>Sai ling The Seas Of Cheese</title>";
            $xmlString .= "<artist>Primus </artist>";
            $xmlString .= "<year>1991 </year>";
            $xmlString .= "</cd>";
            $xmlString .= "<cd>";
            $xmlString .= "<title>Pur e Guava</title>";
            $xmlString .= "<artist>We en</artist>";
            $xmlString .= "<year>1992 </year>";
            $xmlString .= "</cd>";
            $xmlString .= "</collection>";


            // Step 2: Transform the xmlString into html by using the xsl file

            $xml = new DomDocument;
            $xml->loadXml($xmlSt ring);

            $xsl = new DomDocument;
            $xsl->load('collecti on.xsl');

            $proc = new XsltProcessor;
            $proc->importStyleShe et($xsl);

            $cdListHtml = $proc->transformToXml ($xml);


            // Step 3: Output the document that will be sent to the viewers browser

            echo "<html>\n";
            echo "<head>\n";
            echo "\t<link href='collectio n.css' type='text/css'
            rel='stylesheet '/>\n";
            echo "</head>\n";
            echo "<body>\n";
            echo $cdListHtml;
            echo "</body>\n";
            echo "</html>\n";
            ?>

            Comment

            • Marcel

              #7
              Re: web app with php, xml, xsl, css

              PHP and MySQL Web Development by Luke Welling and Laura Thomson might be
              what you're after. Web: www.developers-library.com

              Marcel

              <petermichaux@y ahoo.com> wrote in message
              news:1119303788 .648764.156080@ g44g2000cwa.goo glegroups.com.. .[color=blue]
              > Hi,
              >
              > I'm interested in building database web applications. A perfect example
              > of what I want to do would be an e-commerce website with php, xml, xsl,
              > css, pear db and mysql. I understand the basics of the technology parts
              > seperately but I would like to read about integrating them and managing
              > the files (directory structure). Any books or sites that cover this
              > integration?
              >
              > Thank you,
              > Peter
              >[/color]


              Comment

              • Malcolm Dew-Jones

                #8
                Re: web app with php, xml, xsl, css

                petermichaux@ya hoo.com wrote:
                : Hi Malcolm,

                : I grew up next door to a Malcolm Dew-Jones.

                hum, I wouldn't be surprised if that's the same Malcolm that lived with my
                Mom and Dad :)

                : I think I figured out what I was after. I've attached it below.

                : Thanks,
                : Peter

                : <?php

                : //Step 1: Generate the xml string. This could be generated dynamically
                : by querying a database

                : $xmlString = "<collectio n>";
                : $xmlString .= "<cd>";
                : $xmlString .= "<title>Sai ling The Seas Of Cheese</title>";
                : $xmlString .= "<artist>Primus </artist>";
                : $xmlString .= "<year>1991 </year>";
                : $xmlString .= "</cd>";
                : $xmlString .= "<cd>";
                : $xmlString .= "<title>Pur e Guava</title>";
                : $xmlString .= "<artist>We en</artist>";
                : $xmlString .= "<year>1992 </year>";
                : $xmlString .= "</cd>";
                : $xmlString .= "</collection>";


                : // Step 2: Transform the xmlString into html by using the xsl file

                : $xml = new DomDocument;
                : $xml->loadXml($xmlSt ring);

                : $xsl = new DomDocument;
                : $xsl->load('collecti on.xsl');

                : $proc = new XsltProcessor;
                : $proc->importStyleShe et($xsl);

                : $cdListHtml = $proc->transformToXml ($xml);

                Well, look at that, shows how much I know about php, doesn't it. I don't
                see that in my php online docs. Time to do a php upgrade, I guess - I
                hadn't realized I was that out of date. Or maybe I just didn't install
                everything. In any case, checking now I see that various, interesting,
                XML related capabilities are documented in the php manual (not mine, but
                the one at the php web site), so I guess the php manual is still the best
                place to look.


                : // Step 3: Output the document that will be sent to the viewers browser

                : echo "<html>\n";
                : echo "<head>\n";
                : echo "\t<link href='collectio n.css' type='text/css'
                : rel='stylesheet '/>\n";
                : echo "</head>\n";
                : echo "<body>\n";
                : echo $cdListHtml;
                : echo "</body>\n";
                : echo "</html>\n";
                : ?>

                thanks, bye.

                --

                This space not for rent.

                Comment

                Working...