Understanding stacking order of Pipes

Hello there:

I have this pipe: http://pipes.yahoo.com/pipes/pipe.info?_id=9a526c19812432e34c2713c2b38d0c6a

From what you can see, I make two copies of the first table cells (first I copy as 'titulo' and then as 'url', since I need the a tag and the span which live in the same table cells.

When I go to replace them in the regex module, I don't know why does url is having the same value that 'titulo'. From what I understand the Mapping module is doing is:

Save a copy to titulo and when I copy titulo to url it back references titulo, like this titulo.url so whatever changes I make to titulo url gets them too...

My first test pipe, http://pipes.yahoo.com/pipes/pipe.info?_id=bcb2cb7d7f9184e16d65d0111ddc1cf0 makes this better but I'm using string based piping rather than xpath the whole tr...

5 Replies
  • PS: This forum need an edit... button...

    Thank you in advance :)

  • Hello, you could do it the way you tried, but that's overly complicated. What you have to understand, is that the rss feed manipulated is an XML file. so, what you're trying to do using a regex, you can use the rename for that.

    To put an example on my words: in XML file / the language you tried addressing in your regex: <sub-sub-item1-1/> <sub-item2/>

    is equivalent, using item structure in pipes, to: item.sub-item1.sub-sub-item1-1, item.sub-item2

    that way, getting the content of href of item.url can be done in one step using the rename: item.td.0.a.href [copy as] url, and the title in the span using item.td.0.a.span.title [copy as] titulo.

    As I said you could do it your way, why doesn't it work? mainly because reading your expression pipes interprets some of it, which does not appear in your regex formula when it is applied hence troubles... or at least that's the conclusion I've reached and why I'm careful and don't try to do my regex in one big formula.

  • and yes for the edit button, as I forgot the code markdown and some content was interpreted... ;)

    To put an example on my words: in XML file / the language you tried addressing in your regex: <item><sub-item1><sub-sub-item1-1/></sub-item1><sub-item2/></item>

    is equivalent to: item.sub-item1.sub-sub-item1-1, item.sub-item2

  • Hello Lolo, I didn't thought for a second I was able to match a.href with xpath, but I'll give it a go.

    Thanks for the reply.

  • Awesome :D

    It worked :D


Recent Posts

in Pipes