title: XSLT issue with reading in non-xml data
body: <p>I am newbie to XSLT.</p>
  
  <p>I have a requirement to read a URL and convert some of its values into XML.
  I wrote a XSLT that has to take URL as the input value and create a XML file from some of the content of the URL value. </p>
  
  <p>When I debugged the XSLT in XMLSPY, I noticed that the URL value is not being picked up by <strong>inputValue</strong> variable in the below code. I am not sure if my approach to <em>input the URL</em> and the <em>template match</em> are wrong.</p>
  
  <p>Any help is appreciated.</p>
  
  <p>Thanks in advance.</p>
  
  <p>Input to XSLT:</p>
  
  <pre><code>http://host:port/abc/xyz1/6xyz6?qq=123&amp;pp=3
  </code></pre>
  
  <p>Here the XSLT:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nnc="Nnc" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions"&gt;
      &lt;xsl:output method="xml" encoding="UTF-8" indent="yes"/&gt;
      &lt;xsl:param name="inVal" select="xs:string(http://host:port/abc/xyz1/6xyz6?qq=123&amp;pp=3)"/&gt;
      &lt;xsl:template match="/"&gt;
          &lt;xsl:variable name="inputValue" select="$inVal"/&gt;
              &lt;xsl:if test="string-length($inputValue)=0"&gt;
                  &lt;xsl:message terminate="yes"&gt;
                  inputValue is blank
                  &lt;/xsl:message&gt;
              &lt;/xsl:if&gt;
              &lt;xsl:variable name="value" as="xs:string" select="substring-after($inputValue, 'abc/' )"/&gt;
              &lt;xsl:variable name="tokenizedValues" select="tokenize($value,'/')"/&gt;
              &lt;xsl:for-each select="$tokenizedValues"&gt;
                  &lt;xsl:if test="position() = 1"&gt;
                      &lt;id&gt;
                          &lt;xsl:value-of select="."/&gt;
                      &lt;/id&gt;
                  &lt;/xsl:if&gt;
              &lt;/xsl:for-each&gt;
          &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>The desired XML output:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;id&gt;6xyz6&lt;/id&gt;
  &lt;qq&gt;123&lt;/qq&gt;
  &lt;pp&gt;123&lt;/pp&gt;
  </code></pre>