[BUG?] Conditionals, bug or working as intended??
#1
Hello there,

I have question to developers/power scraper writers. When i have following code:

Code:
<RegExp conditional="aaa" input="$$5" output="\1" dest="4">
    <RegExp input="$$1" output="\1" dest="5">
      <expression>EXP_01</expression>
    </RegExp>
    <expression/>
  </RegExp>
  <RegExp conditional="!aaa" input="$$5" output="\1" dest="4">
    <RegExp input="$$1" output="\1" dest="5">
      <expression>EXP_02</expression>
    </RegExp>
    <expression/>
  </RegExp>

i always thought that expressions nested under conditional will never be processed, but they are (in example above - not tested, only for idea - if you have $$1=EXP_01 and aaa=false, you will still get EXP_01 in $$4 instead of empty variable). Is this really how it should work or is it bug? Oo

If it is working as intended i'm wondering what is point of nested regexp elements. I'm using them (better say i thought) for hidding expensive disabled (by condition) expressions from program flow and now i need to go through whole scraper code to reevaluate potencial problems (already found nasty one when i cleared variable from second nested expression which should not be processed Confused).

EDIT: forgot to say that i'm using XBMC version compiled from last stable svn revision, without any changes related to scraper parser.
Reply
#2
probably a woopsie, the intention is that the conditional should nuke anything nested, but i might have poo'd a bit.
Reply
#3
Good to know, i'll make trac ticket for it when i return home.
I already made sure that conditional nested expressions don't modify subsequently used variables in my scraper and it works fine now, but anyway this problem error correction will mean quite decent flow optimalization Smile
Reply

Logout Mark Read Team Forum Stats Members Help
[BUG?] Conditionals, bug or working as intended??0