Re: [xml] final output filtering?



Hi Daniel,

  But precisely, I want libxml2 to be platform independant. The exact
same sequence of bytes should come out of it given the same sequence
of bytes in input. 

I think there is still confusion here.

First, if you really want to enforce byte-by-byte identical output when 
streaming out the tree, the writer's fopen has to be changed to:

#if defined(WIN32) || defined (__CYGWIN__)
      fd = fopen(path, "wb");
#else
        fd = fopen(path, "w");
#endif /* WIN32 */

(plus eventual extra complications for Mac)

Then you will see, whether the Win32 users are still happy. I'm fine with 
this, but it would limit the choice of text editors you can use.

Second, line end normalization, as I understand it, has the fine 
consequence, that XML instances which differ only in line end sequences,
are exactly identical as far a conforming XML processor is concerned.

So, again, I see no principal problem in chooseable line end conventions 
when streaming out the tree, but I have to agree with the fact that it
adds extra complications and could be implemented using plugable I/O.

Regards,
Peter Jacobi





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]