NoSuchMethodError in XSL Transformation

I am trying to run this piece of code to transform an xml file to html.
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document docData = builder.parse("orders.xml");
DOMSource sourceDom = new DOMSource(docData.getDocumentElement());
Document docResult = builder.newDocument();
Result resultDom = new DOMResult(docResult);
//stylesheet
Source srcStyle = new StreamSource("Orders.xsl");
TransformerFactory transFactory = TransformerFactory.newInstance();
Transformer transformer = transFactory.newTransformer(srcStyle);
// This is the line giving the error
transformer.transform(sourceDom, new StreamResult(System.out));
I get the following error :
java.lang.NoSuchMethodError
     at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.addNode(DOM2DTM.java:262)
     at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.<init>(DOM2DTM.java:151)
     at org.apache.xml.dtm.ref.DTMManagerDefault.getDTM(DTMManagerDefault.java:189)
     at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:630)
     at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1088)
     at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1066)
     at tryJavaXml.main(tryJavaXml.java:42)

I already fixed this one..but thanks all the same..n yes, the classpath contained references to jars used by Weblogic which in turn contained the same class files. Removing these from the classpath solved the problem..

Similar Messages

  • XSL transformation with xsl:import generates exceptions

    I am using the Schematron's basic XSL file basic-schematron.xsl to validate the XML format of one of our data files. The XSL file looks something like this
    ================
    <xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias">
    <xsl:import href="skeleton1-5.xsl"/>
    <xsl:template name="process-prolog">
    <axsl:output method="text" />
    </xsl:template>
    ==================
    But, the validation fails while trying to run the transformation on my Schematron input file using this basic-schematron.xsl with java.lang.NoSuchMethodError:
    ======= OUTPUT ============
    Markup Error: no match attribute on <key> outside <rule>
    Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: GregorSamsa.process$dash$root(Lcom/sun/org/apache/xalan/internal/xsltc/DOM;Lcom/sun/org/apache/xml/internal/dtm/DTMAxisIterator;Lcom/sun/org/apache/xml/internal/serializer/SerializationHandler;ILjava/lang/Object;)V
         at GregorSamsa.applyTemplates()
         at GregorSamsa.applyTemplates()
         at GregorSamsa.transform()
         at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:594)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:640)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:279)
         at com.solipsa.xsdvalidator.XSDValidator.validateSchematron(XSDValidator.java:137)
         at com.solipsa.xsdvalidator.XSDValidator.validate(XSDValidator.java:181)
         at com.solipsa.xsdvalidator.XSDValidatorUI.jButton1ActionPerformed(XSDValidatorUI.java:244)
         at com.solipsa.xsdvalidator.XSDValidatorUI.access$300(XSDValidatorUI.java:21)
         at com.solipsa.xsdvalidator.XSDValidatorUI$4.actionPerformed(XSDValidatorUI.java:140)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1766)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    ============= OUTPUT ==============
    I tried the individual JAXP 1.3 for J2SDK 1.4.2 (Using the -Djava.endorsed.dirs JVM param) and tried the JDK 1.5.0_02 which has JAXP 1.3 inbuilt and they all fail.
    I tried the above with separate Xalan/Xerces jar files, and then it works fine.
    The problem seems to be somthing specific to the JAXP 1.3 environment. I can provide more details, if required. Any help is highly appreciated.

    One morning your code woke up and found it had been transformed into a giant insect.
    But seriously, here's the name of the method that doesn't exist:GregorSamsa.process$dash$rootIs GregorSamsa your class? Maybe your server has an old version of it which is missing that method? (Or: those $ signs look strange to me, maybe they are a mistranslation of some other character?)

  • Error: "... is not a table ..." XML not correctly interpreted after XSL-transformation. Table row quantity problem.

    Hey guys, this is one of my xml-elements:
    Jaspreet Sohi 12 18 Juliane Lenz 11 17 Sophie Charlotte Stender 10 15 Rosbeh Hamidzadeh Khayyat 12 17 Lion Stoldt 12 17 Mats Lucas Meincke 6 8 Bero Luke Vincent Ernst 6 8 Cedric Roth 6 8 Soner Cantay 6 8 The following XSL Transformation I use once for transforming all "m" tags and once in order to transform all "j" tags. Please imagine the CSL-code below to be duplicated exactly. Only the "jungs"-table-Tag is replaced by "mädchen" and all underscores _j are replace by _m. As well all "select="j[@..." parts are replaced by "select="m[@...". 1 2 3 The code is very easygoing I think and not difficult to understand. As I said, I use it twice - for both transformations. The very, extremely weird thing, my problem, is that one transformation works perfectly in InDesign and a table is created for all "kategorie"-tags (all is set within a for-each loop). But the second script does not work! I simply do not get this I can't understand it. I've tried more than anything. InDesign sais (in German, so translated based on assumption) "jungs is an invalid table element or is displayed in wrong order". The second strange thing is that I can replace my "aid:trows" attribute by any number, e.g. "10" and immediately the script works fine (as there are never more than 6 "j" tags in my XML so that never the table has more than 6 rows"). But it does not want to work correctly with the actual number, my variable "rows_j". These are my variables: They are all defined before the tables for m and j are created. So finally, why (the heck) is one table created and interpreted perfectly whereas the second - immediately following the first in the XSL.script as an EXACT copy of the first - results in an error? As i've already said, I've tried really everything. For example the script works also when one of the parts "" is randomly deleted from the script. Removing one of these parts directly makes the script working. Just one of my attempts to understand the thing but this has only shown that none of these parts "cell to end-for-each" includes an error. I'm really desperate and looking forward to being rescued by one of you geniuses :)

    Hah, No worries. The forum software is, well, different.
    What would be better, though, would be a sample ID file, any XSLT/XLT files you use, and a bit of data exactly as you have it (pre-transform state). ZIP it up, upload to say dropbox.com and feel free to send me a private message for the download link.
    Too many times there is something different between samples pasted into a post and the real thing that it is sometimes less useful time-wise. I'll keep it private, of course. Then we can communicate via PMs or email until we can (hopefully) arrive together at a solution, then post what that solution is in the forum to benefit others.
    Thank you, Mike

  • XSL Transformation breaks encoding declaration

    The first line in my XML:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    The first line in my XSL:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    Once I do the transformation, I end up with this in my XSL-FO
    file:
    <?xml version="1.0" encoding="ISO8859-1"?> where it
    should be ISO-8859-1.

    You need to watch out for the namespace in the source document:
    You can either specify the namespace and use it when locating paths in the source document (as below) or specify it as the default namespace.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
         version="1.0"
         xmlns:xalan="http://xml.apache.org/xslt"
         xmlns:n="http://sirius/xml/common">
    <xsl:template match="/">          
         <SiebelMessage IntObjectFormat="Siebel Hierarchical" IntObjectName="TBS2 OHS Reply" MessageType="Integration Object">
              <TBS2OHSReply>                    
                   <OrderEntry-Orders>                         
                        <BackOfficeErrorText><xsl:value-of select="n:OrderResponseComplex/n:RejectionReasonCode"/></BackOfficeErrorText>
                        <Status><xsl:value-of select="n:OrderResponseComplex/n:AcceptedIndicator"/></Status>
                   </OrderEntry-Orders>
              </TBS2OHSReply>
         </SiebelMessage>
    </xsl:template>
    </xsl:stylesheet>

  • XSL Transformation between arrays

    Dear all
    I create to XSD for my variables:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:ns="http://www.asre-andishe.com/Inspec/General"
    targetNamespace="http://www.asre-andishe.com/Inspec/General"
    elementFormDefault="qualified">
    <xsd:complexType name="AgentArrayType">
    <xsd:sequence>
    <xsd:element name="Agent" type="ns:AgentType" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="AgentType">
    <xsd:sequence>
    <xsd:element name="user" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="Agent" type="ns:AgentType"></xsd:element>
    <xsd:element name="AgentsArray" type="ns:AgentArrayType"></xsd:element>
    </xsd:schema>
    and the other one:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:ns="http://www.asre-andishe.com/Inspec/DetermineInspec/retrive/relam"
    targetNamespace="http://www.asre-andishe.com/Inspec/DetermineInspec/retrive/relam"
    elementFormDefault="qualified">
    <xsd:complexType name="RelamAgentType">
    <xsd:sequence>
    <xsd:element name="user" type="xsd:string" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="RelamAgents" type="ns:RelamAgentType"></xsd:element>
    </xsd:schema>
    I create two empty variable and then initialized the second variable
    <RelamAgents>
    <user>john</user>
    <user>david</user>
    <user>jack</user>
    </RelamAgents>
    after that i use a transformation XSL and the second variable has been filled without no problem.
    <AgentsArray>
    <ns0:Agent>
    <ns0:user>john</ns0:user>
    </ns0:Agent>
    <ns0:Agent>
    <ns0:user>david</ns0:user>
    </ns0:Agent>
    <ns0:Agent>
    <ns0:user>jack</ns0:user>
    </ns0:Agent>
    </AgentsArray>
    but when i fill the first variable by receiving the output parameter from a service call, the XSL transformation did not work at all and the second variable remains empty.
    I have checked the first variable and i am sure that it is not null and it has the same vale:
    <RelamAgents>
    <user>john</user>
    <user>david</user>
    <user>jack</user>
    </RelamAgents>
    Would anybody please help me with this problem?
    Thank you very much

    Hi,
    receiving the output parameter from a service call, the XSL transformation did not workNamespaces... Check the namespaces the service call is using and see if they match with the XSL is expecting...
    Cheers,
    Vlad

  • XSL Transformation error source

    I am using MII 12.0 and I am getting the following error in the log file:
    javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sap.engine.services.servlets_jsp.server.exceptions.WebIOException: An attempt to write after the stream had been closed.
    The problem is that I am not using and XSL transforms that I know of. What BLS action might generate this error other than the obvious XSL Transformation Action?
    Thanks.
    ...Sparks

    I found this thread:
    [Re: IDOC error|Re: IDOC error]
    Is your system set up to receive any idocs?
    Edited by: Christian Libich on Feb 8, 2010 10:00 PM

  • XSL Transformation failure

    Here is a sample of my code:
    I initially have one (non-null & valid - checked that !) node (dataNode). I need to do a XSL transformation on this one using an xsl (non-null & valid String). I can do manually the transform using a program such as XMLSpy and everything's fine !!!
    If I pass the initial Node to transform as a String to the following function it works fine:
    * Return the transformation of an XML through an XSL
    public static String getTransformedXML(String xmlSourceString, String xslSourceString) {
    StreamSource xmlSource;
    StreamSource xslSource;
    StreamResult xmlDestination;
    StringWriter sw;
    try {
    xmlSource = new StreamSource(new StringReader(xmlSourceString));
    xslSource = new StreamSource(new StringReader(xslSourceString));
    xmlDestination = new StreamResult(sw = new StringWriter());
    Transformer thisTransformer = tFactory.newTransformer(xslSource);
    thisTransformer.transform(xmlSource, xmlDestination);
    System.out.println("xxxxx = " + sw.getBuffer());
    return sw.getBuffer().toString();
    } catch (TransformerConfigurationException e) {
    System.out.println("TRANSFORMATION CONFIGURATION ERROR:" + e.getMessage());
    return null;
    } catch (TransformerException e) {
    System.out.println("TRANSFORMATION ERROR:" + e.getMessage());
    return null;
    But I CANNOT get working this code (instead of giving a String, I give a Node):
    * Return the transformation of an XML through an XSL
    public static Node getTransformedXML(Node xmlSourceNode, String xslSourceString) {
    DOMSource xmlSource;
    StreamSource xslSource;
    DOMResult xmlDestination;
    try {
    xmlSource = new DOMSource(xmlSourceNode);
    xslSource = new StreamSource(new StringReader(xslSourceString));
    xmlDestination = new DOMResult();
    Transformer thisTransformer = tFactory.newTransformer(xslSource);
    System.out.println("avant");
    thisTransformer.transform(xmlSource, xmlDestination); // HERE IS WHERE IT CRASHES !!!!
    System.out.println("apres");
    return xmlDestination.getNode();
    } catch (TransformerConfigurationException e) {
    System.out.println("TRANSFORMATION CONFIGURATION ERROR:" + e.getMessage());
    return null;
    } catch (TransformerException e) {
    System.out.println("TRANSFORMATION ERROR:" + e.getMessage());
    return null;
    While using this function, I'm receiving the DOM Exception 3
    TRANSFORMATION ERROR:org.apache.crimson.tree.DomEx: HIERARCHY_REQUEST_ERR : This node is not allowed here !
    Also, does someone knows a way to convert a Node in a String ??? I'd like just to be able to println a node in the form "<parentNode><node1>value</node1><node2>value</node2></parentNode>" for example.
    Please help !!!!
    Thanks a lot in advance to any Java/XML Guru for helping.
    Eg\\*

    Come on ... I cannot believe that nobody saw that before. Isn't there any java/dom guru in here ;-) ?
    Could it be a possibly a bug in the API ?
    Thank you very much.
    Eg\\*

  • XSL Transformation enconding problem?

    Hi everybody.
    I have a strange problem with JDev 9.0.2.829 concerning XSL Transformation:
    I just tried to make the step from JDev 3.2.3 to 9i, imported my existing project and set up JDev 9 for use with XalanJ2 and Xerces2. Everything works fine except:
    If I transform XML data to HTML that contains characters with an ASCII code >127 the whole string appears multiple times (2x or 3x) in the generated HTML.
    The data is read from an Oracle DB with UTF8 encoding, all my stylesheets and JSPs are UTF-8 encoded. JDev9 is set to use UTF-8 encoding.
    No compilation errors, no warnings.
    The same code and stylesheets work perfectly in JDev 3.2.3, deployed into Topmcat 4.0.4 and IBM WebSphere 3.5.4.
    What am I missing?
    Thanks in advance!
    Ralf Steppacher

    OK, I found the culprit.
    The JSPWriter is broken and produces the faulty output when fed with UTF-8 encoded character data. The problem disappears when all character data is buffered in a ByteArrayOutputStream first (without a special encodung schema given) and then written as a string through the JSPWriter.
    Ralf

  • XSL Transformation Design View

    Hello together,
    we find an issue with design view of xsl transformation. When we use the design view serveral configurations and mappings where edited and deleted. For example <xsl:stylesheet version="2.0" change to version="1.0" and the call of EBMHeader-Template was deleted.
    Has anybody the same problem? Our are everybody a "h a r d c o r e" coder and use the source view ;-)
    Greetings from Karlsruhe
    Marcel
    PS: It's a little bit tricky to show the design view. We must switch between diffent xslt to see the design.

    when you open the imported xsd in the browser, you do get a xsd shown up ?
    and when you download the xsd locally and validate it, it is valid?

  • XSL transformation with java binding

    Hi everyone!
    I am trying to implement na XSL transformation that uses java code binding.
    My XSL looks as follows:
    <i><xsl:stylesheet xmlns:myobj="java.lang.System"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xf="http://www.sapportals.com/wcm/app/xmlforms">
    <xsl:param name="myobj"/>
    <xsl:value-of select="string(myobj:currentTimeMillis())"/>
    </xsl:stylesheet></i>
    Everything works fine - current time is displayed.
    But when I try to use my custom java class the compiler returns an exception:
    <i>com.sapportals.wcm.WcmException: com.sap.engine.lib.xml.util.NestedException: Could not load class: ep.UmeLookup required for execution of 'UmeLookup.isReady'</i>
    My second xsl stytesheet with a reference to custom class looks as follows:
    <i><xsl:stylesheet xmlns:ume="ep.UmeLookup" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xf="http://www.sapportals.com/wcm/app/xmlforms">
    <xsl:param name="ume"/>
    <xsl:value-of select="string(ume:UmeLookup.isReady())"/>
    </xsl:stylesheet></i>
    I developed java class (ep.UmeLookup), made a .jar from it, included the jar archive in a Library project and deployed the library to the J2EE engine.
    It looks like my class is not 'visible' in J2EE engine, while in my opinion it should be. Does anyone know how to change that??
    BR / marek

    Ask this lady a question. Maybe she could answer your question.
    XSLT Mapping With JAVA Enhancement ( For Beginners)

  • XSL Transformation - cut asx:abap and asx:values

    Hey all,
    I'm using a XSL Transformation to create a XML-File from an internal table.
    My problem is, that the transformation automatically puts the two tags "<asx:abap xmlns:asx="http://www.sap.com/abapxml">" and "<asx:values>" at the beginning of my file (or string):
    <?xml version="1.0" encoding="iso-8859-1" ?>
    <asx:abap xmlns:asx="http://www.sap.com/abapxml">
    <asx:values>
    <ROOT>
    </ROOT>
    </asx:values>
    </asx:abap>
    Does anyone have any idea how I can easily suppress these lines?
    The best course would be of course an XSL statement.
    Thanks and regards,
    Martin.

    Will using a Simple Transformation help your case ?

  • XSL transformation never works on Websphere 5

    I'm doing a xsl transformation on websphere 5 and this xsl never finds the right values. When I run the exact same transformation with the same source, it finds all the values, but on the server it just return empty tags. Why? And how do I fix this?
    Source xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <n:OrderResponseComplex xmlns:n="http://sirius/xml/common">
         <n:AcceptedIndicator>Akseptert</n:AcceptedIndicator>
         <n:RejectionReasonCode>0</n:RejectionReasonCode>
    </n:OrderResponseComplex>XSL transformation:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xalan="http://xml.apache.org/xslt">
         <xsl:template match="/">
              <SiebelMessage IntObjectFormat="Siebel Hierarchical" IntObjectName="TBS2 OHS Reply" MessageType="Integration Object">
                   <TBS2OHSReply>
                        <OrderEntry-Orders>
                             <BackOfficeErrorText><xsl:value-of select="OrderResponseComplex/RejectionReasonCode"/></BackOfficeErrorText>
                             <Status><xsl:value-of select="OrderResponseComplex/AcceptedIndicator"/></Status>
                        </OrderEntry-Orders>
                   </TBS2OHSReply>
              </SiebelMessage>
         </xsl:template>
    </xsl:stylesheet>Result xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <SiebelMessage MessageType="Integration Object" IntObjectName="TBS2 OHS Reply" IntObjectFormat="Siebel Hierarchical">
         <TBS2OHSReply>
              <OrderEntry-Orders>
                   <BackOfficeErrorText/>
                   <Status/>
              </OrderEntry-Orders>
         </TBS2OHSReply>
    </SiebelMessage>

    You need to watch out for the namespace in the source document:
    You can either specify the namespace and use it when locating paths in the source document (as below) or specify it as the default namespace.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
         version="1.0"
         xmlns:xalan="http://xml.apache.org/xslt"
         xmlns:n="http://sirius/xml/common">
    <xsl:template match="/">          
         <SiebelMessage IntObjectFormat="Siebel Hierarchical" IntObjectName="TBS2 OHS Reply" MessageType="Integration Object">
              <TBS2OHSReply>                    
                   <OrderEntry-Orders>                         
                        <BackOfficeErrorText><xsl:value-of select="n:OrderResponseComplex/n:RejectionReasonCode"/></BackOfficeErrorText>
                        <Status><xsl:value-of select="n:OrderResponseComplex/n:AcceptedIndicator"/></Status>
                   </OrderEntry-Orders>
              </TBS2OHSReply>
         </SiebelMessage>
    </xsl:template>
    </xsl:stylesheet>

  • XSL transformation not working

    Hi!
    I am having problems when trying to generate XSL transformation from XML to XML (where XML output is actually XHTML). It always fails executing <xsl:callTemplate name="something", when <xsl:callTemplate /> is executed from another <xsl:template> which is also called with <xsl:callTemplate. Version of database is 10.2.0.4.0, received error is: ORA-00604: invalid character value 'burek' for attribute 'name'.
    Transformation is working in Java and Altova XMLSpy.
    PL/SQL code:
    procedure process_xsl(p_xml in clob, p_xsl in clob, p_result out clob) is
    w_xsl_proc dbms_XSLProcessor.Processor;
    w_xsl_ss dbms_XSLProcessor.Stylesheet;
    w_dom_xsl dbms_xmldom.DOMDocument;
    w_dom_xml dbms_xmldom.DOMDocument;
    w_parser dbms_xmlparser.Parser;
    begin
    --xml in xsl iz cloba v DOMDocument
    w_parser := dbms_xmlparser.newParser;
    dbms_xmlparser.parseClob(w_parser, p_xml);
    w_dom_xml := dbms_xmlparser.getDocument(w_parser);
    dbms_xmlparser.freeParser(w_parser);
    w_parser := dbms_xmlparser.newParser;
    dbms_xmlparser.parseClob(w_parser, p_xsl);
    w_dom_xsl := dbms_xmlparser.getDocument(w_parser);
    dbms_xmlparser.freeParser(w_parser);
    --xsl procesiranje
    w_xsl_proc := dbms_XSLProcessor.newProcessor;
    w_xsl_ss := dbms_XSLProcessor.newStylesheet(w_dom_xsl, null); <-- Here error is received
    END;
    Stylesheet:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></xsl:output>
         <xsl:decimal-format name="dec" decimal-separator="," grouping-separator="."/>
         <!-- Predefined constants from einvoice xml schema -->
         <xsl:variable name="einvoiceIssuerCode" select="'II'"></xsl:variable>
         <xsl:variable name="einvoiceRecipientCode" select="'IV'"></xsl:variable>
         <xsl:variable name="einvoiceIssueLocationCode" select="91"></xsl:variable>
         <xsl:variable name="einvoiceIssueDateCode" select="137"></xsl:variable>
         <!-- Constants directly from document which is a part of transformation -->
         <xsl:variable name="einvoiceNumber" select="/IzdaniRacunEnostavni/Racun/GlavaRacuna/StevilkaRacuna/text()"></xsl:variable>
         <!-- Intro template -->
         *<xsl:template name="burek"> <!-- Second template called with xsl:call template -->*
              <xsl:text>TEST</xsl:text>
         </xsl:template>
         <!-- Template in which we create html structure including css -->
         <xsl:template name="einvoice">
              <html xmlns="http://www.w3.org/1999/xhtml">
              <head>
                   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                   <title>Vizualizacija e-računa št. </title>
                   <xsl:call-template name="burek"></xsl:call-template>
              </head>
              <body>
              </body>
              </html>
         </xsl:template>
         <!-- Intro template -->
         <xsl:template match="/">
    *          <xsl:call-template name="einvoice"></xsl:call-template> <!-- This call is OK -->*
         </xsl:template>
    </xsl:stylesheet>
    XML document
    <?xml version="1.0" encoding="UTF-8"?>
    <IzdaniRacunEnostavni>
    <Racun Id="data">
    <GlavaRacuna>
    <VrstaRacuna>380</VrstaRacuna>
    <StevilkaRacuna>1205019908211</StevilkaRacuna>
    <FunkcijaRacuna>9</FunkcijaRacuna>
    </GlavaRacuna>
    <DatumiRacuna>
    <VrstaDatuma>137</VrstaDatuma>
    <DatumRacuna>2012-05-07T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-04-28T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-05-27T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-03-28T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-04-26T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-04-27T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <Lokacije>
    <VrstaLokacije>91</VrstaLokacije>
    <NazivLokacije>Ljubljana</NazivLokacije>
    </Lokacije>
    </Racun>
    </IzdaniRacunEnostavni>
    Edited by: 938026 on 01-Jun-2012 00:35

    Hi,
    I think your problem lies in the <title>. You are using non UTF-8 characters in the title (š), but you marked your XML as UTF-8. So change the title to have unicode charaters and it will work.
    Herald ten Dam
    http://htendam.wordpress.com

  • XSL Transformation crashes DW CS3

    Whenever I select XSL Transformation from any of the menus,
    it crashes DW CS3 asking the typical, "do you want to tell
    microsoft about this error."
    Anyone have this problem with using XSL Transformations? I'm
    thinking about reinstalling DW to see if it fixes the problem.
    Thanks

    Forgot to mention that this is a Windows XP SP2 machine.

  • XSL Transformation Action Parameters

    Does anyone know how, or even if it's possible, to pass parameters to an XSLT stylesheet using the XSL Transformation action in a Business Logic Transaction?

    Som,
    The parameter I was referring to is not an action parameter, but a parameter in the XSLT itself. E.G. the following extracts a column from an xMII document and creates a new doc with that one column. But I want to name the column at run time, so I can use the same XSLT in various places.
    [code]
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:param name="ColumnToExtract" select="ProductAshDry"></xsl:param> <xsl:template match="/">
        <Rowsets DateCreated="2007-05-31T10:58:25" EndDate="2007-05-31T10:58:25" StartDate="2007-05-31T10:58:25" Version="11.5.2">
          <Rowset>
            <Columns>
              <Column Description="Item" MaxRange="0" MinRange="0" Name="Data" SQLDataType="1" SourceColumn="Data"/>
            </Columns>
            <xsl:for-each select="/Rowsets/Rowset/Row">
              <Row>
                <Data>
                  <xsl:value-of select="$ColumnToExtract"/>
                </Data>
              </Row>
            </xsl:for-each>
          </Rowset>
        </Rowsets>
      </xsl:template>
    </xsl:stylesheet>
    [/code]
    ColumnToExtract is a parameter for the XSLT, which can be set at runtime with various other transform engines. I just can't see a way to set it using the xMII XSL Transformation action.
    Regards,
    Bill

Maybe you are looking for

  • Acrobat Pro  9.0 - Open navigation pane as default

    Can anyone tell me if there is a way to configure Acrobat Pro 9.0 to open the Navigation pane with the Pages view by default for all documents?

  • Unable to pass flashvars in application url in Flex 4.5.

    I am creating an application in which I have to pass variable in application URL like http://localhost/Test/test.html?name=testUser It works fine in flex 3.5 and can be read using Application.application.parameters['name']. But with flex 4.5 it is no

  • Upload using iPhone Safari browser

    Can the iPhone's Safari browser upload files? I'd like to use my company's web-based CMS tool for adding content, but the 'file browse' button is inactive (grayed out). Can't attach files in Gmail either... I was hoping this might be a 'feature' adde

  • Will Photoshop Elements 10 work with Microsoft 8.1 operating system?

    When selecting the option e-mail from the Elements Organizer to share a picture, the program stops with a note from Elements Organizer stating they could not finish creating the e-mail message. I never experienced this problem when it was operating i

  • Why won't my iPod Touch 5th Generation send emails?

    I had this problem before and I fixed it some how. When I tried to email my friend it kept saying an error occurred while sending this message. Please answer this quickly. I need help!