[wpkg-users] [Bug 285] wpkg.xml not valid under some circumstances.

Keith Jones K.E.Jones at brighton.ac.uk
Thu May 22 16:10:07 CEST 2014


>-----Original Message-----
>From: wpkg-users-bounces at lists.wpkg.org [mailto:wpkg-users-bounces at lists.wpkg.org] On Behalf Of Stefan Pendl
>Sent: 20 May 2014 23:46
>To: wpkg-users at lists.wpkg.org
>Subject: Re: [wpkg-users] [Bug 285] wpkg.xml not valid under some circumstances.
>
>Am 20.05.2014 22:56, schrieb bugzilla-daemon at bugzilla.wpkg.org:
>> 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.
>>
>Just to give my two cents on this.
>
>I always use single quotes, when I need to include double quotes inside of the attribute value.
>
>This is mainly because of laziness, since the XML-parser will convert the single quotes to double ones and the embedded double quotes to text, e.g. "e;
>
>So without any change the parser is doing everything correctly, so no action necessary for Rainer.
>
>Sorry, but that is only my observation.
>
>
>--
>Stefan P.
>

 Hi Stephan,

 I'm sorry to be so slow in responding. I've got a big deployment job going on tonight that I need to prepare for.

 Thanks for the workaround. Much appreciated!

 In this case (and usually always), I was actually using single quotes because of mutual laziness too :-)

 The single accidental double quote probably was encoded correctly as "e; (when initially saved to the settings file). But in the subsequent run, WPKG ended up with a raw quote somehow (possibly reading it from the package definition?). It was that raw quote that broke the x-path query  and proved to be really hard to identify as a problem. I was expecting a more user friendly, "file not found" or "can't get file version" or "learn to type properly" etc  :-)

 My suggested improvement and description sucked of course :-) All that code did was move the problem elsewhere.

 I think I've found a way to code things but I appreciate that Rainer probably doesn't want to risk causing breakage at this level so I'll work on it and submit it once I've got it as good as I can.
 
 Anyway... lesson learned :-) After 20+ years in the biz you'd think I'd be able to spot an unbalanced quote from at least 3 miles away!

Regards,

Keith

>Top-posting:
>A: Because it messes up the order in which people normally read text.
>Q: Why is top-posting such a bad thing?
>A: Top-posting.
>Q: What is the most annoying thing in e-mail?
>
>-------------------------------------------------------------------------
>Vacation Rentals, Homes, Apartments & Rooms - sign up and get $25 off your first booking! http://www.ptraveler.com/redir/airbnb
>-------------------------------------------------------------------------
>wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
>_______________________________________________
>wpkg-users mailing list
>wpkg-users at lists.wpkg.org
>http://lists.wpkg.org/mailman/listinfo/wpkg-users
>
>___________________________________________________________
>This email has been scanned by MessageLabs' Email Security System on behalf of the University of Brighton.
>For more information see http://www.brighton.ac.uk/is/spam/
>___________________________________________________________
>

___________________________________________________________
This email has been scanned by MessageLabs' Email Security
System on behalf of the University of Brighton.
For more information see http://www.brighton.ac.uk/is/spam/
___________________________________________________________



More information about the wpkg-users mailing list