Hi i trying to get a request Parameter that is a URL path to a file:
I'm using a template from a XSL file to "paste" a div with a onclick event:
<div onclick="openPDF(700,500,'getDoc?pathpdf={./.}&type=pdf&nocache='+Math.random(),'scrollbars=yes,toolbar=no,status=yes,resizable=yes,menubar=no,location=no');" align="center">
<img src='Images/pdfIconsmall.png' width='12' style='height:12' />
</div>
THIS PART -> pathpdf={./.} will receive the url like so:
pathpdf=\\SERVER02\work\area51\docs\ws\00120130000261_101912.pdf
the parameter is sent has expected, but in server side when i try to do a System.out
of that parameter i am presented with this value:
->->->Path: SERVER02workarea51docsws 00120130000261_101912.pdf
Is the escaping made by the servlet or is somwthing in my aplication doing that?
Thank you
EDIT
I made this in a different way from the answear below but similar:string-replace-all
<xsl:when test="string-length(./.) >0">
<xsl:variable name="pathpdf">
<xsl:call-template name="string-replace-all">
<xsl:with-param name="text" select="./." />
<xsl:with-param name="replace" select="'\'" />
<xsl:with-param name="by" select="'\\'" />
</xsl:call-template>
</xsl:variable>
<div onclick="openPDF(700,500,'getDoc?pathpdf={$pathpdf}&type=pdf&nocache='+Math.random(),'scrollbars=yes,toolbar=no,status=yes,resizable=yes,menubar=no,location=no');" align="center">
<img src='Images/pdfIconsmall.png' width='12' style='height:12' />
</div>
</xsl:when>