Help,about jsp+xml+xslt
if I write like this:
<?xml version="1.0" encoding="GB2312"?>
<%@ page contentType="text/html;charset=GB2312"%>
<?xml-stylesheet type="text/xsl" href="xslt/test.xslt"?>
<news>
<word>
link
</word>
<link>
abc.jsp
</link>
</news>
the test.xslt can convert the xml to html
but I write like this:
<?xml version="1.0" encoding="GB2312"?>
<%@ page contentType="text/html;charset=GB2312"%>
<?xml-stylesheet type="text/xsl" href="xslt/href.xslt"?>
<%
out.println("<news><word>link</word><link>abc.jsp</link></news>");
%>
the test.xslt would not work,why????
first the xslt is in a .xsl file
second I'm pretty sure you can't put java in an xsl file.
Similar Messages
-
HELP: JSP + XML + XSLT = HTML?
Hello, all.
I am trying out Weblogic 6 and I am trying to get the JSP + XML + XSLT =>
HTML chain working.
I am coming from using Orion and SAXON.. and in that situation I had a JSP
that contained XML tags... they were filled in at runtime and then using
Servlet-Chaining was passed along to the SAXON XSLT Processer. SAXON checked
for the inline XSL specified and then used that to transform the document
into HTML.
It worked well, but there were some other features missing/not documented
that we now need.
With Weblogic I am trying to use the XSLT Tag Library that comes with the
distribution, but it seems to be very finicky. I followed the directions and
I got it to do a sort of roundabout transformation. But it doesn't seem to
work quite right.
The best I can get is the following:
I have an 'xslt' directory url-pattern-mapped to xslt.jsp (as instructed)...
but can't figure out how to specify the xsl file on-the-fly... that is, if I
don't hard-code the XSL file in the x:xslt element in the xslt.jsp it
complains about some XML file not having a root element.
Ideal situation:
1. I have a JSP that includes XML elements.
2. It is filled from a database at runtime and specifys (using a PI) what
XSL stylesheet it is to be processed with.
3. Somehow (fingers crossed) the XML is processed and transformed into HTML
by the appropriate XSL file.
I think I am mostly stuck moving between steps 2 and 3.
Can anyone give me some hints? Are there some Weblogic specific
elements/tags that I have to include in the XML file that Weblogic will
catch and re-direct to the XSL Parser?
Please, anyone, if you have some information, I would much appreciate it.
Dylan Parker
PS - I apologize for the cross-post, I hope it doesn't cause too much
traffic.Craig,
I've since discovered how to do it with the WL Taglibrary... and have
moved on =)
It has to do with the EXTREMELY BADLY documented x:xml tag that can
appear within the x:xslt tag body...
So the WL Tag Library allows something like the following.
(Please note, angled brackets are omitted in this post to prevent html
parsing)
[x:xslt stylesheet="sheet.xsl"]
[x:xml]
Here is the XML to run the sheet on.
This should have all relevant XML syntax: the PIs, the doctype,
root elements etc...
[x:xml]
[x:xslt]
And that DOES work. But not very well. WL, a little prematurely
incorporated versions 1.2 of Xerces and Xalan in their product -- and
these versions have some irritating bugs.
Also -- There tag library doesn't copy the source XML across as UTF-8
.. so a lot of the Japanese I have embedded there (from a DB) gets
mangled somewhere in their code...
AND -- If you hammer a little bit on an JSP/XML that uses the WL Tag
Library (eg clicking refresh lots of times in IE)... I get huge
amounts of irritating exceptions appearing in the log files.
NullPointerExceptions
XSL Parsing Exceptions
XML Parsing Exceptions
but completely unpredictably...
In my eyes.. the WL XML/XSL Tag Library using the incorporated and
untouchable Xalan and Xerces (v1.2) is virtually unusable.
What a pain.
BUT! Apache offers a similar OPEN SOURCE XSL Tag Library available
here:
http://jakarta.apache.org/taglibs/doc/xsl-doc/intro.html
And it uses the standard, non-weblogic-incorporated, Xerces and Xalan
(which means you can provide whatever version you want).. and it works
impressively well.
It has almost identical performance as the WL Taglib, and without all
of the bizarre exceptions being thrown.
And it does proper passing of the character encoding type!
If only the taglib did caching though =(
The performance hit over pure JSP is huge. Almost two orders of
magnitude. On my desktop box I can get around 500Requests/Sec if I am
returning HTML direct from a JSP... while if I produce XML that gets
processed by XSL into HTML the Requests/Sec drops to 5!!!!
Caching. Caching. And more Caching. A lot of DiskIO is going on with
the XML/XSL/XHTML chain of events.
I hope this helps!
I'd be curious as to what you find out as well.
Dylan Parker
On 5 Mar 2001 07:20:00 -0800, "Craig Macha"
<[email protected]> wrote:
>
Yep, I feel Dylan's pain.
I am trying to accomplish the same thing. A JSP page generating
dynamic XML content and then utilizing an XSLT stylesheet to transform
all the content into XHTML.
Does anyone have some examples that show exactly how to accomplish
this? Can I do this with WLS and the XML taglib that comes with
it? Or do I have to move on to something like Cocoon to get this
capability?
Any insight would be greatly appreciated.
Thanks,
Craig Macha
"Dylan Parker" <[email protected]> wrote:
Hello, all.
I am trying out Weblogic 6 and I am trying to get the
JSP + XML + XSLT =>
HTML chain working.
I am coming from using Orion and SAXON.. and in that situation
I had a JSP
that contained XML tags... they were filled in at runtime
and then using
Servlet-Chaining was passed along to the SAXON XSLT Processer.
SAXON checked
for the inline XSL specified and then used that to transform
the document
into HTML.
It worked well, but there were some other features missing/not
documented
that we now need.
With Weblogic I am trying to use the XSLT Tag Library
that comes with the
distribution, but it seems to be very finicky. I followed
the directions and
I got it to do a sort of roundabout transformation. But
it doesn't seem to
work quite right.
The best I can get is the following:
I have an 'xslt' directory url-pattern-mapped to xslt.jsp
(as instructed)...
but can't figure out how to specify the xsl file on-the-fly...
that is, if I
don't hard-code the XSL file in the x:xslt element in
the xslt.jsp it
complains about some XML file not having a root element.
Ideal situation:
1. I have a JSP that includes XML elements.
2. It is filled from a database at runtime and specifys
(using a PI) what
XSL stylesheet it is to be processed with.
3. Somehow (fingers crossed) the XML is processed and
transformed into HTML
by the appropriate XSL file.
I think I am mostly stuck moving between steps 2 and 3.
Can anyone give me some hints? Are there some Weblogic
specific
elements/tags that I have to include in the XML file that
Weblogic will
catch and re-direct to the XSL Parser?
Please, anyone, if you have some information, I would
much appreciate it.
Dylan Parker
PS - I apologize for the cross-post, I hope it doesn't
cause too much
traffic. -
JSP, XML, XSLT: applying XSL on JSP-generated XML doc
Hello,
I am currently trying to figure out how to do the following:
let's consider (that's not entirely hypothetical :) ) a web application working with JSP (on apache/tomcat 3.1) and oracle BC4J Application modules.
The JSPs call oracle webbeans to perform updates and retrieve data from an 8.1.6 database.
Now I'm thinking of moving to a combination of JSP, XML and XSL, which (hopefully) would allow to customize the application depending on the user's browser, language etc...(that's the point isn't it?)
It doesn't seem to be a problem to produce XML from a jsp, send it directly to the client browser, which in turn goes to look for the proper XSL file and does all the transformation stuff.
However this only works with I.E 5 for the moment right? and most website need to support various kinds of browsers...
The need is:
* When a non XML-capable browser is detected, apply the proper XSL(s) on the server side before sending the result back, in html/wml/whatever...
* For XML-capable browsers, produce raw XML, maybe apply some XSL(s), and eventually send the result to the browser which handles the rest of the XSL stuff itself.
Therefore, I'd like to:
- Have the jsp produce the raw xml data (maybe adding extra tags, to indicate the browser and/or the language that the jsp engine has detected).
- Pass the output to a first XSLT engine which would take care of the language stuff
- Feed the result into a second XSLT engine to handle browser specificities for instance...
- Send the final output to the client browser.
Now, there are 2 problems:
* 1/ I have seen various engines capable of chaining XSL transforms, and it is easy to produce XML from a jsp, but I don't know how to feed a jsp's output into an XML engine. is that possible? how?
* 2/ I'm a bit concerned about the cost of applying three (or more) process stages, does anyone have insight on the performance issues this could raise?
bonus question ;) : is there a simpler approach?
Thanks a lot in advance, Remi
nullHello,
I am currently trying to figure out how to do the following:
let's consider (that's not entirely hypothetical :) ) a web application working with JSP (on apache/tomcat 3.1) and oracle BC4J Application modules.
The JSPs call oracle webbeans to perform updates and retrieve data from an 8.1.6 database.
Now I'm thinking of moving to a combination of JSP, XML and XSL, which (hopefully) would allow to customize the application depending on the user's browser, language etc...(that's the point isn't it?)
It doesn't seem to be a problem to produce XML from a jsp, send it directly to the client browser, which in turn goes to look for the proper XSL file and does all the transformation stuff.
However this only works with I.E 5 for the moment right? and most website need to support various kinds of browsers...
The need is:
* When a non XML-capable browser is detected, apply the proper XSL(s) on the server side before sending the result back, in html/wml/whatever...
* For XML-capable browsers, produce raw XML, maybe apply some XSL(s), and eventually send the result to the browser which handles the rest of the XSL stuff itself.
Therefore, I'd like to:
- Have the jsp produce the raw xml data (maybe adding extra tags, to indicate the browser and/or the language that the jsp engine has detected).
- Pass the output to a first XSLT engine which would take care of the language stuff
- Feed the result into a second XSLT engine to handle browser specificities for instance...
- Send the final output to the client browser.
Now, there are 2 problems:
* 1/ I have seen various engines capable of chaining XSL transforms, and it is easy to produce XML from a jsp, but I don't know how to feed a jsp's output into an XML engine. is that possible? how?
* 2/ I'm a bit concerned about the cost of applying three (or more) process stages, does anyone have insight on the performance issues this could raise?
bonus question ;) : is there a simpler approach?
Thanks a lot in advance, Remi
null -
Web Based Messageboard (JSP, XML, XSLT) - Just Looking For Advice Please!
I have a general question - I am not looking for any code, just some advice if possible. I am studying on a Masters course and I have been given an assignment to do which I am having difficult getting started. I have worked a lot with Java up until now, however this is the first time I have had to JSP on my course.
My current assignment is that I am required to create a simple web based message board, using JSP and XML, which allows users to post messages to the board, and also to reply to messages. The content of the message board is stored in an XML file, and there is no database involved. The message data needs to be formatted for viewing in a browser using XSL transformations.
I am stuck as to how to go about starting the project, and this is all I am asking for advice in. I have created the basic XML file which has some preliminary data stored within it, and I have created an XSL stylesheet to transform this data, however I am stuck with the JSP. Do I need to create a seperate JSP page for each page of the website? How does this link in with the XSLT?
I would welcome and really appreciate any advice, but I stress that I am not looking for anyone to give me any code or anything like that.
Thanks.You can use XSLT to convert XML to HTML. Then include this HTML in your JSP. Further on you've a plain HTML form with an input field for a message which you submit to a servlet. In the servlet validate/convert/whatever this message and add it to the XML file and then forward/redirect the request back to the JSP.
-
Serious Help about JSP? please anyone
Hello everyone,
I am newbie on java. just learned java and java servlet. and learning jsp. i got a job interview for java development and jsp. is there anyone can help me out on which part of java and jsp i should pay attention. so i can be success in my interview. please anyone
SumitIt's not that people are rude here, it's just that (in your original question) you seemed to indicate that you had no knowledge of java but were going to be interviewing for a java position and what you wanted from the user community was something you could say in the interview that would give the impression to the interviewer that you were an experienced java professional.
If you just want pointers with a java interview... well, this is not exactly the forum for that question. I will give you one piece of advice anyway: Be honest with who your interviewer. Tell them you want a java job but have little to no experience but are willing to spend extra time to become proficient. If hired, this means you can spend time getting some OJT without worrrying about getting canned.
If you try to BS your way into a job, they may expect you to already know alot. Your first day on the job, it will be apparent you don't know squat and it won't be too long after that before you will be back on the street looking for work.
HTH,
P. -
Hi all!
I'm in a bit of a dilema. As the least knowledgable member of our small development group (3 people incl. me) I'm caught in the middle of a pretty fierce debate over whether or not to we should implement JSP.
Currently to seperate business logic from presentation we have our servlets pass XML to the browser and then the browser renders the HTML using the appropriate .xsl (sometimes we use server-side transformation).
Now one of the guys wants to use MVC/Struts and JSPs in order to create a much needed UI for an application. The plan is to not put any Java code in the JSP (seperation of logic and presentation - good, business logic in both the JSP and Servlet - bad.) but the other guy is still vehemently against it.
He says that anything JSP can do we can already do with XML/XSLT and to add JSP to our environment would complicate things.
And while I agree with him there, there are some things that when you do them with JSPs make the code more readable and transparent.
If you had to take a side, which one would you choose?
Has anyone else out there already gone through this debate? I'd be interested in knowing the outcome.
Thanks,
JohnI have a couple of comments.
1> "XML to the browser and then the browser renders the HTML using the appropriate .xsl"
I all cases you should do the transformations on the server. Lot of browser do not know how to
do a xsl transform. And since you can do it some time why not do it not everytime?
2> "business logic in both the JSP and Servlet"
Business logic should neither be in servlets nor in jsp. I think they should be in business logic beans.
3> "anything JSP can do we can already do with XML/XSLT "
Although anything can be done using xml/xsl or jsp there are a bit of differences where struts-jsp architecture is more perferable.
Imaging a web site which has lots of online forms(with textfiedls, checkboxes, select lists, etc) which are to be validated and if some validation fails the same form is to be shown with the values already submitted prefilled. Doing this with xml/xsl or even simple jsp could be a nightmare.
But if you use struts MVC architecture with jsp and struts taglib this will be very very simple.
Introducing struts-jsp will not complicate things and if the scnario described above is there or could arise in your application then you should seriously think about using struts+jsp. That does not mean you will have to scrap you xml+xsl architecture. You can still generate the xml using your action bean , put the xml in request and forward it to you jsp for rendetion. The jsp page could then use a taglib which has the xsl transformation code to do the xslt transformation.
The above comments are not just my thoughts but i have also implemented/experienced the above during various projects and they have proved to be useful.
Cheers! -
Help need to know about JSP-RMI connection
Hi All...
Can anyone send me any tutorial/link about JSP-RMI connection. I need to access a RMI server object from JSP page.Is it possible?
Looking for your responds.....Hi ...
I didn't get any reply from any one....
Is it possible to make Java Server Pages and RMI work
together -sure, jsp's can make requests to servlets which can then talk to remote objects, then a response can be sent back down to the jsp
to invoke a method on a server object from a JSP? And
if, does
someone know of a good tutorial, article etc., on
this matter?hmm, Google, JSP Tutorial, RMI Tutorial, etc. -
Hello.
I have a device that produce XML output file( dynamically )
I need to read it by Jsp page.
I able to do it using XSL but when XML changes my Jsp page is not updated.
Only if i recompile jsp page i get new data
Do you know some methods to get dynamically XLM data?
Thx
Riccardo
example code:
<%@page contentType="text/html"%>
<html><head><title>XSLT Example</title>
<%@ taglib uri='/WEB-INF/tlds/xslt.tld' prefix='xslt' %>
</head>
<body>
<xslt:apply xsl='Fieldgate.xsl'>
<%@ include file='output.xml' %>
</xslt:apply>
</body></html>Thats because you are including your XML in your JSP.
If you were to parse your XML in your in your JSP using SAX or DOM and then use them to populate the dynamic contents of your JSP then you will not need to recomplie your JSP.
Read the following article. It will help you out and possibly give you some other Ideas.
http://developer.java.sun.com/developer/technicalArticles/xml/WebAppDev2/#code13 -
Question about getSpaceContents and XSLT.
Hello everybody. Have some problems with understanding of working with getSpaceContents. I Have some *.xmls in ContentSpace and need put each of them into varaiable (to work with it in loop). How should I do it correct? The point of loop is :I have some xmls with one xsd into ContentSpace, i must to produce set of xmls (with another xsd) using xslt.First xsd looks like : Supplier, Good(unbounded) , second like : Good , Supplier(unbounded).I.e. each xmls with 1st xsd have 1 of all suppliers and list of goods, the 2nd have one of all goods and list of suppliers,corresponding to it.Could anyone give an idea , how to do it the best way? The problem is , that the information to make one of output xmls contained in each of input xmls.
Thx in advance.upd:
The problem of working with getSpaceContents : i made a variable doclist ( list<CRCResult> ). After getSpaceContents operation doclist looks like that :
<list>
<com.adobe.livecycle.contentservices.client.impl.CRCResultImpl>
<attributeMap>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}creator</string>
<string>usersystemcontext/DefaultDom</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}browse-link</string>
<string>http://81.5.113.36:8080/contentspace/wcs/api/node/content/workspace/SpacesStore/42dbbb75-abfa-43e1-96cd-b3454477d541/ID_1_Урожай.xml</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/system/1.0}store-protocol</string>
<string>workspace</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}content</string>
<string>contentUrl=store://2010/11/17/18/54/d143cd65-1dfc-460e-88cb-1f08975ecfea.bin|mimetype=text/xml|size=3968|encoding=UTF-8|locale=en_</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/system/1.0}node-uuid</string>
<string>42dbbb75-abfa-43e1-96cd-b3454477d541</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}modifier</string>
<string>usersystemcontext/DefaultDom</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}name</string>
<string>ID_1_Урожай.xml</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}qualified-path</string>
<string>/app:company_home/cm:RetailerSupplierInteraction/cm:Proposal/cm:ID_1_Урожай.xml</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}modified</string>
<date>2010-11-17 18:54:32.622 MSK</date>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}node-type</string>
<string>{http://www.alfresco.org/model/content/1.0}content</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}folder-path</string>
<string>/Company Home/RetailerSupplierInteraction/Proposal</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}created</string>
<date>2010-08-26 12:45:12.512 MSD</date>
</entry>
<entry>
<string>{http://www.alfresco.org/model/system/1.0}store-identifier</string>
<string>SpacesStore</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}resolved-path</string>
<string>/{http://www.alfresco.org/model/application/1.0}company_home/{http://www.alfresco.org/model/content/1.0}RetailerSupplierInteraction/{http://www.alfresco.org/model/content/1.0}Proposal/{http://www.alfresco.org/model/content/1.0}ID_1_Урожай.xml</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/system/1.0}node-dbid</string>
<long>629</long>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}content-type</string>
<string>text/xml</string>
</entry>
</attributeMap>
<document serialization="custom">
<com.adobe.idp.Document>
<int>3</int>
<boolean>false</boolean>
<boolean>false</boolean>
<null/>
<string>81.5.113.36/127.0.0.1</string>
<null/>
<null/>
<null/>
<string>IOR:000000000000002849444C3A636F6D2F61646F62652F6964702F49446F63756D656E7443616C6C6261636B3A312E30000000000200000000000000EC000102000000000C38312E352E3131332E3336000DC8000000000015353834393831363137302F01163C37231524460635000000000000050000000000000008000000004A414300000000010000001C000000000501000100000001050100010001010900000001050100010000002100000060000000000000000100000000000000240000001E0000007E00000000000000010000000C38312E352E3131332E3336000DC9004000000000000000000000001004010008060667810201010100000000000000000000000000000000000000000000002000000004000000000000001F0000000400000003000000010000002000000000000000020000002000000004000000000000001F0000000400000003</string>
<int>82</int>
<string>text/xml</string>
<null/>
<map>
<entry>
<string>basename</string>
<string>ID_1_Урожай.xml</string>
</entry>
<entry>
<string>file</string>
<string>ID_1_Урожай.xml</string>
</entry>
<entry>
<string>wsfilename</string>
<string>ID_1_Урожай.xml</string>
</entry>
</map>
<string>adobe/idp/DocumentPullServant/adobejb_null</string>
<long>-1</long>
</com.adobe.idp.Document>
</document>
</com.adobe.livecycle.contentservices.client.impl.CRCResultImpl>
<com.adobe.livecycle.contentservices.client.impl.CRCResultImpl>
<attributeMap>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}creator</string>
<string>usersystemcontext/DefaultDom</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}browse-link</string>
<string>http://81.5.113.36:8080/contentspace/wcs/api/node/content/workspace/SpacesStore/0ac06777-e5ae-48ef-99d8-1ed029253987/ID_2_Три топора.xml</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/system/1.0}store-protocol</string>
<string>workspace</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}content</string>
<string>contentUrl=store://2010/11/17/18/55/3ad2fac7-2b6e-4dae-a87a-382ca0f35fd4.bin|mimetype=text/xml|size=3979|encoding=UTF-8|locale=en_</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/system/1.0}node-uuid</string>
<string>0ac06777-e5ae-48ef-99d8-1ed029253987</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}modifier</string>
<string>usersystemcontext/DefaultDom</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}name</string>
<string>ID_2_Три топора.xml</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}qualified-path</string>
<string>/app:company_home/cm:RetailerSupplierInteraction/cm:Proposal/cm:ID_2_Три_x0020_топора.xml</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}modified</string>
<date>2010-11-17 18:55:26.206 MSK</date>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}node-type</string>
<string>{http://www.alfresco.org/model/content/1.0}content</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}folder-path</string>
<string>/Company Home/RetailerSupplierInteraction/Proposal</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}created</string>
<date>2010-08-26 12:49:54.431 MSD</date>
</entry>
<entry>
<string>{http://www.alfresco.org/model/system/1.0}store-identifier</string>
<string>SpacesStore</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}resolved-path</string>
<string>/{http://www.alfresco.org/model/application/1.0}company_home/{http://www.alfresco.org/model/content/1.0}RetailerSupplierInteraction/{http://www.alfresco.org/model/content/1.0}Proposal/{http://www.alfresco.org/model/content/1.0}ID_2_Три_x0020_топора.xml</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/system/1.0}node-dbid</string>
<long>630</long>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}content-type</string>
<string>text/xml</string>
</entry>
</attributeMap>
<document serialization="custom">
<com.adobe.idp.Document>
<int>3</int>
<boolean>false</boolean>
<boolean>false</boolean>
<null/>
<string>81.5.113.36/127.0.0.1</string>
<null/>
<null/>
<null/>
<string>IOR:000000000000002849444C3A636F6D2F61646F62652F6964702F49446F63756D656E7443616C6C6261636B3A312E30000000000200000000000000EC000102000000000C38312E352E3131332E3336000DC8000000000015353834393831363137302F01163C37231524460635000000000000050000000000000008000000004A414300000000010000001C000000000501000100000001050100010001010900000001050100010000002100000060000000000000000100000000000000240000001E0000007E00000000000000010000000C38312E352E3131332E3336000DC9004000000000000000000000001004010008060667810201010100000000000000000000000000000000000000000000002000000004000000000000001F0000000400000003000000010000002000000000000000020000002000000004000000000000001F0000000400000003</string>
<int>83</int>
<string>text/xml</string>
<null/>
<map>
<entry>
<string>basename</string>
<string>ID_2_Три топора.xml</string>
</entry>
<entry>
<string>file</string>
<string>ID_2_Три топора.xml</string>
</entry>
<entry>
<string>wsfilename</string>
<string>ID_2_Три топора.xml</string>
</entry>
</map>
<string>adobe/idp/DocumentPullServant/adobejb_null</string>
<long>-1</long>
</com.adobe.idp.Document>
</document>
</com.adobe.livecycle.contentservices.client.impl.CRCResultImpl>
<com.adobe.livecycle.contentservices.client.impl.CRCResultImpl>
<attributeMap>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}creator</string>
<string>usersystemcontext/DefaultDom</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}browse-link</string>
<string>http://81.5.113.36:8080/contentspace/wcs/api/node/content/workspace/SpacesStore/c793f4b8-0f42-462c-a75b-d104f286f66f/ID_3_Теремок.xml</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/system/1.0}store-protocol</string>
<string>workspace</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}content</string>
<string>contentUrl=store://2010/11/17/18/56/b57edc81-c288-4258-9710-18632ad86a66.bin|mimetype=text/xml|size=3974|encoding=UTF-8|locale=en_</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/system/1.0}node-uuid</string>
<string>c793f4b8-0f42-462c-a75b-d104f286f66f</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}modifier</string>
<string>usersystemcontext/DefaultDom</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}name</string>
<string>ID_3_Теремок.xml</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}qualified-path</string>
<string>/app:company_home/cm:RetailerSupplierInteraction/cm:Proposal/cm:ID_3_Теремок.xml</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}modified</string>
<date>2010-11-17 18:56:05.332 MSK</date>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}node-type</string>
<string>{http://www.alfresco.org/model/content/1.0}content</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}folder-path</string>
<string>/Company Home/RetailerSupplierInteraction/Proposal</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}created</string>
<date>2010-08-26 12:51:10.671 MSD</date>
</entry>
<entry>
<string>{http://www.alfresco.org/model/system/1.0}store-identifier</string>
<string>SpacesStore</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}resolved-path</string>
<string>/{http://www.alfresco.org/model/application/1.0}company_home/{http://www.alfresco.org/model/content/1.0}RetailerSupplierInteraction/{http://www.alfresco.org/model/content/1.0}Proposal/{http://www.alfresco.org/model/content/1.0}ID_3_Теремок.xml</string>
</entry>
<entry>
<string>{http://www.alfresco.org/model/system/1.0}node-dbid</string>
<long>631</long>
</entry>
<entry>
<string>{http://www.alfresco.org/model/content/1.0}content-type</string>
<string>text/xml</string>
</entry>
</attributeMap>
<document serialization="custom">
<com.adobe.idp.Document>
<int>3</int>
<boolean>false</boolean>
<boolean>false</boolean>
<null/>
<string>81.5.113.36/127.0.0.1</string>
<null/>
<null/>
<null/>
<string>IOR:000000000000002849444C3A636F6D2F61646F62652F6964702F49446F63756D656E7443616C6C6261636B3A312E30000000000200000000000000EC000102000000000C38312E352E3131332E3336000DC8000000000015353834393831363137302F01163C37231524460635000000000000050000000000000008000000004A414300000000010000001C000000000501000100000001050100010001010900000001050100010000002100000060000000000000000100000000000000240000001E0000007E00000000000000010000000C38312E352E3131332E3336000DC9004000000000000000000000001004010008060667810201010100000000000000000000000000000000000000000000002000000004000000000000001F0000000400000003000000010000002000000000000000020000002000000004000000000000001F0000000400000003</string>
<int>84</int>
<string>text/xml</string>
<null/>
<map>
<entry>
<string>basename</string>
<string>ID_3_Теремок.xml</string>
</entry>
<entry>
<string>file</string>
<string>ID_3_Теремок.xml</string>
</entry>
<entry>
<string>wsfilename</string>
<string>ID_3_Теремок.xml</string>
</entry>
</map>
<string>adobe/idp/DocumentPullServant/adobejb_null</string>
<long>-1</long>
</com.adobe.idp.Document>
</document>
</com.adobe.livecycle.contentservices.client.impl.CRCResultImpl>
</list>
I read Help about CRCResult variable, it is said there ,that we can receive the information like document, link , etc. from it. I can't figure out how to do it.So the question : what function should we apply or how can we get access to what we need? For example, i want to get document from the doclist.
Thanks in advance. -
Java Translets XML/XSLT Transformation
Translets "are precompiled XSL documents that are optimized and converted into simple Java classes. When you compile your application Java files, you compile your XSL files into Java class files. During runtime, you can load translets like any regular Java class and perform XSL transformations over and over again.
The syntax checking and parsing of XSL documents are done when the XSL files are compiled. The transformation therefore takes only as long as the compiled code takes to execute, which improves performance multiple folds.
The downside to using XSL is that "it can take a considerable amount of time and reduce performance. The time needed to parse XML and XSL documents is directly proportional to the size of the documents. Each transformation requires the XML and XSL documents to be loaded, syntax checked, and parsed." I recommends using translets for the following reasons.
I had written an application (<a href="http://www.simplygites.com" title="www.simplygites.com">SimplyGites</a>) using standard XSL / XML transformation and experienced some very slow server-side transformation on the very complex screens with large amounts of xml. Timings showed these problem screens took 2-3 seconds to transform, which was totally unacceptable non-functional requirements.
I considered rewriting these screens as JSP or PHP, then I discovered Translets. And wow what a discovery the timings for these pages now compiled as Translets(java classes) are amazing in comparison to the original timings ? I now have them transforming in 500ms (all now under 1 second).
I would recommend anyone using XSL/XML transformation to use Translets, these have now been running tried and tested on the <a href="http://www.simplygites.com" title="www.simplygites.com">SimplyGites</a> for the past 6months.
Technolgies used:
Weblogic 8.1 SP5
Java 1.4.2
Required Jars
xsltc.jar
runtime.jar
BCEL.jar
JLex.jar
java_cup.jar
regexp.jar
xml-dtm.jar
For more information see http://xml.apache.org/xalan-j/xsltc_usage.html
I hope this helps anyone that has XML/XSLT performance issues.
Mark
MB Computer Ltd
www.simplygites.comThanks for your help.
The problem was that my firewall was blocking my server. -
Continuing problems about JSP compilation...
I have two problems that I can't solve about JSP:
- my JSPs aren't recompiled when I modify them
I've got to redeploy the entire webApp for the
modification to be updated.
- the precompilation of my JSPs fails
I've got the common NullPointerException in JSP2Java.makeReader
I'm working in the deployed directory way, with a WL6.0sp2...
My xml files seem to be correct and the clocks of the different machines are synchronized.
I read several threads and solutions concerning those problems but all of these
were applied and it still doesn't work...
If someone could help me... TIA...
JimmyL wrote:
> I have two problems that I can't solve about JSP:
>
> - my JSPs aren't recompiled when I modify them
> I've got to redeploy the entire webApp for the
> modification to be updated.
On admin server or managed server????
>
>
> - the precompilation of my JSPs fails
> I've got the common NullPointerException in JSP2Java.makeReader
>
Answered in the other email..
Kumar
>
> I'm working in the deployed directory way, with a WL6.0sp2...
> My xml files seem to be correct and the clocks of the different machines are synchronized.
>
> I read several threads and solutions concerning those problems but all of these
> were applied and it still doesn't work...
>
> If someone could help me... TIA...
-
Passing parameters from jsp to xslt
Hi all,
I am trying to pass a variable string from a jsp to xslt .
This is the code in the jsp which passes the variables .
<c:set var="xsl">
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="<%= "service_attribute.xsl" %>"/>
<xsl:variable name="ItemId"><%= ItemId %></xsl:variable>
<xsl:variable name="pos"><%= pos %></xsl:variable>
<xsl:variable name="lineInfoTn"><%= lineInfoTn %></xsl:variable>
</xsl:stylesheet>
</c:set>
<x:transform xmlSystemId="foo.xml" xslt="${xsl}">
<%= FM.getOrderBean().getXml("ActivationRequest") %>
</x:transform>
In the service_attribute.xsl I would like to be able to check the lineInfoTn variable for content .
something like this .
<xsl:if test="$lineInfoTn='10pt'">
<!-- Do something -->
<xsl:value-of select="$lineInfoTn"/>
</xsl:if>
The first problem is that it complains that the $lineInfoTn is not declared .
So I added the variable as a global variable .
<xsl:param name="lineInfoTn">10pt</xsl:param>
Note I have been switching between variables and parameters to try and get this working .
I can use the itemId variable like this and I dont have a problem .
<xsl:for-each select="q:RequestItem/q:ItemId[text() = $ItemId]/..">
Any ideas on how to get this working .
Thanks for your helpThanks for the input
-
Hi All
I'm want to dip my toe into the world of XML/XSLT development
to help with
job applications. Seems there's a lot of companies asking for
this.
I've been developing ASP applications for a number of years,
but i've never
looked at XML, etc...
Can anyone provide a strating point, examples, etc? I'm also
looking to
learn .NET too (think i have a mountain to climb).
I've been using Access database for my applications but also
need to expand
by using MS SQL on my local machine.
Any ideas wher to start?
Hope someone can point me in the right direction - Thanks in
Adance
Andy> Can anyone provide a strating point, examples, etc? I'm
also looking to
> learn .NET too (think i have a mountain to climb).
And at the top of that mountain is a pile of .net XML
applications. I can't
say that's the motherland of software development, but, yea,
it probably
pays good. ;o)
> Any ideas wher to start?
Well, if you start using asp.net 2.0, a lot of the built-in
controls
leverage XML and XSLT, so you'll begin to get your hand dirty
just going
through the basic ASP.net 2.0 tutorials.
-Darrel -
ei, i'm learning about jsp's... i'm reading this book and trying all this examples given in the book.
my problem is where am i suppose to put all the jsp's and beans?
this is where i put all my programs as stated in the book... webapps/ROOT/web-inf/classes/calculators/
i've made this folder calculator as what is instructed in the book... and i've put the class file and jsp of the Triangle program i've made.
and in the web browser... i type this url... http://localhost:8080/Triangle.jsp but it generates http 404.
what add-ins should i put in the web.xml? please tell me all i need to do.
thanks so muchi just want to clarify this one... so my program
triangle.jsp shouldn't be placed in the classes
directory?The classes should go into that folder, not the JSP.
where should i put it? the directory i've put it is
in webapps/ROOT/web-inf/classes/calculator.
my question is this... should i put it here
webapps/ROOT?Yes.
the calculator is actually a package... so in my
triangle bean i specified there package calculators.There is a difference in calculator and calculators. Make sure that you are using the correct package name. -
OT:XML/XSLT transformations on iAS6.0 anyone?
Hi,
I know this is Off Topic from JATO, but...
I am trying to come up with a way to process the typical
transformation of xml & xslt to html.
For whatever reason I can't seem to get this to work.
I've tried it by writing my own servlet, but it hangs.
I've tried to install cocoon, but nothing ever works, and all the
installation instructions seem to trail off at the most important time
(like what if the build doesn't create a war file).
Can someone point to a definitive resource that I can follow for
something like this which will work on iAS6.0?
Thanks,
John Hoskins.Yeah, off topic, so I doubt you will get any expert help here. Might try the S1AS 6.x forum.
sorry
Maybe you are looking for
-
USB ports failing to mount an external hard drive, recognize a printer.
Hello, I have a Mac Mini running 10.5.8. Suddenly the usb ports do not mount external hardrives (I have 2) and also do not recognize an Hp printer. If I plug the keyboard an the mouse, they are recognize and useful. Firewire mounts one of my firewire
-
I have two itunes cards that I can't redeem because the barcodes came off when I ripped the stickers off. I am not sure what I do about this? Any help would be great.
-
trying to restore ipod, done all updates to computer and i tunes still get error
-
How to access whatsapp back-up files on icloud
How do I get access again to my whatsapp conversations backed up on icloud?
-
Button Fire Event Multiple Times
Hey everyone. I've somewhat inherited a LabVIEW program for a project I'm working on. I need to fire an event in an event structure 20 times in a row to fully collect my data. Right now i just have the event structure connected to a slider so i ju