[TYPO3-project-formidable] Reading XML configuration

Manuel Rego Casasnovas mrego at igalia.com
Wed Jun 13 14:20:40 CEST 2007


Hi Jerome,

I'm not sure about the side effects using trim() in xml2array.

In CDATA sections the white spaces haven't any specially meaning.
In PHP or HTML the white spaces after and before any text are ignored.

I don't find the problems to use trim(), you can test it but I'm not sure.

Bye,
   Rego

-- 
Manuel Rego Casasnovas
Computer Science Engineer
mailto:mrego at igalia.com
Tel: +34 986 10 76 10
Fax: +34 981 91 39 49
Igalia - http://www.igalia.com


Jerome Schneider escribió:
> Hi,
>
> I tried to change the parser settings by setting XML_OPTION_SKIP_WHITE 
> to 1 (http://www.php.net/xml_parser_set_option) but it didn't had any 
> effect.
>
> Maybe should the xml2array function of Formidable trim() values returned 
> by the parser ? But I suspect this to create some side effects, 
> especialy in CDATA sections
>
> What do you think ?
> Best regards,
> Jerome Schneider
>
> Manuel Rego Casasnovas a écrit :
>   
>> Hello.
>>
>> Some time ago I reported a bug in http://bugs.typo3.org/ about a problem
>> related with the reading of the XML configuration files of FORMidable.
>>
>> The problem happen when I've some whitespaces before and after some
>> values in the XML file. I don't know exactly the XML specification but I
>> think that the whitespaces have to be ignored, like in HTML.
>> In HTML the blank spaces don't mean anything, however I'm not sure about
>> if in XML is the same.
>>
>> If I'm right, the solution to this problem is easy, it would be call the
>> trim PHP function every time that FORMidable reads something from the
>> XML configuration file.
>>
>> An example that it doesn't work:
>>         <renderer:TEMPLATE>
>>             <template>
>>                 <path>
>>                     EXT:u_my_ext/pi1/templates/template.html
>>                 </path>
>>                 <subpart>###FORM###</subpart>
>>                 <errortag>errors</errortag>
>>             </template>
>>         </renderer:TEMPLATE>
>>
>> The problem is in the path property.
>>
>> I don't know if this is a bug or not. You can read more about that in
>> http://bugs.typo3.org/view.php?id=5484
>>
>> Best regards,
>>     Rego
>>
>>     
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable


More information about the TYPO3-project-formidable mailing list