Re: [PHP] Re: Php +Xml?

2003-03-09 Thread Alexandru COSTIN
Hello,
DomXML is a large improvement over Sablot. If you take a close look at XML,
you'll see that XML is used effectively with some technologies : SAX (Simple
Api for XML), DOM (Document Object Modelling), XSL (Extensible styleshhet
language).

The DOMxml php extension (http://www.php.net/manual/en/ref.domxml.php) is a
wrapper for PHP usage of the libxml2 (xmlsoft.org) and libxslt1
(xmlsoft.org/XSLT) that helps you load XML files into DOM trees, manipulate
them using standard DOM API and transform them using XSL (with a blazing
speed, also).

You should compile your PHP version with DOM support (we have some RPMS
created for PHP with DOMXML support for Redhat 8.0, but they are not
released yet to the public as they are experimental).

I hope you have a better start now.

Alexandru

--
Alexandru COSTIN
Chief Operating Officer
http://www.interakt.ro/
+4021 411 2610

Daniel [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 what is domxml ? is it similar to sablot ?
 = Original Message From Alexandru COSTIN [EMAIL PROTECTED]
=
 Hello,
 
  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.
 If you want to use SAX, you should already have it installed if you
have
 compiled PHP with '--with-xml'. (BTW, have you compiled PHP yourself? -
do
 you know how to compile PHP?).
 
 First of all you should upgrade to a newer apache, as as far as I
know
 Apache 1.3.12 had some problem when ran with Sablotron (this would be
needed
 if you will want to use XML with XSL transformations)
 
 Then you should use the domxml extension (add '--with-dom'
 '--with-dom-xslt' '--with-dom-exslt' to your configure patch when you are
 compiling PHP). After you compile PHP, you should have support for SAX,
DOM
 and XSL transformations.
 
 And if you want a bootstrap to start using XMLs for content
publishing,
 you should also look at Krysalis at
 http://www.interakt.ro/products/Krysalis/
 
 Alexandru
 
 
  How do I install xml? I am totally new to Xmland 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



Re: [PHP] Re: Php +Xml?

2003-03-09 Thread Alexandru COSTIN
Hello James,

Your vision is very similar to ours.

You should take the Krysalis platform (LGPL) and give it a try. It's a
mature solution (similar to cocoon) for XML/XSL publishing, and allows you
to define the way requests are served, define the way dynamic XML trees are
created and then define how to add the presentation layer to them.


Alexandru

--
Alexandru COSTIN
Chief Operating Officer
http://www.interakt.ro/
+4021 411 2610
James [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 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 trtdHello/td/tr;
 }


 Take the following in XSLT:

 xsl:for-each select=node/to/match
 trtdxsl: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 Xmland 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



RE: [PHP] Re: Php +Xml?

2003-03-08 Thread daniel
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 Xmland 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



Re: [PHP] Re: Php +Xml?

2003-03-08 Thread James
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 trtdHello/td/tr;
}


Take the following in XSLT:

xsl:for-each select=node/to/match
trtdxsl: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 Xmland 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



RE: [PHP] Re: Php +Xml?

2003-03-08 Thread daniel
what is domxml ? is it similar to sablot ?
= Original Message From Alexandru COSTIN [EMAIL PROTECTED] =
Hello,

 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.
If you want to use SAX, you should already have it installed if you have
compiled PHP with '--with-xml'. (BTW, have you compiled PHP yourself? - do
you know how to compile PHP?).

First of all you should upgrade to a newer apache, as as far as I know
Apache 1.3.12 had some problem when ran with Sablotron (this would be needed
if you will want to use XML with XSL transformations)

Then you should use the domxml extension (add '--with-dom'
'--with-dom-xslt' '--with-dom-exslt' to your configure patch when you are
compiling PHP). After you compile PHP, you should have support for SAX, DOM
and XSL transformations.

And if you want a bootstrap to start using XMLs for content publishing,
you should also look at Krysalis at
http://www.interakt.ro/products/Krysalis/

Alexandru


 How do I install xml? I am totally new to Xmland 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



RE: [PHP] Re: Php +Xml?

2003-03-08 Thread Khalid El-Kary
try this parser, it would be useful.

http://creaturesx.ma.cx/kxparse/

Regards,
Khalid
_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail

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


RE: [PHP] Re: PHP XML

2002-10-16 Thread Simon Taylor

To me this is a lot of work and processing for limited benefits, a simple db
abstraction layer provides you with a divide between you db queries and the
presentation of your site, what benefits do you see in doing this?
Cheers
Simon

-Original Message-
From: Alexandru COSTIN [mailto:[EMAIL PROTECTED]] 
Sent: 15 October 2002 18:50
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP  XML


Hello,

Most of what you are looking for is already implemented and fully working in

our Krysalis Professional platform.

We help you create dynamic XML files, we provide you reusable taglibs  to 
avoid rewriting similar code multiple times, wr provide various levels of 
caching and many more.

Please se more details at : http://www.interakt.ro/products/

Alexandru

 Let me preface this by saying that I know the benefits of using XML 
 with regards to portability and extensibility. Here is the issue I 
 face.  I have all of my data stored in a MySQL database.  I'm 
 considering reworking my website so that it uses XML (after being 
 converted from resultant records in my DB) to transmit  XSLT to 
 transform and display the data to my end user. There are a few 
 benifits I can see in sending XML messages as part of the back end 
 processing.  However, that seems to be out- weighed by the amount of 
 processing that's going to need to take place in actually serving the 
 data to the user. First I have to query and pull the records from the 
 database.  Then, I need to send those records to a function (or 
 functions) to convert it to XML.  Then, I need to take that XML data 
 and have PHP use an XSL stylesheet to transform it to HTML before it, 
 finally, gets sent on to the browser.  So that's basically 2 
 conversions that take place on the back end.
 How much experience have any of you had with doing that?  Does
 it take significantly longer to serve the pages; is there a noticible
 performance hit?  Do you realize more benifit for the back end
 processes when using XML that makes any additional time it takes
 to display a page to the user worth it?
 I'd love to hear about people's experience with this kind of thing so I
 can better make a decision wrt whether or not I should even go down
 this route.
 
 thnx,
 Chris


-- 
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




RE: [PHP] Re: PHP XML

2002-10-16 Thread Joshua Alexander

To me this is a lot of work and processing for limited benefits, a simple db
abstraction layer provides you with a divide between you db queries and the
presentation of your site, what benefits do you see in doing this?

I have to agree with Simon. I am at a loss when it comes to seeing 
any benefit to XML that doesn't involve data exchange between at 
least two parties.

I've spent the last two years building database-backed websites, so 
I'm constantly trying to improve how I build them in order to make 
design and maintenance easier... I used to rely heavily on SSI for 
this, and now I rely more on PHP... if XML would make things easier, 
believe me, I would LOVE to know how... but I just don't see it.

-Josh


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




RE: [PHP] Re: PHP XML

2002-10-16 Thread José León Serna

El mié, 16-10-2002 a las 10:22, Joshua Alexander escribió:
 I have to agree with Simon. I am at a loss when it comes to seeing 
 any benefit to XML that doesn't involve data exchange between at 
 least two parties.
 
 I've spent the last two years building database-backed websites, so 
 I'm constantly trying to improve how I build them in order to make 
 design and maintenance easier... I used to rely heavily on SSI for 
 this, and now I rely more on PHP... if XML would make things easier, 
 believe me, I would LOVE to know how... but I just don't see it.
Let's imagine you create a website of an online magazine, this magazine
publishes in HTML, PDF, TXT, PS, etc, etc, etc. How would you do it?

I would use XML to write the articles and then stylesheets to transform
the articles to the formats I want. Write once, publish anywhare ;-)

Regards
-- 
XPde :: XP-like desktop environment (developed with Kylix ;-)
http://www.xpde.com





signature.asc
Description: This is a digitally signed message part


RE: [PHP] Re: PHP XML

2002-10-16 Thread Simon Taylor

Sure in this context I agree with you, but how often do you have a website
which needs to publish in many different formats? I have designed and built
websites for a while and have never come across such an application.
But if I were ever I would definitely invest the effort that is required,
but until then I will save myself from the extra work.
Cheers
Simon

-Original Message-
From: José León Serna [mailto:[EMAIL PROTECTED]] 
Sent: 16 October 2002 10:40
To: Joshua Alexander
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Re: PHP  XML


El mié, 16-10-2002 a las 10:22, Joshua Alexander escribió:
 I have to agree with Simon. I am at a loss when it comes to seeing
 any benefit to XML that doesn't involve data exchange between at 
 least two parties.
 
 I've spent the last two years building database-backed websites, so
 I'm constantly trying to improve how I build them in order to make 
 design and maintenance easier... I used to rely heavily on SSI for 
 this, and now I rely more on PHP... if XML would make things easier, 
 believe me, I would LOVE to know how... but I just don't see it.
Let's imagine you create a website of an online magazine, this magazine
publishes in HTML, PDF, TXT, PS, etc, etc, etc. How would you do it?

I would use XML to write the articles and then stylesheets to transform the
articles to the formats I want. Write once, publish anywhare ;-)

Regards
-- 
XPde :: XP-like desktop environment (developed with Kylix ;-)
http://www.xpde.com



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




RE: [PHP] Re: PHP XML

2002-10-16 Thread José León Serna

El mié, 16-10-2002 a las 11:02, Simon Taylor escribió:
 Sure in this context I agree with you, but how often do you have a website
 which needs to publish in many different formats? I have designed and built
 websites for a while and have never come across such an application.
 But if I were ever I would definitely invest the effort that is required,
 but until then I will save myself from the extra work.
If you create an intranet (DMS, ISO compliance, etc) for a company, sure
you have to deal with that ;-)

Regards 
-- 
XPde :: XP-like desktop environment (developed with Kylix ;-)
http://www.xpde.com





signature.asc
Description: This is a digitally signed message part


RE: [PHP] Re: PHP XML

2002-10-16 Thread Joshua Alexander

I still wouldn't use XML for this. I mean, all the articles are in 
the database, and I'm already using PHP to pull them out and format 
them into html, right? I can just as easily use PHP to put them into 
all those other formats.

So again, why waste time with XML unless I need to feed these 
articles to others, like in a newsfeed situation?

But if I were ever I would definitely invest the effort that is required,
but until then I will save myself from the extra work.

Let's imagine you create a website of an online magazine, this magazine
publishes in HTML, PDF, TXT, PS, etc, etc, etc. How would you do it?

I would use XML to write the articles and then stylesheets to transform the
articles to the formats I want. Write once, publish anywhare ;-)

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




RE: [PHP] Re: PHP XML

2002-10-16 Thread José León Serna

El mié, 16-10-2002 a las 11:13, Joshua Alexander escribió:
 I still wouldn't use XML for this. I mean, all the articles are in 
 the database, and I'm already using PHP to pull them out and format 
 them into html, right? I can just as easily use PHP to put them into 
 all those other formats.
In what format do you have the articles on the database? TXT?
You will need to create a PHP software to format these articles to 
HTML
PDF
TXT
PS

With XML you don't need that, the parser does the hard work for you.

What would it happen if you need another format? You would need to
develop another program (or modify an existing one) to transform your
content to the new format. With XML you just need to add a new XSL.

Of course, XML is not the only solution, but IMO is the easiest.

Regards
-- 
XPde :: XP-like desktop environment (developed with Kylix ;-)
http://www.xpde.com





signature.asc
Description: This is a digitally signed message part


[Fwd: Re: [PHP] Re: PHP XML]

2002-10-16 Thread Tariq Murtaza

Can u elaborate more about ISO standards.
i mean, if u could explain more about using Xml in DMS with ISO
standards with small examples
Best ragards

José León Serna wrote:
  El mié, 16-10-2002 a las 11:02, Simon Taylor escribió:
 
 Sure in this context I agree with you, but how often do you have a 
website
 which needs to publish in many different formats? I have designed and 
built
 websites for a while and have never come across such an application.
 But if I were ever I would definitely invest the effort that is required,
 but until then I will save myself from the extra work.
 
  If you create an intranet (DMS, ISO compliance, etc) for a company, sure
  you have to deal with that ;-)
 
  Regards



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




Re: [Fwd: Re: [PHP] Re: PHP XML]

2002-10-16 Thread José León Serna

El mar, 15-10-2002 a las 23:16, Tariq Murtaza escribió:
 Can u elaborate more about ISO standards.
 i mean, if u could explain more about using Xml in DMS with ISO 
 standards with small examples
AFAIK there is no especific request to use XML to be compliant with
ISO standard, the ISO specifies the information must be accesible by
everyone, so XML is the perfect candidate, it was just a sample ;-)

Regards.



signature.asc
Description: This is a digitally signed message part


Re: [PHP] Re: PHP XML

2002-10-16 Thread Stas Maximov

The benefit would be in dividing business logic from presentation layer.

Stas.

- Original Message -
From: Simon Taylor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 16, 2002 7:35 AM
Subject: RE: [PHP] Re: PHP  XML


 To me this is a lot of work and processing for limited benefits, a simple
db
 abstraction layer provides you with a divide between you db queries and
the
 presentation of your site, what benefits do you see in doing this?
 Cheers
 Simon

 -Original Message-
 From: Alexandru COSTIN [mailto:[EMAIL PROTECTED]]
 Sent: 15 October 2002 18:50
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: PHP  XML


 Hello,

 Most of what you are looking for is already implemented and fully working
in

 our Krysalis Professional platform.

 We help you create dynamic XML files, we provide you reusable taglibs  to
 avoid rewriting similar code multiple times, wr provide various levels of
 caching and many more.

 Please se more details at : http://www.interakt.ro/products/

 Alexandru

  Let me preface this by saying that I know the benefits of using XML
  with regards to portability and extensibility. Here is the issue I
  face.  I have all of my data stored in a MySQL database.  I'm
  considering reworking my website so that it uses XML (after being
  converted from resultant records in my DB) to transmit  XSLT to
  transform and display the data to my end user. There are a few
  benifits I can see in sending XML messages as part of the back end
  processing.  However, that seems to be out- weighed by the amount of
  processing that's going to need to take place in actually serving the
  data to the user. First I have to query and pull the records from the
  database.  Then, I need to send those records to a function (or
  functions) to convert it to XML.  Then, I need to take that XML data
  and have PHP use an XSL stylesheet to transform it to HTML before it,
  finally, gets sent on to the browser.  So that's basically 2
  conversions that take place on the back end.
  How much experience have any of you had with doing that?  Does
  it take significantly longer to serve the pages; is there a noticible
  performance hit?  Do you realize more benifit for the back end
  processes when using XML that makes any additional time it takes
  to display a page to the user worth it?
  I'd love to hear about people's experience with this kind of thing so I
  can better make a decision wrt whether or not I should even go down
  this route.
 
  thnx,
  Chris


 --
 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




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




Re: [PHP] Re: PHP XML

2002-10-16 Thread Geoff Hankerson

Ultimately it's about flexibility and seperating content from 
presentation.Even if you don't have sites that need to be output into 
multiple formats you will almost cetainly need to redesign some or all 
of the presentation at some point even if it is only in html.  Have you 
ever had your boss/client say I want to give the Website a new look. 
 If you have content mixed in with presentation you will need to do a 
lot of work to mix your content into a new presentation layer.

It's also about writing code that is easy to maintain. You can make  a 
class to convert db content to xml and another to convert xml to html 
via xslt. Your pages suddenly become very easy to write (an have fewer 
lines of code) , they only differ in the sql statment and the name of 
the xsl file.

I am going to do all my sites like this now. I'm tired of the old way. 
it's too much work.

Joshua Alexander wrote:

 I still wouldn't use XML for this. I mean, all the articles are in the 
 database, and I'm already using PHP to pull them out and format them 
 into html, right? I can just as easily use PHP to put them into all 
 those other formats.

 So again, why waste time with XML unless I need to feed these articles 
 to others, like in a newsfeed situation?

 But if I were ever I would definitely invest the effort that is 
 required,
 but until then I will save myself from the extra work.


 Let's imagine you create a website of an online magazine, this magazine
 publishes in HTML, PDF, TXT, PS, etc, etc, etc. How would you do it?

 I would use XML to write the articles and then stylesheets to 
 transform the
 articles to the formats I want. Write once, publish anywhare ;-)






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




Re: [PHP] Re: PHP XML

2002-10-16 Thread Adrian Slusarczyk


Using XML can also make sense for smaller projects where a 'real' DB just
isn´t available on the server.

I am developing a CMS for our student magazine. Over the last 16 months or
so, we used CGI /Perl for processing and stored the data in plain text
files.In these article files, I would use pseudo-tags like, __PICTURE_1__,
then get some data for this picture (URL, width  height, ALT-Text, longer
description, source  copyright) from a *seperate* text file, then create an
HTML table that contains the picture  a description and insert it into the
article.
This was way better than using static HTML, which we had used in the
beginning (wanne here a definition for *pain*? ;-). But it still didn´t
really seperate layout and content since basic HTML tags like H1, BR,
B, I etc. were used in the text files. This worked fine as long as we
were glad that minor changes in the footer of the page didn´t involve 48
hours of non-stop work, but it became unfeasible when our ambitions grew and
extended to having a (differently formatted) print version of each
article

The bottom line is: With XML, we now have a clear-cut DTD and thorough
seperation of code, content, and layout -- exactly what one would want to
achieve with a DB. The performance is ok, I´d say better than with the old
Perl script :) and will improve even further when we implement caching of
the HTML output (yes, I know, that´s not an option for everyone).

For us, XML is kinda a third way aside from SQL and plain text files.
Besides, we still have the option to set up a DB and create the XML files
automatically  cache the output if we ever grow big and important enough to
afford web hosting with a real DB :)

Unless you´re data are updated too frequently (and are needed to be
up-to-date immediately) to be cached, take a look at XML. Besides, once you
CAN exchange your stuff with others, you might come across new ideas to
improve your whole site!

Regards,

Adrian Slusarczyk


Simon Taylor [EMAIL PROTECTED] schrieb im Newsbeitrag
414B25821CCAD61181A90048543C810C03EDB4@EMAILSERVER">news:414B25821CCAD61181A90048543C810C03EDB4@EMAILSERVER...
Sure in this context I agree with you, but how often do you have a website
which needs to publish in many different formats? I have designed and built
websites for a while and have never come across such an application.
But if I were ever I would definitely invest the effort that is required,
but until then I will save myself from the extra work.
Cheers
Simon

-Original Message-
From: José León Serna [mailto:[EMAIL PROTECTED]]
Sent: 16 October 2002 10:40
To: Joshua Alexander
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Re: PHP  XML


El mié, 16-10-2002 a las 10:22, Joshua Alexander escribió:
 I have to agree with Simon. I am at a loss when it comes to seeing
 any benefit to XML that doesn't involve data exchange between at
 least two parties.

 I've spent the last two years building database-backed websites, so
 I'm constantly trying to improve how I build them in order to make
 design and maintenance easier... I used to rely heavily on SSI for
 this, and now I rely more on PHP... if XML would make things easier,
 believe me, I would LOVE to know how... but I just don't see it.
Let's imagine you create a website of an online magazine, this magazine
publishes in HTML, PDF, TXT, PS, etc, etc, etc. How would you do it?

I would use XML to write the articles and then stylesheets to transform the
articles to the formats I want. Write once, publish anywhare ;-)

Regards
--
XPde :: XP-like desktop environment (developed with Kylix ;-)
http://www.xpde.com





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




RE: [PHP] Re: PHP XML

2002-10-16 Thread .: B i g D o g :.

I am all for the power of XML, another benefit is the ability to have
many themes for your viewer.  Plus, if you are writing a CMS or portal
of some sort you can have your users create their own themes without
ever touching the data layers.

They just need to create some XSLT pages and that is it.  

Another benefit is RSS and allowing users to pull information from your
website.  Heaven knows that u want your users to frequent ur website. 
So you can allow them to pull info directly.

Also a great way to incorporate a cacheing system as well.


On Wed, 2002-10-16 at 00:35, Simon Taylor wrote:
 To me this is a lot of work and processing for limited benefits, a simple db
 abstraction layer provides you with a divide between you db queries and the
 presentation of your site, what benefits do you see in doing this?
 Cheers
 Simon
 
 -Original Message-
 From: Alexandru COSTIN [mailto:[EMAIL PROTECTED]] 
 Sent: 15 October 2002 18:50
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: PHP  XML
 
 
 Hello,
 
 Most of what you are looking for is already implemented and fully working in
 
 our Krysalis Professional platform.
 
 We help you create dynamic XML files, we provide you reusable taglibs  to 
 avoid rewriting similar code multiple times, wr provide various levels of 
 caching and many more.
 
 Please se more details at : http://www.interakt.ro/products/
 
 Alexandru
 
  Let me preface this by saying that I know the benefits of using XML 
  with regards to portability and extensibility. Here is the issue I 
  face.  I have all of my data stored in a MySQL database.  I'm 
  considering reworking my website so that it uses XML (after being 
  converted from resultant records in my DB) to transmit  XSLT to 
  transform and display the data to my end user. There are a few 
  benifits I can see in sending XML messages as part of the back end 
  processing.  However, that seems to be out- weighed by the amount of 
  processing that's going to need to take place in actually serving the 
  data to the user. First I have to query and pull the records from the 
  database.  Then, I need to send those records to a function (or 
  functions) to convert it to XML.  Then, I need to take that XML data 
  and have PHP use an XSL stylesheet to transform it to HTML before it, 
  finally, gets sent on to the browser.  So that's basically 2 
  conversions that take place on the back end.
  How much experience have any of you had with doing that?  Does
  it take significantly longer to serve the pages; is there a noticible
  performance hit?  Do you realize more benifit for the back end
  processes when using XML that makes any additional time it takes
  to display a page to the user worth it?
  I'd love to hear about people's experience with this kind of thing so I
  can better make a decision wrt whether or not I should even go down
  this route.
  
  thnx,
  Chris
 
 
 -- 
 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


-- 
.: B i g D o g :.


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