XSL Variables problem in WLPI 2.0

Environment: OS-Win 2k Pro, JDK-1.3.1, WLS 6.0 sp2, WLI 2.0
Gee.., the XML repository looks like it could be useful if only the XSL it
processes could handle XSL variables! When trying to use XSL variables in
my stylesheet, I get a
'org.apache.xalan.xpath.XPathException:pattern='$myvar' could not get
variable named myvar error
when I try to use any XSL variables!!
For example:
Given XML of:
<?xml version='1.0' encoding='utf-8' ?>
<DOC>hello</DOC>
and XSL of:
<?xml version='1.0' encoding='utf-8' ?>
<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:output method='xml'/>
<xsl:template match="DOC">
<xsl:variable name='myvar' select='./text()'/>
<MYVAR>
<xsl:value-of select="$myvar"/>
</MYVAR>
</xsl:template>
</xsl:stylesheet>
WLI chokes. If I however replace the variable with the XPATH statement, it
works fine! I've tested this by using the WLI version of the apache XALAN
product that can be found in 'xmlx.jar' and this works fine outside of WLI.
Can someone tell me what is happening here??
Bart Jenkins, CTO
Globeflow SA
[email protected]
mobile: +34 667 65 10 75

FYI :
WLI SP2 Fixes the problem.
Thanks
Bart Jenkins wrote:
Environment: OS-Win 2k Pro, JDK-1.3.1, WLS 6.0 sp2, WLI 2.0
Gee.., the XML repository looks like it could be useful if only the XSL it
processes could handle XSL variables! When trying to use XSL variables in
my stylesheet, I get a
'org.apache.xalan.xpath.XPathException:pattern='$myvar' could not get
variable named myvar error
when I try to use any XSL variables!!
For example:
Given XML of:
<?xml version='1.0' encoding='utf-8' ?>
<DOC>hello</DOC>
and XSL of:
<?xml version='1.0' encoding='utf-8' ?>
<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:output method='xml'/>
<xsl:template match="DOC">
<xsl:variable name='myvar' select='./text()'/>
<MYVAR>
<xsl:value-of select="$myvar"/>
</MYVAR>
</xsl:template>
</xsl:stylesheet>
WLI chokes. If I however replace the variable with the XPATH statement, it
works fine! I've tested this by using the WLI version of the apache XALAN
product that can be found in 'xmlx.jar' and this works fine outside of WLI.
Can someone tell me what is happening here??
Bart Jenkins, CTO
Globeflow SA
[email protected]
mobile: +34 667 65 10 75

Similar Messages

  • XMLTRANSORM - LPX-00607: Invalid reference - xsl:variable

    Hi,
    I'm working on Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit.
    I have a problem using XMLTRANSFORM method with variable (ie. SenderDN).
    There is a table "ma_table" with three columns : "id", "data_xml" and "data_xsl".
    Here is the query used :
    SELECT XMLTRANSFORM (data_xml, data_xsl) FROM ma_table WHERE id = 64;Here is the data to transform :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <SOSTA xmlns="http://www.xxxxxx.com/yyyy/pipo">
         <infos>
              <generated>2009-08-19T16:23:56</generated>
              <reference_tech>ABCD123456789</reference_tech>
         </infos>
         <RECEDEP>AAAAAAAA</RECEDEP>
         <SENDERM>BBB</SENDERM>
         <REFSEND>5100161753</REFSEND>
         <QUALIFI>N</QUALIFI>
         <REFINTE>0010000934487</REFINTE>
         <TYPSTAT>IPRC</TYPSTAT>
         <STAREMT>REJT</STAREMT>
         <RAISON>DSEC</RAISON>
         <NARRA>blablabla</NARRA>
         <NARRA1>blablabla</NARRA1>
         <NARRA2/>
         <CENTRDT>20090819</CENTRDT>
         <STTLMDT>00000000</STTLMDT>
         <TYPSORA>SOU</TYPSORA>
         <INDMONT>O</INDMONT>
         <QUANTFI/>
         <SEAMMNT>10941,19</SEAMMNT>
         <CLIEDEV>EUR</CLIEDEV>
         <IFICODI>EEEEEEEEEE</IFICODI>
         <IFILIBE/>
         <IDCPTIT>123456789456132</IDCPTIT>
         <routage>
              <feuille name="tagada">
                   <Destinataire>dest</Destinataire>
                   <Priority>Normal</Priority>
                   <IsNotificationRequested>false</IsNotificationRequested>
                   <Service>dervice</Service>
              </feuille>
         </routage>
    </SOSTA>And here is the stylesheet :
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
         xmlns:yyyy="http://www.xxxxxx.com/yyyy/pipo">
         <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
         <xsl:variable name="SenderDN">sender dn</xsl:variable>
         <xsl:variable name="SenderBIC8">bic height</xsl:variable>
         <xsl:template match="/*">
              <DataPDU xmlns="urn:swift:saa:xsd:saa.2.0">
                   <Header>
                        <Message>
                             <SenderReference>
                                  <xsl:value-of select="./yyyy:infos/yyyy:reference_tech"/>
                             </SenderReference>
                             <MessageIdentifier>
                                  <xsl:value-of select="./yyyy:routage/yyyy:feuille/yyyy:MessageIdentifier"/>
                             </MessageIdentifier>
                             <Format>MX</Format>
                             <Sender>
                                  <DN>
                                       <xsl:value-of select="$SenderDN"/>
                                  </DN>
                                  <FullName>
                                       <X1>
                                            <xsl:value-of select="$SenderBIC8"/>
                                            <xsl:value-of select="./yyyy:routage/yyyy:feuille/yyyy:SenderBranchCode"/>
                                       </X1>
                                  </FullName>
                             </Sender>
                             <Receiver>
                                  <DN>
                                       <xsl:value-of select="./yyyy:routage/yyyy:feuille/yyyy:ReceiverDN"/>
                                  </DN>
                                  <FullName>
                                       <X1>
                                            <xsl:value-of select="./yyyy:routage/yyyy:feuille/yyyy:ReceiverBIC11"/>
                                       </X1>
                                  </FullName>
                             </Receiver>
                             <InterfaceInfo>
                                  <UserReference>
                                       <xsl:value-of select="./yyyy:infos/yyyy:reference_tech"/>
                                  </UserReference>
                             </InterfaceInfo>
                             <NetworkInfo>
                                  <Service>
                                       <xsl:value-of select="./yyyy:routage/yyyy:feuille/yyyy:Service"/>
                                  </Service>
                             </NetworkInfo>
                        </Message>
                   </Header>
                   <Body>
                        <AppHdr>
                             <MsgRef>
                                  <xsl:value-of select="./yyyy:infos/yyyy:reference_tech"/>
                             </MsgRef>
                             <CrDate>
                                  <xsl:value-of select="./yyyy:infos/yyyy:generated"/>
                             </CrDate>
                        </AppHdr>
                        <Document> </Document>
                   </Body>
              </DataPDU>
         </xsl:template>
    </xsl:stylesheet>And I get this error message :
    ORA-31011: XML parsing failed
    ORA-19202: Erroroccured in XML processing
    LPX-00607: Invalid reference: 'SenderDN'Why this error?
    How to use this variable?
    Thanks,
    -Dominique

    Hi,
    I'va found the solution by modifying the <xsl:stylesheet> like this :
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
         xmlns:yyyy="http://www.xxxxxx.com/yyyy/pipo"
         xmlns="urn:swift:saa:xsd:saa.2.0">(adding xmlns="urn:swift:saa:xsd:saa.2.0")
    But I don't understand why it work fine now ???
    If anyone have an explanation?
    Thanks,
    -Dominique

  • Interrogating xsl:variable value yields unexpected result

    Hi,
    We have a problem which we are unsure as to whether it is a bug or not.
    The transform below declares an xsl:variable (VAR1) and assigns it a value (X). This variable is subsequently interrogated, by checking for its value to be equal to Y, and this returns true. Is this as expected?
    We are running Oracle 10.2.0.1
    To reproduce, run the following transform against the following sample XML to output the following result
    =======================TRANSFORM ===============================================
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
    <xsl:template match="Product">
    <xsl:variable name="VAR1">
    <xsl:choose>
    <xsl:when test="true()">X</xsl:when>
    <xsl:otherwise>N</xsl:otherwise>
    </xsl:choose>
    </xsl:variable>
    <xsl:value-of select="$VAR1" />
    <xsl:choose>
    <xsl:when test="$VAR1='Y'">Y</xsl:when>
    <xsl:otherwise>N</xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    </xsl:stylesheet>
    =======================XML========================================================
    <?xml version="1.0" encoding="UTF-8"?><Product></Product>
    =======================RESULT=====================================================
    XY
    ==================================================================================

    Appears to be a bug in 10.2.0.1. It produces the correct result in 10.2.0.3. Not sure which way .2 falls.
    From 10.2.0.3
    SQL> var xsltext varchar2(4000)
    SQL>
    SQL> begin
      2  :xsltext :=
      3  '<?xml version="1.0" encoding="UTF-8"?>
      4  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
      5  <xsl:template match="Product">
      6  <xsl:variable name="VAR1">
      7  <xsl:choose>
      8  <xsl:when test="true()">X</xsl:when>
      9  <xsl:otherwise>N</xsl:otherwise>
    10  </xsl:choose>
    11  </xsl:variable>
    12  <xsl:value-of select="$VAR1" />
    13  <xsl:choose>
    14  <xsl:when test="$VAR1=''Y''">Y</xsl:when>
    15  <xsl:otherwise>N</xsl:otherwise>
    16  </xsl:choose>
    17  </xsl:template>
    18  </xsl:stylesheet>';
    19  end;
    20  /
    PL/SQL procedure successfully completed
    SQL> select xmltransform(xmltype('<Product></Product>'),xmltype(:xsltext)) from dual;
    XMLTRANSFORM(XMLTYPE('<PRODUCT
    XN

  • XSL Append & XSL Variable !!!

    Hi,
    If anyone has any ideas on the below problem I would sincerely appreciate it as it is driving me crazy!!!
    I need to concatenate/append the contents of a Collection node into a string variable, such that each element is comma seperated in the string. I need to do this to pass the string of comma seperated values into a 3rd party service that I am calling. It looks like I would use an XSL transform to achieve this. However, it appears to be impossible because Oracle Transform mapper does not support <xsl:variable> ie. I get "unsupported" when I try to use this.
    So,for example, I want to convert the following collection
    <NamesCollection>
    <name>A</name>
    <name>B</name>
    <name>C</name>
    <name>D</name>
    <name>E</name>
    <name>F</name>
    <name>G</name>
    <name>H</name>
    </NamesCollection>
    ...such that it would become:
    <NAMES>A,B,C,D,E,F,G,H</NAMES>
    I found some sample XSL code in google:
    <xsl:variable name="String">
    <xsl:for-each select="/NamesCollection">
    <xsl:value-of select="name" />
    <xsl:text>,</xsl:text>
    </xsl:for-each>
    </xsl:variable>
    However, Oracle mapper does not support "xsl:variable". So the above is no good.
    I cannot also nest a "for-each" inside a node,
    Eg.
    <NAMES>
    <xsl:for-each select="/NamesCollection">
    <xsl:value-of select="name"/>
    </xsl:for-each>
    </NAMES>
    because it complains:
    Error: Invalid Usage of <for-each> Element
    If anyone has any suggestions, they would be sincerely appreciated !!!!!!!!!

    Humm...
    You can iterate trough your NamesCollection (see <HOME>\integration\orabpel\samples\tutorials\112.Arrays sample).
    After, for each <name>, you can use an "Assign" activity to append all names to another variable.
    The trick here is to edit the "Assign" source code on process.bpel (because the default behaviour is to replace the value, not append). You have to use a BPEL extension:
    <assign name="Assign_1">
    <bpelx:append>
    <bpelx:from concat(bpws:getVariableData(eachName_Variable),",") />
    <bpelx:to variable="namesWithComma_Variable" />
    </bpelx:append>
    </assign>
    Logic:
    <IterateOver NamesCollection>
    <get one name>
    <concat it with a comma>
    <concat it with other names>
    <loop iterate>

  • Editing xsl:variable node

    I want to write a java class that edits the value of the playerNumber variable in player.xsl. I wrote the java class below but the line with XPathQuery.selectSingleNode returns null. I thought my query would work but now I think maybe the problem is that I'm not specifying a namespace in my query. Anyone have any helpful hints? Thanks in advance.
    TransformXSL.java
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import java.io.*;
    public class TransformXSL {
         public static void main(String[] args) throws Exception {
              File fl = new File ("player.xsl");
               DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              DocumentBuilder builder = factory.newDocumentBuilder();
              Document doc = builder.parse(fl);
              Element docElement = doc.getDocumentElement();
              String xpathQuery = "xsl:stylesheet/xsl:variable";
              Node n = XPathAPI.selectSingleNode(docElement, xpathQuery); // this node returns null
              if (n == null) {
                   System.out.println("n is null");
              } else {
                   System.out.println("n is not null");
    player.xsl
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1">
         <xsl:variable name="playerNumber">25</xsl:variable>
         <xsl:template match="/">
              <h3>
                   <xsl:value-of select="firstName"/>
                   <xsl:value-of select="lastName"/>
                   <xsl:value-of select="$playerNumber"/>
              </h3>
         </xsl:template>
    </xsl:stylesheet>

    Witht the XPathAPI a namespace node is required in the selectSingleNode method for a node with a namespace prefix.
    Parse with the JDOM XPath class which has a addNamespace method to add namespace for XPath expressions.
    http://www.jdom.org/docs/apidocs/org/jdom/xpath/XPath.html

  • How to use xsl-variables

    I have the following piece of code. The numbers are the number of the code lines.
    In line 17 I want to assign a value to the attribute value of the node options. The value should be the value of the xsl-variable "wildart" which i declared in line 7. How can use the value of this variable in line 17 correctly?
    1     String xsl =
    2      + "<form name=\"wildart\" action=\"/servlet/model/ServletTransformerTest\"  method=\"post\">"
    3      + "<select name=\"wildart\" onChange=\"form.submit()\">"
    4      + "<option>Bitte Ausw�hlen</option>"
    5      + "<xsl:for-each select=\"//tier\">"
    6      + "<xsl:sort select=\"@wildart\" data-type=\"text\"/>"
    7      + "<xsl:variable name=\"wildart\" select=\"@wildart\"/>"
    8      + "<xsl:variable name=\"name\" select=\"@name\"/>"
    9      + "<xsl:variable name=\"anzahl\" select=\"count(//tier[@wildart=$wildart])\"/>";
    10                
    11     if(optionSelected == null) {
    12
    13        xsl = xsl           
    14        + "<xsl:for-each select=\"//tier[@wildart =$wildart]\">"
    15        + "<xsl:if test=\"position()=last()\">"
    16        + "<xsl:if test=\"@name=$name\">"         
    17        + "<option value=\"$wildart\">"
    18        + "<xsl:value-of select=\"@wildart\"/>"
    19        + "</option>"
    20        + "</xsl:if>";
    21     }

    use : "<option value=\"{$wildart}\">"

  • Xsl variable error not explained in earlier thread

    Steve,
    Thank you so much for your response to my earlier thread, it is difficult to focus on what I am supposed to be doing today, with all the sad news from the east coast.
    Re-visiting this variable issue one more time to try understand what is going wrong with this file.
    Below is a shortened version of the file plus the output from parsing it with xalan, saxon and oracle's two latest versions. As you see it parses fine with xalan and saxon but errors out with oracle's latest version. Should this be looked at again perhaps?
    xml file
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="UtilDataForm.xsl"?>
    <page>
    <dataform target="News.xsql" submit="SubmitButtonTitle">
    <item type="checkboxlist" name="nameOfCheckBoxList" label="CheckBoxList">
    <ROWSET>
    <ROW><VALUE>4</VALUE><DISPLAY>This</DISPLAY></ROW>
    <ROW><VALUE>5</VALUE><DISPLAY>That</DISPLAY></ROW>
    <ROW><VALUE>6</VALUE><DISPLAY>The Other</DISPLAY></ROW>
    </ROWSET>
    </item>
    </dataform>
    </page>
    xsl file
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <!--
    | UtilDataForm.xsl: Transform <dataform> structural info
    | into a data-bound HTML Form
    +-->
    <xsl:template match="dataform">
    <xsl:variable name="form-target">
    <xsl:choose>
    <xsl:when test="@target">
    <xsl:value-of select="@target"/>
    </xsl:when>
    <xsl:when test="./target">
    <xsl:value-of select="./target"/>
    <xsl:if test="*">?</xsl:if>
    <xsl:for-each select="*">
    <xsl:value-of select="name(.)"/>
    <xsl:text>=</xsl:text>
    <xsl:value-of select="."/>
    <xsl:if test="position() != last()">
    <xsl:text>&;</xsl:text>
    </xsl:if>
    </xsl:for-each>
    </xsl:when>
    <xsl:otherwise>
    <xsl:text> </xsl:text>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:variable>
    <center>
    <form method="POST" action="{$form-target}">
    <xsl:for-each select="item[@type='hidden']">
    <input type="hidden" name="{@name}" value="{normalize-space(.)}"/>
    </xsl:for-each>
    <table>
    <xsl:for-each select="item[@type != 'hidden']">
    <tr>
    <th align="right"><xsl:value-of select="@label"/></th>
    <td>
    <xsl:choose>
    <xsl:when test="@type='text'">
    <input type="text" name="{@name}"
    value="{normalize-space(.)}">
    <xsl:if test="@size">
    <xsl:attribute name="size">
    <xsl:value-of select="@size"/>
    </xsl:attribute>
    </xsl:if>
    </input>
    </xsl:when>
    <xsl:when test="@type='password'">
    <input type="password" name="{@name}"
    value="{normalize-space(.)}">
    <xsl:if test="@size">
    <xsl:attribute name="size">
    <xsl:value-of select="@size"/>
    </xsl:attribute>
    </xsl:if>
    </input>
    </xsl:when>
    <xsl:when test="@type='textarea'">
    <textarea class="code" rows="5" name="{@name}">
    <xsl:if test="@size">
    <xsl:attribute name="cols">
    <xsl:value-of select="@size"/>
    </xsl:attribute>
    </xsl:if>
    <xsl:value-of select="normalize-space(.)"/>
    </textarea>
    </xsl:when>
    <xsl:when test="@type='list'">
    <xsl:variable name="default" select="default"/>
    <select name="{@name}">
    <xsl:for-each select="ROWSET/ROW">
    <option value="{VALUE}">
    <xsl:if test="VALUE=$default">
    <xsl:attribute name="selected"/>
    </xsl:if>
    <xsl:value-of select="DISPLAY"/>
    </option>
    </xsl:for-each>
    </select>
    </xsl:when>
    <xsl:when test="@ty pe='checkboxlist'">
    <xsl:variable name="name" select="@name"/>
    <xsl:for-each select="ROWSET/ROW">
    <input type="checkbox" name="{$name}" value="{VALUE}">
    <xsl:if test="SELECTED='Y'">
    <xsl:attribute name="checked"/>
    </xsl:if>
    </input>
    <xsl:value-of select="DISPLAY"/>
    </xsl:for-each>
    </xsl:when>
    </xsl:choose>
    </td>
    </tr>
    </xsl:for-each>
    </table>
    <input type="submit" value="{@submit}"/>
    </form>
    </center>
    </xsl:template>
    </xsl:stylesheet>
    xalan output
    <?xml version="1.0" encoding="UTF-8"?>
    <center><form action="News.xsql" method="POST"><table><tr><th align="right">CheckBoxList</th><td><input value="4"
    name="nameOfCheckBoxList" type="checkbox"/>This
    <input value="5" name="nameOfCheckBoxList"
    type="checkbox"/>That
    <input value="6" name="nameOfCheckBoxList" type="checkbox"/>The Other
    </td></tr></table><input
    value="SubmitButtonTitle" type="submit"/></form></center>
    saxon output
    <?xml version="1.0" encoding="utf-8"?>
    <center><form method="POST" action="News.xsql"><table><tr><th align="right">CheckBoxList</th><td><input type="checkbox"
    name="nameOfCheckBoxList" value="4"/>This
    <input type="checkbox" name="nameOfCheckBoxList" value="5"/>That
    <input
    type="checkbox" name="nameOfCheckBoxList" value="6"/>The Other
    </td></tr></table><input type="submit"
    value="SubmitButtonTitle"/></form></center>
    oraxsl with xmlparserv2.jar dated 06/19/01 10:09
    <?xml version = '1.0'?>
    <center><form method="POST" action="News.xsql"><table><tr><th align="right">CheckBoxList</th><td><input type="checkbox"
    name="nameOfCheckBoxList" value="4"/>This
    <input type="checkbox" name="nameOfCheckBoxList" value="5"/>That
    <input
    type="checkbox" name="nameOfCheckBoxList" value="6"/>The Other
    </td></tr></table><input type="submit"
    value="SubmitButtonTitle"/></form></center>
    oraxsl with xmlparserv2.jar dated 08/04/01 20:24
    file:/W:/workorders/util/UtilDataForm.xsl: XSL-1031: (Error) Variable not defined: 'name'.
    oracle.xml.parser.v2.XPathException: Variable not defined: 'name'.
    Error occurred while processing W:\workorders\util\FormTest.xsql: file:/W:/workorders/util/UtilDataForm.xsl: XSL-1031:
    (Error) Variable not defined: 'name'.
    Thank you again for your help!
    Ola Kvalvaag
    IS Administrator
    CT&E Environmental Services Inc.

    Yeah!!! It works. Turned out to be a combination of DrKlap's and Martisan's suggestions -- had to change var frame's declaration from JFrame to MyFrame:
        MyFrame frame;Next, created the external class -- but again changed JFrame references to MyFrame:
    public class ShowOnExit extends WindowAdapter {
    //   JFrame aFrame;
       MyFrame aFrame;
       public ShowOnExit(MyFrame f) {
          aFrame = f;
       public void windowClosing(WindowEvent e)
          System.out.println("Why me???" + aFrame.textArea.getText()); // aFrame here not frame !!!
    }This worked. So looks like even though the original code added a WindowListener to 'frame', the listener didn't couldn't access frame's methods unless it was explicitly passed in as a parameter. Let me know if that's wrong.
    Thanks again, all.

  • Bad Bind Variable Problem

    Hi
    I am trying to create a trigger and facing Bad Bind Variable problem.
    Plz let me know, what's the problem in this trigger.
    CREATE OR REPLACE TRIGGER Tender_tax_update AFTER
    INSERT
    OR UPDATE
    OR DELETE OF ITEM_QTY,ITEM_RATE,TENDER_ACC_QTY ON TENDER_ENQUIRY_ITEM_D REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW
    Declare
         v_amt TENDER_VENDOR_TAX_D.TAX_AMOUNT%TYPE;
         v_tax_ty TENDER_VENDOR_TAX_D.TAX_TYPE%TYPE;
         v_tax_cd TENDER_VENDOR_TAX_D.TAX_CODE%TYPE;
         v_ven_cd TENDER_VENDOR_TAX_D.VENDOR_CODE%TYPE;     
         v_item_cd TENDER_VENDOR_TAX_D.item_cd%TYPE;     
         v_tenno TENDER_VENDOR_TAX_D.tender_enquiry_no%TYPE;
    Begin
         if inserting then
              v_tax_ty:=:new.TAX_TYPE;
              v_tax_cd:=:new.TAX_CODE;
              v_ven_cd:=:new.vendor_code;
              v_item_cd:=:new.item_cd;
              v_tenno:=:new.tender_enquiry_no;
    select TAX_AMOUNT into v_amt from TENDER_TAX_DETAILS where tender_enquiry_no=v_tenno and TAX_CODE=v_tax_cd and TAX_TYPE=v_tax_ty and item_cd=v_item_cd and vendor_code=v_ven_cd;
    update TENDER_VENDOR_TAX_D set TAX_AMOUNT=v_amt where tender_enquiry_no=v_tenno and TAX_CODE=v_tax_cd and TAX_TYPE=v_tax_ty and item_cd=v_item_cd and vendor_code=v_ven_cd;
         end if;
    End Tender_tax_update;
    Database deails are as follows:
    TENDER_VENDOR_TAX_D
    Name Null? Type
    TENDER_ENQUIRY_NO NOT NULL VARCHAR2(8)
    VENDOR_CODE NOT NULL VARCHAR2(4)
    TAX_CODE NOT NULL VARCHAR2(4)
    PERCENTAGE NUMBER(5,2)
    TAX_AMOUNT NUMBER(15,2)
    ITEM_CD NOT NULL VARCHAR2(10)
    TAX_FLAG VARCHAR2(1)
    TAX_TYPE CHAR(3)
    TENDER_TAX_DETAILS
    Name Null? Type
    TENDER_ENQUIRY_NO NOT NULL VARCHAR2(8)
    VENDOR_CODE VARCHAR2(4)
    ITEM_CD VARCHAR2(10)
    TAX_CODE NOT NULL VARCHAR2(4)
    TAX_TYPE CHAR(3)
    TAX_AMOUNT NUMBER
    Message was edited by:
    user648065

    facing Band Bind Variable problem.Doesn't the error message tell you which bind variable is the problem?

  • Where to put xsl:variable definition

    I apologize in advance if this is a really obvious question/answer for most of you.
    I want to use this definition code to create a variable called color:
    *<xsl:variable name="color" select="'red'"/>*
    I want to include this code in my RTF template to display the contents of that variable:
    *<?$color?>*
    My question is this: where do I put the definition code? I've tried it in several different places, none of which have worked: at the top of my RTF template, on the top row of the table where I'm referring to it, and so forth.
    When I run the preview, I get the typical error screen with this key line: Variable not defined: 'color'.

    The subtemplate idea works quite well (mostly).
    In my subtemplate, I defined this:
    <?template:Format1?>
    <?if:number(Sales) gt 1000000?><?attribute@incontext:color;'red'?> <?attribute@incontext:font-weight; 'bold'?><?end if?>
    <?end Format1?>
    In my template field, I call Format1 like this:
    <?call@inlines:Format1?><?end call?>
    Sure enough, my values are shown in bold red. Yay!!!
    But now I've got extra vertical space in the affected cells. I've used table functions to align the values at the bottom of the cell. If I don't apply this conditional formatting, the row is what I'll call a "normal" height. When I apply the conditional formatting, the bold red numbers are displayed at the bottom of the cell as expected, but the row is twice as tall as its "normal" height.
    The difference is found in the page source for the browser page. The <tr> tag shows a height of 13.216pt for the "normal" rows, but 25.933pt for the rows affected by the formatting. For some reason, BIP wants to generate a much taller row when it contains these formatted results.
    I've experimented with attribute tags such as <?attribute@incontext:linefeed-treatment;'ignore'?> and <?attribute@incontext:height;14?>. I've used Word table formatting to fix the height of the row at exactly .3 inches. I removed the bold tag, and just kept the font color. None of those ideas was successful in removing the extra height.
    Thoughts?

  • How get xsl variable

    How get xsl variable after transformation in java-code?
    Edited by: pasash on Sep 2, 2009 3:43 AM

    Of course after the transformation is complete, its internal state is not accessible to the caller. In particular those variables aren't accessible.
    Perhaps you could explain what you are trying to do? Not the question you asked, the question you incorrectly thought it was the answer to.

  • Xsl:param or xsl:variable gets reset.

    Hi, I'm trying to keep a counter using a top level variable in xsl.
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:variable name="rownumber">1</xsl:variable>
    And every time my xsl calls a specific template, i want to keep a counter.
    <xsl:template match="row">
    <xsl:variable name="rownumber">     
    <xsl:number value="$rownumber+1"/>     
    </xsl:variable>     
    <xsl:variable value="$rownumber"/>
    </xsl:template>
    However, my variable $rownumber always gets reset to the default value of "1" everytime the template is called and returns a value of "2".
    Is there a work around for this? Is there a way to keep a counter in xsl? Can top level variable change?
    I don't want to count the nodes either....
    Thanks in advanced,
    jon

    You can't do that. Variables can't change. And there is no "workaround", as you put it. XSLT is not that kind of programming language. If you want to count something, you need to figure out an expression that looks at the incoming XML and determines the answer. This is often surprisingly easy once you stop writing programs that assume that statements are executed one after the other. For example, in your case it appears that you just want to count the number of "row" elements in the document. The XPath expression for that is "count(//row)". Or perhaps you want to count the number of "row" elements below the current node; that's "count(row)".

  • Hangman: variable problem

    Good evening. I am in the final stages of finishing up my hangman project but I have encountered a variable problem on 3 lines of code. The compiler doesn't seem to like this line of code "r = in.readLine();" or "word = in.readLine();" obviously it doesn't like this way of reading in. I am seeking any help possible. It would be very much appreciated. Thanks!
    here's the code:
    package hangman;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2005</p>
    * <p>Company: </p>
    * @author unascribed
    * @version 1.0
    import java.io.*;
    import java.text.*;
    public class Hangman {
        public static void main(String[] args)throws IOException
            char[] theWord;
            char[] guesses;
            boolean[] correctGuesses;
            int maxWrong = 6; // We'll give them 6 incorrect
            int numWrong = 0;
            boolean badGuess;
            char guess;
            int numGuesses = 0;
            // Get the word
            theWord = getWord();
            // Initialize correctGuesses
            correctGuesses = new boolean[theWord.length];
            for(int i = 0; i < correctGuesses.length; i++) {
                correctGuesses[i] = false;
            // initialize guesses
            guesses = new char[theWord.length + maxWrong];
            // Keep going until they have guessed everything
    while(!gameOver(correctGuesses) && numWrong < maxWrong) {
                // Print out the current state
                System.out.println("-----");
                // Print out the status
                System.out.print("Status: ");
                for(int i = 0; i < theWord.length; i++)
                    if(correctGuesses)
    System.out.print(theWord[i]);
    else
    System.out.print('_');
    System.out.println();
    // Print out what has been guessed so far
    System.out.print("Guessed: ");
    for(int i = 0; i < numGuesses; i++)
    System.out.print(guesses[i]);
    System.out.println();
    System.out.println((maxWrong - numWrong) + " incorrect guesses remaining");
    System.out.println("*****");
    // Get the guess
    guess = getGuess(guesses, numGuesses);
    // Record it
    guesses[numGuesses] = guess;
    numGuesses++;
    // See if it is in the word
    badGuess = true;
    for(int i = 0; i < theWord.length; i++) {
    if(guess == theWord[i]) {
    correctGuesses[i] = true;
    badGuess = false;
    if(!badGuess) {
    System.out.println("Good guess!");
    } else {
    System.out.println("Bad guess!");
    // If the guess wasn't in the word, increment
    numWrong++;
    if(numWrong == maxWrong)
    System.out.println("Game Over: Sorry you entered too many bad guesses - better luck next time!");
    else
    System.out.println("Good Job - you win!");
    // Get the word
    public static char[] getWord() {
    String word;
    // Get a word
    System.out.print("Please enter a word: ");
    word = in.readLine();
    // And return it as a char array
    return word.toCharArray();
    // See if the game is finished (all the letters guessed)
    public static boolean gameOver(boolean[] g) {
    boolean allGuessed = true;
    // if any element of the array is false
    // then they haven't guessed everything yet
    // and the game is not over
    for(int i = 0; i < g.length; i++)
    if(g[i] == false)
    allGuessed = false;
    return allGuessed;
    // Get a guess
    public static char getGuess(char[] guesses, int numGuesses) {
    char r = 'a';
    boolean done = false;
    // Get a character
    while(!done) {
    // Read and discard the previous newline
    while(r != '\n')
    r = in.readLine();
    System.out.print("Your guess: ");
    r = in.readLine();
    // See if they already guessed this letter
    done = true;
    for(int i = 0; i < numGuesses; i++) {
    if(r == guesses[i]) {
    System.out.println("You already guessed that letter. Please try again.");
    done = false;
    // return the guess
    return r;

    THANKS! i just added a bufferedreader however, the same problem with the variable persists. if anyone can fix it i'd appreciate it dearly!
    code with bufferedreader:
    package hangman;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2005</p>
    * <p>Company: </p>
    * @author unascribed
    * @version 1.0
    import java.io.*;
    import java.text.*;
    public class Hangman {
        public static void main(String[] args)throws IOException
            char[] theWord;
            char[] guesses;
            boolean[] correctGuesses;
            int maxWrong = 6; // We'll give them 6 incorrect
            int numWrong = 0;
            boolean badGuess;
            char guess;
            int numGuesses = 0;
            BufferedReader in;
            in = new BufferedReader(new InputStreamReader(System.in));
            // Get the word
            theWord = getWord();
            // Initialize correctGuesses
            correctGuesses = new boolean[theWord.length];
            for(int i = 0; i < correctGuesses.length; i++) {
                correctGuesses[i] = false;
            // initialize guesses
            guesses = new char[theWord.length + maxWrong];
            // Keep going until they have guessed everything
    while(!gameOver(correctGuesses) && numWrong < maxWrong) {
                // Print out the current state
                System.out.println("-----");
                // Print out the status
                System.out.print("Status: ");
                for(int i = 0; i < theWord.length; i++)
                    if(correctGuesses)
    System.out.print(theWord[i]);
    else
    System.out.print('_');
    System.out.println();
    // Print out what has been guessed so far
    System.out.print("Guessed: ");
    for(int i = 0; i < numGuesses; i++)
    System.out.print(guesses[i]);
    System.out.println();
    System.out.println((maxWrong - numWrong) + " incorrect guesses remaining");
    System.out.println("*****");
    // Get the guess
    guess = getGuess(guesses, numGuesses);
    // Record it
    guesses[numGuesses] = guess;
    numGuesses++;
    // See if it is in the word
    badGuess = true;
    for(int i = 0; i < theWord.length; i++) {
    if(guess == theWord[i]) {
    correctGuesses[i] = true;
    badGuess = false;
    if(!badGuess) {
    System.out.println("Good guess!");
    } else {
    System.out.println("Bad guess!");
    // If the guess wasn't in the word, increment
    numWrong++;
    if(numWrong == maxWrong)
    System.out.println("Game Over: Sorry you entered too many bad guesses - better luck next time!");
    else
    System.out.println("Good Job - you win!");
    // Get the word
    public static char[] getWord() {
    String word;
    // Get a word
    System.out.print("Please enter a word: ");
    word = in.readLine();
    // And return it as a char array
    return word.toCharArray();
    // See if the game is finished (all the letters guessed)
    public static boolean gameOver(boolean[] g) {
    boolean allGuessed = true;
    // if any element of the array is false
    // then they haven't guessed everything yet
    // and the game is not over
    for(int i = 0; i < g.length; i++)
    if(g[i] == false)
    allGuessed = false;
    return allGuessed;
    // Get a guess
    public static char getGuess(char[] guesses, int numGuesses) {
    char r = 'a';
    boolean done = false;
    // Get a character
    while(!done) {
    // Read and discard the previous newline
    while(r != '\n')
    r = in.readLine();
    System.out.print("Your guess: ");
    r = in.readLine();
    // See if they already guessed this letter
    done = true;
    for(int i = 0; i < numGuesses; i++) {
    if(r == guesses[i]) {
    System.out.println("You already guessed that letter. Please try again.");
    done = false;
    // return the guess
    return r;

  • Xsl template problem generating parameterized link

    I am using an xsql query to generate a list of possible id's. When I apply this to my xsl template, I want to generate an html page with a series of links of the form:
    stylesheet code:
    This is inside of a <xsl:for-each loop.
    When I try to run this xsql query with the xsl template, I get an error saying that &id= is undefined.
    How can I force my style sheet to pass the ampersand through rather than interpreting it as indicating a variable name?

    If what you're saying is you want the &; symbol be be part of your parameter name, then I think you're going to run into trouble. You could build your href like this:
    <xsl:for-each select="XPath/id">
    </xsl:for-each>
    Which is almost exactly what Womisa said. The problem with this is your browser will interpret the &; symbol and treat 'id' as the parameter name. It will just assume that the first parameter after '?' was blank, spot the &; and treat 'id' as the second parameter.
    Following my example from yesterday you could use the concat() function inside the <xsl:value-of select""/>... call to dynamically build your href... but that will still have problems when the browser interprets the &;
    The only other suggestion I have is a bit of a hack... why not use another symbol when you build the href. Then when the href is called (assuming the URL points to an XSL transformed page) use the translate() function at the beginning of this XSL to swap your symbol back to an &;
    null

  • Local variable problem

    I am making an application that takes an apartment number and number of occupants in that apartment and then displays a number of statistics. So far I haven't had much problem
    except on a what is probably a very simple problem.
    I have two buttons, and when "store" is clicked the info in the textboxes is input to an array.
    My problem is with the next button, "quit", this is where all the info is supposed to be displayed.
    All my variables that I need from "store" are local and are recognized in " the if statement in quit. Ive tried declaring them outside of the if statement, but it hasn't been working.
    {code}
    public void actionPerformed(ActionEvent event)
                   Object source = event.getSource();
                   Apartment input;
                   if (source == store)
                        Integer aptNo = Integer.parseInt(input1.getText());
                        Integer occup = Integer.parseInt(input2.getText());
                        input = new Apartment(aptNo, occup);
                        if(aptNo > BUILDING_SIZE)
                             JOptionPane.showMessageDialog(null, "That apartment number doesn't exist.");
                        else if(occup > MAX_OCCUPANTS)
                             JOptionPane.showMessageDialog(null, "Too many occupants, only 20 are permitted per apartment.");
                        else
                             occupants[aptNo] = occup;
                             input1.setText("");
                             input2.setText("");
                             JOptionPane.showMessageDialog(null, input.getNumber(occupants));
                   if (source == quit)
                   // I need the variables aptNo and occup in here to put into my methods for output, but I don't know how to get them.     
    {code}

    EmmCeeVee wrote:
    Thank you for all of the responses, it really helps me out.
    Obviously my knowledge of local variables is hurting as I switched it around as your said and declared the aptNo and occup outside of the if's.
    All I need is for the quit button to look at the array ( which has just been modified by the sotre button) and output a bunch of results.
    Heres where im at:Your problem is of scope of the variables.
    Here whatever variable you defined in actionPerformed they are local for that method (they are out of scope when the method is finished/called again), Upon this, the actionPerformed is called twice one for store and another time for quit. So you cant expect the value stored at store should be there still when you all quit
    If you want those values available on both the actions then make them a class level variables.
    Below is a sample program, might help you.
    class Employee
         String empName = null;
         int empNo;
         Employee(String eName,int eNmbr)
              this.empName = eName;
              this.empNo = eNmbr;
    class CheckVariableScope
            Employee empOb; // Here
         int eNo;
         String eName = null;
         public void checkScope(String action)
                    //Instead of defining Employee reference variable, eNo and eName  in checkScope method, define it @ class level.
                    // in your case they are Apartment input, Integer aptNo and Integer occup
                     // like above i did.
                     // If i comment the class level variable and uncomment method variable, this program also give the same error.
              //Employee empOb;
              //int eNo;             
              //String eName = null;
              if (action.equals("Store") )
                        eNo = 10;
                        eName = "Bob";
                        empOb = new Employee(eName, eNo);
                        System.out.println("The eName is : "+empOb.empName+" , empNo is : "+empOb.empNo);
                   if (action.equals("quit"))
                        System.out.println(" eNO from Object is : "+empOb.empNo);
                        System.out.println(eNo); //Error: may not have been intitialized
         public static void main (String st[])
              CheckVariableScope ob = new CheckVariableScope();
              ob.checkScope("Store");
              ob.checkScope("quit");
    }

  • Presentation variable problem in PDF generation

    Hi,
    I have created the custom field using the following code
    *case when (V_balance.yr<=@{var_year}{2009} and V_balance.yr>=@{var_year-3}{2006}) then 1 else 0 end*
    Use this field I have created the filter and remove the field from report.
    When I run the report with different prompts, its working fine as I expected in dashboard.
    But when I generate the PDF for different prompt values ( var_year=2008 ) , I got same result. That is its generate var_year=2009 (default presentation variable)
    Its generate the pdf with 'presentation variable default values' instead of presentation variable.
    How could I rectify this problem.
    Any one facing this problem.
    Is there any alternative for this condition
    Note:
    We are using bise1 10.1.3.2.1
    but I got a right answer in obiee 10.1.3.4.0
    Thanks
    Mohan
    Edited by: Mohan 8732779 on Nov 23, 2009 5:50 AM

    This is a known issue in 10.1.3.2. Oracle solved this problem in the new upgraded 10.1.3.4. Check the Meta link for the service request numbers raised for this problem. How hard it would be for you to migrate to 10.1.3.4.
    Thanks
    Prash

Maybe you are looking for

  • UCS C series maximum hard drive size

    Looking for info on the maximum hard drive size support on teh UCS C series.  I have a C200M2 that I added a 4TB drive, I have updated the server to the latest firmware and BIOS however the server shows the drive size is 2TB.

  • How do I lock some form fields, but not all?

    How do I create a form with interactive form fields where certain fields can be locked after being filled in, and others remain unlocked so the customer can interact with it? My workflow looks like this: I created a PDF with open form fields for my c

  • Lacie disk mini won't mount

    I just bought a intel core duo iMac and hooked up my lacie disk mini via USB to access my itunes library and other files only to get a message saying that no disk mini was found. Both Disk Utility and Norton see the external hard drive and scan it wi

  • Genius cannot send information to Apple, please help!

    Hi is there anybody out there who can help me? This is the problem: I have an iMac with itunes 8 on. I've been trying to start genius features the whole week. The first step (scanning my library) is ok but then the system takes way too much time to s

  • Is it possible to undo the software latest version

    is it possible to undo the software latest version