Re: Re: About Incorporating MySQL and XML/XSLT/PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wouldn't XSLT document be filled with input forms if I want to receive
information from the customers?

XHTML forms are probly the most ubiquitous way to get data from a user to an
application.  and to be specific, the xsl files are those that would
contain the XHTML forms.

There is no great rationale to convert data from the form into XML prior to
further processing that immediately comes to mind, though im sure there may
be a suitable reason for it somewhere.  Naturally, when users submit data to
your application, the very first thing you should do w/ it is validate it.
If that works out
you can pass said data along for further processing and potentially modify
the application database.  Therefore if you plan on using PHP, which im
assuming you are
at this point, the action attribute of the form tags within xsl files will
reference PHP files.  Those PHP files will process the data as i just
described.

-nathan

On 7/9/07, Kelvin Park <kelvinpark86@xxxxxxxxx> wrote:

and -> an

On 7/9/07, Kelvin Park <kelvinpark86@xxxxxxxxx> wrote:
>
> The contents would be basically and item name, description, and its
> image.
> Let say I'm transferring mysql database to XML and display product
> information on a website with XSLT.
> If I'm not sending user inputted information through XML back to mysql
> database,
>
> Wouldn't XSLT document be filled with input forms if I want to receive
> information from the customers?
>
> Or bottomline is it more convenient and clear coding (with XSLT, XML) to
> just directly send customer data through PHP POST in to mysql database?
>
> On 7/9/07, Nathan Nobbe < quickshiftin@xxxxxxxxx> wrote:
> >
> > I said,
> > > Kevin
> >
> > my bad; meant to say Kelvin..
> >
> > -nathan
> >
> > On 7/9/07, Nathan Nobbe <quickshiftin@xxxxxxxxx > wrote:
> > >
> > > Kevin,
> > >
> > > would you mind sending the particular url w/ the content you are
> > > referring to?
> > >
> > > also, data doesnt necessarily need to go through xml on its way back
> > > to the database.
> > > consider a web form for instance which might submit data to your
> > > application via HTTP POST.
> > > in that case you could simply process the data in a familiar way and
> > > insert / update or whatever, the database as appropriate.
> > > aside from that if you wanted to send XML elements to the database
> > > you could do so in one of several ways.
> > >
> > > the XML could be stored natively of course, but i think what youre
> > > asking about is getting the contents of a particular tag, say, and insert
> > > that into a particular field in a table.  to accomplish this use
> > > SimpleXML or DOM to parse the XML and traverse to the node whose data you
> > > mean to insert (or update or whatever) into the database; store it
> > > in a variable and use it in a query at a later point in the code.
> > >
> > > -nathan
> > >
> > > On 7/9/07, Kelvin Park < kelvinpark86@xxxxxxxxx> wrote:
> > > >
> > > > One of his tutorials explained how to transfer MySQL data to XML,
> > > > however obviously the data is not always static, it needs to be changed
> > > > sending the data back to MySQL through XML.
> > > >
> > > > Do you know how to send XML elements back in to MySQL database?
> > > >
> > > > Thanks!
> > > >
> > > > On 7/9/07, Nathan Nobbe <quickshiftin@xxxxxxxxx > wrote:
> > > > >
> > > > > i havent had time to fully explore the material from Tony yet,
> > > > > but so far ive been building XML entirely in memory rather than reading in a
> > > > > complete file, parsing it and placing data at certain points.  one thing i
> > > > > would like to explore is either DTDs or XMLSchema to validate the XML
> > > > > against.  in that case even w/ the approach i currently take there would
> > > > > still be files on disk. as long as said XML files have practical permissions
> > > > > i dont think having them on disc is a great security risk.
> > > > >
> > > > > -nathan
> > > > >
> > > > > On 7/9/07, Kelvin Park < kelvinpark86@xxxxxxxxx> wrote:
> > > > > >
> > > > > > Since XML is just a text document, wouldn't it raise security
> > > > > > issues if all data was transferred to XML files?
> > > > > >
> > > > > > On 7/9/07, Kelvin Park < kelvinpark86@xxxxxxxxx> wrote:
> > > > > > >
> > > > > > > absolutely!, thanks
> > > > > > >
> > > > > > > On 7/9/07, Nathan Nobbe <quickshiftin@xxxxxxxxx > wrote:
> > > > > > > >
> > > > > > > > Tony,
> > > > > > > >
> > > > > > > > this material looks quite excellent; thanks for sharing.
> > > > > > > >
> > > > > > > > -nathan
> > > > > > > >
> > > > > > > > On 7/9/07, Tony Marston < tony@xxxxxxxxxxxxxxxxxxxxxxxx>
> > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > Try these for size:
> > > > > > > > > http://www.tonymarston.net/php-mysql/domxml.html and
> > > > > > > > > http://www.tonymarston.net/php-mysql/sablotron.html
> > > > > > > > > http://www.tonymarston.net/php-mysql/dom.html and
> > > > > > > > > http://www.tonymarston.net/php-mysql/xsl.html
> > > > > > > > >
> > > > > > > > > There is also a sample application available at
> > > > > > > > > http://www.tonymarston.net/php-mysql/sample-application.html
> > > > > > > > which you can
> > > > > > > > > download with all the necessary code.
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Tony Marston
> > > > > > > > > http://www.tonymarston.net
> > > > > > > > > http://www.radicore.org
> > > > > > > > >
> > > > > > > > > ""Kelvin Park"" <kelvinpark86@xxxxxxxxx> wrote in
> > > > > > > > message
> > > > > > > > >
> > > > > > > > news:d1ace2e20707090141p63050dbfy3be12208f89af53@xxxxxxxxxxxxxxxxx
> > > > > > > >
> > > > > > > > > > I'm using XSLT to make a website template and XML to
> > > > > > > > describe the data
> > > > > > > > > on
> > > > > > > > > > my
> > > > > > > > > > website. Do I parse the data from MySQL to XML in
> > > > > > > > order to apply styles
> > > > > > > > > > and
> > > > > > > > > > display them as XHTML with XSLT?
> > > > > > > > > >
> > > > > > > > > > I would have to use PHP to parse XML, however I was
> > > > > > > > unclear on how to
> > > > > > > > > pass
> > > > > > > > > > MySQL data to XML in order for it do be displayed
> > > > > > > > through XSLT template.
> > > > > > > > > > Do you know a good reference (website, book, article)
> > > > > > > > for the most
> > > > > > > > > correct
> > > > > > > > > > way to display MySQL data with XML/XSLT/PHP?
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > PHP General Mailing List ( http://www.php.net/)
> > > > > > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux