• 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

xsltlib:apply

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
I m using xml and xsl in a JSP. This was done using jakarta-taglibs-xsl-1.0.1 . The code used (in jsp) is mentioned below :
<%@taglib uri="/WEB-INF/taglibs-xsl.tld"
prefix="xsltlib" %>
<html>
<!-- html here -->
<xsltlib:apply xml="/a.xml" xsl="/a.xsl"/>
<!-- more html here -->
Currently a.xml is a file.
I need to have the contents of a.xml in a String or buffer and use the same in '<xsltlib:apply ' , i.e. instead of <xsltlib:apply reading from a file i want it to read from a String or Buffer.
Is this possible ? If yes, please let me know how.
I need this urgently.
regards,
Shailja
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you read the tag documentation at http://jakarta.apache.org/taglibs/doc/xsl-doc/xsl-1.0/index.html#apply?
It seems to me that you should be able to do
<xsltlib:apply nameXml="myXml" xsl="/a.xsl"/>
as long as you've stored the corresponding XML string as a request/session scope variable with the name "myXml".
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic