You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Wei Cheng <We...@baylor.edu> on 2001/03/22 23:13:25 UTC

Exception problem - asking for help

Hi all,
  When I write a xsl file try to transform xml file,
  using SimpleTransform.java in the samples.
  I always got the exception Error:
SystemId Unknown; Line 18; Column 83; javax.xml.transform.TransformerException:
Can not convert #STRING to a NodeList!

  I attach my xsl file and xml to this email.
  maybe one small trick,but for me it's a big problem.

Best regards,
 Wei                          mailto:Wei_Cheng@baylor.edu

Re: HTML to XLS Conversion

Posted by James Melton <ja...@cylogix.com>.
This is not the right place to look for Excel file information. This
mail list discusses the Apache Xalan package which deals with XSL, not
XLS files. If you are interested, a quick look at
http://www.w3.org/TR/xsl/ should give you some information on XSL.

Regarding Excel, perhaps you should contact Microsoft and request
published details of their file formats. Maybe they will even be so
gracious as to produce a toolkit that provides C++ or Java classes to
read/write their files. However, if they do give you these please don't
tell everyone as I would lose a rather large bet I have placed regarding
their (un)willingness to do this.  ;)

Jim.


"Mahesh P.V" wrote:
> 
> Hi All,
> 
> I need to convert an HTML File to an Excel file(.xls) programatically.
> Can some one give an idea on how to do it.
> 
> Thanks
> Mahesh

-- 

____________________________________________________________
James Melton                 CyLogix
609.750.5190                 609.750.5100
james.melton@cylogix.com     www.cylogix.com

HTML to XLS Conversion

Posted by "Mahesh P.V" <ma...@wipro.com>.
Hi All,

I need to convert an HTML File to an Excel file(.xls) programatically.
Can some one give an idea on how to do it.

Thanks
Mahesh


Re: Exception problem - asking for help

Posted by Gary L Peskin <ga...@firstech.com>.
Wei Cheng wrote:
> 
> Hi all,
>   When I write a xsl file try to transform xml file,
>   using SimpleTransform.java in the samples.
>   I always got the exception Error:
> SystemId Unknown; Line 18; Column 83; javax.xml.transform.TransformerException:
> Can not convert #STRING to a NodeList!
> 
>   I attach my xsl file and xml to this email.
>   maybe one small trick,but for me it's a big problem.
> 

Wei --

The problem is in the template:

<xsl:template match="doc">
    <xsl:apply-templates select="person"/>   
    <xsl:apply-templates select="person" mode="checkmode"/>
</xsl:template>

You are applying the template with the match="person" and
mode="checkmode" with no parameters.  Your xsl:param element causes the
_self variable to be assigned the value of the empty string in
accordance with the XSLT Recommendation.  In your xsl:if element, you
try to use the value of $_self as a location step and you can't do that
with a string, only with a node-set.  This is why you're getting the
error.

HTH,
Gary