Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

XSLT issues

  Asked By: Howard    Date: Nov 17    Category: Java    Views: 550
  

I am trying to create XML documents using StyleSheets and
XSLT. I was wondering if I can use just XSLT rules to connect to a
database and retrieve and store data in resultsets? From what i have
read, I am under the impression that I need an XML document with the
data from the database to create another style/format of XML. If
calling and retrieving data is impossible to do from a StyleSheet
using XSLT, then is it possible to use XSLT to call java methods to do
the data retrieval for me.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Anna Hill     Answered On: Nov 17

I have set up xslt  under a stand alone tomcat instance [not running
under apache] as a filter specification in the target applications
web.xml file. If the name of the xml  document matches the URL filter
specification:

/servlet/pps.path.PPSServlet

The XSLT file culo.xsl is used to render the XML file. The order of
all the tags in web.xml file are critical. For example if <filter-
mapping> appears before <filter> tomcat will fail to load the
application.

<filter>
<filter-name>culo Filter</filter-name>
<filter-class>com.develop.filters.XSLTFilter</filter-class>
<init-param>
<param-name>xslt</param-name>
<param-value>/culo.xsl</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>culo Filter</filter-name>
<url-pattern>/servlet/pps.path.PPSServlet</url-pattern>
</filter-mapping>

 
Didn't find what you were looking for? Find more on XSLT issues Or get search suggestion and latest updates.




Tagged: