Re: more question for xml,xsl in orion

2000-11-02 Thread Christian Sell

I have a XML with data and XSL with the layout information AND JSP Java
code in it. How can I tell orion to:
1. Put XML and XSL together and output JSP.
2. Then compile the JSP output to html.

I can get XML and XSL to merge together but the JSP compiler will not
compiler the JSP output. For example, here is the code.

Thanks

I am not amazed that the JSP compiler does not get invoked. After all, what
orion sees is a request for an XML resource. I presume you would have to
somehow generate a second request (via RequestDispatcher.forward()) for the
generated JSP page after doing the transformation. This would imply that the
XML is never requested directly but through a servlet, which makes 2 calls
(include() to invoke the transformation, then forward() to call the JSP).

just my 2c
Christian





RE: more question for xml,xsl in orion

2000-11-02 Thread Duffey, Kevin

OK...I didn't get to finish because some stupid key I hit sent my email
out..sorry..I'll finish in this one..



I am about to dive in to XML, XSL and all that good stuff soon. My
understanding is that you would want the JSP page to return XML, then apply
XSL via an XSLT engine to output HTML. To make JSP return XML you just add a
tag at the start of the JSP page..I forget what it is. The main thing to
remember is to use br/br or br / tags and stuff where only single tags
are used in HTML. If anyone knows for sure on how this would work..could you
give a couple of steps as to how to do this. My guess is that you have a
submission, link whatever go to a controller servlet, which then uses a URL
connection to get the JSP page output (in xml form) in a StringBuffer, it
then would pass that string data along with the selected XSL is then applied
via the XSLT engine and returns HTML output..which you put into the response
and send back.

Thanks for any help.


 -Original Message-
 From: Christian Sell [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, November 02, 2000 1:04 AM
 To: Orion-Interest
 Subject: Re: more question for xml,xsl in orion
 
 
 I have a XML with data and XSL with the layout information 
 AND JSP Java
 code in it. How can I tell orion to:
 1. Put XML and XSL together and output JSP.
 2. Then compile the JSP output to html.
 
 I can get XML and XSL to merge together but the JSP compiler will not
 compiler the JSP output. For example, here is the code.
 
 Thanks
 
 I am not amazed that the JSP compiler does not get invoked. 
 After all, what
 orion sees is a request for an XML resource. I presume you 
 would have to
 somehow generate a second request (via 
 RequestDispatcher.forward()) for the
 generated JSP page after doing the transformation. This would 
 imply that the
 XML is never requested directly but through a servlet, which 
 makes 2 calls
 (include() to invoke the transformation, then forward() to 
 call the JSP).
 
 just my 2c
 Christian
 

 -Original Message-
 From: Christian Sell [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, November 02, 2000 1:04 AM
 To: Orion-Interest
 Subject: Re: more question for xml,xsl in orion
 
 
 I have a XML with data and XSL with the layout information 
 AND JSP Java
 code in it. How can I tell orion to:
 1. Put XML and XSL together and output JSP.
 2. Then compile the JSP output to html.
 
 I can get XML and XSL to merge together but the JSP compiler will not
 compiler the JSP output. For example, here is the code.
 
 Thanks
 
 I am not amazed that the JSP compiler does not get invoked. 
 After all, what
 orion sees is a request for an XML resource. I presume you 
 would have to
 somehow generate a second request (via 
 RequestDispatcher.forward()) for the
 generated JSP page after doing the transformation. This would 
 imply that the
 XML is never requested directly but through a servlet, which 
 makes 2 calls
 (include() to invoke the transformation, then forward() to 
 call the JSP).
 
 just my 2c
 Christian
 




RE: more question for xml,xsl in orion

2000-11-02 Thread Juan Lorandi (Chile)

You may want to have a Filter (a special servlet) to acomplish the XSLT...
In the jsp, in the @page tag, add a Content-Type="text/xml" or whatever your
filter requires...

you may also place inside the xml a xsl tag which refernces the xsl file you
want applied (may be dinamically
generated, based on any criteria, say, user-agent, URI extension, etc.)


-Original Message-
From: Duffey, Kevin [mailto:[EMAIL PROTECTED]]
Sent: Jueves, 02 de Noviembre de 2000 15:18
To: Orion-Interest
Subject: RE: more question for xml,xsl in orion


OK...I didn't get to finish because some stupid key I hit sent my email
out..sorry..I'll finish in this one..



I am about to dive in to XML, XSL and all that good stuff soon. My
understanding is that you would want the JSP page to return XML, then apply
XSL via an XSLT engine to output HTML. To make JSP return XML you just add a
tag at the start of the JSP page..I forget what it is. The main thing to
remember is to use br/br or br / tags and stuff where only single tags
are used in HTML. If anyone knows for sure on how this would work..could you
give a couple of steps as to how to do this. My guess is that you have a
submission, link whatever go to a controller servlet, which then uses a URL
connection to get the JSP page output (in xml form) in a StringBuffer, it
then would pass that string data along with the selected XSL is then applied
via the XSLT engine and returns HTML output..which you put into the response
and send back.

Thanks for any help.


 -Original Message-
 From: Christian Sell [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, November 02, 2000 1:04 AM
 To: Orion-Interest
 Subject: Re: more question for xml,xsl in orion
 
 
 I have a XML with data and XSL with the layout information 
 AND JSP Java
 code in it. How can I tell orion to:
 1. Put XML and XSL together and output JSP.
 2. Then compile the JSP output to html.
 
 I can get XML and XSL to merge together but the JSP compiler will not
 compiler the JSP output. For example, here is the code.
 
 Thanks
 
 I am not amazed that the JSP compiler does not get invoked. 
 After all, what
 orion sees is a request for an XML resource. I presume you 
 would have to
 somehow generate a second request (via 
 RequestDispatcher.forward()) for the
 generated JSP page after doing the transformation. This would 
 imply that the
 XML is never requested directly but through a servlet, which 
 makes 2 calls
 (include() to invoke the transformation, then forward() to 
 call the JSP).
 
 just my 2c
 Christian
 

 -Original Message-
 From: Christian Sell [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, November 02, 2000 1:04 AM
 To: Orion-Interest
 Subject: Re: more question for xml,xsl in orion
 
 
 I have a XML with data and XSL with the layout information 
 AND JSP Java
 code in it. How can I tell orion to:
 1. Put XML and XSL together and output JSP.
 2. Then compile the JSP output to html.
 
 I can get XML and XSL to merge together but the JSP compiler will not
 compiler the JSP output. For example, here is the code.
 
 Thanks
 
 I am not amazed that the JSP compiler does not get invoked. 
 After all, what
 orion sees is a request for an XML resource. I presume you 
 would have to
 somehow generate a second request (via 
 RequestDispatcher.forward()) for the
 generated JSP page after doing the transformation. This would 
 imply that the
 XML is never requested directly but through a servlet, which 
 makes 2 calls
 (include() to invoke the transformation, then forward() to 
 call the JSP).
 
 just my 2c
 Christian
 




more question for xml,xsl in orion

2000-11-01 Thread Terence Kwan

I have a XML with data and XSL with the layout information AND JSP Java code in it. 
How can I tell orion to:
1. Put XML and XSL together and output JSP.
2. Then compile the JSP output to html.

I can get XML and XSL to merge together but the JSP compiler will not compiler the JSP 
output. For example, here is the code.

Thanks

- car.xml -
?xml version="1.0?
?xml-stylesheet href="car.xsl" type="text/xsl"?

%  // Query database to get car information
   String sCarName="Toyota";
%

car
name%=sCarName%/name
/car
 car.xsl 
?xml version="1.0"?
xsl:stylesheet xmlns:xsl=" http://www.w3.org/1999/XSL/Transform
http://www.w3.org/1999/XSL/Transform " version="1.0"
xsl:output method="html"/
xsl:template match="car"
 html
  head
  /head
   body
h1xsl:value-of select="name"//h1
xsl:text disable-output-escaping="yes"
![CDATA[%int (int i=0;i10;i++)
{
%%=i%%
}
%]]
/xsl:text
   /body
 /html
/xsl:template
/xsl:stylesheet