• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using xsl:import but i throws NullPointerException

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
I facing a weird problem and need urgent solution. My code and error is below:
<b>Code:</b>
1. XML (Data.xml)
<data>
<item>Hello</item>
</date>
2. XSL (Temp.xsl)
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl utput method="html" />
<xsl:include href="TempInclude.xsl" />
<xsl:template match="Gems">
<xsl:call-template name="firstTemplate" />
</xsl:template>

</xsl:stylesheet>
3. XSL (TempInclude.xsl)
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template name="firstTemplate">
Help me guys
</xsl:template>
</xsl:stylesheet>
<b>Error:</b>
java.lang.NullPointerException
com.icl.saxon.style.XSLGeneralIncorporate.getIncludedStyleSheet(XSLGeneralIncorporate.java:104)
com.icl.saxon.style.XSLStyleSheet.spliceIncludes(XSLStyleSheet.java:421)
com.icl.saxon.style.XSLStyleSheet.preprocess(XSLStyleSheet.java:346)
com.icl.saxon.PreparedStyleSheet.setStyleSheetDocument(PreparedStyleSheet.java:176)
com.icl.saxon.PreparedStyleSheet.prepare(PreparedStyleSheet.java:133)
com.icl.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:127)
com.icl.saxon.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:79)
org.apache.taglibs.standard.tag.common.xml.TransformSupport.doStartTag(Unknown Source)
org.apache.taglibs.standard.tag.el.xml.TransformTag.doStartTag(Unknown Source)
org.apache.jsp.InfoPackageData_jsp._jspService(InfoPackageData_jsp.java:376)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:320)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

I am accessing all this with the help of JSP and all of my files are placed in the same directory and i am getting the following error. Kindly help me ASAP. I shall be very thankfull to you all.
Chakk de..

 
Bikramjit Singh Bajwa
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Forget to tell you, while including second xsl file into first xsl file. I am getting this error. This is just becaz of including xsl.I guess, i am missing something or anything required ?
Thanks in Advance
Bikram
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe you should consider writing your custom javax.xml.transform.URIResolver ?
 
Bikramjit Singh Bajwa
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yuhooooo
I just used latest saxon parser and it starts working.
Any way thanks alot Lasse
Bikram
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic