[PHP] Re: [PHP-XML-DEV] DomXPath and default XML namespaces

2004-12-13 Thread Adam Maccabee Trachtenberg
On Mon, 13 Dec 2004, Dan Phiffer wrote:

> Adam Maccabee Trachtenberg wrote:
>
> > This is an XPath FAQ. Without a ns prefix, XPath doesn't choose
> > elements living in the default ns, but ones living in no namespace.
>
> Are there any good references you might point me to? I'm pretty new to
> this stuff and beyond my "in a Nutshell" book don't have many places to
> consult yet.

Nothing good I can think of off hand besides the spec. That's really
the only tricky XPath gotcha, however.

-adam

-- 
[EMAIL PROTECTED] | http://www.trachtenberg.com
author of o'reilly's "upgrading to php 5" and "php cookbook"
avoid the holiday rush, buy your copies today!

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


[PHP] Re: [PHP-XML-DEV] DomXPath and default XML namespaces

2004-12-13 Thread Dan Phiffer
Adam Maccabee Trachtenberg wrote:
This is an XPath FAQ. Without a ns prefix, XPath doesn't choose
elements living in the default ns, but ones living in no namespace.
Are there any good references you might point me to? I'm pretty new to 
this stuff and beyond my "in a Nutshell" book don't have many places to 
consult yet.

> what happens to:

  

  
  
   
  

And /root/foo/qxx? Do you select qxx in the default ns? Or not?
-adam
That makes perfect sense. I'm realizing that XPaths are not as portable 
as I thought they were. At least not without some way of converting 
element prefixes easily...

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


[PHP] Re: [PHP-XML-DEV] DomXPath and default XML namespaces

2004-12-13 Thread Adam Maccabee Trachtenberg
On Mon, 13 Dec 2004, Dan Phiffer wrote:

> I guess what I would expect to work is to allow for blank values as the
> first argument to registerNamespace, representing the default namespace,
> but that causes the queries to always return no matches. Is there
> something I'm missing with this?

This is an XPath FAQ. Without a ns prefix, XPath doesn't choose
elements living in the default ns, but ones living in no namespace.

Otherwise, you have problems with:


  
  


What would /root/foo be, the first, the second, both? And if this
example is resolvable, what happens to:


  

  
  
   
  


And /root/foo/qxx? Do you select qxx in the default ns? Or not?

-adam

-- 
[EMAIL PROTECTED] | http://www.trachtenberg.com
author of o'reilly's "upgrading to php 5" and "php cookbook"
avoid the holiday rush, buy your copies today!

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


[PHP] Re: [PHP-XML-DEV] DomXPath and default XML namespaces

2004-12-13 Thread Christian Stocker

On 14.12.2004 6:45 Uhr, Dan Phiffer wrote:
Adam Maccabee Trachtenberg wrote:
This is an XPath FAQ. Without a ns prefix, XPath doesn't choose
elements living in the default ns, but ones living in no namespace.

Are there any good references you might point me to? I'm pretty new to 
this stuff and beyond my "in a Nutshell" book don't have many places to 
consult yet.

 > what happens to:

  

  
  
   
  

And /root/foo/qxx? Do you select qxx in the default ns? Or not?
-adam
That makes perfect sense. I'm realizing that XPaths are not as portable 
as I thought they were. At least not without some way of converting 
element prefixes easily...
You just have to learn that prefixes are just aliases to the real 
namespaces, then you're fine. Don't count on prefixes, they itself are 
meaninngless. And always use registerNamespace() for all namespaces you 
need in the XPath query. Then XPath is very portable.

chregu
Thanks,
-Dan
--
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch  |  [EMAIL PROTECTED]  |  gnupg-keyid 0x5CE1DECB
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-22 Thread Rob Richards
From: Vivian Steller

> i now can use the following syntax to set the namespaceUri of a node:
>
>  $element = new DomElement("tagname", "value",
"http://namespaceUri";);
> // or
> $element = new DomElement("pref:tagname", "value",
"http://namespaceUri";);
> // works as well
> ?>

Your point for adding this was well made (as well as others expressing the
same view), so support has been added to the DomElement constructor. as well
as the examples above, to create a node with no value in a namespace:
$element = new DomElement("pref:tagname", NULL, "http://namespaceUri";);

Note: There will be no further additional dom features added for 5.0. This
was an exception due to its usefulness in functionality.

Rob

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



[PHP] Re: [PHP-XML-DEV] PHP5: ext/dom: Namespace & Prefix unexpected behavior

2004-02-18 Thread Rob Richards
> I thought that setting $root->prefix will set the prefix and the
> namespaceUri to the other domain... but it seems to me that the parser
> doesn't see the "xmlns:anotherprefix" as a prefix-declaration?
> maybe i just misunderstood something, so please correct me if so.

The current behavior is wrong (fix currently being discussed), however your
expectations are also incorrect.

Setting the prefix does not change a nodes namespace uri. Once a node is
created, it is permanently bound to the namespace URI (per specs).

Changing the prefix only changes the prefix of the current namespace on that
element, which may result in a new namespace definition on that node (if
namespace is inherited) or it may fail as in your case there would be
namespace collision due to 2 namespaces with the same prefix (which imo
should error out rather than allow it).

Rob

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



[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-17 Thread Vivian Steller
Rob Richards wrote:

> From: Christian Stocker
> 
>> > $node->setAttributeNS("http://www.w3.org/2000/xmlns/";, "xmlns:b",
>> > "http://www.somedomain.de/";);
>> >
> 
>> IMHO, that would be very confusing.
>>
>> I liked the idea by vivian with a third optional namespaceURI argument
>> for the element object, so that at least you can use your own extended
>> classes for that.
>>
>> And maybe we still need a ->setNamespaceURI method, even if W3C didnt
>> think of that ;)
> 
> After thinking about it some more I started to think about it the same
> way. One can always then use $node->prefix = "xyz" to set the prefix (if
> needed) for the initial namespace delcaration.
> It probably has to wait until 5.1 though since its so close to the
> release.
> 
> Rob

first of all, thanks for your interests...
i tried my self in extending your code - i'm really no C programmer, just
copy&pasted it (poor to say that, sorry:), but it seems to work.

i now can use the following syntax to set the namespaceUri of a node:

http://namespaceUri";);
// or
$element = new DomElement("pref:tagname", "value", "http://namespaceUri";);
// works as well
?>

here is the diff output:

--- ./element_original.c2004-02-15 15:08:52.0 +0100
+++ ./element.c 2004-02-17 20:53:35.0 +0100
@@ -64,11 +64,14 @@
 
zval *id;
xmlNodePtr nodep = NULL, oldnode = NULL;
+   xmlNsPtr nsptr = NULL;
dom_object *intern;
-   char *name, *value = NULL;
-   int name_len, value_len = 0;
+   char *name, *value = NULL, *uri = NULL;
+   char *localname = NULL, *prefix = NULL;
+   int name_len, value_len = 0, uri_len = 0;
+   int errorcode;
 
-   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
"Os|s", &id, dom_element_class_entry, &name, &name_len, &value, &value_len)
== FAILURE) {
+   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
"Os|ss", &id, dom_element_class_entry, &name, &name_len, &value,
&value_len, &uri, &uri_len) == FAILURE) {
return;
}
 
@@ -77,15 +80,49 @@
RETURN_FALSE;
}
 
-   nodep = xmlNewNode(NULL, (xmlChar *) name);
+   //
+
+   errorcode = dom_check_qname(name, &localname, &prefix, uri_len, name_len);
+
+   if (errorcode == 0) {
+   nodep = xmlNewNode(NULL, (xmlChar *) localname);
+
+   if (!nodep)
+   RETURN_FALSE;
+
+   if (value_len > 0) {
+   xmlNodeSetContentLen(nodep, value, value_len);
+   }
+   // nodep = xmlNewDocNode (docp, NULL, localname, NULL);
+   if (nodep != NULL && uri != NULL) {
+   nsptr = xmlSearchNsByHref (nodep->doc, nodep, uri);
+   if (nsptr == NULL) {
+   nsptr = dom_get_ns(nodep, uri, &errorcode, prefix);
+   }
+   xmlSetNs(nodep, nsptr);
+   }
+   }
 
-   if (!nodep)
+   xmlFree(localname);
+   if (prefix != NULL) {
+   xmlFree(prefix);
+   }
+
+   if (errorcode != 0) {
+   if (nodep != NULL) {
+   xmlFreeNode(nodep);
+   }
+   php_dom_throw_error(errorcode, dom_get_strict_error(intern->document)
TSRMLS_CC);
RETURN_FALSE;
+   }
 
-   if (value_len > 0) {
-   xmlNodeSetContentLen(nodep, value, value_len);
+   if (nodep == NULL) {
+   RETURN_FALSE;
}
 
+
+   nodep->ns = nsptr;
+   //
intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);
if (intern != NULL) {
oldnode = (xmlNodePtr)intern->ptr;
@@ -97,8 +134,8 @@
 }
 /* }}} end dom_element_element */
 
-/* {{{ proto tagName   string  
-readonly=yes 
+/* {{{ proto tagName   string
+readonly=yes
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226
DOM3-Core.html#core-ID-104682815
 Since: 
 */


as you said it's close to the release and i won't bring you into trouble,
but maybe you can take a short time to look if i had made some heavy
errors...

MANY MANY THANKS in advance,
best regards

vivian

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



[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-16 Thread Rob Richards
From: Christian Stocker

> > $node->setAttributeNS("http://www.w3.org/2000/xmlns/";, "xmlns:b",
> > "http://www.somedomain.de/";);
> >

> IMHO, that would be very confusing.
>
> I liked the idea by vivian with a third optional namespaceURI argument
> for the element object, so that at least you can use your own extended
> classes for that.
>
> And maybe we still need a ->setNamespaceURI method, even if W3C didnt
> think of that ;)

After thinking about it some more I started to think about it the same way.
One can always then use $node->prefix = "xyz" to set the prefix (if needed)
for the initial namespace delcaration.
It probably has to wait until 5.1 though since its so close to the release.

Rob

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



[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-16 Thread Christian Stocker


On 2/16/04 12:07 PM, Rob Richards wrote:

Porting the setNamespace function to PHP5 would be nice. Another solution
could be the possibility to append a namespace-node (is the
domnamespacenode class currently used by any functions?) or the
setAttribute checks wether some "xmlns"/"xmlns:" attribute is set and
updates namespaceUri itself... would be more W3C standard compliant.


The namespace node isnt really used with any functions. It is also a
"special" node as its not a standard node type in libxml.
Via the specs, it doesnt really exist, but it can be returned via xpath,
which is why dom manipulates the libxml namespace into a returnable type,
which a few of the properties are allowed to work with it (otherwise either
dom would either have to prevent xpath from returning it or let the system
crash when its returned - neither of these options was acceptable - thus
this special node).
As far as setAttributeNS goes. This function actually does do checks,
however it doesnt put the element into the current namespace (which possibly
may be a logic bug - namespaces internally are so damned confusing).
Using the syntax:

$node->setAttributeNS("http://www.w3.org/2000/xmlns/";, "xmlns:b",
"http://www.somedomain.de/";);
This sets the definition on the element but doesnt put that node into the
namespace, it just puts the namespace into the scope of the node, so that
elements added with createelementns and appended as children of $node can be
placed within the namespace and would be prefixed with "b".
Now here is the question, if a namespace is not associated on the element at
that point, should the above set the element into the new namespace? (Easy
enough to implement, but really have no clue if this is the proper logic or
not). Any namespace gurus around here?
IMHO, that would be very confusing.

I liked the idea by vivian with a third optional namespaceURI argument 
for the element object, so that at least you can use your own extended 
classes for that.

And maybe we still need a ->setNamespaceURI method, even if W3C didnt 
think of that ;)

chregu

Rob

--
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch  |  [EMAIL PROTECTED]  |  gnupg-keyid 0x5CE1DECB
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-16 Thread Rob Richards
> Porting the setNamespace function to PHP5 would be nice. Another solution
> could be the possibility to append a namespace-node (is the
> domnamespacenode class currently used by any functions?) or the
> setAttribute checks wether some "xmlns"/"xmlns:" attribute is set and
> updates namespaceUri itself... would be more W3C standard compliant.

The namespace node isnt really used with any functions. It is also a
"special" node as its not a standard node type in libxml.
Via the specs, it doesnt really exist, but it can be returned via xpath,
which is why dom manipulates the libxml namespace into a returnable type,
which a few of the properties are allowed to work with it (otherwise either
dom would either have to prevent xpath from returning it or let the system
crash when its returned - neither of these options was acceptable - thus
this special node).

As far as setAttributeNS goes. This function actually does do checks,
however it doesnt put the element into the current namespace (which possibly
may be a logic bug - namespaces internally are so damned confusing).

Using the syntax:

$node->setAttributeNS("http://www.w3.org/2000/xmlns/";, "xmlns:b",
"http://www.somedomain.de/";);

This sets the definition on the element but doesnt put that node into the
namespace, it just puts the namespace into the scope of the node, so that
elements added with createelementns and appended as children of $node can be
placed within the namespace and would be prefixed with "b".

Now here is the question, if a namespace is not associated on the element at
that point, should the above set the element into the new namespace? (Easy
enough to implement, but really have no clue if this is the proper logic or
not). Any namespace gurus around here?

Rob

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



[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-16 Thread Vivian Steller
Christian Stocker wrote:

> ...
> Vivian, it's not possible the set the namespace according to the W3C
> standard, except with createElementNS(). As Adam said, in PHP 4, there
> was the option set_namespace, which isn't ported to PHP5 (yet).
> 
> Maybe we should port that function as well, to allow some deeper level
> manipulation of the namespaces...
> 
> Currently, I don't have a solution to your problem, except porting
> setNamespace to PHP5...
> 
> chregu
> 

Porting the setNamespace function to PHP5 would be nice. Another solution
could be the possibility to append a namespace-node (is the
domnamespacenode class currently used by any functions?) or the
setAttribute checks wether some "xmlns"/"xmlns:" attribute is set and
updates namespaceUri itself... would be more W3C standard compliant.

without the functionality to set the namespace it will never be possible to
overwrite the createElementNS of domdocument, as the following example
shows:

setNamespace("http://...";);
// -> maybe you get into trouble with "NO MODIFICATION ALLOWED 
ERROR"!!
//because node isn't appended

// or something like
$element->setAttributeNS("http://www.w3c.org/2000/xmlns";, 
"xmlns",
"http://mydomain.de/";);
// -> maybe you get into trouble with "NO MODIFICATION ALLOWED 
ERROR"!!
//because node isn't appended

return $element;
}
}
?>

i think because of the problems with the MODIFICATION ERRORS while node
isn't appended, it would be best if you could define the node-namespace
with the third argument of DomElement::__construct($name, $value, $uri =
"defaultUri")...

it would be VERY nice if you think about such solutions...

thanks a lot,
vivi

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



[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-15 Thread Christian Stocker


On 2/16/04 1:24 AM, Adam Bregenzer wrote:

On Sun, 2004-02-15 at 19:04, Vivian Steller wrote:

As you can see it is impossible to set the namespace manually! I tried to
set it with the help of a DomNamespaceNode-object but those objects are no
"real" nodes (why!?!) and the consequence is that you couldn't append such
a node with $node->appendChild($domnamspacenode_object); ...


I am not sure if PHP 5 has many changes from PHP 4, however have you
tried calling set_namespace[1]?
$node->set_namespace('http://www.somedomain.de/');
[1] http://www.php.net/domnode-set-namespace


Vivian, it's not possible the set the namespace according to the W3C 
standard, except with createElementNS(). As Adam said, in PHP 4, there 
was the option set_namespace, which isn't ported to PHP5 (yet).

Maybe we should port that function as well, to allow some deeper level 
manipulation of the namespaces...

Currently, I don't have a solution to your problem, except porting 
setNamespace to PHP5...

chregu

--
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch  |  [EMAIL PROTECTED]  |  gnupg-keyid 0x5CE1DECB
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP, XML, UTF-8

2003-12-11 Thread Lucian Cozma
Answer: Multi-Byte String Functions.
You could take a look at the function:
string mb_convert_encoding ( string str, string to-encoding [, mixed
from-encoding] )
You must have php_mbstring extension enabled in your php.ini file.

Regards,
Lucian COZMA

"Russell P Jones" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Im storing a lot of user-entered data in XML files but i have a problem
> with folks submitting stuff just by copying and pasting from microsoft
> word. "Smart Quotes" and other awkward text then gets submitted and ruins
> the xml, meaning i am searching and replacing item by item to replace
> stuff.
>
> Does anyone know how I could do this automatically, as in is there
> anything that will convert a string to UTF-8 automatically
>
> ideally $fixed = convert-to-utf($oldmessedupstring)
>
> any ideas? Will CDATA sections allow non UTF-8 text?
>
> Russ Jones

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



[PHP] Re: PHP, XML, UTF-8

2003-12-08 Thread Manuel Lemos
Hello,

On 12/08/2003 04:37 PM, Russell P Jones wrote:
Im storing a lot of user-entered data in XML files but i have a problem
with folks submitting stuff just by copying and pasting from microsoft
word. "Smart Quotes" and other awkward text then gets submitted and ruins
the xml, meaning i am searching and replacing item by item to replace
stuff.
Does anyone know how I could do this automatically, as in is there
anything that will convert a string to UTF-8 automatically
ideally $fixed = convert-to-utf($oldmessedupstring)

any ideas? Will CDATA sections allow non UTF-8 text?
There is the function utf8_encode() but if you want to generate XML, you 
may also want to try this class that performs whatever conversions you need:

http://www.phpclasses.org/xmlwriter

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP XML Reference

2003-03-14 Thread David Eisenhart
check out the book XML and PHP by Vikram Vaswani, News Riders; a well
written and concise treatment of xml and php.

David Eisenhart



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



[PHP] Re: PHP XML Reference

2003-03-14 Thread Alexandru COSTIN
Hello,
You will also might want to try the free Krysalis platform - it's
designed from scratch for XML/XSL content publishing (a la Cocoon) and you
will find it very useful for your goals.

http://www.interakt.ro/products/Krysalis/



Alexnadru

--
Alexandru COSTIN
Chief Operating Officer
http://www.interakt.ro/
+4021 411 2610
"Tim Funk" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Hi,
>
> I am new to PHP, however i have a good handle on C programming and
therefore hope to apply those conceps to PHP programming quickly. I am
looking for a print reference that can help me to construct a web-based
front-end for an application using XML. Any help in this regard will bemuch
appreciated.
>
> Thanks,
> Tim
>
>
>
> -
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online



-- 
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 "Hello";
> }
>
>
> Take the following in XSLT:
>
> 
> 
> 
>
> 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-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-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?

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 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 "Hello";
}


Take the following in XSLT:





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



[PHP] Re: Php +Xml?

2003-03-08 Thread Alexandru COSTIN
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



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



[PHP] Re: Php +Xml?

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



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




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 , ,
,  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 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 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: [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


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


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




[PHP] Re: PHP & XML

2002-10-15 Thread Alexandru COSTIN

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] Re: PHP: XML/XSL

2002-08-29 Thread Alexandru COSTIN

Hello
For painless XML/XSL transformation on PHP, you should check Krysalis, the 
XML/XSL development framework. We have a lot of nice features packed in, 
like dynamic XML, multiple XSL transformations in a pipeline, etc.

http://www.interakt.ro/products/Krysalis/

Alexandru


Alia Mikati wrote:

> Hi everybody,
> I'm using Sablotron to transform XML with XSL and this is the PHP file:
> 
> Thx a lot


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




[PHP] Re: [php-xml] Http Request

2002-01-08 Thread Manuel Lemos

Hello,

Sandeep Murphy wrote:
> 
> Hi,
> 
> Can anyone tellme how I can do a http request to a servlet from a PHP??
> 
> I mean, I have a username and password which I want to send in a
> string(variable) to a Servlet which authentifies it and responses back in
> XML format...
> 
> any suggestions??

This is what you need. There is even an example on how to make a SOAP
request via HTTP.

http://phpclasses.UpperDesign.com/browse.html/package/3

Regards,
Manuel Lemos

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: PHP & XML

2001-12-19 Thread Martin Hughes

Sorry - I should perhaps say that I'm only intending to code this site for
IE(5/6) - there are too many issues with NetS - I **KNOW** that that's bad
and lazy, but that's the way it's gonna be :o)

M



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]