XDK XSLT proccessor alternative

Hi,
I'm using XSL transformation build in XDK, but there is a bug admitted by Oracle. They try to fix it but it takes too long.
My question is... Is there any alternative to XDK XSL processor? Something what can be called in PLSQL. ... Java, C++, whatever ?
Thanks.

From the XMLDB 11g Developers Manual:
XMLType instance can be transformed in the following ways:
- Using SQL function XMLtransform (or XMLType method transform()) in the database.
- Using XDK transformation options in the middle tier, such as XSLT Processor for Java.
XMLTRANSFORM and XMLType.transform():
Examples
The examples in this section illustrate how to use SQL function XMLtransform and XMLType method transform() to transform XML data stored as XMLType to various formats.
Example 10-1 Registering XML Schema and Inserting XML Data
This example sets up the XML schema and tables needed to run other examples in this chapter. (The call to deleteSchema here ensures that there is no existing XML schema before creating one. If no such schema exists, then deleteSchema produces an error.)
BEGIN
  -- Delete the schema, if it already exists; otherwise, this produces an error.
  DBMS_XMLSCHEMA.deleteSchema('http://www.example.com/schemas/ipo.xsd',4);
END;
BEGIN
-- Register the schema
DBMS_XMLSCHEMA.registerSchema('http://www.example.com/schemas/ipo.xsd',
'<schema targetNamespace="http://www.example.com/IPO"
         xmlns="http://www.w3.org/2001/XMLSchema"
         xmlns:ipo="http://www.example.com/IPO">
  <!-- annotation>
   <documentation xml:lang="en">
    International Purchase order schema for Example.com
    Copyright 2000 Example.com. All rights reserved.
   </documentation>
  </annotation -->
  <element name="purchaseOrder" type="ipo:PurchaseOrderType"/>
  <element name="comment" type="string"/>
  <complexType name="PurchaseOrderType">
   <sequence>
    <element name="shipTo"     type="ipo:Address"/>
    <element name="billTo"     type="ipo:Address"/>
    <element ref="ipo:comment" minOccurs="0"/>
    <element name="items"      type="ipo:Items"/>
   </sequence>
   <attribute name="orderDate" type="date"/>
  </complexType>
  <complexType name="Items">
   <sequence>
    <element name="item" minOccurs="0" maxOccurs="unbounded">
     <complexType>
      <sequence>
       <element name="productName" type="string"/>
       <element name="quantity">
        <simpleType>
         <restriction base="positiveInteger">
          <maxExclusive value="100"/>
         </restriction>
        </simpleType>
       </element>
       <element name="USPrice"    type="decimal"/>
       <element ref="ipo:comment" minOccurs="0"/>
       <element name="shipDate"   type="date" minOccurs="0"/>
      </sequence>
      <attribute name="partNum" type="ipo:SKU" use="required"/>
     </complexType>
    </element>
   </sequence>
  </complexType>
  <complexType name="Address">
   <sequence>
    <element name="name"    type="string"/>
    <element name="street"  type="string"/>
    <element name="city"    type="string"/>
    <element name="state"   type="string"/>
    <element name="country" type="string"/>
    <element name="zip"     type="string"/>
   </sequence>
  </complexType>
  <simpleType name="SKU">
   <restriction base="string">
    <pattern value="[0-9]{3}-[A-Z]{2}"/>
   </restriction>
  </simpleType>
</schema>',
   TRUE, TRUE, FALSE);
END;
-- Create table to hold XML instance documents
DROP TABLE po_tab;
CREATE TABLE po_tab (id NUMBER, xmlcol XMLType)
XMLType COLUMN xmlcol
XMLSCHEMA "http://www.example.com/schemas/ipo.xsd"
ELEMENT "purchaseOrder";
INSERT INTO po_tab
  VALUES(1, XMLType(
              '<?xml version="1.0"?>
               <ipo:purchaseOrder
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xmlns:ipo="http://www.example.com/IPO"
                 xsi:schemaLocation="http://www.example.com/IPO
                                     http://www.example.com/schemas/ipo.xsd"
                 orderDate="1999-12-01">
                 <shipTo>
                   <name>Helen Zoe</name>
                   <street>121 Broadway</street>
                   <city>Cardiff</city>
                   <state>Wales</state>
                   <country>UK</country>
                   <zip>CF2 1QJ</zip>
                 </shipTo>
                 <billTo>
                   <name>Robert Smith</name>
                   <street>8 Oak Avenue</street>
                   <city>Old Town</city>
                   <state>CA</state>
                   <country>US</country>
                   <zip>95819</zip>
                 </billTo>
                 <items>
                   <item partNum="833-AA">
                     <productName>Lapis necklace</productName>
                     <quantity>1</quantity>
                     <USPrice>99.95</USPrice>
                     <ipo:comment>Want this for the holidays!</ipo:comment>
                     <shipDate>1999-12-05</shipDate>
                   </item>
                 </items>
               </ipo:purchaseOrder>'));Example 10-2 Using XMLTRANSFORM and DBURITYPE to Retrieve a Style Sheet
DBURIType is described in Chapter 20, "Accessing Data Through URIs".
DROP TABLE stylesheet_tab;
CREATE TABLE stylesheet_tab(id NUMBER, stylesheet XMLType);
INSERT INTO stylesheet_tab
  VALUES (1,
          XMLType(
            '<?xml version="1.0" ?>
             <xsl:stylesheet version="1.0"
                             xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
               <xsl:template match="*">
                 <td>
                   <xsl:choose>
                     <xsl:when test="count(child::*) > 1">
                       <xsl:call-template name="nested"/>
                     </xsl:when>
                     <xsl:otherwise>
                       <xsl:value-of select="name(.)"/>:<xsl:value-of
                                                          select="text()"/>
                     </xsl:otherwise>
                   </xsl:choose>
                 </td>
               </xsl:template>
               <xsl:template match="*" name="nested" priority="-1" mode="nested2">
                 <b>
                   <!-- xsl:value-of select="count(child::*)"/ -->
                   <xsl:choose>
                     <xsl:when test="count(child::*) > 1">
                       <xsl:value-of select="name(.)"/>:<xsl:apply-templates
                                                          mode="nested2"/>
                     </xsl:when>
                     <xsl:otherwise>
                       <xsl:value-of select="name(.)"/>:<xsl:value-of
                                                          select="text()"/>
                     </xsl:otherwise>
                   </xsl:choose>
                 </b>
               </xsl:template>
             </xsl:stylesheet>'));
SELECT
  XMLtransform(x.xmlcol,
               DBURIType('/XDB/STYLESHEET_TAB/ROW
                            [ID=1]/STYLESHEET/text()').getXML()).getStringVal()
  AS result
  FROM po_tab x;
This produces the following output (pretty-printed here for readability):
RESULT
<td>
  <b>ipo:purchaseOrder:
    <b>shipTo:
      <b>name:Helen Zoe</b>
      <b>street:100 Broadway</b>
      <b>city:Cardiff</b>
      <b>state:Wales</b>
      <b>country:UK</b>
      <b>zip:CF2 1QJ</b>
    </b>
    <b>billTo:
      <b>name:Robert Smith</b>
      <b>street:8 Oak Avenue</b>
      <b>city:Old Town</b>
      <b>state:CA</b>
      <b>country:US</b>
      <b>zip:95819</b>
    </b>
    <b>items:</b>
  </b>
</td>Example 10-3 Using XMLTRANSFORM and a Subquery to Retrieve a Style Sheet
This example illustrates the use of a stored style sheet to transform XMLType instances. Unlike the previous example, this example uses a scalar subquery to retrieve the stored style sheet:
SELECT XMLtransform(x.xmlcol,
    (SELECT stylesheet FROM stylesheet_tab WHERE id = 1)).getStringVal()
     AS result
   FROM po_tab x;Example 10-4 Using Method transform() with a Transient Style Sheet
This example uses XMLType method transform() to transform an XMLType instance using a transient style sheet:
SELECT x.xmlcol.transform(XMLType(
'<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="*">
    <td>
    <xsl:choose>
      <xsl:when test="count(child::*) > 1">
        <xsl:call-template name="nested"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="name(.)"/>:<xsl:value-of select="text()"/>
      </xsl:otherwise>
    </xsl:choose>
    </td>
</xsl:template>
<xsl:template match="*" name="nested" priority="-1" mode="nested2">
    <b>
    <!-- xsl:value-of select="count(child::*)"/ -->
    <xsl:choose>
      <xsl:when test="count(child::*) > 1">
        <xsl:value-of select="name(.)"/>:<xsl:apply-templates mode="nested2"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="name(.)"/>:<xsl:value-of select="text()"/>
      </xsl:otherwise>
    </xsl:choose>
    </b>
</xsl:template>
</xsl:stylesheet>'
)).getStringVal()
FROM po_tab x;
So in short XMLTRANSFORM ;-) ?

Similar Messages

  • XDK XSLT processor alternative

    Hi,
    I use XSL transformation built in XDK, but there is a bug admitted by Oracle. They try to fix it but it takes too long.
    My question is... Is there any alternative to XDK XSL processor? Something what can be called in PLSQL. ... Java, C++, whatever ?
    Thanks.

    Hi,
    I use XSL transformation built in XDK, but there is a bug admitted by Oracle. They try to fix it but it takes too long.
    My question is... Is there any alternative to XDK XSL processor? Something what can be called in PLSQL. ... Java, C++, whatever ?
    Thanks.

  • XDK, XSLT Processor, Add JARs statically

    Hello,
    while using XDK's Oracle XSLT Extensions I'm facing an issue with class visibility after adding it via "loadjava" tool.
    I'm getting the following exception during transformation:
         oracle.xml.xpath.XPathException: Extension function error: Class not found ...
         oracle.xml.xslt.XSLStylesheet.flushErrors(XSLStylesheet.java:2495)
    The docs say the following: (Using the XSLT Processor for Java)
    "Note: The XSL class loader only knows about statically added JARs and paths in the CLASSPATH and those specified by wrapper.classpath. Files added dynamically are not visible to XSLT processor."
    So it's rather clear that loadjava adds classes dynamically. That explains the error message.
    The question however is: how to add classes statically?
    Thanks a lot in advance for you help!

    Trying some stuff at home now until we can call each other.
    Java version is a bit old, isn't it...?
    On my DB version at home (12.1.0.1), server side, it mentions:
    [oracle@localhost ~]$ java -version
    java version "1.6.0_24"
    OpenJDK Runtime Environment (IcedTea6 1.11.11) (rhel-1.61.1.11.11.el6_4-x86_64)
    OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
    Will try to figure out what the local XDK stuff says.
    My $CLASSPATH is not set. The Oracle Java JDK version mentions:
    [oracle@localhost bin]$ $ORACLE_HOME/jdk/bin/java -version
    java version "1.6.0_37"
    Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
    After setting the environment on server database side, I get...
    [oracle@localhost oracle.xdk_11.1.0]$ oraxsl -v
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/xml/parser/v2/oraxsl
    Caused by: java.lang.ClassNotFoundException: oracle.xml.parser.v2.oraxsl
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    Could not find the main class: oracle.xml.parser.v2.oraxsl. Program will exit.
    [oracle@localhost oracle.xdk_11.1.0]$ echo $PATH
    /usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin:/u01/app/oracle/product/12.1.0/dbhome_1/bin
    [oracle@localhost oracle.xdk_11.1.0]$ echo $LD_LIBRARY_PATH
    /u01/app/oracle/product/12.1.0/dbhome_1/lib
    [oracle@localhost oracle.xdk_11.1.0]$ echo $JAVA_HOME
    /u01/app/oracle/product/12.1.0/dbhome_1/jdk/bin
    [oracle@localhost oracle.xdk_11.1.0]$ echo $ORACLE_HOME
    /u01/app/oracle/product/12.1.0/dbhome_1
    [oracle@localhost oracle.xdk_11.1.0]$ echo $CLASSPATH
    /u01/app/oracle/product/12.1.0/dbhome_1/lib/xmlparserv2.jar:/u01/app/oracle/product/12.1.0/dbhome_1/lib/xsu12.jar:/u01/app/oracle/product/12.1.0/dbhome_1/lib/xml.jar
    [oracle@localhost oracle.xdk_11.1.0]$ oraxsl -v
    Release version: Oracle XML Developers Kit 12.1.0.1.0 - Production
    oraxsl: Number of arguments specified (1) is illegal
    usage: oraxsl options* source? stylesheet? result?
                -w                          Show warnings
                -e <error log>              A file to write errors to
                -l <xml file list>          List of files to transform
                -d <directory>              Directory with files to transform
                -x <source extension>       Extensions to exclude
                -i <source extension>       Extensions to include
                -s <stylesheet>             Stylesheet to use
                -r <result extension>       Extension to use for results
                -o <result directory>       Directory to place results
                -p <param list>             List of Params
                -t <# of threads>           Number of threads to use
                -v                          Verbose mode
                -debug                      Debug mode
                -m <version #>              XSLT Version, 1 or 2
    Please refer to the readme file for more information on the above options
    [oracle@localhost oracle.xdk_11.1.0]$ java -version
    java version "1.6.0_24"
    OpenJDK Runtime Environment (IcedTea6 1.11.11) (rhel-1.61.1.11.11.el6_4-x86_64)
    OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
    [oracle@localhost oracle.xdk_11.1.0]$ export PATH=$ORACLE_HOME/jdk/bin:$PATH
    [oracle@localhost oracle.xdk_11.1.0]$ java -version
    java version "1.6.0_37"
    Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)

  • Who knows about xdk: xslt vm and xml pipeline processor

    hello,
    i read anywhere that xslt vm and xml pipeline processor is
    part of the xdk.
    i would know more about xslt vm and pipeline processor,
    but where ??
    thank you!!

    Hi,
    XSLT VM is a high performance XSLT transformation engine in C.
    XML Pipeline Processor specifies Java processes to be executed in a declarative manner. W3C recommendation is at http://www.w3.org/TR/2002/NOTE-xml-pipeline-20020228/.
    Both of these are supported by Oracle in XDK 10i. More information at http://technet.oracle.com/tech/xml/xdk/content.html. Documentation at http://otn.oracle.com/docs/tech/xml/xdk/doc_library/Beta/index.html.
    Thanks.

  • XDK XSLT output to HTML: How do I stop it from indenting?

    indent = "no" does not seem to work in XSLT. DBMS_xslprocessor insists on indenting my output, which makes use of the &lt;pre&gt; tag impossible.
    Help!
    Thanks,
    mzk
    Michael Zvi Krumbein
    [email protected]
    (240)568-6201

    Looks like I have the answer to this. Apparantly the new versions of xslprocessor, etc. (XDB.dbms_xslprocessor instead of sys.xslprocessor) do not seem to work correctly. The old ones did, but did not show up until we installed the new ones. (9.2)

  • XSLT 2.0 template error in OeBS XMLP 5.6.2

    Hi everybody.
    I've added the following XSL-XML template to my XMLP data definition to test XSLT 2.0 grouping capabilities:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template match="/">     
         <Groups>
              <xsl:for-each-group select="1 to 10" group-by=". mod 3">
                   <Group id="{current-grouping-key()}">
                             <xsl:copy-of select="current-group()"/>
                   </Group>
              </xsl:for-each-group>
              </Groups>      
         </xsl:template>
    </xsl:stylesheet>
    I've ran concurrent program using the above template, the result was "Warning", conc program log reported about OPP errors. In OPP log I found the error:
    [5/2/07 9:31:23 AM] [UNEXPECTED] [41563:RT1774967] java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at oracle.apps.xdo.common.xml.XSLT10gR1.invokeProcessXSL(XSLT10gR1.java:580)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:378)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:197)
         at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:160)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:6071)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3555)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3614)
         at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:245)
         at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:153)
    Caused by: java.lang.NullPointerException
         at oracle.xdo.parser.v2.XSLTContext.isStrippedWS(XSLTContext.java:719)
         at oracle.xdo.parser.v2.XSLExprValue.removeWhiteSpace(XSLExprValue.java:1202)
         at oracle.xdo.parser.v2.XSLForEachGroup.processAction(XSLForEachGroup.java:81)
         at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
         at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
         at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
         at oracle.xdo.parser.v2.XSLTemplate.processAction(XSLTemplate.java:191)
         at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:508)
         at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:485)
         at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:264)
         at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:150)
         at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:187)
    The questions are:
    - Is XMLP 5.6.2 in OeBS support XSLT 2.0 templates?
    - If it's true, what is the reason of getting the above error?

    I took xdoparser.zip from EBS $JAVA_TOP and tried to do XSLT transformation locally using
    java -cp .;xdoparser.zip oracle.xdo.parser.v2.oraxsl %1 %2 %3
    where %1 из source xml file, %2 - xslt file , %3 - resulting xml file
    and got the same error.
    So it is not the error of XMLP, but the error of Oracle XSLT processor.
    As far as I understood, in xdoparser.zip oracle.xdo.parser package is the same as oracle.xml.parser package from original Oracle XDK. The question is: what version of XDK XSLT processor xdoparser.zip corresponds to?

  • Performance of XSLT transformation

    Hello everybody,
    I´m trying to do some in-database XML transformations from one XML format to another with a rather complex xsl stylesheet of about 9000 lines of code which performs this transformation. At first I tested the XDK XSLT functionality by simply doing a Transformation over the JAXP API outside the Database. It performed not bad, altough the memory consumption was a little bit higher then Saxon or Xalan. After that I read about the possibilities of in-database transformation, which should consume less memory because of oracle´s xml features like scalable DOM, XML Indexing and Query Rewriting when using object relational or binary storage. So we loaded our testdata into the db (we are using 11gR2 on a test system with Intel Core2Duo @ 3GhZ and 3GB RAM), in different XML storage options (XMLTYPE CLOB, Binary, OR) and tried to do a XSLT transformation on the columns. But it isn´t working.
    The db seems not to be able to cope with the transformation although the parser and processor should be the same as the off-database transformation that was working well (or am I wrong?). After half an hour we aborted because the db hadn´t finished the transformation yet (the off-db transformation of this 100KB XML took less then a second). We tried indexing the columns with XMLIndex, didn´t work out, we tried both XMLTYPE´s XMLtransform() and dbms_xslprocessor.processxsl(), same problem, the DB is working and working with no result, after some time we have to terminate. With a simple teststylesheet the transformation is doing fine but our complex stylesheet seems to be the problem.
    My question is, why is the xslt performance so poorly with the complex stylesheet and why can I use the XDK Parser and Processor in an off-db transformation very efficiently but when doing the same transformation in the db it´s not working.
    Hope you can help me out a little bit I´m really running out of ideas.
    Greetz dirac

    Hi,
    The db seems not to be able to cope with the transformation although the parser and processor should be the same as the off-database transformation that was working well (or am I wrong?). No, the database built-in XSLT processor (C-based) is not the same as the XDK's Java implementation.
    There's also a C XSLT processor available for external transformation and working with compiled stylesheets, it should outperform the Java implementation.
    See : http://docs.oracle.com/cd/E11882_01/appdev.112/e23582/adx_c_xslt.htm#i1020191
    We tried indexing the columns with XMLIndex, didn´t work out, we tried both XMLTYPE´s XMLtransform() and dbms_xslprocessor.processxsl(), same problem, the DB is working and working with no result, after some time we have to terminate. With a simple teststylesheet the transformation is doing fine but our complex stylesheet seems to be the problem.XMLIndexes won't help at all in this situation.
    In my experience so far with the built-in engine, I've seen the best result when the XML document we want transform is stored as binary XML.
    I don't know about the scalable DOM (or "lazy" DOM loading) feature described in the documentation, seems it doesn't support complex transformations, much like functional vs. streaming evaluation for XQuery.
    Hope you can help me out a little bit I´m really running out of ideas.I'd be interested in a test case if you have the possibility (stylesheet + sample input XML). You can mail me at this address : mb[dot]perso[at]wanadoo[dot]fr
    If you can't, could you describe what kind of transformation you're performing and how can I reproduce that behaviour?
    Thanks.
    Marc.

  • XSLT document() function in PL/SQL XDK

    I'm using the PL/SQL XDK (9.2.0.2.0) to do XSLT transformations but having
    no success using the XSLT document() function.
    I just get the error
    ORA-20100: Error occurred while processing: XSL-1021: (Error) Error parsing
    external document: 'wrongmachine.mycompany.com'.
    Can the document function access an external xml file using http from pl/sql?
    eg. http://amachine.mycompany.com/xmldocs/myxml.xml
    I've tried setting the ref parameter of the newStylesheet function, assuming
    this sets up the base uri for the stylesheet
    xslss := xslProcessor.newStylesheet
    (xmldoc => xsl_doc,
    ref => 'http://amachine.mycompany.com/xmldocs');
    I've also used the setBaseDir on both the DOMDocument and the stylesheet
    xmlparser.setBaseDir(p => xsl_parser,
    dir => 'http://amachine.mycompany.com/xmldocs');
    I've tested the XSL stylesheet in Saxon and it works fine.
    Other XSL transformations also work fine using the Oracle XDK but none that use
    document()
    'wrongmachine.mycompany.com' is not even the machine the code is executing on!?
    Is this set up in an installation script?
    Any ideas/examples on how document() can be used in the pl/sql XDK?
    Thanks
    John Holder

    BTW: following this link
    xsl:include within XSL stylesheet stored in XMLType column
    i've encountered that this theme has been asked but none from Oracle staff has answered on it yet ;(((((((

  • [svn:fx-trunk] 7784: adding xslt change so info related to Alternative shows up in the asdoc

    Revision: 7784
    Author:   [email protected]
    Date:     2009-06-12 07:46:21 -0700 (Fri, 12 Jun 2009)
    Log Message:
    adding xslt change so info related to Alternative shows up in the asdoc
    QE Notes: None.
    Doc Notes: None.
    Modified Paths:
        flex/sdk/trunk/asdoc/templates/class-parts.xslt
    Added Paths:
        flex/sdk/trunk/asdoc/templates/images/P_AlternativeMetadataIndicator_30x28_N.png

    I've checked the resolution in Photoshop just as a double-check and it shows resolution as 300 PPI. When you say "because they can be mixed" do you mean because elements and graphics with the PDF can be of varying resolutions? I hadn't thought of that, if that's what you meant. I do have some items within my pdf that might be lower resolution.
    If these show up in my Preflight Panel as an issue, does this mean they would be flagged also with the Printer? In trying to find a resolution I read several forum discussions about how Printers often run your document through a Preflight process and will send it back when there are low resolution images in the document.
    Is there some other way to be sure these images are in the InDesign document as 300 PPI so I can know they will in fact print correctly?
    PS - Peter - thanks for the super quick response! And I saw your the highlighted "Exceptional Contributor" on the right sidebar for the InDesign forum - clearly well-deserved! Congrats

  • XSLT with XDK (Using C libs, Oracle 8.1.7)

    Hi,I am currently tring to use the XSLT mechanism available within Oracle 8.1.7 XDK C libs.
    In the file called "XSLSample.c", a function :"void printres(xmlctx*, xmlnode*)" is used to display the result of the tranformation to the standard output.
    What I wish to do is to get this result in a "char*" to be able to reuse it.
    Is there a simple way of doing this or is it necessary to rewrite a "printresToChar" function ?
    If so, is there a way to get the algorythm used for "printres" ?.
    (I'have not spent a long tim on C++ or JAVA implementation but I think the question is also valid for those two languages)
    Thanks,
    Pierre

    The function printBuffer() is available in later releases which can be
    downloaded from OTN. This is what I do in Java to translate any xml document to a string:
    try
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    PrintWriter writer = new PrintWriter(out);
    xmlDoc.print(writer);
    newXmlString = out.toString();
    PrintWriter can be a real printer or in this case an output stream.

  • XSLT alternative

    Hi All,
    Recently I got an application that has performance issues. It is taking very long time for XSLT transformation due to large xml files and I am looking into alternatives to XSLT. I would appreciate if you can throw in some ideas here.
    Thanks
    WD

    I has the same scenario where I need to transform huge xml files into html reports. Freemarker is an freeware tool which can best server as an alternative to XSLT.
    I had following statistics
    Time taken by Xalan to transform a complex xml file: 23.25 second
    Time taken by Saxon to transform the same file:9.125 second
    where as Freemarker took only 3.734 second.
    But the problem with freemarker is that you have to use its own templates using freemarker template language to generate different html pages.

  • XSLT Mapping with Java class not working in Integration Repository

    Hi,
    I have an XSLT mapping program with Java enhancement and I was able to successfully tested it in Stylus Studio. However, when I imported the Java class and the xslt program in Enterprise Service Builder and tested it, my program does not compile.
    Here is the error message: "Transformer Configuration Exception occurred when loading XSLT mapping_temp.xsl; details: Could not compile stylesheet".
    My java program is in a zip file containing SOAPHeaderHandler.java and SOAPHeaderhandler.class. My Java has a package com.nga.xslt.
    Here is the declaration of my Java class in the XSLT: xmlns:javamap="java:com.nga.xslt.SOAPHeaderHandler"
    It seems that it could not read the java class. Can you please advice what is wrong?

    Hi ,
    select XMLTOOLKIT option in Operation mapping and execute it.
    I am not sure we can call java program in XSLT Program,but alternative is copy the code and use it in XSLT mapping it self,that means your XSLT program will become with JAVA extensions.
    then in Operation mapping level select SAPXMLTOOL kit option and execute it. i hope it will work. if it is not working then you have deploy some JAXP files on server,because the way execution of XSLT Mpaping program got changed,like when eve you executing XSLT with extnasions( if you are not using XMLTOOL kit option) then you have to use latest version of JAXP.JDK files.
    Regards,
    Raj

  • Adding "Filter Criteria" to the XSLT List View Web Part impact on "Export to Excel" functionality within Document Library

    Hi there,
    XSLT List View displaying all the list items within the Document Library. In order to implement the Search functionality within Document library out of box "Text Filter" web part is configured as explained below. The solution is similar to
    the one suggested at
    http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=77
    "Text Filter" Web Part added to the page.
    Filter Criteria (i.e., XSLT List View columns) added to the XSLT List View where the filter parameters take the input from the "Text Filter" Web Part .
      3. Both Web Parts (XSLT List View and the Text Filter) are connected.
    When the search criteria is entered into the "Text Filter" Web Part, it is passed to the relevant Columns of the XSLT List View and the documents (List Items) that match the search criteria are shown within XSLT List View.
    Search functionality working as expected.
    Query: Selecting the "Export to Excel" icon from the ribbon generates the excel spread sheet with no data except Column Titles from the Document library. In the investigation it is
    found that adding the 'Filter Criteria' on XSLT List View is causing this bug. When the Filter Criteria is removed, then "Export to Excel" functionality is working as expected.
    But it is mandatory to add "Filter Criteria" to implement the search functionality with in the document library.
    Help: Help/input appreciated on the work around to get the "Export to Excel" functionality work when the "Filter Criteria"
    exist on the XSLT List View.
    Regards,

    Once again thanks very much for your help Scott. very much appreciated.
    In the investigation it is found that removing the 'Filter Criteria' on XSLT List View makes the "Export to Excel" functionality work. But the 'Filter Criteria' is mandatory to get the 'Document Search' functionality.
    I think that due to technical limitations it should be concluded that 'only custom development can make all work, no code solutions using the SharePoint Designer can meet all the requirements.
    If you can think of any alternative solution that could help in resolving the current issue or fix the issue without any custom implementation please inform. Otherwise this issue would be marked as resolved with your suggested response.
    Regards,

  • Swapping XML Parser and XSLT to Xalan 2.7.0 - Not Working (OC4J 10.1.3)

    Hi-
    I'm trying to use the latest Xercies/Xalan classes in OC4J 10.1.3 as described in the How-To swap XML Parsers document:
    http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-swapxmlparser/doc/readme.html
    What I can see happening is that the oracle.xml shared library is successfully 'turned off', but the xalan libraries are not added. Instead, the default xml classes that are distributed with the JDK become visible. For instance, using a slightly modified version of the index.jsp page from the how-to, I get this result:
    ------ Output from JSP page ----------------
    TransformerFactory Instance: org.apache.xalan.processor.TransformerFactoryImpl
    Transformer Instance: org.apache.xalan.transformer.TransformerIdentityImpl
    Transformer Version: Xalan Java 2.4.1 (!!)
    What I expect is for that last line to say version 2.7.0, which is the version of the xalan.jar included in my shared library (code to add that line to the how-to shown below).
    I suspect what is happening is that the class loader is simply not letting a shared library override a system library - to do that you probably need to place the jar files in system endorsed directory.
    Has anyone gotten this how-to to work - actually replacing the XML parser/transform classes with the latest Xalan classes? Are you sure it is seeing the current version you placed in the shared library?
    Thanks,
    Eric Everman
    ---- My modified getXSLTDetails() method in the index.jsp page of the how-to -------
    <!-- Additional Import -->
    <%@ page import="org.apache.xalan.Version" %>
    public static String getXSLTDetails()
    Transformer transformer=null;
    TransformerFactory transformerfactory = TransformerFactory.newInstance();
         Version ver = null;
         String br = "<" + "br" + ">"; //otherwise the otn forum chocks on the break.
    try
    transformer = transformerfactory.newTransformer();
              ver = (Version) transformer.getClass().forName("org.apache.xalan.Version").newInstance();
              String ret_val =
                   "TransformerFactory Instance: "+transformerfactory.getClass().getName() + br +
                   "Transformer Instance: "+transformer.getClass().getName() + br;
              if (ver != null) {
                   ret_val = ret_val + "Transformer Version: " + ver.getVersion() + br;
              } else {
                   ret_val = ret_val + "Transformer Version not Available" + br;
              return ret_val;
    catch (Exception e)
    e.printStackTrace();
    return e.getMessage();
    }--------------------------------------------------------------------

    Steve - Thanks for responding on this.
    The Xalan SQL extension is built into Xalan. The most painless way to try it out is to run it via JEdit: www.jedit.org
    JEdit a OS Java application with a fairly painless install process (I'm assuming you already have a current JRE installed). Once its installed, you'll need to install the XSLT plugin - in JEdit goto Plugins | Plugin Manager | Install and pick the XSLT plugin. You'll need the Oracle JDBC classes on your classpath - this can be done by copying the oracle_jdbc4.jar into the [JEdit install directory]/jars directory.
    Restart to load that jar and you should be all set.
    I included a sample XSLT page at the bottom of this post that is somewhat of a template transform for the SQL extension - its more complicated then it needs to be, but it does some nice things with the results of the query. Save it as a file and make the appropriate changes to the 'datasource' parameter near the top of the file.
    Then in JEdit, open the file and make sure the XSLT plugin is visible (Plugins | XSLT | XSLT Processor Toggle - or alternately dock it in the window via global prefs). In the XSLT plugin: Allow the current buffer to be used as the source, Add that same file as a stylesheet via the '+' button, and pick a result file at the bottom. Then click the 'Transform XML' button.
    Troubleshooting: I seem to remember having some classpath errors when I tried this on windows, but others have had it work w/o issues. I do remeber that the XSLT plugin had a popup window that gave a pretty good explaintion of the problem, if it occurs. Also, for some reason the XSLT plugin will not create a new file for the output, so its often best to create a file first, then choose it as the output. Of course, you can always run a transformation from the command line or w/in an applicatoin. Full docs on the Xalan SQL extension can be found at: http://xml.apache.org/xalan-j/extensionslib.html#sql
    Here is my sample XSLT transform using the SQL extension:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
              xmlns:sql="http://xml.apache.org/xalan/sql"
              xmlns:str="http://exslt.org/strings"
              xmlns:xalan="http://xml.apache.org/xalan"
              extension-element-prefixes="sql str xalan">
         <xsl:output indent="yes"/>
         <xsl:param name="driver">oracle.jdbc.OracleDriver</xsl:param>
         <xsl:param name="datasource">jdbc:oracle:thin:jqpublic/jqpublic@server_name:1521:dbname</xsl:param>
         <xsl:param name="jndiDatasource"><!-- jndi source for production use w/in enterprise environment --></xsl:param>
         <xsl:param name="debug">true</xsl:param>
         <xsl:variable name="connection" select="sql:new()"/>
         <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
         <xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'"/>
         <!--
              The query:  You could pass parameters in to this query to build a where clause, but here is a simple example.
              Also, its nice to wrap the query with a max row number to prevent huge results.
         -->
         <xsl:param name="query">
         select * from (
      SELECT
              'One' FIELD_1,
              'Two' FIELD_2
         FROM DUAL
         ) where rownum < 100
         </xsl:param>
         <!-- Essentially, create a XConnection object -->
         <xsl:variable name="connection" select="sql:new()"/>
         <xsl:template match="/">
        <xsl:choose><!-- Connect using JNDI -->
          <xsl:when test="$jndiDatasource != ''">
            <xsl:if test="not(sql:connect($connection, $jndiDatasource))">
              <xsl:message>Failed to connect to db via jndi connection</xsl:message>
              <xsl:comment>Failed to connect to db via jndi connection</xsl:comment>
              <xsl:if test="$debug = 'true'">
                <xsl:copy-of select="sql:getError($connection)/ext-error"/>
              </xsl:if>
            </xsl:if>
          </xsl:when>
          <xsl:otherwise><!-- Connect using connection string -->
            <xsl:if test="not(sql:connect($connection, $driver, $datasource))">
              <xsl:message>Failed to connect to db via driver/url connection</xsl:message>
              <xsl:comment>Failed to connect to db via driver/url connection</xsl:comment>
              <xsl:if test="$debug = 'true'">
                <xsl:copy-of select="sql:getError($connection)/ext-error"/>
              </xsl:if>
            </xsl:if>
          </xsl:otherwise>
        </xsl:choose>
              <!--
              The results of the query.  The rowset is brought back in 'streaming' mode,
              so its not possible to ask it for the number of rows, or to check for zero
              rows.  There is a switch to disable streaming mode, but this requires all
              rows to be brought into memory.
              -->
              <xsl:variable name="table" select="sql:query($connection, $query)"/>
              <xsl:if test="not($table)">
                   <xsl:message>Error in Query</xsl:message>
                   <xsl:copy-of select="sql:getError($connection)/ext-error"/>
              </xsl:if>
              <page>
                   <!-- Your xalan environment -->
                   <xsl:copy-of select="xalan:checkEnvironment()"/>
                   <!-- Build a bunch of metadata about the rows -->
                   <meta>
                        <cols>
                             <xsl:apply-templates select="$table/sql/metadata/column-header"/>
                        </cols>
                   </meta>
                   <rowset>
                        <!--
                             With streaming results, you must use the apply-temmplates contruct,
                             not for-each, since for-each seems to attempt to count the rows, which
                             returns zero.
                        -->
                        <xsl:apply-templates select="$table/sql/row-set"/>
                   </rowset>
              </page>
              <xsl:value-of select="sql:close($connection)"/><!-- Always close -->
         </xsl:template>
         <xsl:template match="row">
              <row>
                   <xsl:apply-templates select="col"/>
              </row>
         </xsl:template>
         <xsl:template match="column-header">
              <col>
                   <xsl:attribute name="type">
                        <xsl:value-of select="@column-typename"/>
                   </xsl:attribute>
                   <xsl:attribute name="display-name">
                        <xsl:call-template name="create-display-name"/>
                   </xsl:attribute>
                   <xsl:value-of select="@column-name"/>
              </col>
         </xsl:template>
         <!-- Convert column names to proper caps: MY_FIELD becomes My Field -->
         <xsl:template name="create-display-name">
              <xsl:variable name="col-name">
                   <xsl:for-each select="str:tokenize(@column-name, '_')">
                        <xsl:value-of
                             select="concat(translate(substring(., 1, 1), $lowercase, $uppercase), translate(substring(.,2), $uppercase, $lowercase), ' ')"/>
                   </xsl:for-each>
              </xsl:variable>
              <xsl:value-of select="substring($col-name, 1, string-length($col-name) - 1)"/>
         </xsl:template>
         <!-- Creates data columns named 'col' with a column-name attribute -->
         <xsl:template match="col">
              <col>
                   <xsl:attribute name="column-name"><xsl:value-of select="@column-name"/></xsl:attribute>
                   <xsl:value-of select="."/>
              </col>
         </xsl:template>
    </xsl:stylesheet>

  • ANN: XDK 10.1.0.1.0A Beta and 9.2.0.6.0 Producti

    XDK 10.1.0.1.0A Beta and 9.2.0.6.0 production are available
    online at:
    http://otn.oracle.com/tech/xml
    In the 10.1.0.1.0A beta release, extensive enhancements are included
    for XSLT 2.0, JAXB Class Generator and DOM 3.0 XML support. The new
    features include:
    * New JAXP 1.2 support allows XML schema validation using JAXP.
    * New C++ XML APIs: provide unified DOM support for XMLType.
    * New XMLSAXSerializer provides support to handle the SAX output
    serialization.
    In the 9.2.0.6 release, various XDK bugs are fixed:
    XDK C:
    2540242 ORA-31011 DURING SYS.XMLTYPE.TRANSFORM
    2560740 PARSER THROWS INCORRECT ERROR ON UTF 8 DATABASE
    2641534 PROBLEMS WITH WHITESPACE HANDLING WITH THE PARSER (WITH
    IGNORE_WHITESPACE) FLAG
    2673096 XMLTYPE.CREATEXML REJECTS DOCUMENTS WITH XML NAMESPACE LPX-233
    2792249 REGISTERSCHEMA(). ALLOWS AN XML SCHEMA WITH INVALID SUBSTITUTION GROUP.
    2901439 PURIFY SHOW A LEAK IN A MULTI-THREADED APPLICATION
    2907572 FAILS TO DETECT DUPLICATE KEY IF SELECTOR HAS MULTIPLE STEPS:
    XPATH="BOOKS/BOOK"
    2940270 ORA-07445: EXCEPTION ENCOUNTERED: CORE DUMP [0000000102536A48] [SIGBUS]
    2970738 ORA-7445 [STRCMP()+568] WHEN REGIST XBRL GL SCHEMAS
    3007680 XDK FOR C FAILS SCHEMA CHECK
    XDK Java:
    2438656: ORACLE DOM PARSER NOT PARSING CORRECTLY
    2701717: XML PARSER DOES NOT SUPPORT SETEXPANDENTITYREFERENCE(FALSE)
    2495218: NULLPOINTEXCEPTION THROWN WHEN RESOLVING SAME XPATH EXPR IN MULTIPLE THREADS

    Oracle XDK 10.1.0.2.0 may be used with OC4J 9.0.4

Maybe you are looking for