Re-parsing XSL output

Hi,
I have successfully produced an XML document from our Oracle8i db using XSQL and an XSL stylesheet. Now I want to reprocess the XML result with another XSL stylesheet that we have for converting XML into HTML. Is there a way in XSQL to specify repeated calls to the XSLT processor?
Thanks,
Matt

Sure.
To keep the model simple, each XSQL Page represents one "datapage" plus an optional XSLT transformation.
Any XSQL Page can <xsql:include-xsql> another page very efficiently so you can do:
<!-- Page that the User Browses -->
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="final.xsl"?>
<xsql:include-xsql href="otherpage.xsql" xmlns:xsql="urn:oracle-xsql"/>
<!-- Page that does the first transformation -->
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="sometransform.xsl"?>
<xsql:query>
select stuff from table
</xsql:query>
The net result is that the included XSQL page
will materialize its "datapage", get transformed by "sometransform.xsl", and then be transformed by "final.xsl" in the initiating page.

Similar Messages

  • XSL-1047: (Error) Invalid instantiation of 'xsl:output' in 'INSERT' context

    Following is my development environment:
    JDeveloper 9i Release Candidate
    JDeveloper JVM 1.3.1
    Oracle XML Parser v2 9.2.0.0.0
    I'm using the Oracle XML Parser V2 9.2.0.0.0 library to apply a stylesheet to an XML document. However when I invoke the call to processor.processXSL() an XSLException is thrown with the following details:
    oracle.xml.parser.v2.XSLException: <Line 1, Column 116>: XSL-1047: (Error) Invalid instantiation of 'xsl:output' in 'INSERT' context.
    exception
    Below is the sequence of events:
    // Create an instance of XSLProcessor to perform the transformation
    XSLProcessor processor = new XSLProcessor();
    // create a Reader from a String object that contains the stylesheet text
    StringReader r = new StringReader( stylesheet );
    // create a new XSL stylesheet, passing it the Reader object reference
    XSLStylesheet sheet = processor.newXSLStylesheet(r);
    // apply the stylesheet
    // the variable sheet represents the XSLStylesheet object
    // the variable source represents the XMLDocument object
    // this call throws the exception
    DocumentFragment df =
    processor.processXSL(sheet,source);
    I've included the Stylesheet and source XML file I'm processing below.
    Note: My application works fine when I use the Oracle XML Parser v2 9.0.1 library. (although I have to use new XSLStylesheet() in place of XSLProcessor.newXSLStylesheet())
    Any ideas on what has changed between the two releases? I do have a reproducible test case that I can send on if required?
    thanks in advance
    private String stylesheet =
    "<INSERT xsl:version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"> "+
    "<xsl:output method=\"xml\" indent=\"yes\"/> "+
    "<ROWSET table_name=\"acc_database\"> "+
    " <xsl:for-each select=\"DATABASES/DATABASE\"> "+
    " <ROW> "+
    " <DBID><xsl:value-of select=\"DBID\"/></DBID> "+
    " <DBNAME><xsl:value-of select=\"DBNAME\"/></DBNAME> "+
    " <DBSIZE><xsl:value-of select=\"DBSIZE\"/></DBSIZE> "+
    " <DBPATHNAME><xsl:value-of select=\"DBPATHNAME\"/></DBPATHNAME> "+
    " <DBUSER><xsl:value-of select=\"DBUSER\"/></DBUSER> "+
    " <DBPASSWORD><xsl:value-of select=\"DBPASSWORD\"/></DBPASSWORD> "+
    " <ISAPPDB><xsl:value-of select=\"ISAPPDB\"/></ISAPPDB> "+
    " <ISATTACHEDDB><xsl:value-of select=\"ISATTACHEDDB\"/></ISATTACHEDDB> "+
    " <CONVERTDB><xsl:value-of select=\"CONVERTDB\"/></CONVERTDB> "+
    " <VERSION><xsl:value-of select=\"VERSION\"/></VERSION> "+
    " </ROW> "+
    " </xsl:for-each> "+
    "</ROWSET> "+
    "</INSERT>";
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!-- this file was generated by the Oracle Migration Workbench Exporter for MS Access 9.2.0.1.0 on 13/02/02 15:16:52 -->
    <!-- Do not modify this file as any modification will invalidate the export and subsequent migration of your MS Access database -->
    <DATABASES>
    <DATABASE>
    <DBID>1</DBID>
    <DBNAME>xmltest</DBNAME>
    <DBSIZE>1</DBSIZE>
    <DBPATHNAME>E:\xmltest.mdb</DBPATHNAME>
    <DBUSER>xmltest</DBUSER>
    <DBPASSWORD>oracle</DBPASSWORD>
    <ISAPPDB>1</ISAPPDB>
    <ISATTACHEDDB>0</ISATTACHEDDB>
    <CONVERTDB>1</CONVERTDB>
    <VERSION>4.0</VERSION>
    <TABLES>
    <TABLE PRIMARY_KEY="1">
    <TBLID>1</TBLID>
    <DBID>1</DBID>
    <TBLNAME>xsu_test</TBLNAME>
    <CNVTABLESTRUCT>1</CNVTABLESTRUCT>
    <CNVMOVEDATA>1</CNVMOVEDATA>
    <CNVRI>1</CNVRI>
    <CNVVALIDATION>1</CNVVALIDATION>
    <CNVDEFAULT>1</CNVDEFAULT>
    <CNVADDTIMESTAMP>1</CNVADDTIMESTAMP>
    <ATTACHTABLEBACKTOACCESS>1</ATTACHTABLEBACKTOACCESS>
    <SAVEPASSWORD>0</SAVEPASSWORD>
    <CNVMAKEUPDATEABLE>1</CNVMAKEUPDATEABLE>
    <RETAINLOCALCOPY>0</RETAINLOCALCOPY>
    <SYNCWITHSERVER>1</SYNCWITHSERVER>
    <OWNERID>1</OWNERID>
    <VALIDATIONTEXT></VALIDATIONTEXT>
    <VALIDATIONRULE></VALIDATIONRULE>
    <NUMBEROFROWS>1</NUMBEROFROWS>
    <CACHINGTABLE>0</CACHINGTABLE>
    <DESCRIPTION></DESCRIPTION>
    <COLUMNS>
    <COLUMN>
    <COLID>1</COLID>
    <TBLID>1</TBLID>
    <COLNAME>id</COLNAME>
    <COLTYPE>4</COLTYPE>
    <COLTYPEDESC>Long</COLTYPEDESC>
    <COLAUTOINCR>1</COLAUTOINCR>
    <NEXTCOUNTERVALUE>0</NEXTCOUNTERVALUE>
    <MAXLENGTHSOURCE>0</MAXLENGTHSOURCE>
    <AVGLENGTHSOURCE>0</AVGLENGTHSOURCE>
    <COLTEXTSIZE>4</COLTEXTSIZE>
    <ALLOWZEROLENGTH>0</ALLOWZEROLENGTH>
    <DEFAULTVALUE></DEFAULTVALUE>
    <COLREQUIRED>1</COLREQUIRED>
    <COLCOLLATINGORDER>1033</COLCOLLATINGORDER>
    <COLORDPOSITION>1</COLORDPOSITION>
    <VALIDATIONRULE></VALIDATIONRULE>
    <VALIDATIONTEXT></VALIDATIONTEXT>
    <COLUMNDESCRIPTION></COLUMNDESCRIPTION>
    </COLUMN>
    <COLUMN>
    <COLID>2</COLID>
    <TBLID>1</TBLID>
    <COLNAME>name</COLNAME>
    <COLTYPE>10</COLTYPE>
    <COLTYPEDESC>Text</COLTYPEDESC>
    <COLAUTOINCR>0</COLAUTOINCR>
    <NEXTCOUNTERVALUE>0</NEXTCOUNTERVALUE>
    <MAXLENGTHSOURCE>0</MAXLENGTHSOURCE>
    <AVGLENGTHSOURCE>0</AVGLENGTHSOURCE>
    <COLTEXTSIZE>50</COLTEXTSIZE>
    <ALLOWZEROLENGTH>0</ALLOWZEROLENGTH>
    <DEFAULTVALUE></DEFAULTVALUE>
    <COLREQUIRED>1</COLREQUIRED>
    <COLCOLLATINGORDER>1033</COLCOLLATINGORDER>
    <COLORDPOSITION>2</COLORDPOSITION>
    <VALIDATIONRULE></VALIDATIONRULE>
    <VALIDATIONTEXT></VALIDATIONTEXT>
    <COLUMNDESCRIPTION></COLUMNDESCRIPTION>
    </COLUMN>
    </COLUMNS>
    <INDEXES>
    <INDEX>
    <INDID>1</INDID>
    <TBLID>1</TBLID>
    <DBID>1</DBID>
    <INDNAME>id</INDNAME>
    <CNVINDEX>1</CNVINDEX>
    <ISPRIMARY>0</ISPRIMARY>
    <ISUNIQUE>0</ISUNIQUE>
    <ISFOREIGN>0</ISFOREIGN>
    <IGNORENULLS>0</IGNORENULLS>
    <ISREQUIRED>0</ISREQUIRED>
    <INDEX_COLUMNS>
    <INDEX_COLUMN>
    <INDCOLID>1</INDCOLID>
    <INDID>1</INDID>
    <COLID>1</COLID>
    <COLORDER>1</COLORDER>
    </INDEX_COLUMN>
    </INDEX_COLUMNS>
    </INDEX>
    <INDEX>
    <INDID>2</INDID>
    <TBLID>1</TBLID>
    <DBID>1</DBID>
    <INDNAME>PK_xsu_test</INDNAME>
    <CNVINDEX>1</CNVINDEX>
    <ISPRIMARY>1</ISPRIMARY>
    <ISUNIQUE>1</ISUNIQUE>
    <ISFOREIGN>0</ISFOREIGN>
    <IGNORENULLS>0</IGNORENULLS>
    <ISREQUIRED>1</ISREQUIRED>
    <INDEX_COLUMNS>
    <INDEX_COLUMN>
    <INDCOLID>2</INDCOLID>
    <INDID>2</INDID>
    <COLID>1</COLID>
    <COLORDER>1</COLORDER>
    </INDEX_COLUMN>
    </INDEX_COLUMNS>
    </INDEX>
    </INDEXES>
    </TABLE>
    </TABLES>
    <RELATIONS>
    </RELATIONS>
    </DATABASE>
    <ATTACHED_TABLES>
    </ATTACHED_TABLES>
    </DATABASES>

    Your problem is that your stylesheet is illegal.
    You're using the "simple form" of the stylesheet which
    is equivalent to having a single root template.
    If you use the simple form, you cannot use: <xsl:include>,
    <xsl:import>, <xsl:output>, <xsl:param>
    or any other <xsl:XXX> element which must be at the "top-level"
    of the stylesheet.
    The solution is to change from:
    <INPUT xsl:version="1.0" xmlns:xsl="...">
       <xsl:output>
    </INPUT>.
    which is illegal to:
      <xsl:stylesheet version="1.0" xmlns:xsl="...">
        <xsl:output>
        <xsl:template match="/">
          <INPUT>
          </INPUT>
        </xsl:template>
      </xsl:stylesheet>

  • Xsl:output function fully implemented in XSL-processor?

    I'm using XSL-processor as contained in the XML-parser version 2.0.2 in C.
    When changing the referring DTD of an incoming XML-message with following XSL-stylesheet
    <xsl:output method="xml"/>
    <xsl:output ommit-xml-declaration="no"/>
    <xsl:output standalone="no"/>
    <xsl:output doctype-system="someOther.dtd"/>
    nothing seems to happen.
    Is <xsl:output> already fully implemented in this C-version of the XSL-processor?
    Erwin

    Hi,
    The xsl:output is not yet implemented. This was specified in the README file.
    Thanks,
    Oracle XML Team
    null

  • Xsl output placing %20 (spaces) in output

    Xsl output placing %20 (spaces) in output when XSL file is
    save by Dreamweaver CS3, I notice a problem in Dreamweaver CS3
    today, when editing XSL files. Here is the xsl code
    Note: I have no problems when using DW 8 for writing my xsl
    style sheets. I suspect a setting in DW CS3 would fix this. My
    current development environment is all hand coded, not using DW
    server behaviors for any thing. Using MSXML2.DomDocument.4.0 for a
    XML Parser.
    Top part of file
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="
    http://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:output omit-xml-declaration="yes"/>
    Works good this way (all the code on one line)
    <xsl:value-of disable-output-escaping="yes"
    select="url"/>?n=<xsl:value-of disable-output-escaping="yes"
    select="navigationid"/>&amp;p=<xsl:value-of
    disable-output-escaping="yes" select="parentid"/>
    I decided to make the code readable by placing the xsl calls
    on separate lines using line return on the keyboard.
    <xsl:value-of disable-output-escaping="yes"
    select="url"/>?n=
    <xsl:value-of disable-output-escaping="yes"
    select="navigationid"/>&amp;p=
    <xsl:value-of disable-output-escaping="yes"
    select="parentid"/>
    The code above resulted in my query string having
    %20%20%20%20%20 between the n= and value or p and value. It looks
    like the DW CS3 is placing some character in the file that XSL
    parser is interpreting as spaces (%20)
    Note: Dreamweaver 8 does not have this problem. is there a
    setting in CS3 to fix this, maybe a bug in DW CS3?
    David Pearson

    Hi,
    The xsl:output is not yet implemented. This was specified in the README file.
    Thanks,
    Oracle XML Team
    null

  • XSLProcessor support of xsl:output method="text"?

    I'm having trouble getting my processor to format the output as a big string. Actually, the output is html, but because of some browser bugs I want to avoid linebreaks between tags. Specifically table cell tags <td> and the content of the cell.
    Right now, even though I write my xsl like this:
    <table><tr><td>content</td></tr></table>
    the processor formats the output like this:
    <table>
    <tr>
    <td>content</td>
    </tr>
    </table>
    Is there any way to avoid these line breaks and indentation?
    When I add the lines
    <xsl:output method="text"/>
    <xsl:output indent="no"/>
    to my xsl document, nothing happens.
    Thanks in advance.
    null

    Oh. One more thing. I tried parsing that very simple xml file using the xsl sheet you suggested with the class XSLSample that downloads with the parser. Same problem. Any ideas?
    xml file:
    <root>
    <foo>test text</foo>
    </root>
    xsl file:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html" indent="no"/>
    <xsl:template match="/">
    <html>
    <body>
    <table>
    <tr>
    <td><xsl:value-of select="foo"/></td>
    <td><xsl:text>SomeText</xsl:text></td>
    </tr>
    </table>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    output:
    <root>
    <html>
    <body>
    <table>
    <tr>
    <td/>
    <td>SomeText</td>
    </tr>
    </table>
    </body>
    </html>
    </root>
    null

  • xsl:output method="html"/ - supported?

    Is the otutput method "html" supported in
    the recent version of the XML/XSL parser?
    I was trying to use the <BR> tag with the
    <xsl utput method="xml"/> declaration but
    I got an XSLException error message
    indicating a not well-formed XML document.
    Then I tried the following output method
    declaration: <xsl utput method="html"/>
    but I got the same result?!
    Here's a simple XSL stylesheet I was using:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl utput method="html"/>
    <xsl:template match="/">
    <HTML>
    <HEAD></HEAD>
    <BODY>
    <P>
    Blah blah<BR>
    More blah blah<BR>
    </P>
    </BODY>
    </HTML>
    </xsl:template>
    My question is: "How do I use a not
    well-formed tags (like <IMG>, <BR>, etc.)
    in a XSL stylesheet?"
    Thank you very much in advance!
    Cheers.
    Georgi

    Sorry for jumping in on this thread, but I have a question regarding you reply. I have an XSL stylesheet that preforms XML to HTML conversion. Everything works correctly with the exception of those HTML tags that are not weel formed. Using your example if I have something like:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <input type="text" name="{NAME}" size="{DISPLAY_LENGTH}" maxlength="{LENGTH}"></input>
    </xsl:stylesheet>
    It would render HTML in the format of
    <HTML>
    <input type="text" name="in1" size="10" maxlength="20"/>
    </HTML>
    While IE can handle this Netscape can not. Is there anyway to generate completely cross browser complient HTML with XSL?
    Thanks!

  • Xsl:output ignored when doing transformation by XMLReader and XMLFilter

    I want to make XML transformation via XSL file using XMLReader and filter as described in java tutorial http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/xslt/5_chain.html, but it is not working correctly. Transformation is not using encoding and method set in xslfile by <xsl:output method="xml" encoding="ISO-8859-2"/>.
    I wrote simple test program whitch has two method doing transformation:
    transform_method1 - transforms by XMLReader and filter
    transform_method2 - transforms in other manner described in the same tutorial
    The second method is working, but first not. Maybe someone has some solution why the first method is not working correctly?
    Here is test class:
    package xslt;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.sax.*;
    import javax.xml.transform.stream.*;
    import java.io.*;
    public class TestTransform {
        public static void main(String[] args) {
            File xml_file = new File(args[0]);
            File xsl_file = new File(args[1]);
            File output_file_method1 = new File(args[2]);
            File output_file_method2 = new File(args[3]);
            transform_method1(xml_file, xsl_file, output_file_method1);
            transform_method2(xml_file, xsl_file, output_file_method2);
        private static void transform_method1(File xml, File xsl, File output) {
            try {
                BufferedInputStream bis = new BufferedInputStream(new FileInputStream(xml));
                InputSource input = new InputSource(bis);
                SAXParserFactory spf = SAXParserFactory.newInstance();
                SAXParser parser = spf.newSAXParser();
                XMLReader reader = parser.getXMLReader();
                SAXTransformerFactory stf = (SAXTransformerFactory) TransformerFactory.newInstance();
                XMLFilter filter1 = stf.newXMLFilter(new StreamSource(xsl));
                filter1.setParent(reader);
                StreamResult result = new StreamResult(output);
                Transformer transformer = stf.newTransformer();
                SAXSource transformSource = new SAXSource(filter1, input);
                System.out.println("encoding method1="+transformer.getOutputProperty(OutputKeys.ENCODING));
                transformer.transform(transformSource, result);
            } catch (Exception e) {
                e.printStackTrace();
        private static void transform_method2(File xml, File xsl, File output) {
            try {
                TransformerFactory tFactory =   TransformerFactory.newInstance();
                Transformer transformer = tFactory.newTransformer( new StreamSource( xsl) );
                System.out.println("encoding method2="+transformer.getOutputProperty(OutputKeys.ENCODING));
                transformer.transform(new StreamSource(xml), new StreamResult(output));
            } catch (Exception e) {
                e.printStackTrace();
    }and here is test xml file:
    <?xml version="1.0" encoding="ISO-8859-2"?>
    <root>
        <line>Some text line 1</line>
        <line>Some text line 2</line>
        <line>Some text line 3</line>
    </root>the test stylesheet:
    <?xml version="1.0" encoding="ISO-8859-2"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" encoding="ISO-8859-2"/>
    <xsl:template match="root">
         <p><xsl:apply-templates/></p>
    </xsl:template>
    <xsl:template match="line">
         <div><xsl:apply-templates/></div>
    </xsl:template>
    </xsl:stylesheet>I get output file from method1:
    <?xml version="1.0" encoding="UTF-8"?>
        Some text line 1
        Some text line 2
        Some text line 3and method2 output:
    <?xml version="1.0" encoding="ISO-8859-2"?>
    <p>
        <div>Some text line 1</div>
        <div>Some text line 2</div>
        <div>Some text line 3</div>
    </p>Output on System.out from program is:
    encoding method1=UTF-8
    encoding method2=ISO-8859-2Can someone help how can I make transformation like transform_method1 style not to ignore <xsl:output method="xml" encoding="ISO-8859-2"/> tag?

    You have two transformations chained together. The first is the XMLFilter, which uses your XSLT, and the second is the Transformer, which takes its output and does an identity transformation on it. The second transformation is the one that produces your final XML, so it's the one that controls what encoding it gets.
    So your stylesheet should be working. Your only "problem" is that you get a different encoding than you expected. And I put "problem" in quotes because the output you are getting is identical, in XML terms, to the output you want to get.

  • Error parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta name="generator" content="HTML Tidy for Java (vers. 26 Sep 2004), see www.w3.org">
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Transform</title>
    <link type="text/css" rel="stylesheet" href="css/CascadeMenu.css">
    </head>
    <body id="Bdy">
    Hello all, I've run into a perplexing problem with a new and unexptected error on a web application that resides in a JDeveloper 11g environment. I just run it from JDeveloper on my laptop. No deployement other than to the default server at run time Integratedweblogicserver. I am doing an XML transform using XSLT and it has been working fine until I tried to use the page yesterday. I get the following error. javax.servlet.ServletException: javax.xml.transform.TransformerConfigurationException: XML-22000: (Fatal Error) Error while parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast to oracle.xml.parser.v2.SAXParser). at weblogic.servlet.jsp.PageContextImpl.handlePageException(PageContextImpl.java:417) at jsp_servlet.__transform._jspService(__transform.java:109) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413) at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Caused by: javax.xml.transform.TransformerConfigurationException: XML-22000: (Fatal Error) Error while parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast to oracle.xml.parser.v2.SAXParser). at oracle.xml.jaxp.JXSAXTransformerFactory.reportConfigException(JXSAXTransformerFactory.java:759) at oracle.xml.jaxp.JXSAXTransformerFactory.newTemplates(JXSAXTransformerFactory.java:371) at oracle.xml.jaxp.JXSAXTransformerFactory.newTransformer(JXSAXTransformerFactory.java:272) at weblogic.xml.jaxp.RegistryTransformerFactory.newTransformer(RegistryTransformerFactory.java:209) at org.apache.taglibs.standard.tag.common.xml.TransformSupport.doStartTag(TransformSupport.java:145) at jsp_servlet.__transform._jsp__tag2(__transform.java:223) at jsp_servlet.__transform._jspService(__transform.java:102) ... 25 more Caused by: java.lang.ClassCastException: weblogic.xml.jaxp.RegistryXMLReader cannot be cast to oracle.xml.parser.v2.SAXParser at oracle.xml.jaxp.JXSAXTransformerFactory.newTemplates(JXSAXTransformerFactory.java:357) ... 30 more ------------------------------------------------ I changed no code or moved any XML or XSLT file. I do see an error in the log regarding a bad URL ----------------------------------------------- XML-22108: (Error) Invalid Source - URL format is incorrect. XML-22000: (Fatal Error) Error while parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast to oracle.xml.parser.v2.SAXParser). &lt;[ServletContext@10343785[app:QSBQAR module:QSBQAR-QSBQAR-context-root path:/QSBQAR-QSBQAR-context-root spec-version:2.5], request: weblogic.servlet.internal.ServletRequestImpl@699744[ GET /QSBQAR-QSBQAR-context-root/Transform.jsp?reqtype=1 HTTP/1.1 Accept: image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Accept-Language: en-us User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; . ------------------------------ Here is the XML ------------------------------ <?xml version="1.0" encoding="windows-1252" standalone="no"?>
    ACME Bird Seed Co. Capture the Road Runner using a boulder, rope and bird seed. Quinn Brian 00 00 00 00 00 00 00 00 00 11 08 08 08 08 00 43 43 Hours have been approved. APPROVED Smart Jean 00 00 00 00 00 00 00 00 00 Hours approved. APPROVED --------------------------------------------------------------------------------------- Here is the XSL --------------------------------------------------------------------------------------- <?xml version="1.0" encoding="windows-1252"?>
    <!-- Root template -->
    <h2>Project Hours Worked</h2>
    ----------------------------------------------------------------------------------------- Here is the JSP with the transform ----------------------------------------------------------------------------------------
    <table>
    <tr>
    <td>Week Ending Date:--</td>
    </tr>
    <tr>
    <td></td>
    </tr>
    <tr>
    <th>Client</th>
    <td></td>
    <th>Project</th>
    <td></td>
    </tr>
    <tr>
    <td></td>
    </tr>
    <tr>
    <td></td>
    </tr>
    <tr>
    <th>Last Name</th>
    <th>First Name</th>
    <th>Task</th>
    <th>---</th>
    <th>Sun</th>
    <th>Mon</th>
    <th>Tue</th>
    <th>Wed</th>
    <th>Thu</th>
    <th>Fri</th>
    <th>Sat</th>
    <th>---</th>
    <th>Ttl</th>
    </tr>
    <tr>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td>---</td>
    <td>---</td>
    <td></td>
    <td>---</td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td>---</td>
    <td></td>
    </tr>
    <tr>
    <td>Total Hours: </td>
    <td></td>
    <td></td>
    </tr>
    <%@ page contentType="text/html;charset=windows-1252"%><%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %></table>
    <script type="text/javascript" src="scripts/CascadeMenu.js">
    </script>
    <% int bad = 1; %>
    <div id="menuBar" class="menuBar">
    <div id="Bar1" class="Bar">Home</div>
    <div id="Bar3" class="Bar">Accounting</div>
    <div id="Bar4" class="Bar">Help</div>
    </div>
    <div style="background:#84ffff; color:Aqua; "><br>
    <br>
    <p style="color:Orange; font-size:x-large; font-style:italic; font-weight:bold;
    font-family:Arial, Helvetica, sans-serif; "><img src="images/logoqsq.jpg" style="border:1" height="120" width="120" alt="Q Squared">
    </p>
    </div>
    <div>
    <p style="color:Black; font-size:x-large; font-style:italic; font-weight:bold; font-family:Arial, Helvetica, sans-serif;"><img src="images/dilbert.gif" alt="Dilbert" height="100" width="100">
    ? ? Welcome to Q Squared-Brian Quinn Consulting - Manager Time Approval</p>
    </div>
    <div>
    <table width="100%" class="table1">
    <tr>
    <td style="width:15%; border-width:medium; background-color:silver ">
    <h3>Contractor Resources</h3>
    <ul style="list-style-type:circle; ">
    <li>Time Entry</li>
    <li>Profile</li>
    </ul>
    <h3>Manager Resources</h

    LOL - I didn't think about the forum message area having trouble displaying my XML XSLT problem
    It seemed to mix the code with the site XML.
    Oh brother
    The deal is this.
    The XML XSLT transform was working and now it is not and I think it has something to do with
    the HTTP links for either the Oracle core and/or XML TAGLIBs. Either that or the W3.org has
    outdated XSLT http links.
    Anyone know if changes have been made to any of these taglib links?
    This in the JSP
    <!--
    <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <c:import url="HoursWorked.xml" var="xmlHoursWorked" charEncoding="windows-1252"/>
    <c:import url="./HoursWorked3.xsl" var="xslt" charEncoding="windows-1252"/>
    <x:transform xml="${xmlHoursWorked}" xslt="${xslt}" />
    -->
    This in the XSL
    <!--
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    -->
    And the other JSP having the same problem.
    <!--
    <%@ page contentType="text/html;charset=windows-1252"
    import="java.util.List, qsbqar.XMLHandler, org.w3c.dom.NodeList,
    javax.xml.transform.*, javax.xml.transform.stream.*,
    org.w3c.dom.Node, oracle.xml.parser.v2.*, java.io.File,
    java.io.FileReader " %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
    <xsl:param name="employeeID" value="2"/>
    <%session.setAttribute("employee_ID", request.getParameter("consultantID")); %>
    <c:import url="HoursWorked.xml" var="xmlHoursWorked" charEncoding="windows-1252"/>
    <c:import url="./HoursWorked4.xsl" var="xslt" charEncoding="windows-1252"/>
    <x:transform xml="${xmlHoursWorked}" xslt="${xslt}">
    <x:param name="employeeID" value="${sessionScope.employee_ID }"/>
    </x:transform>
    -->
    Edited by: B of Carbon on Dec 19, 2010 12:25 AM

  • How do I create individual xml files from the parsed data output of a xml file?

    I have written a program (DOM Parser) that parses data from a XMl File. I would like to create an individual file with the corresponding name for each set of data parsed from the xml document. If the parsed output is Single, Double, Triple, I would like to create an individual xml file (Single.xml, Double.xml, Triple.xml)with those corresponding names. How do I create the xml files and give each file the name of my parsed data output? Thanks in advance for your help.
    import java.io.IOException;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    public class MyDomParser {
      public static void main(String[] args) {
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      try {
      DocumentBuilder builder = factory.newDocumentBuilder();
      Document doc = builder.parse("ENtemplate.xml");
      doc.normalize();
      NodeList rootNodes = doc.getElementsByTagName("templates");
      Node rootNode = rootNodes.item(0);
      Element rootElement = (Element) rootNode;
      NodeList templateList = rootElement.getElementsByTagName("template");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      System.out.println("Template" + ": " +templateElement.getAttribute("name")+ ".xml");
      } catch (ParserConfigurationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (SAXException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();

    Ive posted the new code but now I'm getting a FileAlreadyExistException error. How do I handle this exception error correctly in my code?
    import java.io.IOException;
    import java.nio.file.FileAlreadyExistsException;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    public class MyDomParser {
      public static void main(String[] args) {
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      try {
      DocumentBuilder builder = factory.newDocumentBuilder();
      Document doc = builder.parse("ENtemplate.xml");
      doc.normalize();
      NodeList rootNodes = doc.getElementsByTagName("templates");
      Node rootNode = rootNodes.item(0);
      Element rootElement = (Element) rootNode;
      NodeList templateList = rootElement.getElementsByTagName("template");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      System.out.println(templateElement.getAttribute("name")+ ".xml");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      String fileName = templateElement.getAttribute("name") + ".xml";
      Files.createFile(Paths.get(fileName));
      System.out.println("File" + ":" + fileName + ".xml created");
      } catch (ParserConfigurationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (SAXException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();

  • REPLY to xsl:output method="html" posting

    Due to a problem with the discussion software, I cannot reply to postings
    with a less-than sign in the Subject!
    As you can imagine in an XML forum where
    angle-brackets are common, this is a real
    pain! The OTN guys tell me they are
    working on a solution.
    We fully support all options of <xsl utput>
    The problem here is that your XSL Stylesheet must be a well-formed XML document, so everywhere you are using the <BR> element, you need to use
    instead.
    <xsl utput method="html"/> requests
    that when the XSLT Engine writes out
    the result of your transformation,
    is a propert HTML document.
    what the XSLT engine reads in must
    be well-formed XML.

    Sorry for jumping in on this thread, but I have a question regarding you reply. I have an XSL stylesheet that preforms XML to HTML conversion. Everything works correctly with the exception of those HTML tags that are not weel formed. Using your example if I have something like:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <input type="text" name="{NAME}" size="{DISPLAY_LENGTH}" maxlength="{LENGTH}"></input>
    </xsl:stylesheet>
    It would render HTML in the format of
    <HTML>
    <input type="text" name="in1" size="10" maxlength="20"/>
    </HTML>
    While IE can handle this Netscape can not. Is there anyway to generate completely cross browser complient HTML with XSL?
    Thanks!

  • Error while parsing SRVCTL output.

    OS : Sun 5.10 SPARC Machine
    DB :11.2.0.1 (Cluster Nodes)
    On DB Control, while checking "Cluster Managed Database Services " getting below error.
    Error while parsing SRVCTL output. Ensure that SRVCTL is functioning properly. I have checked the status of all the processes on that node, looks gsd process is down and in the db control log file getting below error .
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    2010-11-02 10:05:39,751 [Thread-42] ERROR db.rac parseStatusConfig.1010 - SrvctlDatabaseInfo.parseStatusConfig: no parsable status l
    ines.
    2010-11-02 10:38:50,440 [EMUI_10_38_49_/console/rac/racSitemap] WARN em.MetricEngine getCachedData.316 - Metric RAC_HOMETAB contain
    s no cached data!
    2010-11-02 10:38:51,260 [EMUI_10_38_49_/console/rac/racSitemap] WARN em.MetricEngine getCachedData.316 - Metric RAC_HOMETAB contain
    s no cached data!
    2010-11-02 10:39:11,514 [Thread-48] ERROR db.rac parseStatusConfig.1010 - SrvctlDatabaseInfo.parseStatusConfig: no parsable status l
    ines.
    What could be the issue ?

    what command did you execute?
    does it work from the second node?
    did you try rebooting the node?
    did you check clusterware services? some of the processess may have not started properly or died ...
    has it worked before ? or its a new installation ?

  • Xml-declaration="yes" in xsl:output

    When I have a xml-declaration="yes" in my xsl:output, should I
    get <?xml version="1.0" ... ?> in my output? I tried it on
    Oracle xmlparser_v2_0_2 sample XSLSample.java and I did not get
    the <?xml ...?> line. How do I modify the file so that it
    outputs this line if I have xml-declaration="yes"?
    Thanks.
    Khun Yee
    null

    Khun Yee Fung (guest) wrote:
    : When I have a xml-declaration="yes" in my xsl:output, should I
    : get <?xml version="1.0" ... ?> in my output? I tried it on
    : Oracle xmlparser_v2_0_2 sample XSLSample.java and I did not
    get
    : the <?xml ...?> line. How do I modify the file so that it
    : outputs this line if I have xml-declaration="yes"?
    : Thanks.
    : Khun Yee
    You should get this per the spec only it has not yet been
    implemented. It will be in a future release.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Xsl:output not yet implemented??

    Is the xsl:output tag implemented in oracle
    xslt?
    I've tryed this in an xsl file:
    <xsl:output method="xml" encoding="ISO-8859-1" omit-xml-declaration="no" doctype-system="Segnatura.dtd" indent="yes" />
    With another xslt processor produces this header:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE Segnatura SYSTEM "Segnatura.dtd">
    while with xdk the header is empty!!
    I'm doing something wrong or not?
    Please I really nead help on this topic.
    Thanks
    mauro

    We fully implement <xsl:output>
    the most common error is that programmer's accidentally use:
    DocumentFragment processXSL(xsl,xml)
    instead of the:
    void processXSL(xsl,xml,PrintWriter)
    Only the latter gives the XSLT processor a chance to control the serialization and implement the <xsl:output> hints.

  • Dbms_xslprocessor ignore xsl:output

    If I use the xslprocessor.processXsl the output is correct HTML
    If I use dbms_xslprocessor.processXsl , in the output will be " replaced with quot; ...
    it looks so that dbms_xslprocessor ignore tag <xsl:output method = "html"/>, or should I set output by other way ?
    I've last patch 9.2.0.3.0 installed
    I'm SunSPARC Solaris (64 bit) running
    code fragment :
    x_xsl_dom_document := Dbms_Xmldom.newDOMDocument (a_xslt);
    x_style_sheet := dbms_xslprocessor.newStylesheet(x_xsl_dom_document, '');
    x_processor := dbms_xslprocessor.newProcessor;
    dbms_lob.createtemporary(x_tmp_clob, false, dbms_lob.call);
    dbms_xslprocessor.processXsl(x_processor, x_style_sheet, a_xml, x_tmp_clob);

    Please post your question in XMLDB forum

  • Support for "escape-uri-attributes" in xsl:output ???

    Does XSLT processor supports
    new attribute "escape-uri-attributes" for
    xsl:output element?

    This was tested on 9.2.0.1 Beta (D) XDK for Java
    For an example _encXSQL.xsql?param=P&#352;PHF&#381;&#352;&#272;&#381;&#268;&#262;
    returns some garbage in href link, but the valu of the
    param is correct shown as text in html.
    Here are the code for XSQL page (_encXSQL.xsql)
    <?xml version="1.0" encoding="windows-1250"?>
    <?xml-stylesheet type="text/xsl" href="_encXSL.xsl" ?>
    <page
    param = ""
    xmlns:xsql="urn:oracle-xsql">
    <xsql:include-param name="param"/>
    </page>
    And the code for XSL (_encXSL.xsl)
    <?xml version="1.0" encoding="windows-1250"?>
    <xsl:stylesheet
    version="1.0"
    xmlns:xsl=" "
    target="_new">http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" ident="no" encoding="windows-1250"/>
    <!-- Root template -->
    <xsl:template match="/">
    <html>
    <head></head>
    <body>
    <a href="_encTestXSQL.xsql?param={page/param}">
    Param:
    <xsl:value-of select="page/param"/>
    </a>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>

Maybe you are looking for

  • Hotspot click for only some rows in ALV grid for a particular column ?

    Hi there,         In ALV grid, we can make Hotspot enable for all rows in a specified column by specifying in the fieldcatalog with Hotspot attribute set as true. But I want to enable Hotspot only for certain rows in the particular column. I tried wi

  • Drawing preloader line with AS?

    Hello I have the following AS (2) in a preloader (which works - in the sense that it loads the next page): The preloader should have a coloured line which runs from left to right about 0.25px thick. Whenever I have tried to draw the line using a penc

  • Can't read notes on PDF in preview

    I can't believe I am having problems with Preview - but I am. I have inserted sticky notes on a PDF within preview and now when I re-open the PDF, I am unable to expand the note to read what was written? I've tried right clicking, opening up the side

  • Magic Trackpad should have some way to attach to the Bluetooth Keyboard

    I use a mac mini as an HTPC, and have been waiting for this exact product ever since the mini first came out. For the life of me, I can't imagine why Apple didn't ship it with some sort of clip mechanism to attach it to the side of the bluetooth keyb

  • FrameMaker loses formatting during crashes

    I recently upgraded from FrameMaker 8 to 10, and I have noticed that Frame 10 has a charming habit of losing formatting when it crashes. So for example, if a paragraph tag is supposed to be bold, all text with that tag will no longer be bolded after