Thanks for the replies. Here are some more things I tried.
I formatted the URI to be supplied to 'unparsed-text' as,
file:///C:/dirname/filename.csv. But I am still getting the same error
(shown below).
Error
XTDE1170: Cannot resolve relative URI: no protocol:
net.sf.saxon.trans.DynamicError: Cannot resolve relative URI
at net.sf.saxon.functions.UnparsedText.readFile(UnparsedText.java:112)
at net.sf.saxon.functions.UnparsedText.evaluateItem(UnparsedText.java:72
)
at net.sf.saxon.expr.ExpressionTool.eagerEvaluate(ExpressionTool.java:29
7)
at net.sf.saxon.expr.ExpressionTool.lazyEvaluate(ExpressionTool.java:245
)
more errors ..
and following stack trace after this
at net.sf.saxon.expr.VariableReference.evaluateItem(VariableReference.ja
va:222)
at net.sf.saxon.functions.Tokenize.iterate(Tokenize.java:62)
at net.sf.saxon.functions.StringJoin.evaluateItem(StringJoin.java:46)
at net.sf.saxon.expr.ComputedExpression.iterate(ComputedExpression.java:
548)
at net.sf.saxon.instruct.Block$BlockIterator.next(Block.java:405)
at net.sf.saxon.instruct.SimpleContentConstructor.evaluateItem(SimpleCon
tentConstructor.java:193)
Below is my complete stylesheet:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">
<xsl:output method="text" />
<xsl:param name="csv1" />
<xsl:param name="csv2" />
<xsl:variable name="csvStr1" select="unparsed-text($csv1,'UTF-8')" />
<xsl:variable name="csvStr2" select="unparsed-text($csv2,'UTF-8')" />
<xsl:template match="/">
<xsl:value-of select="string-join(tokenize($csvStr1, '\r?\n'),'
'),
string-join(tokenize($csvStr2, '\r?\n')[position() >
1],'
')"
separator="" />
</xsl:template>
</xsl:stylesheet>
I am trying to merge two CSV files (with stripping of 1st line from 2nd CSV).
Can somebody please give me some hint to solve this ...
On 3/20/08, Colin Adams <colinpauladams(_at_)googlemail(_dot_)com> wrote:
On 20/03/2008, hugh <hdixon(_at_)bigpond(_dot_)net(_dot_)au> wrote:
I'm not sure if this is your problem, but I found using MS products, that
when I moved from IE6 to IE7 it was more sensitive to the formatting of the
URI.
In particular
file:/C:/dirname/filename.csv
would fail. The URI should be
It should fail on all products. The // is a required part of the
hierarchical part according to RFC 3986. So file:/// (or
file://localhost/, but the former is canonical) is correct.
file://C:/dirname/filename.csv
That's interesting. file:///C:/dirname/filename.csv is more normal. Do
IE6 and IE7 reject this?
(I say normal - not correct - there is no standard anyone can point
to. In the example you give, C appears to be treated as userinfo and
an empty password within the authority section, which, whilst
syntacticallt permitted, is not semantically accurate.
--
Regards,
Mukul Gandhi
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--