Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The first problem is easy. For each input feed, use a Rename operator rename or copy dom elements to your unified format. Then after you union all your modified input fields, you can use the unified names.</p> <p>The second problem is tricky. I usually work around cases like that by using a <em>Rename</em> + <em>Regex</em> + <em>Loop(String Builder)</em> operators like this:</p> <ol> <li><p>Rename the relevant fields, just so that they become easier to work with later, for example:</p> <ul> <li>Rename <code>item.div.div.0.div.div.a.href</code> to <code>link0</code></li> <li>Rename <code>item.div.div.1.div.div.a.href</code> to <code>link1</code></li> <li>Rename <code>item.div.div.2.div.div.a.href</code> to <code>link2</code></li> <li>...</li> </ul></li> <li><p>Using a <em>Regex</em>, try to make the irrelevant <code>link0</code>, <code>link1</code> empty, for example:</p> <ul> <li>In <code>item.link0</code> replace <code>^.*[^/]$</code> with nothing</li> <li>In <code>item.link1</code> replace <code>^.*[^/]$</code> with nothing</li> <li>In <code>item.link2</code> replace <code>^.*[^/]$</code> with nothing</li> <li>...</li> </ul> <p>The right regex will depend on your use case. In my example this was suitable to make the irrelevant elements empty.</p></li> <li><p>Using a <em>Loop</em>, with a <em>String Builder</em> inside, I concatenate <code>item.link0</code> and <code>item.link1</code> and assign the result to <code>item.link</code>.</p></li> </ol> <p>As a result, whichever <code>link0</code>, <code>link1</code>, ... had the right link, since all the others were emptied, the concatenated value will be the right one.</p> <p>It's a hack, but it can work. I actively use this technique in some of my pipes. The tricky part is coming up with the right regex to make the irrelevant values blank.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload