hi,
> I was testing hbmxml with this line on win/mingw:
> testmxml setup.ui
>
> where setup.ui comes from /contrib/hbide/setup.ui,
> and the output (in out.xml) has its indenting and EOLs
> messed up.
>
> F.e. newlines are sometimes CRLF, sometimes LF only (which
> doesn't work on win platform), sometimes space char seems to
> be used instead of newline (LF).
>
> Is this expected behavior?
hard to say. if you run the upstream testmxml on this file, you'll see
that it's indenting too is messed up (iow testmxml isn't really an
xmllint --format-replacement, and by no means a generic tool), but it
should at least be comparable to our version's result (as long as you
look at ti with tab=8sp, as i've just spotted a bit of a problem).
new lines should probably be consistent, if nothing else.
there's a bit of a work left to be done on testmxml, i made a mental
note of these issues raised, and will look at them.
--
[-]
mkdir /nonexistent
hi,
> I repeated the same test using original testmxml.c, and
> the result are similar except that the .c version consistently
> uses 0x0A (LF) EOLs, whilst the Harbour version has a
> mixup of CRLF and LF. (BTW I used the Harbour hosted
> mxml lib with the .c test suite, too)
>
> This is caused by HB_EOL() calls in the .prg version. Replacing
> these to Chr( 10 ) (LF) gives exact same output with both tests.
that's good news.
> [ I've made both tests on win platform. ]
that's even better news ;)
> The more worrying aspect is that this conveys that minixml
> code uses hard-coded LF EOLs. This latter might either be
> minixml bug or configuration problem on our local build (or
> some runtime minixml setting?). Anyways, definitely something
> to check out, since this is showstopper for production use.
how is that? there's no significance of eols in xml whatsoever, i'd
qualify this as a nuisance rather than a showstopper problem.
mxml does use hard-coded \ns, but i don't see how that in any way is a
showstopper on any platform.
--
[-]
mkdir /nonexistent
> I repeated the same test using original testmxml.c, andthat's good news.
> the result are similar except that the .c version consistently
> uses 0x0A (LF) EOLs, whilst the Harbour version has a
> mixup of CRLF and LF. (BTW I used the Harbour hosted
> mxml lib with the .c test suite, too)
>
> This is caused by HB_EOL() calls in the .prg version. Replacing
> these to Chr( 10 ) (LF) gives exact same output with both tests.
that's even better news ;)
> [ I've made both tests on win platform. ]
how is that? there's no significance of eols in xml whatsoever, i'd
> The more worrying aspect is that this conveys that minixml
> code uses hard-coded LF EOLs. This latter might either be
> minixml bug or configuration problem on our local build (or
> some runtime minixml setting?). Anyways, definitely something
> to check out, since this is showstopper for production use.
qualify this as a nuisance rather than a showstopper problem.
mxml does use hard-coded \ns, but i don't see how that in any way is a
showstopper on any platform.
> I'd never create an output file with inconsistent EOLs.
so there's a bug in my interpretation of testmxml.
> There is hardly any official file specification which would
> explicitly allow that, so it's only a chance to create problems
> and put the receiver side under unnecessary stress test.
> Best case it's a nuisance for anyone wanting to look into
> a generated .xml file (human readability is one of the points
> of .xml after all), but certainly a clear sign of bad quality
> software. Also note that f.e. SVN doesn't even allow you
> to upload such mixed EOL files due to the ambiguity it
> creates.
so there's a bug in my interpretation of testmxml. it's quite a
stretch to call mxml names based on that.
> mxml does use hard-coded \ns, but i don't see how that in any way is a
> > showstopper on any platform.
> >
>
> It very much is. If it bothers you, let's not call it
> showstopper, but a simple bug and/or portability problem,
> sloppy coding, whatever.
it is exactly neither of the above. white spaces (which mxml writes)
still bear no significance whatsoever in xml, and for parsed entities
(which mxml does not write, nor are they affected by the whitespace
callback) the ambiguity is taken out by the xml specification.
as for human readability, *wordpad* can render unix (and mac, for that
matter) eols. wordpad. not vim or emacs or whatever their
grandma-and-the-kitchensink equivalent on windows is, wordpad.
> Please note that all parts of Harbour uses consistent
> EOLs in sync with the platform, and there is great care
> taken that it's done like this.
so i'll just fix testmxml up.
--
[-]
mkdir /nonexistent
> I'd never create an output file with inconsistent EOLs.so there's a bug in my interpretation of testmxml.
so there's a bug in my interpretation of testmxml. it's quite a
> There is hardly any official file specification which would
> explicitly allow that, so it's only a chance to create problems
> and put the receiver side under unnecessary stress test.
> Best case it's a nuisance for anyone wanting to look into
> a generated .xml file (human readability is one of the points
> of .xml after all), but certainly a clear sign of bad quality
> software. Also note that f.e. SVN doesn't even allow you
> to upload such mixed EOL files due to the ambiguity it
> creates.
stretch to call mxml names based on that.
> It very much is. If it bothers you, let's not call itit is exactly neither of the above. white spaces (which mxml writes)
> showstopper, but a simple bug and/or portability problem,
> sloppy coding, whatever.
still bear no significance whatsoever in xml, and for parsed entities
(which mxml does not write, nor are they affected by the whitespace
callback) the ambiguity is taken out by the xml specification.
as for human readability, *wordpad* can render unix (and mac, for that
matter) eols. wordpad. not vim or emacs or whatever their
grandma-and-the-kitchensink equivalent on windows is, wordpad.
so i'll just fix testmxml up.
> Please note that all parts of Harbour uses consistent
> EOLs in sync with the platform, and there is great care
> taken that it's done like this.
Much better is output in SciTE (of course Windows)
Regards,
Petr
Due to the interoperable nature of XMLs and the recomendation of w3c
that XML parsers complain with any combination of CR, LF or both, I
believe that this should be something that we can choose some way, not
only inherent to the OS generating the XML.
Of course the current discussion still aplies to the default EOL.
Regards,
Bacco
Apil
> <scite2.jpg>
SciTE always has/had good EOL handling, even mixed files.
+1.
I access some web services that need a continuos string. No CRLF or CR or LF
at XML file. Maybe this is non professioanl WS but here in Brazil I found
this scenario.
IMHO, the OS default LF is the best, but we need a way to change it, if
necessary.
TIA and best regards,
Toninho.
__________________________________________________
Fale com seus amigos de gra�a com o novo Yahoo! Messenger
http://br.messenger.yahoo.com/
I access some web services that need a continuos string. No CRLF or CR or LF at XML file. Maybe this is non professioanl WS but here in Brazil I found this scenario.
IMHO, the OS default LF is the best, but we need a way to change it, if necessary.
>The OS default should be the OS native EOL, not LF. LF is *nix>specific. This is how we do it all over Harbour, so its nothing new.Thank you, but users need a way to create XML with no default OS EOL. As I saw, I have situations, where I need a XML without EOL.