Xslprocessor problem
Any idea why I get an 'End of communication channel' error after using xslprocessor ?
My session gets kill after using the xslprocessor..
I am using javaparserv2.jar 9.2.0.3
Hi there :)
I have the same problem using the DBMS_XSLPROCESSOR package. The XSLPROCESSOR package (included in the XDK, not as part of Oracle 9.2), however, seems to work but has given me problems with inserting extra unnecessary namespaces.
The problem seems to be happening when the document is NOT in the default namespace. I've run DBMS_XSLPROCESSOR methods on XML without a special namespace, and it has worked. All of the XML for the application I'm working on uses a particular namespace, however, so this ultimately won't work for me.
Sorry I can't offer any more than this.
Constantine
Similar Messages
-
Xslprocessor - performance problem
Here we are using XDK for PL/SQL to process XML documents. we are facing a BIG perforance problem........
When applying a stylesheet (xsl) to an XMLDOMdocument using xslprocessor.ProcessXSL
function ,it is taking 23 minutes to process 938Kb file.
Is there any way to improve the peformance ? do i need to change anyof the XDK/init.ora parameters for this ?
nullWhat Application Server you are using?
I have samilar problem with you, I'm using Jrun Application Server.
When using JSP only, the response time is less than 1 second but If using XML+XSL using XDK, it take about 5 second to display.
I have added timestamp to each process including generate data from DB, generate XML, parse XML,XSL and ProcessXSL. Each process take less than 50ms.
So I think the delay is cause by the Application Server / Web Server instead.
Did anyone know is there any problem of JRun using taglib plus XDK? -
XSQLRequest ,XSLProcessor , XSLStylesheet Memory Problem
Solaris & NT.
Using the following processor combination to generate xmldocuments for an output stream, We are experiencing what appears to be a over caching of xml objects or objects not being garbage collected after use. (JProb on OC4J analysis)
The processing works repeatedly - using a JVM with -mx=98MB after a processing some XML Objects accumulate until whatever memory resources you have allocated are exhausted. Currently processing 1200 documents will generate enough left over objects to bring the system to a halt and OutOfMemory Error.
XSLStylesheet sheet = null;
XSLProcessor xslt = new XSLProcessor();
XSQLRequest req = new XSQLRequest(new URL(resMasterGetUrl));
Hashtable params = new Hashtable(1);
params.put("pageName",urlFilename.toString().toLowerCase());
OutputStream out
xslt.processXSL(new XSLStylesheet((XMLDocument)req.processToXML(params),new URL(resMasterGetBaseStyleUrl)),xmlParameters,out);
out.close();
req = null;
xslt = null;
sheet = null;
params = null;
COUNT MEMORY
oracle.xml.parser.v2 DOMParser 1 ( 0.0%) 20 ( 0.0%)
oracle.xml.parser.v2 DTD 1 ( 0.0%) 68 ( 0.0%)
oracle.xml.parser.v2 DocumentBuilder 1 ( 0.0%) 92 ( 0.0%)
oracle.xml.parser.v2 Entry 910 ( 2.2%) 18,200 ( 0.2%)
oracle.xml.parser.v2 EqualExpr 5 ( 0.0%) 180 ( 0.0%)
oracle.xml.parser.v2 FastVector 57 ( 0.1%) 684 ( 0.0%)
oracle.xml.parser.v2 FilterExpr 53 ( 0.1%) 5,300 ( 0.1%)
oracle.xml.parser.v2 FromAttributes 1 ( 0.0%) 4 ( 0.0%)
oracle.xml.parser.v2 FromChildren 20 ( 0.0%) 80 ( 0.0%)
oracle.xml.parser.v2 FromDescendantAttributes 1 ( 0.0%) 4 ( 0.0%)
oracle.xml.parser.v2 FromDescendants 25 ( 0.1%) 300 ( 0.0%)
oracle.xml.parser.v2 FromSelf 5 ( 0.0%) 60 ( 0.0%)
oracle.xml.parser.v2 NSNameImpl 38 ( 0.1%) 760 ( 0.0%)
oracle.xml.parser.v2 NodeFactory 5 ( 0.0%) 20 ( 0.0%)
oracle.xml.parser.v2 NonValidatingParser 1 ( 0.0%) 116 ( 0.0%)
oracle.xml.parser.v2 ObjectPool 46 ( 0.1%) 552 ( 0.0%)
oracle.xml.parser.v2 ParserState 2 ( 0.0%) 72 ( 0.0%)
oracle.xml.parser.v2 PathExpr 53 ( 0.1%) 3,180 ( 0.0%)
oracle.xml.parser.v2 Predicate 1 ( 0.0%) 12 ( 0.0%)
oracle.xml.parser.v2 SAXAttrList 2 ( 0.0%) 72 ( 0.0%)
oracle.xml.parser.v2 Step 28 ( 0.1%) 1,904 ( 0.0%)
oracle.xml.parser.v2 StringHashtable 1 ( 0.0%) 4 ( 0.0%)
oracle.xml.parser.v2 XMLAttr 230 ( 0.6%) 13,800 ( 0.2%)
oracle.xml.parser.v2 XMLAttrList 288 ( 0.7%) 3,456 ( 0.0%)
oracle.xml.parser.v2 XMLComment 44 ( 0.1%) 1,584 ( 0.0%)
oracle.xml.parser.v2 XMLDOMImplementation 1 ( 0.0%) 4 ( 0.0%)
oracle.xml.parser.v2 XMLDeclPI 5 ( 0.0%) 260 ( 0.0%)
oracle.xml.parser.v2 XMLDocument 5 ( 0.0%) 500 ( 0.0%)
oracle.xml.parser.v2 XMLElement 308 ( 0.7%) 18,480 ( 0.2%)
oracle.xml.parser.v2 XMLEntity 6 ( 0.0%) 600 ( 0.0%)
oracle.xml.parser.v2 XMLError 6 ( 0.0%) 456 ( 0.0%)
oracle.xml.parser.v2 XMLNodeList 139 ( 0.3%) 1,668 ( 0.0%)
oracle.xml.parser.v2 XMLPI 1 ( 0.0%) 36 ( 0.0%)
oracle.xml.parser.v2 XMLReader 1 ( 0.0%) 92 ( 0.0%)
oracle.xml.parser.v2 XMLText 498 ( 1.2%) 17,928 ( 0.2%)
oracle.xml.parser.v2 XMLUTF8Reader 1 ( 0.0%) 108 ( 0.0%)
oracle.xml.parser.v2 XSLAttribute 5 ( 0.0%) 580 ( 0.0%)
oracle.xml.parser.v2 XSLCondition 5 ( 0.0%) 540 ( 0.0%)
oracle.xml.parser.v2 XSLExprValue 106 ( 0.3%) 4,664 ( 0.1%)
oracle.xml.parser.v2 XSLForEach 7 ( 0.0%) 756 ( 0.0%)
oracle.xml.parser.v2 XSLNode 2 ( 0.0%) 200 ( 0.0%)
oracle.xml.parser.v2 XSLNodeList 103 ( 0.2%) 1,236 ( 0.0%)
oracle.xml.parser.v2 XSLNodeSetExpr 2 ( 0.0%) 72 ( 0.0%)
oracle.xml.parser.v2 XSLOutput 1 ( 0.0%) 148 ( 0.0%)
oracle.xml.parser.v2 XSLResultElement 87 ( 0.2%) 10,092 ( 0.1%)
oracle.xml.parser.v2 XSLStylesheet 1 ( 0.0%) 172 ( 0.0%)
oracle.xml.parser.v2 XSLTemplate 3 ( 0.0%) 540 ( 0.0%)
oracle.xml.parser.v2 XSLValueOf 6 ( 0.0%) 648 ( 0.0%)
oracle.xml.parser.v2 XSLVariable 23 ( 0.1%) 2,852 ( 0.0%)
oracle.xml.xsql XSQLConfigManager 1 ( 0.0%) 100 ( 0.0%)
oracle.xml.xsql XSQLConnectionManagerFactoryImpl 1 ( 0.0%) 4 ( 0.0%)
oracle.xml.xsql XSQLLRUCache 2 ( 0.0%) 40 ( 0.0%)
oracle.xml.xsql XSQLLRUCache$LRUNode 2 ( 0.0%) 40 ( 0.0%)
oracle.xml.xsql XSQLNamedConnection 9 ( 0.0%) 180 ( 0.0%)
oracle.xml.xsql XSQLPage 1 ( 0.0%) 12 ( 0.0%)
oracle.xml.xsql XSQLPageManager 1 ( 0.0%) 4 ( 0.0%)
oracle.xml.xsql XSQLStylesheet 1 ( 0.0%) 20 ( 0.0%)
oracle.xml.xsql XSQLStylesheetManager 1 ( 0.0%) 4 ( 0.0%)
oracle.xml.xsql XSQLStylesheetPool 1 ( 0.0%) 52 ( 0.0%)Also, please note what exact version of Oracle XDK for Java you are using. You can find this out (if you're not sure) by doing:
System.out.println(DOMParser.getReleaseVersion()); -
XSLProcessor limitation problem
Setup: I have an XSL stylesheet that I use to convert an XML document (result of an SQL query) in Oracle 8i with the XDK of 9.2.0.2.0. I use a PL/SQL procedure to access the XSU functions. I test the PL/SQL procedure from SQL*Plus. It is a Windows 2000 computer with gigabytes of free disk and 512 MB memory.
My procedure uses CLOBs for storing the query, the original XML document, and the XML document that is the result of the conversion.
I convert some XML elements to attributes.
Problem: The XSL processor hangs with the memory consumption rocketing to the sky when I add one more attribute conversion to the XSL stylesheet. It does not matter which one. Any three of my four attribute conversions in the same template generates proper output in a second. All four of them send the procedure into infinite loop.
Here is the template:
<xsl:template match="OPER_ROW">
<Operation>
<xsl:attribute name="opernbr">
<xsl:value-of select="opernbr"/>
</xsl:attribute>
<xsl:attribute name="revnbr">
<xsl:value-of select="revnbr"/>
</xsl:attribute>
<xsl:attribute name="change">
<xsl:value-of select="change"/>
</xsl:attribute>
<xsl:attribute name="object_seqno">
<xsl:value-of select="OBJECTTABLEATT/OBJECTTABLEATT_ROW/object_seqno"/>
</xsl:attribute>
<xsl:apply-templates select="OPEROBJECTLIST"/>
</Operation>
</xsl:template>
I even changed the Java pool size of the database from 20MB to 30MB without any improvement.
Let me know if there is any remedy.
KatiWhat Application Server you are using?
I have samilar problem with you, I'm using Jrun Application Server.
When using JSP only, the response time is less than 1 second but If using XML+XSL using XDK, it take about 5 second to display.
I have added timestamp to each process including generate data from DB, generate XML, parse XML,XSL and ProcessXSL. Each process take less than 50ms.
So I think the delay is cause by the Application Server / Web Server instead.
Did anyone know is there any problem of JRun using taglib plus XDK? -
Problem with xslprocessor.newStylesheet
I try to import a XML file with a XSL file to treat the out
result. The out result is like insert into toto values
(...,...,....). In internet explorer the result is good with my
XML and XSL file.
When i execute the function xslprocessor.newStylesheet i get
this error message:
ORA-20100: Error occurred while processing: XSL-1009:
Attribute 'xsl:version
not found in 'xsl:stylesheet'.
ORA-06512: ` "SYS.XSLPROCESSOR", ligne 22
ORA-06512: ` "SYS.XSLPROCESSOR", ligne 346
ORA-06512: ` ligne 70
I tried to write xsl:version='1.0' in the tag 'xsl:stylesheet'
in xsl file and i get the same errors.
I am a newbies in Oracle with XML, so all help we'll be wellcome.
PS: I have read a lot of faq. So i tried to see where i could by
the Muench's Book, but i am in france and this book will be in
sold during the middle of the next month.XDB Issues (including use of the DBMS_XML.. packages) are best discussed here
XML DB
You probably need to use htttpuritype to get the Stylesheet. In general this is conidered bad practive due to the dangers of spoofing etc. -
Greetings,
I am trying to develop a PLSQL function that, given the URL of a XML file, it returns a HTML file through a prepared XLS file
So far, the test procedure to check if the function is working ends with a ORA-20103: Null input is not allowed error.
Function is as follows:
FUNCTION translate_XML(path_xml VARCHAR2, path_xsl VARCHAR2) RETURN CLOB IS
v_return CLOB;
v_processor SYS.XSLPROCESSOR.PROCESSOR;
v_style SYS.XSLPROCESSOR.STYLESHEET;
v_xmldom SYS.XMLDOM.DOMDOCUMENT;
BEGIN
v_xmldom := SYS.XMLPARSER.PARSE(path_xml);
v_style := SYS.XSLPROCESSOR.NEWSTYLESHEET(path_xsl, NULL);
v_processor := SYS.XSLPROCESSOR.NEWPROCESSOR;
SYS.XSLPROCESSOR.PROCESSXSL(v_processor, v_style, v_xmldom, v_return);
RETURN v_return;
EXCEPTION
when others then
sys.xslprocessor.freeprocessor(v_processor);
raise;
END;
could anyone point me in the right direction, please?First, try resetting the iPod.
http://support.apple.com/kb/HT1320
If that does not work, you should probably use the Restore button in iTunes to erase the iPod and initialize its software. Then sync everything back, videos and music.
FYI - It's a 5th Gen iPod. -
I have following code to process XML with XSLT processor. I am getting no output. Is anything wrong with code ?
Please help,
Arun
begin
xml_clob clob;
xsl_clob clob;
buffer VARCHAR2(4000) := NULL;
p Xmlparser.Parser;
Xml_doc Xmldom.DOMDocument;
xmldocnode Xmldom.DOMNode;
proc Xslprocessor.Processor;
ss Xslprocessor.Stylesheet;
xsldoc Xmldom.DOMDocument;
docfrag Xmldom.DOMDocumentFragment;
docfragnode Xmldom.DOMNode;
xslelem Xmldom.DOMElement;
xslcmds Xmldom.DOMNodeList;
BEGIN
SELECT detaildata INTO xml_clob FROM adam.userdata
WHERE userid = 50667;
SELECT xsldata INTO xsl_clob FROM adam.usertemplate
WHERE usertemplateid = 12;
p := Xmlparser.newParser;
Xmlparser.setValidationMode(p, FALSE);
-- Parse XMLDOC
Xmlparser.parseclob(p, xml_clob);
Xml_doc := Xmlparser.getDocument(p);
-- Parse SS
Xmlparser.parseclob(p, xsl_clob);
xsldoc := Xmlparser.getDocument(p);
-- make stylesheet
proc := Xslprocessor.newProcessor;
ss := Xslprocessor.newStylesheet(xsldoc, 'http://www.w3.org/TR/WD-xsl');
-- process xsl
docfrag := Xslprocessor.processXSL(proc, ss, Xml_doc);
docfragnode := Xmldom.makeNode(docfrag);
Xmldom.writeTobuffer(docfragnode, buffer);
dbms_output.put_line(SUBSTR(buffer,1,200));
Xmlparser.freeparser(p);
END;nullWould you try to print out the result to buffer directly by:
xslprocessor.processXSL(proc,ss,xmldoc,resbuf);
null -
Problem when rendering a report in BI Publisher deployed on Apache Tomcat
Hello for all.
First, I am going to tell you technical specifications about the software where I have deployed BI Publisher:
1. OS: Windows XP SP3
2. JDK and JRE: 1.6.0_24
3. Apache Tomcat: 5.5.33 (Set JVM Max Memory in 768MB)
4. BI Publisher EE: 10.1.3.4.1
I have deployed BI Publisher on Apache Tomcat without any problem, I uploaded Report files (both XDO and RTF), and I can see the reports in XML output format, but when I try to see the reports rendered by using the rtf file I have configured, BI Publisher shows me an Error; I checked the Apache Tomcat log and the following error is reported:
[042511_033325984][oracle.apps.xdo.common.xml.XSLTWrapper][ERROR] XSL error:
<Line 3, Column 123>: XML-22002: (Fatal Error) Error while processing include XSL file (rtf2xsl://http_//localhost:8080/xmlpserver/SubTemplates/sub-template-parameters.rtf?sid=1&eaf=3).
<Line 296, Column 18>: XML-22000: (Error) Error while parsing XSL file (null).
[042511_033325984][oracle.apps.xdo.template.FOProcessor][ERROR] End Memory: max=247MB, total=44MB, free=15MB
[042511_033325984][][EXCEPTION] java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
at oracle.apps.xdo.common.xml.XSLTWrapper.transform(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.createFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.generate(Unknown Source)
at oracle.apps.xdo.servlet.RTFCoreProcessor.transform(RTFCoreProcessor.java:91)
at oracle.apps.xdo.servlet.CoreProcessor.process(CoreProcessor.java:276)
at oracle.apps.xdo.servlet.CoreProcessor.generateDocument(CoreProcessor.java:82)
at oracle.apps.xdo.servlet.ReportImpl.renderBodyHTTP(ReportImpl.java:552)
at oracle.apps.xdo.servlet.ReportImpl.renderReportBodyHTTP(ReportImpl.java:255)
at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:270)
at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:250)
at oracle.apps.xdo.servlet.XDOServlet.doGet(XDOServlet.java:178)
at oracle.apps.xdo.servlet.XDOServlet.doPost(XDOServlet.java:201)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)
Caused by: java.util.EmptyStackException
at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)
... 39 more
[042511_033325984][][EXCEPTION] java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
at oracle.apps.xdo.common.xml.XSLTWrapper.transform(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.createFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.generate(Unknown Source)
at oracle.apps.xdo.servlet.RTFCoreProcessor.transform(RTFCoreProcessor.java:91)
at oracle.apps.xdo.servlet.CoreProcessor.process(CoreProcessor.java:276)
at oracle.apps.xdo.servlet.CoreProcessor.generateDocument(CoreProcessor.java:82)
at oracle.apps.xdo.servlet.ReportImpl.renderBodyHTTP(ReportImpl.java:552)
at oracle.apps.xdo.servlet.ReportImpl.renderReportBodyHTTP(ReportImpl.java:255)
at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:270)
at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:250)
at oracle.apps.xdo.servlet.XDOServlet.doGet(XDOServlet.java:178)
at oracle.apps.xdo.servlet.XDOServlet.doPost(XDOServlet.java:201)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)
Caused by: java.util.EmptyStackException
at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)
... 39 more
I checked that the url http://localhost:8080/xmlpserver/SubTemplates/sub-template-parameters.rtf would be accesible via Internet Explorer, and It is accesible.
I am glad if you can tell me what could be the cause of the error.
Thanks.Finally, I stop working in the implementation of BIP over Apache Tomcat; I installed OC4J 10.1.3.5.0 (standalone installation) and I deployed BIP on it.
It seems the error I wrote in last post has been fixed, but actually I am obtaining the following error with the deployment on OC4J:
[042711_055706687][][ERROR] Namespace 'http://www.oracle.com/XSL/Transform/java/
oracle.com.xmlpublisher.reports.BIPExtension' failed Secure Java Extensions chec
k.
[042711_055706687][oracle.apps.xdo.template.FOProcessor][ERROR] End Memory: max=
494MB, total=46MB, free=21MB
[042711_055706687][][EXCEPTION] oracle.apps.xdo.XDOException: XSLT10gR1: Failed
Secure Java Extensions check.
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
at oracle.apps.xdo.common.xml.XSLTWrapper.transform(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.createFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.generate(Unknown Source)
at oracle.apps.xdo.servlet.RTFCoreProcessor.transform(RTFCoreProcessor.j
ava:91)
at oracle.apps.xdo.servlet.CoreProcessor.process(CoreProcessor.java:276)
at oracle.apps.xdo.servlet.CoreProcessor.generateDocument(CoreProcessor.
java:82)
at oracle.apps.xdo.servlet.ReportImpl.renderBodyHTTP(ReportImpl.java:552
at oracle.apps.xdo.servlet.ReportImpl.renderReportBodyHTTP(ReportImpl.ja
va:255)
at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:270)
at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:250)
at oracle.apps.xdo.servlet.XDOServlet.doGet(XDOServlet.java:178)
at oracle.apps.xdo.servlet.XDOServlet.doPost(XDOServlet.java:201)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterC
hain.java:64)
at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilt
er.java:94)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletReque
stDispatcher.java:644)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Ser
vletRequestDispatcher.java:391)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequ
estHandler.java:908)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques
tHandler.java:458)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpReque
stHandler.java:226)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:127)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:116)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSo
cketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Relea
sableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:662)
[042711_055706687][][EXCEPTION] oracle.apps.xdo.XDOException: XSLT10gR1: Failed
Secure Java Extensions check.
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
at oracle.apps.xdo.common.xml.XSLTWrapper.transform(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.createFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.generate(Unknown Source)
at oracle.apps.xdo.servlet.RTFCoreProcessor.transform(RTFCoreProcessor.j
ava:91)
at oracle.apps.xdo.servlet.CoreProcessor.process(CoreProcessor.java:276)
at oracle.apps.xdo.servlet.CoreProcessor.generateDocument(CoreProcessor.
java:82)
at oracle.apps.xdo.servlet.ReportImpl.renderBodyHTTP(ReportImpl.java:552
at oracle.apps.xdo.servlet.ReportImpl.renderReportBodyHTTP(ReportImpl.ja
va:255)
at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:270)
at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:250)
at oracle.apps.xdo.servlet.XDOServlet.doGet(XDOServlet.java:178)
at oracle.apps.xdo.servlet.XDOServlet.doPost(XDOServlet.java:201)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterC
hain.java:64)
at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilt
er.java:94)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletReque
stDispatcher.java:644)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Ser
vletRequestDispatcher.java:391)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequ
estHandler.java:908)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques
tHandler.java:458)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpReque
stHandler.java:226)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:127)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:116)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSo
cketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Relea
sableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:662)
May you know the cause of the error above?
Thanks, -
Problem with extended SQL functions in RTF Template
Hello,
I'm new to BI Publisher and I'm trying to create a new rtf template. I've created my layout and added fields without any problems, but I'm having trouble trying to insert calculations such as add,substract,multiply,divide, etc.
Here is an example of what I'm trying to do:
<?xdofx:STAFF_ASMT+100?>
Where STAFF_ASMT is one of my fields. When I add this function all I get is the actual value from that field returned on the first page, and then on other pages I get the value plus an extra zero.
So with my example data below I get: 6600 on page 1 and 51830 on page 2. Any ideas on what I'm doing wrong or if it is possible to do what I'm doing? Also, is it possible to add/substract/multiple two or more fields together?
Something like this: <?xdofx:STAFF_ASMT+GROSS_INV?>
I was going to add all of these functions to my SQL statement, but I have 30 or so calculations I want to perform in the layout and I don't want to have to write that all out in SQL.
<ROWSET>
<ROW>
<STAFF_ASMT>6600</STAFF_ASMT>
<GROSS_INV>0</GROSS_INV>
</ROW>
<ROW>
<STAFF_ASMT>5183</STAFF_ASMT>
<GROSS_INV>0</GROSS_INV>
</ROW>
</ROWSET>
Thanks for your helpWhen I tried that I get the following error message when I click the Validate Template option:
[080609_031631893][][ERROR] [Line 162.184] Incorrect XPath: +
And when I try to generate a PDF preview I get:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
at oracle.apps.xdo.common.xml.XSLTWrapper.transform(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.createFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.generate(Unknown Source)
at RTF2PDF.runRTFto(RTF2PDF.java:629)
at RTF2PDF.runXDO(RTF2PDF.java:439)
at RTF2PDF.main(RTF2PDF.java:289)
Caused by: oracle.xdo.parser.v2.XPathException: Error in expression: './/+'.
at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571) -
My company has made the decision to do all of our internal inter-system communication using XML. Often we may need to transfer thousands of records from one system to another and due to this (and the 32K limit in prior versions) we're implementing it in 11g. Currently we have Oracle 11g Enterprise Edition Release 11.1.0.6.0 on 64 bit Linux.
This is a completely network/memory setup - the XML data comes in using UTL_HTTP and is stored in a CLOB in memory and then converted to a DOMDocument variable and finally the relevant data is extracted using xslprocessor.valueof calls.
While this is working fine for smaller datasets, I've discovered that repeated calls with very large documents cause the xslprocessor to run out of memory with the following message:
ERROR at line 1:
ORA-04030: out of process memory when trying to allocate 21256 bytes
(qmxdContextEnc,)
ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 1010
ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 1036
ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 1044
ORA-06512: at "SCOTT.UTL_INTERFACE_PKG", line 206
ORA-06512: at line 28
Elapsed: 00:03:32.45
SQL>
From further testing, it appears that the failure occurs after approximately 161,500 calls to xslprocessor.valueof however I'm sure this is dependent on the amount of server memory available (6 GB in my case).
I expect that we will try and log a TAR on this, but my DBA is on vacation right now. Has anyone else tried calling the xslprocessor 200,000 times in a single session?
I've tried to make my test code as simple as possible in order to track down the problem. This first block simply iterates through all of our offices asking for all of the employees at that office (there are 140 offices in the table).
DECLARE
CURSOR c_offices IS
SELECT office_id
FROM offices
ORDER BY office_id;
r_offices C_OFFICES%ROWTYPE;
BEGIN
OPEN c_offices;
LOOP
FETCH c_offices INTO r_offices;
EXIT WHEN c_offices%NOTFOUND;
utl_interface_pkg.get_employees(r_offices.office_id);
END LOOP;
CLOSE c_offices;
END;
Normally I'd be returning a collection of result data from this procedure, however I'm trying to make things as simple as possible and make sure I'm not causing the memory leak myself.
Below is what makes the SOAP calls (using the widely circulated UTL_SOAP_API) to get our data and then extracts the relevant parts. Each office (call) should return between 200 and 1200 employee records.
PROCEDURE get_employees (p_office_id IN VARCHAR2)
l_request utl_soap_api.t_request;
l_response utl_soap_api.t_response;
l_data_clob CLOB;
l_xml_namespace VARCHAR2(100) := 'xmlns="' || G_XMLNS_PREFIX || 'EMP.wsGetEmployees"';
l_xml_doc xmldom.DOMDocument;
l_node_list xmldom.DOMNodeList;
l_node xmldom.DOMNode;
parser xmlparser.Parser;
l_emp_id NUMBER;
l_emp_first_name VARCHAR2(100);
l_emp_last_name VARCHAR2(100);
BEGIN
--Set our authentication information.
utl_soap_api.set_proxy_authentication(p_username => G_AUTH_USER, p_password => G_AUTH_PASS);
l_request := utl_soap_api.new_request(p_method => 'wsGetEmployees',
p_namespace => l_xml_namespace);
utl_soap_api.add_parameter(p_request => l_request,
p_name => 'officeId',
p_type => 'xsd:string',
p_value => p_office_id);
l_response := utl_soap_api.invoke(p_request => l_request,
p_url => G_SOAP_URL,
p_action => 'wsGetEmployees');
dbms_lob.createtemporary(l_data_clob, cache=>FALSE);
l_data_clob := utl_soap_api.get_return_clob_value(p_response => l_response,
p_name => '*',
p_namespace => l_xml_namespace);
l_data_clob := DBMS_XMLGEN.CONVERT(l_data_clob, 1); --Storing in CLOB converted symbols (<">) into escaped values (<, &qt;, >). We need to CONVERT them back.
parser := xmlparser.newParser;
xmlparser.parseClob(parser, l_data_clob);
dbms_lob.freetemporary(l_data_clob);
l_xml_doc := xmlparser.getDocument(parser);
xmlparser.freeparser(parser);
l_node_list := xslprocessor.selectNodes(xmldom.makeNode(l_xml_doc),'/employees/employee');
FOR i_emp IN 0 .. (xmldom.getLength(l_node_list) - 1)
LOOP
l_node := xmldom.item(l_node_list, i_emp);
l_emp_id := dbms_xslprocessor.valueOf(l_node, 'EMPLOYEEID');
l_emp_first_name := dbms_xslprocessor.valueOf(l_node, 'FIRSTNAME');
l_emp_last_name := dbms_xslprocessor.valueOf(l_node, 'LASTNAME');
END LOOP;
xmldom.freeDocument(l_xml_doc);
END get_employees;
All of this works just fine for smaller result sets, or fewer iterations (only the first two or three offices). Even up to the point of failure the data is being extracted correctly - it just eventually runs out of memory. Is there any way to free up the xslprocessor? I've even tried issuing DBMS_SESSION.FREE_UNUSED_USER_MEMORY but it makes no difference.Replying to both of you -
Line 206 is the first call to xslprocessor.valueof:
LINE TEXT
206 l_emp_id := dbms_xslprocessor.valueOf(l_node, 'EMPLOYEEID');
This is one function inside of a larger package (the UTL_INTERFACE_PKG). The package is just a grouping of these functions - one for each type of SOAP interface we're using. None of the others exhibited this problem, but then none of them return anywhere near this much data either.
Here is the contents of V$TEMPORARY_LOBS immediately after the crash:
SID CACHE_LOBS NOCACHE_LOBS ABSTRACT_LOBS
132 0 0 0
148 19 1 0
SID 132 is a SYS session and SID 148 is mine.
I've discovered with further testing that if I comment out all of the xslprocessor.valueof calls except for the first one the code will complete successfully. It executes the valueof call 99,463 times. If I then uncomment one of those additional calls, we double the number of executions to a theoretical 198,926 (which is greater than the 161,500 point where it usually crashes) and it runs out of memory again. -
APEX 4.1 - APACHE FOP PDF generation problem.
Hi all,
I'm having problem with PDF generation using APACH FOP on OC4J.
When I test my print server as described here:
http://marcsewtz.blogspot.com/2008/06/heres-another-posting-on-pdf-printing.html
everything works without problem. But when I upload my Layout to APEX and try to generate PDF from apex I'm getting error:
oracle.xml.parser.v2.XMLParseException: Unexpected EOF.
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)
at oracle.xml.parser.v2.XMLReader.popXMLReader(XMLReader.java:549)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1375)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:362)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:308)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:337)
at oracle.xml.xslt.XSLProcessor.newXSLStylesheet(XSLProcessor.java:714)
at oracle.xml.xslt.XSLStylesheet.<init>(XSLStylesheet.java:322)
at oracle.xml.parser.v2.XSLStylesheet.<init>(XSLStylesheet.java:114)
at apex_fop._jspService(_apex__fop.java:71)
[SRC:/apex_fop.jsp:21]
I could see similar post here:
Handling Special characters in call to apex_util.download_print_document
But it doesn't explain my case as it's crashing even when I generate empty pdf(no data so no special characters, only empty XML file with no data should be sent to print server)
Is there any way to see what xml is sent do print server for processing? That could eventually show where is a problem.
PaloMy mistake, there was really an "&" character in my template. now when I replaced it with %26 it works.
However I would be still interested if there is a way to see what data is APEX engine sending to print server cause it will help me to find this kind of errors.
Palo -
Dbms_xslprocessor package problems in PL/SQL
Hi all :)
I was wondering if anyone has any ideas about this problem I'm having:
When using the dbms_xslprocessor in PL/SQL, I consistently get dropped connections when trying to either transform a document, or search a document via XPath. So, for instance, if I call dbms_xslprocessor.selectSingleNode('XPATH'), the connection will drop out with the following error (I'm calling a stored procedure here):
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Similar problems happen on XMLType.transform(stylesheet).
I've only managed to have this happen when transforming or searching documents that are not in the default (i.e., xmlns="") namespace, but I can't get rid of the namespace (too much other code is relying on it being there).
What's even stranger is that the XSLPROCESSOR package works, but DBMS_XSLPROCESSOR package does not. Unfortunately, the XSLPROCESSOR package doesn't seem to handle namespaces well, and inserts seemingly random namespace declarations in the transformation results (for instance, on the root element, it puts in "xmlns:xmlns='http://www.w3.org/2000/xmlns/'") or redeclares namespaces on nodes that already have that namespace defined for them by their parents. Namespace prefixes, too.
Does anybody have any ideas as to what this might be?
Thanks in advance,
ConstantineI should also mention that I'm ABSOLUTELY sure that the stylesheets I'm using for transformation are correct as of XSLT ver. 1.0 -- multiple external processors (Xalan and MSXML, specifically) give the correct result on the same stylesheet.
-
Dbms_xslprocessor problems in PL/SQL
Hi all :)
-- This is a cross-posting of a question I placed on the XMLDB forum, but there seems to be more activity here
-- Sorry about the duplicate
I was wondering if anyone has any ideas about this problem I'm having:
When using the dbms_xslprocessor in PL/SQL, I consistently get dropped connections when trying to either transform a document, or search a document via XPath. So, for instance, if I call dbms_xslprocessor.selectSingleNode('XPATH'), the connection will drop out with the following error (I'm calling a stored procedure here):
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Similar problems happen on XMLType.transform(stylesheet).
I've only managed to have this happen when transforming or searching documents that are not in the default (i.e., xmlns="") namespace, but I can't get rid of the namespace (too much other code is relying on it being there).
What's even stranger is that the XSLPROCESSOR package works, but DBMS_XSLPROCESSOR package does not. Unfortunately, the XSLPROCESSOR package doesn't seem to handle namespaces well, and inserts seemingly random namespace declarations in the transformation results (for instance, on the root element, it puts in "xmlns:xmlns='http://www.w3.org/2000/xmlns/'") or redeclares namespaces on nodes that already have that namespace defined for them by their parents. Namespace prefixes, too.
I should mention that I'm absolutely sure the stylesheet is correct. External processors like MSXML and Xalan produce correct results.
Does anybody have any ideas as to what this might be?
Thanks in advance,
Constantinewhat version of the XDK are you using ?
Version of the javaparser ? -
Problems with FOP/Apache - Apex PDF printing
Hello,
I have configured
Apex 3.0.1
iAS 10.1.3.x (http + modplsql)
OC4J 10.1.3.3 (stand alone)
FOP for PDF printing
RDBMS 9.2.0.8 64bits (Solaris)
following the OTN recipee and this setup does not seem to work for all cases.
For instance, using the Apex admin interface, I go to the monitoring page :
Home -> Monitor Page -> Login Attempts
And click on the Print link (left bottom corner of the page) , it works o.k, the PDF is generated correctly.
However, if I go to
Home -> utilities -> Object Reports -> Table Storage Sizes
and click on the Print link, it does not work. A pdf file is generated with the following text
<HTML><HEAD><TITLE>500 Internal Server Error</TITLE></HEAD>
<BODY><H1>500 Internal Server Error</H1>
<PRE>Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.</PRE>
</BODY>
</HTML>
If I check in the application log I see the following error
07/08/08 11:52:21.584 fop: Servlet error
oracle.xml.xpath.XPathException: Error in expression: './/BYTES/1024/1024'.
at oracle.xml.xslt.XSLBuilder.startElement(XSLBuilder.java:468)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:320)
at oracle.xml.xslt.XSLProcessor.newXSLStylesheet(XSLProcessor.java:712)
at oracle.xml.xslt.XSLStylesheet.<init>(XSLStylesheet.java:321)
at oracle.xml.parser.v2.XSLStylesheet.<init>(XSLStylesheet.java:114)
at apex_fop._jspService(_apex__fop.java:71)
at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
at java.lang.Thread.run(Thread.java:595)
I do not think it is related to a config/installation issue. It seems a parsing issue with the SQL stmt being executed, but it works for some SQL code and not for other.
Some users did notice this problem this morning when testing the new PDF printing.
Any ideas ?
Nilo Segura
CERN.ups.. sorry for the ugly formatting exercise...
-
Hi,
I have problems when printing the result of processing XML with an XSL that contains locale specific chars.
Here is a sample:
XML :
<?xml version="1.0" encoding="ISO-8859-1"?>
<ListePatients>
<Patient>
<Nom>Zeublouse</Nom>
<NomMarital/>
<Prinom>Agathe</Prinom>
</Patient>
<Patient>
<Nom>Stick</Nom>
<NomMarital>Laiboul</NomMarital>
<Prinom>Ella</Prinom>
</Patient>
<Patient>
<Nom>`ihnotvy</Nom>
<NomMarital/>
<Prinom>Jacques</Prinom>
</Patient>
</ListePatients>
XSL :
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="*|/"><xsl:apply-templates/></xsl:template>
<xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>
<xsl:template match="/">
<HTML>
<HEAD>
<META http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
<TITLE>Liste de patients</TITLE>
</HEAD>
<BODY>
<xsl:apply-templates select='ListePatients'/>
</BODY>
</HTML>
</xsl:template>
<xsl:template match='ListePatients'>
<TABLE>
<xsl:for-each select='Patient'>
<xsl:sort select='Nom' order='ascending' data-type='text'/>
<TR TITLE='`ihnotvy'>
<TD> <xsl:value-of select='Nom'/> </TD>
<TD> <xsl:value-of select='NomMarital'/> </TD>
<TD> <xsl:value-of select='Prinom'/> </TD>
</TR>
</xsl:for-each>
</TABLE>
</xsl:template>
</xsl:stylesheet>
Test program (from Oracle sample) :
import java.net.URL;
import java.io.*;
import oracle.xml.parser.v2.DOMParser;
import oracle.xml.parser.v2.XMLDocument;
import oracle.xml.parser.v2.XMLDocumentFragment;
import oracle.xml.parser.v2.XSLStylesheet;
import oracle.xml.parser.v2.XSLProcessor;
public class XSLSampleOTN
* Transforms an xml document using a stylesheet
* @param args input xml and xml documents
public static void main (String args[]) throws Exception
DOMParser parser;
XMLDocument xmldoc, xsldoc, out;
URL xslURL;
URL xmlURL;
try
if (args.length != 2)
// Must pass in the names of the XSL and XML files
System.err.println("Usage: java XSLSampleOTN xslfile xmlfile");
System.exit(1);
// Parse xsl and xml documents
parser = new DOMParser();
parser.setPreserveWhitespace(true);
// parser input XSL file
xslURL = DemoUtil.createURL(args[0]);
parser.parse(xslURL);
xsldoc = parser.getDocument();
// parser input XML file
xmlURL = DemoUtil.createURL(args[1]);
parser.parse(xmlURL);
xmldoc = parser.getDocument();
// instantiate a stylesheet
XSLStylesheet xslSS = new XSLStylesheet(xsldoc, xslURL);
XSLProcessor processor = new XSLProcessor();
// display any warnings that may occur
processor.showWarnings(true);
processor.setErrorStream(System.err);
// Process XSL
XMLDocumentFragment result = processor.processXSL(xslSS, xmldoc);
// print the transformed document
result.print(System.out);
// an other way to print, it doesn't print the same !!!!
processor.processXSL(xslSS, xmldoc, System.out);
catch (Exception e)
e.printStackTrace();
When printing the transformed document with DocumentFragment.print() it work fine but when using processXSL(xslSS, xmldoc, System.out) it don't works for locale specific chars and a second <META> balise appears, Why ?
with DocumentFragment.print(), it's Ok :
<HTML>
<HEAD>
<META http-equiv="Content-Type"
content="text/html; charset=iso-8859-1"/>
<TITLE>Liste de patients</TITLE>
</HEAD>
<BODY>
<TABLE>
<TR TITLE="`ihnotvy">
<TD>`ihnotvy</TD>
<TD/>
<TD>Jacques</TD>
</TR >
<TR TITLE="`ihnotvy">
<TD>Stick</TD>
<TD>Laiboul</TD>
<TD>Ella</TD>
</TR>
<TR TITLE="`ihnotvy">
<TD>Zeublouse
</TD>
<TD/>
<TD>Agathe</TD>
</TR>
</TABLE>
</BODY>
</HTML>
With processXSL(xslSS, xmldoc, System.out), it's not Ok :
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html">
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>Liste de patients</TITLE>
</HEAD>
<BODY>
<TABLE>
<TR TITLE="C C)C(C.C/C4C6C9">
<TD>C C)C(C.C/C4C6C9</TD>
<TD></TD>
<TD>Jacques</TD>
</TR>
<TR TITLE="C C)C(C.C/C4C6C9">
<TD>Stick</TD>
<TD>Laiboul</TD>
<TD>Ella</TD>
</TR>
<TR TITLE="C C)C(C.C/C4C6C9">
<TD>Zeublouse</TD>
<TD></TD>
<TD>Agathe</TD>
</TR>
</TABLE>
</BODY>
</HTML>
TIA
Didier
nullTwo other problems with XSL and print:
first one :
XSL :
<SCRIPT langage="Javascript" type="text/javascript" src="scripts/erreur.js"></SCRIPT>
DocumentFragment.print() produce :
<SCRIPT langage="Javascript" type="text/javascript" src="scripts/erreur.js"/>
=> IE5.5 don't load the file !!, it required syntaxe like <SCRIPT ...></SCRIPT> to load.
the second one :
XSL:
<TD><IMG src="images/menuleft.gif"/></TD>
DocumentFragment.print() produce :
<TD>
<IMG src="images/menuleft.gif">
</TD>
processXSL(xslSS, xmldoc, System.out) produce :
<TD><IMG src="images/menuleft.gif">
</TD>
Why a cariage return ?? it cause prisentation failure when you want to specifie the size off the cell !!
TIA
Didier
null
Maybe you are looking for
-
Hi, I was trying to get an explain plan for below query. (Refer - A) BILL_DETAIL table have index of ZONECODE,MRNO,AREACODE,WCNO but still it's showing 'TABLE ACCESS FULL in BILL_DETAIL' If i select only first 4 column, it is going by index. (REFER -
-
Hi All, This is regarding Invoice Split...from VF06 Tcode. We are trying to generate Invoice from Delivery using VF06. But Invoice is splitting at item level. We tried to debug the routines for 003 & 007 as well for copy control.. But while executin
-
Hi all, I looked at old messages, but couldnt really find an answer in recent subjects. I had my website in HTML before, and it was pretty high indexed in all the search engines. Now I moved exactly the same information into a flex application and it
-
Can't update oracle Long data type
Hi All, Setup Weblogic 5.1.0sp11, oracle 8.1.6, Solaris8, classes12.zip, Solaris_JDK_1.2.1_03a ConnectionPool: weblogic.jdbc.connectionPool.XXXDBPool=\ url=jdbc:oracle:thin:@10.2.30.50:1521:ZZZZ,\ driver=oracle.jdbc.driver.OracleDriver,\...etc Proble
-
I'm new with a BlackBerry Curve 8520. I came from a "standard" non-smart cellphone where I could play "music" over most Bluetooth earpieces / headphones. Now it seems that only stereo Bluetooth headphones will allow music to be played over Bluetoo