Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 23rd, 2006, 04:46 AM
Registered User
 
Join Date: Jun 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to include jsp page in xsl

how to include jsp page in xsl, i have tried to include jsp page in xsl, it will not display jsp page in xsl,i have given the following code,

<jsp:include page="test.jsp"/> the code did'n show error but it wont display the test.jsp code,

test.jsp

<html>
<body>
<table>
<tr>
<td>code</td>
<td>name</td>
</tr>
<tr>
<td>100</td>
<td>john</td>
</tr>
</table>
</body>
</html>

the above code doesnot display in my xsl. how to do this if any one knows pls give the solution. thanks in advance.

 
Old August 23rd, 2006, 05:03 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Do you just want to include the text of the JSP page in your XML? In that case use:
Code:
<xsl:include href="test.jsp"/>
But this will treat the JSP as an XSLT document and merge them into one large XSLT.

If you want access to XML returned by executing the JSP then use the document function:
Code:
<xsl:variable name="externalData" select="document('http://myServer/mySite/test.jsp')"/>
<xsl:copy-of select="$externalData/*"/>
This will work with your given JSP as it's well-formed XML but not all HTML is.


--

Joe (Microsoft MVP - XML)
 
Old August 23rd, 2006, 05:04 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

I can't understand why you would want to include a JSP page in your XSL. It doesn't make sense. What are you trying to achieve?



Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic xsl:include? rushman XSLT 7 October 16th, 2012 05:26 AM
xsl import/include mapping sammyj727 XSLT 3 July 19th, 2007 04:15 PM
cannot include jar file in jsp pa7751 JSP Basics 1 November 28th, 2006 03:22 AM
xsl:include within include chuck123ie XSLT 1 January 5th, 2006 11:07 AM
xsl:import or xsl:include ShaileshShinde XSLT 2 August 17th, 2005 04:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.