Additionally, while you might not think so much of guaranteed compliance,

I'll guess that the "guarantee" is that no matter how stupidly you try to use Genx, it refuses to produce invalid XML (in so far as the code is bug free in specification as well as implementation).

Other than control characters, in what ways are we currently non-compliant? I'm not aware of any gain to be had there (I'll get to control characters shortly).

So if someone decides to do something really stupid, then Genx will guarantee the output will be either empty or compliant, really stupid XML.

Standards are great because of the benefits they provide. So standards compliance is a secondary goal, one that you shoot for because it facilitates many primary goals (mostly flavors of interoperability). Getting most or all of the benefits that are supposed to come with compliance is the primary goal. Putting a secondary goal ahead of your primary goals is a common mistake I see and that I try to avoid.

there are parsers around which will complain about control characters as they should.

I said as much. The last time this came up I proposed that we default to stripping control characters and have an option to request XML 1.1 which would preserve control characters.

Part of the reason that I think that the default should strip control characters is because being XML compliant is important. I do consider compliance important, I just don't blindly put it ahead of reaping real benefits.

Well, XML 1.1 probably hasn't received final approval yet so Genx surely refuses to produce it.

<char ord="##"/>

Genx will probably allow such to be output since it is a good example of compliant, stupid XML. (: I'm certainly not aware of any XML parsers that will translate that back into the proper characters. You've broken single fields into multiple pieces such that they are a pain to put back together. You lost the primary goal by concentrating on a secondary goal.

So I'm still not sure what goals you have here. In some ways, your goals appear to be "use Genx" and "ditch XML::Fling". Useless goals. If one of your goals is compliance, than patch things to strip control characters by default (if that still isn't the case).

If your goal is performance gain then please at least demonstrate one instead of guessing that there is one. But currently I doubt that would be enough to overcome the drawbacks of Genx feature-wise.

I'd like to offer UTF-8 XML but Latin-1 has advantages in some cases so I don't want to stop offering it, especially since it is what we've produced for so long.

If a future version of Genx supports Latin-1 and XML 1.1, then it might make a good replacement.

As things stand, if you have some strong desire to use Genx, then you'd need to make Genx just an option, while still supporting our current methods.

- tye        


In reply to Re^7: XML::Fling begone? (goals) by tye
in thread XML::Fling begone? by Aristotle

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.