There are distinct differences to parsing XML into your program and
producing XML from your program.

We use the following method's which are enabling us to create scalable
systems with independent design from code.
One of the clear reasons for using XML/XSLT is the seperation of data and
design.  If you imagine that your ecommerce application is working very well
and doesnt need changing but you have a new client who wants the system in
thier design.  Usually, there will come a point where you have to change
hardcoded design elements within your ecommerce application - and if the
design is radically different you will need to do conditional statements to
determine which design to use - a real pain.  More importantly your playing
with your engine (code) when in fact all you really wanted to do was put  on
some new alloys! :-)  It's boring, time consuming and often results in *****
up code.

If you take the XML and XSLT path you instantly change your method.  Your
ecommerce application only EVER spews out XML.  That's it's purpose in
life - it has it's business rules and it's resulting output and design is
never a factor.  The XSLT style sheets are used to implement the XML into a
valid document usable by humans.  In essence you can now have a 1000
independent designs which never require a single code change in your main
commerce app.  Taking it further you can employ your xsl sheets to spew out
WML, CSV, XML etc etc.  Simply, your have reached a true data and design
independence.

Added to this you can offer third parties an industry standard form of data
exchange.  You can use multiple languages and know with confidence that none
of them have to understand each other.  We are using this method very
shortly to create a win32 application using the XML feed from our commerce
engine.  Eventually it will be used by our customer service team.

>php are
> insanely tedious to replicate in xsl :|
>

I totally disagree.  Take the following:

for ($i=0;$i<=10;$i++){
    echo "<tr><td>Hello</td></tr>";
}


Take the following in XSLT:

<xsl:for-each select="node/to/match">
    <tr><td><xsl:value-of select="." /></td></tr>
</xsl:for-each>

They may be about the same in number of lines but the php app must be
modified to create a different table type.  It is true however that unless
you need to something on a large scale these methods may be to much.


James.







"Daniel" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> wot exactly does the xml parse do over sablot ? and what benfit do u get
> xml'ing an entire site , where some processes which come easy to do in php
are
> insanely tedious to replicate in xsl :|
>
> >===== Original Message From "James" <[EMAIL PROTECTED]> =====
> >There is nothing to install.
> >
> >By default php usually comes with XML parser methods - however if you
want
> >to invest time in running XSLT/XPATH styles against XML you need to
install
> >server side software such as Sablotron or Saxon.  We run Sablotron and
it's
> >very good.  We've also invested in Stylus Studio which is a good xml/xslt
> >development tool.
> >
> >I'm not really sure what you want to do so it's difficult to help you
> >further.    If you give a small idea of what it is you want to achieve
then
> >it might be easier to help you on your way.
> >
> >Jim.
> >
> >
> >"Dhaval Desai" <[EMAIL PROTECTED]> wrote in message
> >news:[EMAIL PROTECTED]
> >> Hello people,
> >>
> >> I want to start using Xml with php. How do I install xml on Apache with
> >Php?
> >> I am running redhat 7.2,Apache 1.3.12 and php latest version.
> >>
> >> How do I install xml? I am totally new to Xml....and want to start
> >> somewhere...
> >>
> >> -Dhaval
> >>
> >>
> >>
> >>
> >>
> >> _________________________________________________________________
> >> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> >> http://join.msn.com/?page=features/virus
> >>
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to