Invenzzia »

IMPORTANT ANNOUNCEMENT

Due to the uncertain status of the Flyspray project, lack of new releases and moving the code repository to Github, we decided to shutdown this issue tracker by the end of January 2011. From that date, the bugs should be reported directly in Github project repositories.

List of repositories:

Open Power Template 2.x family

PLEASE PROVIDE THE TEMPLATES AND/OR PHP CODE IN THE TASK DESCRIPTION (Not URL-s to them). THAT ALLOWS US TO REPRODUCE THE PROBLEM! OTHERWISE WE ARE NOT ABLE TO HELP YOU!

Remember to hide all the security-related pieces of code from the task description, like passwords, server paths etc. for your own safety. Once we close the task, we cannot edit it anymore!
Tasklist

FS#58 - stripWhitespaces and whitespaces produces an invlaid XML output

Attached to Project: Open Power Template
Opened by Skruppy (Skrupellos) - Friday, 27 February 2009, 10:15 GMT-8
Last edited by Zyx (Zyx) - Saturday, 28 February 2009, 03:15 GMT-8
Task Type Bug Report
Category Compiler
Status Closed
Assigned To Zyx (Zyx)
Operating System OS-independent
Severity Medium
Priority High
Reported Version 2.0 SVN
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

EXAMPLE:
In the following templates I use # instead of a blank character. This should be better to see. So if you try out the examples, replace the # with a blank character. Any other whitespace works
--- code ---
$tpl->stripWhitespaces = true;
--- END code ---

--- template ---
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<opt:root>
<div> </div>
</opt:root>
--- END template ---


RESULT:
--- output ---
<div></div></>
--- END output ---


EXPECTED:
--- output ---
<div>#</div>
--- END output ---

or
--- output ---
<div />
--- END output ---

Could you please explain what, and why, is the right output.
This task depends upon

Closed by  Zyx (Zyx)
Saturday, 28 February 2009, 03:15 GMT-8
Reason for closing:  Fixed
Additional comments about closing:  Fixed in rev. 60.
Comment by Zyx (Zyx) - Saturday, 28 February 2009, 03:15 GMT-8
The stripWhitespaces implementation has been changed and now everything seems to work. The new algorithm keeps a single space between two nodes, if there was a whitespace CDATA content:

----
<div> </div>
----

Loading...