Trending Posts

mint screenshot

Make Money Online: Documenting 10 Years of Failure

By John Ward / March 20, 2015 / 65 Comments
This is the history of my experience trying to make money online over the past 10 years or so. This is by far the longest post I've ever personally written and it's more of an autobiography than a blog post....
IBM Watson Avatar Logo

IBM Watson Explorer

By John Ward / April 6, 2015 / 1 Comment
I'm going to talk a little bit about IBM Watson Explorer (WEX). A few people have contacted me about what I do at my day job as a Watson Explorer Consultant. Since this is my personal site I don't usually...
pancakeswap prediction bot

I Made an Automated Pancakeswap Prediction Bot

By John Ward / October 14, 2022 / 0 Comments
A few weeks ago I got the idea to try to automatically bid on Pancakeswap's Prediction game. So I decided to try to build a Pancakeswap Prediction bot to take on the task. I did this just to learn about...
2022

My 2022 Recap and 2023 Plans

By John Ward / January 13, 2023 / 0 Comments
I haven't been posting to my blog that often, but I wanted to recap 2022 and lay out some of my plans for 2023. Overall, 2022 was a pretty good year for me, and I made some progress on business...
watson explorer vs elastics earch

Watson Explorer vs Elasticsearch for Enterprise Search

By John Ward / May 12, 2020 / 0 Comments
Are you interested in IBM Watson Explorer vs Elasticsearch? Recently, I had to do some comparisons between IBM Watson Explorer and Elasticsearch for a project. I spent some time going through the features of both platforms and found some interesting...

One AdSense Change Dramatically Increased My Earnings…

By John Ward / March 9, 2015 / 12 Comments
... and I have no idea what it is. I used to blog actively on my tutorial site, TeamTutorials. In it's prime the site would see over 100k page views per month. Even in the prime the site barely met...
what is ibm watson

What is IBM Watson

By John Ward / July 24, 2020 / 0 Comments
There is a lot of confusion about what exactly IBM Watson is? I'm going to try to clear that up a little bit in this blog post. I'll go into the history of IBM Watson and what IBM is doing...

Are Products the Road to Prosperity?

By John Ward / May 13, 2015 / 1 Comment
A few weeks ago a wrote a somewhat popular post about my past experiences trying to make money online. I went through the ups and downs of working as an affiliate promoting other people's products. At the conclusion of the...
xrp

What’s the Future of XRP

By John Ward / September 20, 2021 / 0 Comments
The XRP token was a fast-growing cryptocurrency until the U.S. Securities and Exchange Commission (SEC) filed a lawsuit against the parent company, Ripple,  back in December of 2020. This left many people scrambling to dump their XRP holdings and several...
IBM Watson explorer connector list

IBM Watson Explorer Connector List

By John Ward / March 4, 2020 / 0 Comments
IBM Watson Explorer Foundational Components include many out-of-box connectors for various types of data sources including web, filesystems, shares, databases and content management systems. This allows Watson Explorer (WEX) to be a very versatile tool for ingesting and indexing from...

Using crawl-url nodes to enqueue data along with a url in Watson Explorer

viv:crawl-enqueue-url is documented as having 1 argument – the url to enqueue.
However, it has an optional second form with two arguments which allows much more flexibility. If the first argument is set to the url and the second is a variable containing a crawl-url, that also works. (note the use of entities to create the content tags)
For example:
<xsl:variable name="my-crawl-url">


<crawl-url another-attribute="value">


<crawl-data content-type="application/vxml-unnormalized">


&lt;content name="inside" &gt;I am a content!&lt;/content &gt;


</crawl-data>


</crawl-url>


</xsl:variable>


<xsl:value-of select="viv:crawl-enqueue-url('www.someurl.com', $my-crawl-url)" />
When www.someurl.com is crawled, the content ‘inside’ will be added to it (after running through the normalization converter, probably), and from the converter, the attributes ‘url’ (automatically added) and ‘another-attribute’ (manually added) will be available to you via viv:current-node()/@attribute-name. If you want to add multiple contents in your crawl-data node, you’ll need to give them a root node – ‘document’ will work:
<crawl-data content-type="application/vxml-unnormalized">


&lt;document>


&lt;content name="inside" &gt;I am a content!&lt;/content &gt;


&lt;content name="inside2" &gt;I am another content!&lt;/content &gt;


&lt;/document>


</crawl-data>
The prototype of the two-argument form actually looks something like: viv:crawl-enqueue-url(object, node). If the first argument evaluates to true, it is used as the url attribute on the node. That’s why the url is automatically added, above. If it evaluates to false, the node is used as-is. Thus, an equivalent form of the above is:
<xsl:variable name="my-crawl-url">


<crawl-url url="www.someurl.com" another-attribute="value">


<crawl-data content-type="application/vxml-unnormalized">


&lt;content name="inside" &gt;I am a content! &lt;/content &gt;


</crawl-data>


</crawl-url>


</xsl:variable>


<xsl:value-of select="viv:crawl-enqueue-url(false(), $my-crawl-url)" />

 

Published by

John Ward

I've been in working in the tech space since about 2004. I've spent time working with Artificial Intelligence, Machine Learning, Natural Language Processing, and Advertising technology.