You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Albert Tsun <al...@excel.com.hk> on 2000/11/28 12:10:00 UTC
Xalan-J : URL stroke parsing into xsl
Hi all,
I'm using XALAN-J and try to pass a directory path in URL form as a
parameter into a stylesheet and
use <xalan:write> to get multiple output files.
stylesheet :
<xsl:param name="outputpath" select="'file:/d:/'"/>
<xsl:param name="gendate" select="'20001231'"/>
<xsl:template match="SetReport2:Header">
<xsl:variable name="file"
select="concat($outputpath",'header_',$gendate,'.xml')"/>
<xsl:value-of select="$outputpath" />
<redirect:write select="$file">
<xsl:call-template name="print-header">
<xsl:with-param name="pageno" select="###"/>
</xsl:call-template>
</redirect:write>
</xsl:template>
but when I try to pass "file:/d:/SETProject/output/" as outputpath
parameter into the stylesheet,
the xalan XSLT transformer prompt me with errors.
Error :
XSL Error: pattern = 'file:/d:/SETProject/output/'
Extra illegal tokens: 'd', ':', '/', 'SETProject', '/', 'output', '/',
style tree node: org.apache.xalan.xslt.StylesheetRoot@30633a
XSL Error: SAX Exception
Error : pattern = 'file:/d:/SETProject/output/'
Extra illegal tokens: 'd', ':', '/', 'SETProject', '/', 'output', '/'
org.apache.xalan.xslt.XSLProcessorException: pattern =
'file:/d:/SETProject/output/'
Extra illegal tokens: 'd', ':', '/', 'SETProject', '/', 'output', '/'
at
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1674)
at
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1638)
at
org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:671)
Would some please kindly give me some hint how to solve it.
Many Thanks in advance.
Re: Xalan-J : URL stroke parsing into xsl
Posted by Gary L Peskin <ga...@firstech.com>.
Albert Tsun wrote:
>
> Hi all,
>
> I'm using XALAN-J and try to pass a directory path in URL form as a
> parameter into a stylesheet and
> use <xalan:write> to get multiple output files.
> ...
> but when I try to pass "file:/d:/SETProject/output/" as outputpath
> parameter into the stylesheet,
> the xalan XSLT transformer prompt me with errors.
>
> Error :
>
> XSL Error: pattern = 'file:/d:/SETProject/output/'
Place the value of your outputpath parameter in quotes or apostrophes.
The method is expecting an XPath expression and it thinks your filename
is some sort of LocationPath.
Gary