
- You are not logged in. | Login
January 15, 2007 9:49 am
- admin
- Administrator


Discuss article: "XML. Specification and DOM functions in PHP"
Leave your comments here
Discussed article: "XML. Specification and DOM functions in PHP"
March 30, 2007 7:01 am
- selmahyekishot
- Member


Re: Discuss article: "XML. Specification and DOM functions in PHP"
To be honest, it doesn’t impress much. I’d like to see usage of DOM in the article i.e. ways in which it really simplifies (or improves) work.
It’s clear that XSLT is separation of document’s structure from its design.
And what is DOM?
Maybe I don’t understand some things that’s why I’m writing here. At the moment I just see some extra troubles in it plus increasing of the code size.
Could you educate me?
And who are all those ‘neophytes’ for who this all has been written?
March 30, 2007 7:07 am
- cplusplus
- Member


Re: Discuss article: "XML. Specification and DOM functions in PHP"
Neophytes are those who don’t have any idea (or have a rather obscure one) of DOM XML.
March 30, 2007 7:11 am
- franzkafka
- Member


Re: Discuss article: "XML. Specification and DOM functions in PHP"
You are not necessarily to use iconv. utf8_encode(decode) is enough
March 30, 2007 7:16 am
- cplusplus
- Member


Re: Discuss article: "XML. Specification and DOM functions in PHP"
It has been already discussed on forum that these functions work a bit strange and iconv seems to be more stable. I had trouble with utf8_encode. Generally speaking, it should be specially tested.
March 30, 2007 7:21 am
- sirburpsalot
- Member


Re: Discuss article: "XML. Specification and DOM functions in PHP"
This function works with ISO-8859-1 only
March 30, 2007 8:48 am
- mellis
- Member


Re: Discuss article: "XML. Specification and DOM functions in PHP"
Enough time passed from the moment when method DomXsltStylesheet->result_dump_mem() appeared.
So it should be added into XSL-transformation that if you have PHP which version is > 4.3.* (I don’t remember exactly time of its appearance) then:
$final = $xslt->process($dom);
echo $xslt->result_dump_mem($final);
March 30, 2007 8:54 am
- cplusplus
- Member


Re: Discuss article: "XML. Specification and DOM functions in PHP"
Hmmm...And what new does method result_dump_mem bring? Final document is recorded into $final... Is it transmitted to the XSLT-objetc method once more?
March 30, 2007 9:18 am
- tucansam
- Member


Re: Discuss article: "XML. Specification and DOM functions in PHP"
You are to write either
$result= $xslt->xslt_result_dump_mem($doc);
or
$xslt->xslt_result_dump_file($doc,$fp,[compression_flag]);
Function dump_mem() returns XML independently from method indicated in xsl:output. To get HTML you may use html_dump_mem()
March 30, 2007 9:32 am
- franzkafka
- Member


Re: Discuss article: "XML. Specification and DOM functions in PHP"
Maybe I don’t understand some things but at least everything works properly by me. On the other hand owners of other codings may have some troubles. In any case realization of XML-encoding is outsider in PHP. You cannot set encoding within document by means of XML. That’s why you are to wait for proper release.
March 30, 2007 9:47 am
- sirburpsalot
- Member


Re: Discuss article: "XML. Specification and DOM functions in PHP"
In fact iconv isn’t ideal as well. In particular by recoding from into non-unicode if some symbol has happened to be impossible to recode, in some cases it simply can return a blank string having lost all information.
March 30, 2007 10:06 am
- purplebean
- Member


Re: Discuss article: "XML. Specification and DOM functions in PHP"
This all is very good and quite right except for one thing: we are making real sites. XML and XSLT simplify site considerably but at the same time have influence upon its working speed. The same can be told about PEAR. script in which downloading of my dataobjects (class PEAR) is completely executed within 0.1 second period; the one displaying table, constrained selects and so on – within 1.9 seconds and analogical script on templates and libraries of my own – within 0.1 seconds. Without any doubt XML+XSLT are revolutionary tools. If only they were not so slow…


