[phpxmlrpc] How to manage HTML into XML-RPC content node ?

Patrick Gelin patrick.gelin at rpn.ch
Thu Nov 25 06:08:41 PST 2004


Hi,

I'm working with a PHP web site, using XML-RPC and the XML data is parsed
with a XSL script. This is XML data:

<?xml version="1.0" encoding="UTF-8"?>
<requirement identifier="aaaaaaaa" name="aaaaaaaaa" priority="high"
status="draft">
  <revision date="2004-11-25 13:29:22" label="aaaaaaaa">
    <author id="gelinp">Patrick Gelin</author>
    <comment><![CDATA[aaaaaaaa aaaaaaa]]></comment>
  </revision>
  <description><![CDATA[aaaaaaa<br /><br />
bbbbbbbb]]></description>
</requirement>

I would like not to modify the HTML CDATA zone, but it seems to me the XSL
script below modify something...

(...)
<td colspan="2">
  <out:attribute xmlns:out="http://www.w3.org/1999/XSL/Transform"
name="class">
  <out:value-of select="$CSSPrefix"/>FormData</out:attribute>
  <textarea name="req_description" cols="100" rows="10" style="width:100%">
    <out:if xmlns:out="http://www.w3.org/1999/XSL/Transform"
test="$ChangeHandler != ''">
      <out:attribute name="onChange">
        <out:value-of select="$ChangeHandler"/>
      </out:attribute>
    </out:if>
    <out:attribute xmlns:out="http://www.w3.org/1999/XSL/Transform"
name="class">
    <out:value-of select="$CSSPrefix"/>FormControl</out:attribute>
    <out:value-of xmlns:out="http://www.w3.org/1999/XSL/Transform"
select="normalize-space(/requirement/description)"/>
  </textarea>
</td>
(...)

because the result is:

(...)
<td colspan="2" class="FormData">
<textarea name="req_description" cols="100" rows="10" style="width:100%"
class="FormControl">aaaaaaa&lt;br /&gt;&lt;br /&gt; bbbbbbbb</textarea>
</td>
(...)

So, I'm Isking myself why my CDATA HTML section changed? I can't find any
documentation on 'normalize-space' function...

Thanks.





More information about the phpxmlrpc mailing list