document() problem


I have a problem requesting a xml document from a tamino server with the document() function, but the url I gave it doesnt work, xalan processor says it is not a valid url ($MalformedURIException).

I did it like this:

<xsl:variable name=“URI”>
<xsl:value-of select=“concat(‘http://’,$host,‘/tamino/’,$DB,‘/’,$collection)”/>

<xsl:variable name=“query”>
<xsl:value-of select=“concat($URI,‘?_XQL(1%2C1)=’,‘/’,$entity,‘%5B’,‘STLFields/STLCode’,‘=%22’,$code,‘%22%5D’)”/>

<xsl:variable name=“xmldoc” select=“document($query)”/>

I have printed the value of the query variable and it is ok, you can even paste the url in your browser and you will be able to see the xml .

Thanks in advance.