[wpkg-users] [Bug 285] wpkg.xml not valid under some circumstances.
bugzilla-daemon at bugzilla.wpkg.org
bugzilla-daemon at bugzilla.wpkg.org
Tue May 20 22:56:46 CEST 2014
http://bugzilla.wpkg.org/show_bug.cgi?id=285
--- Comment #4 from Keith Jones <k.e.jones at brighton.ac.uk> ---
(In reply to comment #3)
> I think whether WPKG should use double or single quotes in attributes clause
> during X-Path Query might depend on whether the value actually contains double
> or single quotes itself.
>
> Not sure if the code could be enhanced in more stable way to build the query.
> Though also this should not have a huge impact on the execution. If results of
> previously used checks cannot be queried from local wpkg.xml they should be
> simply re-evaluated. Though I didn't do any in-depth testing now whether the
> code could use some more exception handling. In any case it seems to boil down
> to incorrect quoting in this specific case. So I set this report to
> resolved-invalid.
Hi,
I appreciate what you're saying on many levels. Yes, I understand that *how*
you quote things should depend on *how* the data you need store is originally
quoted. I also appreciate that this specific case was simply me making a typo.
Still though, I think you might be missing something.
Perhaps the thought I'm trying to put across is providing stability on a more
subtle level than I'm able to explain?
The x-path on that line is the only one that uses " instead of '.
- As a geek, I'd see that as a coding neatness issue.
- Just because I'm a neatness freak :-)
- As a IT guy, I'd see it introducing two points of failure rather than one.
- you can typo an unbalanced " and kill one set of routines
- equally you can typo an unbalanced ' and kill another set of routines.
- I see that as a doubling of the potential points of failure
- As a user, I'd see more subtleties to learn.
I'm not aiming any of this towards adding extra coding to cover error
processing or anything like that. I'm just trying to point out something that
looks like a good change.
Regards,
Keith
PS:
The catch for the error throw happens a lot higher up the chain than you're
expecting. It skips outside of the settings being saved so the package never
actually gets updated if the checks can't be saved.
5100: // Save modified settings.
5101: saveSettings(false);
5102: } catch (e) {
5103: error("Unable to add result of check to settings: " + e.message);
5104: }
5105: }
--
Configure bugmail: http://bugzilla.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the wpkg-users
mailing list