Here is the piece of code.
// List of entities to be converted.
// This array contains a list of entities to be converted when an XPath
// expression is evaluated.
// ### People seem to think that &apos is a bad idea for charset ISO-8859-1
//var $entities = array ( "&" => "&", "<" => "<", ">" => ">",
// "'" => "'", '"' => """ );
var $entities = array('&'=>'&', '<'=>'<', '>'=>'>', '"'=>'"');
That means that if I do
The rendering will be
And the browser will display
The easiest (but probably not the safiest) solution is to emplty $entities, I
have no problem with that because until now I use xml.php/xpath.class.php to
read XML files not to produce XML files, but I suppose that emptying $entities
is a bad thing to do when it comes to output XML.
En réponse à [EMAIL PROTECTED]:
> With xml.php to have a correct rendering of HTML enclosed in XML tags
> (in CDATA
> sections) the array entities () might be emptied. If it was not the case
> HTML entities where converted and then displayed by the browser in their
> literal form.
> It seem to be the same with xpath.class.php
> I’m not in front of my development computer so I can’t check the
> xpath.class.php but the result shows that the behavior is the same.
> Instead of letting the user empty the array containing entities to
> perhaps it would be a good thing to have a property to set (TRUE or
> depending the behavior we need/want.
> To go back to my test bed site :-)
> In the following example both the paragraph displayed in the center of
> screen and the contextual menu in the left block came form the same XML
> Here is the xml.php version with entities() emptied :
> HTML rendering is OK
> Here is the xpath.class.php version
> HTML entities contained in CDATA sections are converted so the browser
> them in their literal form
> This message has been sent through the <phpXML/> user discussion list.
> To unsubscribe, please visit
> https:[EMAIL PROTECTED]/
This message has been sent through the <phpXML/> user discussion list. To unsubscribe,
please visit https:[EMAIL PROTECTED]/
Phpxmldb-phpxml-arc mailing list