XSLT : Problem using xsl:value-of disable-output-escaping="yes"

Hello,
I have some problem using "disable-output-escaping" attribute of xsl:value-of() function.
I have a table SONGS with two columns XML and XSL filled with :
<song>
  <title>Isn't she lovely?</title>
</song>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="xml" encoding="UTF-8"></xsl:output>
  <xsl:template match="//song">
    <out>
      <xsl:value-of select="title" disable-output-escaping="yes"></xsl:value-of>
    </out>
  </xsl:template>
</xsl:stylesheet>The query to transform XML with XSL :
SELECT XMLTRANSFORM (xml, xsl)  FROM songs;I get this XML :
<out>Isn&apos;t she lovely?</out>but I want that (without the '&amp;' special character) :
<out>Isn't she lovely?</out>How can I procees to succeed ?
Thanks,
Dominique

What DB version?
The following SQL
select xmltransform(XMLTYPE('<song>
  <title>Isn''t she lovely?</title>
</song>'), XMLTYPE('<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="xml" encoding="UTF-8"></xsl:output>
  <xsl:template match="//song">
    <out>
      <xsl:value-of select="title" disable-output-escaping="yes"></xsl:value-of>
    </out>
  </xsl:template>
</xsl:stylesheet>'))
  from dual;produces this on 11.1.0.6
<?xml version="1.0" encoding="UTF-8"?>
<out>Isn't she lovely?</out>and this on 10.2.0.4
<out>Isn&apos;t she lovely?</out>I found a couple of previous discussions regarding this at
{thread:id=679397}
{thread:id=879301}
The last discussion provides a workaround if you need it.

Similar Messages

  • Is xsl:value-of disable-output-escaping="yes"/ Supported in 2.0.2.6?

    I can't seem to display HTML from XML.
    In my XML file I store the HTML snippet in an XML tag:
    <PRE>
    <body.htmlcontent>
    <&#60;table width="540" border="0" cellpadding="0" cellspacing="0">
    &#60;tr>&#60;td>
    &#60;font face="Helvetica, Arial" size="2">
    &#60;!-- STILL IMAGE GOES HERE -->
    &#60;img src="graphics/imagegoeshere.jpg" width="200" height="175" align="right" vspace="0" hspace="7">
    &#60;!-- END STILL IMAGE TAG -->
    &#60;!-- CITY OR TOWN NAME GOES FIRST FOLLOWED BY TWO LETTER STATE ABBREVIATION -->
    &#60;b>City, state abbreviation&#60;/b> -
    &#60;!-- CITY OR TOWN NAME ENDS HERE -->
    &#60;!-- STORY TEXT STARTS HERE -->
    Story text goes here..
    &#60;!-- STORY TEXT ENDS HERE -->
    &#60;/font>
    &#60;/td>&#60;/tr>&#60;/table>
    </body.htmlcontent>
    </PRE>
    I use the following in my xsl:
    <xsl:value-of select="body.HTMLcontent" disable-output-escaping="yes"/>
    However, the HTML output <PRE>&#60;</PRE>is still outputted and all of the HTML tags
    are displayed in the browser. How do I display the HTML properly?
    Bob Hewett
    [email protected]

    This makes sense. Here's why.
    oraxsl internally uses the:
    void XSLProcessor.processXSL(style,source,printwriter);
    XSLSample.java uses:
    DocumentFragment XSLProcessor.processXSL(style,source);
    The former supports <xsl:output> and all
    options related to writing out output
    that might not be valid XML (including the disable output escaping)
    The latter is pure XML-to-XML tree returned,
    so no <xsl:output> or disabled escaping
    can be used since nothing's being output,
    just a DOM tree fragment of the result is
    being returned.
    null

  • XSL's disable-output-escaping in Java

    Hi,
    I have a question about the disable-output-escaping attribute in a XSLT-Stylesheet.
    I need to have a string in my output that describes a numeric entity like "& # x 0030;" (the inserted spaces are only to avoid the forumsoftware to interpret this sign). This should not be interpreted as the sign "0" but rather be literally copied in the result document.
    In XSLT Stylesheet I achieve this by writing:
    <xsl:value-of disable-output-escaping="yes" select="'&#x0026;#x0030;'" />Now I've tried to create a such Node object in a DOM tree. But thats harder than I thought.
    Text n = currentNode.getOwnerDocument().createTextNode((char)38 + "#x0030;");
    Text n = currentNode.getOwnerDocument().createTextNode("\u0026#x0030;");I tried to create a Text object (see above) but the ampersand sign is always interpreted as '& amp;', so that my resultstring is '& amp;#x0048;'.
    Now my question is if there is a posibility to set a property like "disable-output-escaping" for a specific Text/Node object?
    I would be grateful for an answer.
    Best Wishes
    esprimo

    Hi DrClap,
    thank you for your answer. Thats too bad that this doesn't work.
    But allow me a further question. I don't quite understand why it is malformed XML what I want to generate.
    <?xml version="1.0" encoding="UTF-8"?>
    <test>Hello & #x0042;en!</test>[again the space within the entity is to avoid the forum software to interpret this as the sign 'B']
    If I create a file like the above, both my XML editor tells me that this is wellformed and the Firefox browser can parse it properly (which I guess indicates that it is wellformed).
    So why is it malformed XML to represent a numeric entity?
    Best Wishes
    esprimo

  • Disable-output-escaping and named templates Part Two

    Steve,
    I had tried explicitly adding the disable-output-escaping inside the template and it didnt seem to have any effect.
    I had assumed this was becuase it was too late, and that during the process of passing the values through to the template as a param it gets escaped so that disabling escaping inside the template has no impact.
    inside the template I use
    <xsl:copy-of disable-output-escaping="yes" select="$Contents" />
    Any comments, am I doing something wrong
    Rob
    null

    I think I am also seeing something similar.
    When I use the command line oraxsl tool,
    I can process an XML file that contains HTML
    where the '<' is already replaced with the
    '<' entity. To output the content, I
    use :
    <xsl:copy>
    <xsl:value-of select="."
    disable-output-escaping="yes"/>
    </xsl:copy>
    This works fine for oraxsl, but when I try to
    process the file with my own Java class that
    uses XSLStylesheet and XSLProcessor, the
    output shows up as '#60;' instead of '<'...
    What is happening in oraxsl that outputs the
    '<' ...
    null

  • XSL disable-output-escaping problem

    When using the Java xslsample example to perform an XSLT transformation, we are trying to generate characters such as '<' in the output stream. However the following code fragment taken from the XSLT working draft:
    <xsl:text disable-output-escaping="yes"><</xsl:text>
    generates &#60; to the output stream.
    Any ideas?
    David
    null

    Never mind! I found the overloaded ProcessXSL member functions that output rather than transform.
    All cool now!

  • XSL disable-output-escaping

    Hi,
    I have the next part of an XML file:
    <?xml version="1.0" encoding="UTF-8"?>
    <idiomas>
         <element>
              <titol><![CDATA[Angl�s]]></titol>
              <url>/google.com</url>
              <alt><![CDATA[Change to Angl�s]]></alt>
              <language>en</language>
         </element>
    </idiomas>
    I want to obtain the next html code transforming the XML with an XSL to HTML code:
    <a title="Canviar a Castell�">Castellano </a>
    <a title="Change to Angl�s">Angl�s </a>
    but I obtain the next one:
    <a title="Canviar a Castell�">Castellano</a>
    <a title="Change to Angl�s">Angl�s</a>
    because I don't know HOW CAN I MAKE THE "disable-output-escaping" in elements like href, title, lang or xml:lang
    It seems that the "disable-output-escaping" only is available for xsl:value-of and xsl:text
    This is part of my XSL file:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <xsl:output method="html" version="4.0" encoding="UTF-8" indent="yes"/>
    <a href="{url" title="{alt" tabindex="80" lang="{language}" xml:lang="{language}">
         <xsl:value-of select="titol" disable-output-escaping="yes"/>
    </a>
    Anyone know how can I "disable-output-escaping" in elements accessed as {url}, {alt} ...
    Thanks in advance.
    Xavi
    Message was edited by:
    ffelipei_
    Message was edited by:
    ffelipei_

    First of all thanks for answer the question.
    You are right, the forum software has changed the text I wrote.
    I don't know how can explain what I want to said, but I will try.
    In my question I wrote:
    I want to obtain the next html code transforming the XML with an XSL to HTML code:
    <a title="Canviar a Castell�">Castellano </a>
    <a title="Change to Angl�s">Angl�s </a>
    but I obtain the next one:
    <a title="Canviar a Castell�">Castellano</a>
    <a title="Change to Angl�s">Angl�s</a>
    This text is partially ok.
    The two first lines of HTML are ok. The other two are ok partially, because the title attribute has been escaped.
    I will use the next symbol "_" following the ampersand "&" to prevent escaping of forum software.
    The last lines would be:
    <a title="Canviar a Castell&_amp;agrave;">Castellano</a>
    <a title="Canviar a Angl&_amp;egrave;s">Angl&_egrave;s</a>
    In the title I obtain after xsl transformation a "double encoding of entities".
    Thanks

  • 9iR2 XSLT: disable-output-escaping bug if  input is escaped

    If my interpretation of XSLT standards is correct, the "disable-output-escaping" attribute in the following example should output <table width="100%"> before the first attribute of the current element, and </table> after the last one. The overall result will be a valid HTML table. This is what happens if my browser (IE 5.5 SP2) or XMLSpy does the transform.
    In 9iR2 (and also in 9iR1), however, the actual output is &lt;table width="100%"&gt; and &lt;/table&gt;.
    Is this a (known) bug ??
    Age Jan
    <xsl:template match="@*">
         <!-- xsl:if test="position()=1">
              <xsl:text disable-output-escaping="yes">&lt;table width="100%"&gt;</xsl:text>
         </xsl:if -->
         <tr class="attribute">
              <td width="40"><xsl:value-of select="name(.)"/></td>
              <td><xsl:value-of select="."/></td>
         </tr>
         <!-- xsl:if test="position()=last()">
              <xsl:text disable-output-escaping="yes">&lt;/table&gt;</xsl:text>
         </xsl:if -->
    </xsl:template>

    Bug 2289449

  • XSL "disable-output-escaping" Directive  Support post - 9i R2

    Hello there,
    I've recently discovered that the XSL directive, disable-output-escaping="yes", does not work in Oracle 9i R2 when applying a Stylesheet to an XML document via the XMLTYPE.TRANSFORM function.
    I can accept that this wasn't supported in this version of the Database (as I have no choice in the matter ;-)). My question is, is this directive supported in XMLTYPE.TRANSFORM in either 10g R1/R2, or 11g R1?
    Thanks in advance.
    James

    Be adviced, regarding the "I have no choice in the matter", that maybe it is an idea to push your management into a new era, while being aware of the folllowing information (Metalink Note:392222.1):
    PURPOSE
    Reminder to Oracle Database customers of the end of Premier Support for version 9.2
    SCOPE & APPLICATION
    All Oracle9i Database Release 9.2 customers
    REMINDER: Premier Support for Oracle9i Database Release 9.2 Ends July 2007
    Oracle would like to remind our customers that the last day of 5-year Premier
    Support period for all editions of Oracle9i Database Release 9.2 is 31-July-2007.  
    Customers who plan on continuing to use Oracle9i Database Release 9.2 may choose
    from one of two options
    1. Continue with full error correction support by contracting for Extended
       Support, which will be offered for three years (to end of July 2010), or
    2. Continue with Sustaining Support which provides access to Global Customer
       Support and all pre-existing patches and Metalink notes (offered indefinitely).
    Customers wishing to upgrade to a release covered under Premier Support may
    choose Oracle Database Release 10.2 (Premier Support through end of July 2010)
    or Oracle Database Release 10.1 (Premier Support through end of January 2009).
    Oracle9i Database Release 9.2 Extended Support details:
    • Extended Support fee waived for the period August 1, 2007 to July 31, 2008.
    • Access to Fixes and Critical Patch Updates (CPUs) during the first year of
      Extended Support at no additional cost.
    • Patch set 9.2.0.8 will be the last patch set available for Oracle9i Database
      Release 9.2.
    • Effective August 1, 2007 all Fixes and CPUs will be created against the
      9.2.0.8 code line. 
    Please see the headline article on Metalink News and Notes entitled
    "First Year Extended Support Fee Waived for Oracle9i Database Release 2"
    for more details. 
    NOTES and EXCEPTIONS:
    • This end of Premier Support applies to all Oracle E-Business Suite,Peoplesoft,
      and Siebel customers using Database Version 9.2 where a later version of the
      Database is certified.  For example, E-Business Suite version 11.5.8 customers
      will be supported through the end of Premier Support for that E-Business Suite
      version because 9.2 was the last Database version certified.
    • Extended Support (ES) for the Oracle Database 9.2 will not include the
      Oracle HTTP Server 1.0.2.2 that is included with the Oracle Database 9.2.
    SUMMARY of Lifetime Support Dates for Oracle Database Release 9.2:
    Support Phase             Begins             Ends
    Premier Support             1-June-2003     31-July-2007
    Extended Support     1-August-2007     31-July-2010
    Sustaining Support     1-August-2010     Indefinite
    Please see http://www.oracle.com/support/premier/lifetime-support-policy.html for
    more information on the Lifetime Support Policy.

  • How to "disable-output-escaping" got Oracle XMLQuery ?

    I have Oracle 8i columns which contain well formed XML. For example a catalog description that contains "The copy we have for sale is <color>blue</color>".
    I am trying to write a Java program which uses OracleXMLQuery to retrieve columns from the database, adds them to an XMLDocument, then traverses the XMLDocument transforming the nodes in different ways depending on the node attributes and child values.
    I am trying to find a reasonable way to, effectively, "disable-output-escaping" on the OracleXMLQuery.
    I have a similar problem when using XSQL (where I think a "disable-output-escaping" option would be VERY useful) and have to use a "UndoQueryEscaping.xsl" and a requery.
    I have tried using achieving a similar effect using OracleXMLQuery.setXSLT() and XMLDocument.transformNode() but have not been able to get them to work.
    Can anyone suggest a method that works and is reasonably efficient?
    I have include the guts of my processing method to illustrate the problem.
    try
    setOutput( outputName );
    FileReader unescapeReader =
    new FileReader
    "com/jaysmith/jsdb/products/UndoQueryEscaping.xsl" );
    XSLStylesheet unescape =
    new XSLStylesheet( unescapeReader, new URL( "file://com/jaysmith/jsdb/products/" ) );
    xmldoc = new XMLDocument();
    xmldoc.setVersion( "1.0" ); // default.
    xmldoc.setEncoding( "ISO-8859-1" );
    Comment comment = xmldoc.createComment( "created by CatalogToXml on ..." );
    xmldoc.appendChild( comment );
    XMLElement doc = (XMLElement) xmldoc.createElement( "Document" );
    xmldoc.appendChild( doc );
    XMLElement docHeader = (XMLElement) xmldoc.createElement( "DocumentHeader" );
    doc.appendChild( docHeader );
    // Have to create actual XMLElement to pass to cq.getXMLDOM()
    XMLElement catalogs = (XMLElement) xmldoc.createElement( "Catalogs" );
    doc.appendChild( catalogs );
    XMLElement docFooter = (XMLElement) xmldoc.createElement( "DocumentFooter" );
    doc.appendChild( docFooter );
    // The catalog iterator stuff uses LIKE and while( ..next() )
    // even though we should only have one catalog.
    // This is safer and makes it easier to add catcdpattern support in future.
    query = "SELECT * FROM Catalog WHERE CatCd LIKE '" + argCatCd + "'" ;
    cq = new OracleXMLQuery( db.getConnection(), query );
    cq.setRowsetTag( "" ); // bcs we've already created Catalogs Element.
    cq.setRowTag( "Catalog" );
    cq.setDateFormat( "yyyy-MM-dd HH:mm:ss" ); // FIX. use property value.
    cq.setRowIdAttrName( "CATCD" );
    cq.setRowIdAttrValue( "CATCD" );
    // cq.useUpperCaseTagNames(); // NO, bcs forces even setRowTag values to upper.
    cq.useNullAttributeIndicator( true ); // initially incl nulls makes processing easier(?)
    // let us handle the exceptions.
    cq.setRaiseException( true );
    // use exception to break out if no rows.
    // alternatively could let xsql just include the "no rows found" message.
    cq.setRaiseNoRowsException( true );
    // doesn't work
    // cq.setStylesheetHeader( "com/jaysmith/jsdb/products/UndoQueryEscaping.xsl" );
    // doesn't work
    // cq.setXSLT(
    // "file://com/jaysmith/jsdb/products/UndoQueryEscaping.xsl",
    // "file://com/jaysmith/jsdb/products/"
    if( DEBUG >= 9 )
    // This causes closing of cq and thus next cq use will fail
    // Would need to set some cq.set... remain open?
    // env.msg.debug.println( 7, cq.getXMLString() );
    cq.getXMLDOM( catalogs );
    // doesn't work
    // catalogs.transformNode( unescape );
    xmldoc.print( output );
    releaseOutput();
    <xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    >
    <!-- Table.xsl
    -->
    <xsl:output
    encoding="ISO-8859-1"
    method="xml"
    indent="yes"
    />
    <xsl:preserve-space elements="*"/>
    <!--
    -->
    <xsl:template match="*">
    <xsl:copy select="node()" >
    <xsl:copy-of select="@*" />
    <xsl:apply-templates />
    </xsl:copy >
    </xsl:template>
    <xsl:template match="text()|@*">
    <xsl:value-of select="." disable-output-escaping="yes"/>
    </xsl:template>
    <xsl:template match="processing-instruction()|comment()">
    <xsl:copy/>
    </xsl:template>
    </xsl:stylesheet>
    Thank you
    R.Parr
    Temporal Arts
    null

    The way I see it, you have two possible approaches:
    [list=1]
    [*]Produce a text-based version of the XML document, including the unescaped content of the XML column, and then parse the whole thing, or
    [*]You effectively need to do a "mini-parse" of your document fragment in the column to produce the DOM nodes that it represents so that they can be appended into the DOM tree at the right point.
    [list]
    I think approach 1 is the more easily doable.

  • Disable-output-escaping and named templates

    I am trying to combine two parts of Steve book, the "features" example that requires disable-output-escaping because the text in the db contains html, and the titledboxes xsl which is called a s a named template.
    Problem is that when I call a template passing the text from the db as a content param the html gets escaped regardless of the output escaping.
    I know why but I need to know a workaround that allows me to use templates and lets me keep html embeded in the db column.
    Rob

    This is Bug 1285505, "Disable-Output-Escaping Is Lost When Copying A Text Node" which has been fixed for the 9.0.1 release that will be posted to OTN in about the May timeframe.
    In the meantime, the workaround is to build two versions of your titled-box template, one which explicitly does disable-output-escaping when it writes the content to the output, and the other one that's like what you have now.

  • Problem using default value of report parameter 1 to validate parameter 2 passed in to report

    I am having a problem with an SSRS report using the default value of report parameter 1 to validate parameter 2 passed in to report (via C#) instead of using the value of parameter 1 that is also passed into the report.  Here are the
    simplified details:
    Using SSDT, SQL Server 2008 R2
    SSRS report has 2 parameters:
    P1 -- text, hidden, default value 'R1', ... front-end C# code can pass 'R2' or 'R1'
    P2 -- text, allows multiple values, list of available values provided by stored procedure (sproc_list) that takes P1 value as a parameter.  Hence, sproc_list either provides a list for P1 = 'R1' or P1 = 'R2'.
    List for P1 = 'R1' is 'A', 'B', 'C'
    List for P1 = 'R2' is 'A', 'B', 'D'
    Values for P1 and P2 can be passed in via C# to the report.
    The C# front-end displays 2 report choices to the user, R1 and R2, where both choices call the same RDL; but choice R1 passes in 'R1' for P1, and the choice R2 passes in 'R2' for P1.
    Upon a users 1st time use of the report no parameters are passed in.  Then when the user exits the report, the parameter value for P2 that was chosen is saved off to a file for R1 or R2, and used the next time the user selects the report.
    Everything always works fine for report R1 since the default value for P1 is 'R1'.
    When R2 is chosen and the user selects 'D' as the value for P2, runs the report, then exits, the P2 value of 'D' for R2 is saved to a file.  When the user returns the next day to run report R2, 'R2' is passed for P1, and 'D' is passed for P2.
    This is when the problem occurs.  The value of 'D' for P2 is validated against a list generated for P2 based on the default value of 'R1' for parameter P1.  Hence, SSRS considers 'D' an invalid value for P2 and blanks out the P2 parameter. 
    The user can then use the drop down list for P2 and choose 'D', but this defeats the purpose of saving the parameter values to be used the next time.
    Why is the stored procedure that provides a list of available values for parameter P2 using the default value of 'R1' for parameter P1 instead of using the value of 'R2' passed into the report for parameter P1?

    Hi Tom,
    Sorry for my delay.
    If I understand correctly, you have two parameter in your report. It is a couple of cascading parameter. If we have choose ‘R1’ of P1, the P2 values is A, B, C. ‘R2’ of P1, corresponding P2 values is A, B, D. What your requirement is to save the end use
    select option of these two parameters.
    In SSRS, if we have configure the parameter with default value. When we run the report, the parameter will fill with the default value to filter data. If we want to save the last status we are render the report, we need to update the default value of P1.
    If we are query the default value from database, if possible, we can
    update the database try to resolve the issue.  Alternatively, we can set the dynamic default value for the parameter.
    Hope this helps.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Problem using xsl to convert xml to xml

    I have and xml doc that has a format similar to this:
    <HEADER>
    <ORDER_NUMBER>
    <ORDER_DATE>
    <LINE>
    <LINE_NUMBER>
    <ITEM>
    </LINE>
    <LINE_NUMBER>
    <ITEM>
    </LINE>
    </HEADER>
    When I convert from xml to xml using xsl I do not get the second occurence of <LINE>, everything else looks fine.
    Please help.
    Thanks, John

    Hi John,
    I also have problems to convert xml to xml by xsl at command-line interface as follows.
    CLASSPATH=$ORACLE_HOME/rdbms/jlib/xsu12.jar:$ORACLE_HOME/lib/xmlparserv2.jar:$ORACLE_HOME/jdbc/lib/classes12.zip
    java oracle.xml.parser.v2.oraxsl source.xml -s myxsl.xsl destination.xml
    and I received error message as "Error occurred while processing myxsl.xsl: Error in expression: '*|/'."
    Actually, the source xml file and xsl script I used were copied from the book "Professional XML".
    Do you know what's the problem and could you show me setting for the classpath?
    Thanks.
    Yi

  • Problem using the value of the variable in the KM options - Essbase Extract

    Hi,
    I am able to extract the data from Hyperion Essbase using the report script present in D:\ODIHome\oracledi\demo\hyperion.
    Instead of hardcoding the absolute file path in LKM options, I have requirement to use the value of variable, PIPHome and form the file path.
    So in LKM Options I gave Extraction Query File path as #GLOBAL.PIPHome \oracledi\demo\hyperion\extract.rep
    Its not able extract the data and throwing following exception.............Please help me in using the variable value in KM options. Thanks.
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 1, in ?
    com.hyperion.odi.essbase.ODIEssbaseException: Cannot execute report. Analytic Server Error(1030009): Name too long (#GLOBAL.PIP_HOME\oracledi\demo\hyperion\extract.rep) in ESSAPI function EssReportFile
         at com.hyperion.odi.essbase.ODIEssbaseDataReader.getAppData(Unknown Source)
         at com.hyperion.odi.essbase.AbstractEssbaseReader.extract(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
         at org.python.core.PyMethod.__call__(PyMethod.java)
         at org.python.core.PyObject.__call__(PyObject.java)
         at org.python.core.PyInstance.invoke(PyInstance.java)
         at org.python.pycode._pyx3.f$0(<string>:1)
         at org.python.pycode._pyx3.call_function(<string>)
         at org.python.core.PyTableCode.call(PyTableCode.java)
         at org.python.core.PyCode.call(PyCode.java)
         at org.python.core.Py.runCode(Py.java)
         at org.python.core.Py.exec(Py.java)
         at org.python.util.PythonInterpreter.exec(PythonInterpreter.java)
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
         at com.sunopsis.dwg.codeinterpretor.k.a(Unknown Source)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(Unknown Source)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(Unknown Source)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(Unknown Source)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(Unknown Source)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(Unknown Source)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(Unknown Source)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(Unknown Source)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(Unknown Source)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(Unknown Source)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(Unknown Source)
         at com.sunopsis.dwg.cmd.e.i(Unknown Source)
         at com.sunopsis.dwg.cmd.h.y(Unknown Source)
         at com.sunopsis.dwg.cmd.e.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: com.hyperion.odi.essbase.ODIEssbaseException: Cannot execute report. Analytic Server Error(1030009): Name too long (#GLOBAL.PIP_HOME\oracledi\demo\hyperion\extract.rep) in ESSAPI function EssReportFile
         at com.hyperion.odi.essbase.wrapper.EssbaseReportDataIterator.init(Unknown Source)
         ... 33 more
    Caused by: com.essbase.api.base.EssException: Cannot execute report. Analytic Server Error(1030009): Name too long (#GLOBAL.PIP_HOME\oracledi\demo\hyperion\extract.rep) in ESSAPI function EssReportFile
         at com.essbase.server.framework.EssOrbPluginDirect.ex_olap(Unknown Source)
         at com.essbase.server.framework.EssOrbPluginDirect.essMainReport(Unknown Source)
         at com.essbase.api.session.EssOrbPlugin._invokeMainMethod(Unknown Source)
         at com.essbase.api.session.EssOrbPlugin._invokeMethod2(Unknown Source)
         at com.essbase.api.session.EssOrbPlugin._invokeMethod(Unknown Source)
         at com.essbase.server.framework.EssOrbPluginDirect._invokeProtected(Unknown Source)
         at com.essbase.api.session.EssOrbPluginEmbedded.invokeMethod(Unknown Source)
         at com.essbase.api.session.EssOrbPluginEmbedded.invokeMethod(Unknown Source)
         at com.essbase.api.session.EssOrbPlugin.essMainReport(Unknown Source)
         at com.essbase.api.datasource.EssCube.report(Unknown Source)
         ... 34 more
    com.hyperion.odi.essbase.ODIEssbaseException: com.hyperion.odi.essbase.ODIEssbaseException: Cannot execute report. Analytic Server Error(1030009): Name too long (#GLOBAL.PIP_HOME\oracledi\demo\hyperion\extract.rep) in ESSAPI function EssReportFile
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.k.a(Unknown Source)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(Unknown Source)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(Unknown Source)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(Unknown Source)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(Unknown Source)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(Unknown Source)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(Unknown Source)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(Unknown Source)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(Unknown Source)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(Unknown Source)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(Unknown Source)
         at com.sunopsis.dwg.cmd.e.i(Unknown Source)
         at com.sunopsis.dwg.cmd.h.y(Unknown Source)
         at com.sunopsis.dwg.cmd.e.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

    Hi,
    If you are going to use variable as one of the options then what you can do is create a package.
    Drag your variable on to the package and set or declare it.
    Then drag your interface on to the package.
    Now when you execute the package it should make use of the variable.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • XSLT Problem in Sum value

    Hello,
    How can I get the sum() of the XML in some two fields?
    <orders>
    <order>
    <item>Book</item>
    <qty>10</qty>
    <price>12.5</price>
    </order>
    <order>
    <item>CD</item>
    <qty>3</qty>
    <price>6.99</price>
    </order>
    </orders>
    How can I get the subtotal ????
    -- subtotal = sum(qty*price)
    Eric

    here what you're looking for!
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:variable name="total" />
    <xsl:template match="orders">
    <html>
    <Head>
    <title>main file</title>
    </Head>
    <body>
    <xsl:apply-templates select="order"/>
    totale:<xsl:value-of select="round(sum(child::*/child::qty)*sum(child::*/child::price))"/>
    </body>
    </html>
    </xsl:template>
    <xsl:template match="order">
    <xsl:variable name="quantite" select="./qty"/>
    <xsl:variable name="price" select="./price"/>
    subtotal<xsl:value-of select="position()"/>=<xsl:value-of select="$quantite*$price"/>
    </xsl:template>
    </xsl:stylesheet>

  • XSU XSLT and using xsl:include href=""

    I'm runing XDK 9.2 on an 8.1.7.4 database. I'm trying to transform the output of the XSU into a flat text file using a set of XSLT files. The main xslt includes the other xslt template files and then calls their templates by name as needed for different types of data in the XSU output.
    I have the main xslt in a table of BFILEs that I read from and pass to the DBMS_XMLQUERY.SETXSLT procedure as a CLOB. I get the following errors when I run the main procedure to generate the flat text file:
    oracle.xml.sql.OracleXMLSQLException: <Line 41, Column 35>: XSL-1002: (Error) Error while processing include XSL file (header.xslt).
    at oracle.xml.sql.query.OracleXMLQuery.setXSLT(OracleXMLQuery.java:818)
    at oracle.xml.sql.query.OracleXMLStaticQuery.setXSLT(OracleXMLStaticQuery.java:481)
    "header.xslt" is one of the included xslts. Is there some way to specify the other xslts? I have tried loading them into the BFILE table, but it still doesn't work.

    Hi I have tried out the code i.e. transforming a node and getting out a string representation. Following is code that works using JAXP apis.
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    import javax.xml.transform.dom.*;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    import java.io.*;
    public class XMLString {
    public void xmlInString(Document document) throws Exception{
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer transformer =
                   tf.newTransformer();
    StringWriter stWriter = new StringWriter();
    transformer.transform(new DOMSource(document), new StreamResult(stWriter));
    String strDOM = stWriter.toString();
    System.out.println("String dom");
    StringReader strIn = new StringReader(strDOM);
    BufferedReader buffIn = new BufferedReader(strIn);
    BufferedWriter bufOut = new BufferedWriter(new FileWriter("out.txt"));
    String out = null;
    while((out=buffIn.readLine()) != null){
    bufOut.write(out, 0, out.length());
    bufOut.flush();
    bufOut.close();
    public static void main(String args[]){
    try{
    XMLString strXML = new XMLString();
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    InputSource inputSource = new InputSource("input.xml");
    Document doc = db.parse(inputSource);
    strXML.xmlInString(doc);
    }catch(Exception e){
    System.out.println(e.getMessage());
    e.printStackTrace();
    I am using the xalan and xerces versions that come with the Java XML Winter pack from sun's website. The problem could lie with the underlying transformation processor you are using. It may not support transforming to a string or it could have a bug. So my advice is to find out what version transformation processor you are using. And look at the vendor's documentation to find any reference to this feature. Otherwise try using the Java XML Winter pack.

Maybe you are looking for