472,353 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

xsl:if test for null string giving TransformerException

I'm getting a TransformerException when running Tomcat and calling a
Servlet that use XML to create DOM and XSL to create webpage.

I'm posting just the snippet of XSL code and the Error here. Full
listing should be in my next thread. Funny thing is from a command
line I can run Process without an error. Why would Tomcat hiccup and
belch ?
Maybe I should be investigating my JARs in the classpath ?
*** note error occurring in ln 65 ***

65 <xsl:when test="site = ''">
<xsl:attribute name="href">
<xsl:value-of select="site"/>


; SystemID: ; Line#: 65; Column#: 34
javax.xml.transform.TransformerException: Unknown error in XPath
at org.apache.xpath.XPath.bool(XPath.java:411)
at org.apache.xalan.templates.ElemChoose.execute(Elem Choose.java:162)
at org.apache.xalan.transformer.TransformerImpl.execu teChildTemplates(TransformerImpl.java:2182)at
.... xalan.templates.ElemLiteralResult.execute(ElemLite ralResult.java:678)


at org.apache.xpath.objects.XNodeSet.compare(XNodeSet .java:619)
at org.apache.xpath.objects.XNodeSet.equals(XNodeSet. java:706)
at org.apache.xpath.operations.Equals.operate(Equals. java:82)
at org.apache.xpath.operations.Operation.execute(Oper ation.java:146)
at org.apache.xpath.Expression.bool(Expression.java:2 08)
at org.apache.xpath.XPath.bool(XPath.java:388)
... 66 more

Maybe there is a better way to check for blank or null string.
TIA for you suggestions and references.
Jul 20 '05 #1
2 8618
> I'm getting a TransformerException when running Tomcat and calling a
Servlet that use XML to create DOM and XSL to create webpage.
65 <xsl:when test="site = ''"> Error on this line

Also tried this variation
<xsl:when test="string-length(site) > 0">

still getting:
; SystemID: ; Line#: 65; Column#: 48
javax.xml.transform.TransformerException: Unknown error in XPath

Help - something must not be configured right on my system.
Jul 20 '05 #2
<xsl:when test="string-length(site) > 0"> Error here
Help - something must not be configured right on my system.

How would I check what actual jar's are being used by Tomcat 4.0.4 on
I'm assumming check my master environment variables and then analyze
the batch files ( possibly using echo to see the classpath ).
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Lizard | last post by:
OK, total newbie here, so this may be a mind-numbingly dumb question AND I may be phrasing it badly. I have an xsl:template which looks like...
by: Andrea Maschio | last post by:
Hi, i have a terrible noobie frustration formatting an XML file like this: <Dipendente Id="1" Anno="2003" Nome="pippo" Cognome="pippi"...
by: Jørn Tommy Kinderås | last post by:
I need to get nodes in a xml file that match one out of two parameters...but how can I create a or statemement with <xsl:if>? E.G ---xml-- ......
by: Eric Theil | last post by:
I'm at my wit's end with this one. Within an xsl:if test, I'm not able to get 2 variables to properly evaluate if one of them is wrapped within a...
by: websls | last post by:
I tried to do this : <xsl:if test="ToutCompris"> some output </xsl:if> ToutCompris is a boolean element in my XML file My problem is the...
by: Luke Vogel | last post by:
Hi all, Probably a really basic question, but I cant find an answer ... I have an xml file of books something like: <product>...
by: Fred | last post by:
Hi, I am using XSL if to look and see if a node exists and if so display it with a header (see below). Some of the xml I transforming has nodes...
by: Doulos05 | last post by:
Ok, this seems like it should be easy, but it has escaped me. Here is my xml file: <ref_sheet> <item> <date>2007/04/06</date>...
by: grbeal | last post by:
How do I test for a child element with xsl if condition? We have a vendor application that outputs an XML file containing records of School...
by: z1 | last post by:
hi- i am fooling around with soap and weather templates. for some reason either this if or select is failing. i am very new to xml and found...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.