This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

MalFormaed URI exception



Hi,

I am getting follwoing error when I try to use document() function in my
stylesheet.

org.apache.xml.utils.URI$MalformedURIException: No scheme found in
URI: /ms/user/s/shailend/garbage/frm_read/compare2.xml
        at java.lang.Throwable.fillInStackTrace(Native Method)
        at java.lang.Throwable.fillInStackTrace(Compiled Code)
        at java.lang.Throwable.<init>(Compiled Code)
        at java.lang.Exception.<init>(Exception.java:42)
        at java.io.IOException.<init>(IOException.java:47)
        at
org.apache.xml.utils.URI$MalformedURIException.<init>(URI.java:123)
        at org.apache.xml.utils.URI.initialize(Compiled Code)
        at org.apache.xml.utils.URI.<init>(URI.java:229)

Basically I am trying to get the difference between 2 XML files using
xalan2.0 extension function. I actually want to pass the second xml file
as parameter to styleseet.Since it was giving me some error(systemId
unknown)  inorder to debug I hardcoded the path of the second file in the
document() function of the stylesheet. Then it started giving me
MalformedURI exception. Looks like it could not locate the file at the
location specified. How do I solve this problem?

Am I doing something wrong or missing some thing here ?


Following is the code snippet from my XSL file.

<?xml version='1.0' encoding='utf-8' ?>
<xsl:stylesheet
version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                              xmlns:xalan="http://xml.apache.org/xalan";
                              extension-element-prefixes="xalan"
                              exclude-result-prefixes="xalan">
<xsl:output method="xml"/>
<xsl:strip-space elements="*"/>
<xsl:param name="comparison-file"/>
<xsl:variable name="file1" select="/"/>
<xsl:variable
name="file2" select="document('/ms/user/s/shailend/garbage/frm_read/compare2.xml')" />
<xsl:template match="/">
        <xsl:variable name="ns1" select ="$file1//row[position()=1]" />
        <xsl:variable name="ns2" select="$file2//row[position()=2]" /> 

....
.....


I am new to xml and not able to comprehend properly what this error means.
I shall be very thankful for any help towards resolving this problem.

Regards,
Shail



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]