XPATH misunderstanding

Hi,
I am using the following
l_node_list Dbms_Xmldom.Domnodelist;
l_document Dbms_Xmldom.Domdocument;
l_node_list := Dbms_Xslprocessor.selectNodes(Dbms_Xmldom.Makenode(l_document), 'JOURNEY'); -- //* = select all
to process a document that starts like this
<?xml version="1.0" ?>
<schedule>
<messageHeader>
<messageId>JourneyManifestExport</messageId>
<messageSeq>2</messageSeq>
<msmq>Terminal1\InboundQueue</msmq>
<timeStamp>2004-05-20T09:50:39</timeStamp>
<publisherId>TMC</publisherId>
<version>2.2</version>
</messageHeader>
<journey importType="SCHEDULE">
<routeId>3c7fe0bce69d4d8d9d2dd7932e8cb536</routeId>
<journeyAlias>1009</journeyAlias>
<journeyStart>20-MAY-04</journeyStart>
<resource id="" type=""/>
<site id="3e6ec585cd6649a4a435c0c5aa181f5b">
     <pta></pta>
     <ptd></ptd>
     <callSequence>1401</callSequence>
etc.,
and am receiving this error
ORA-22275: invalid LOB locator specified
Is there another way that I can pick up all the elements between the journey tabs ?
tia,

DrClap wrote:
You still don't see the difference?
A stream or a reader permits only sequential access. Once you have read it, that's the end. You can't do anything with it after that. But a DOM permits random access. You can read through it from start to finish, you can jump into the middle, you can read backwards, whatever you like. You can do that indefinitely.Sorry, DrClap, but I have to say this: You are plain wrong. Streams can of course be reused. That's what the mark and reset mechanism is used for.
Back to the topic: Any method closing a stream passed inside the method is nothing more but establishing a bad bad ... BAD side-effect.

Similar Messages

  • One or two XSLT/XPath bugs

    I have an XSLT problem that may actually be two problems. My stylesheet works as expected in MSXML and Xalan but does very weird things in Oracle's XSLT processor. Below is the stylesheet, followed by some test input. It looks like just one bug if you run it on this test input (the "extra rows" generated get numbered 10-14 rather than 20-24, but $count and $remainder seem to have the right values). If you delete all COWS after SEQNUM 13, however, then $count and $remainder are both wrong. So it may be one bug, may be two.
    XSLT:
    ====================================================
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <!-- output a CHICKENROW for each CHICKEN in the source document, and guarantee there's a positive multiple of 8 rows total -->
         <xsl:template match="/">
              <CHICKENROWS>
                   <xsl:for-each select="/COWS/COW[KEY1 = '1']">
                        <CHICKENROW seqnum="{SEQNUM}">
                             <xsl:value-of select="CHICKEN"/>
                        </CHICKENROW>
                   </xsl:for-each>
                   <xsl:variable name="count" select="count(/COWS/COW[KEY1 = '1'])"/>
                   <!-- uncomment this for debugging
                   <count><xsl:value-of select="$count"/></count>
                   -->
                   <xsl:variable name="remainder" select="$count mod 8"/>
                   <!-- uncomment this for debugging
                   <remainder><xsl:value-of select="$remainder"/></remainder>
                   -->
                   <!-- if we have fewer than a positive multiple of 8 rows, add empty rows -->
                   <xsl:if test="$count = 0 or $remainder &gt; 0">
                        <xsl:variable name="startSeqnum">
                             <xsl:choose>
                                  <xsl:when test="/COWS/COW[KEY1 = '1']/SEQNUM">
                                       <xsl:for-each select="/COWS/COW[KEY1 = '1']/SEQNUM">
                                            <xsl:if test="not(/COWS/COW[KEY1 = '1' and SEQNUM &gt; current()])">
                                                 <xsl:value-of select=". + 1"/>
                                            </xsl:if>
                                       </xsl:for-each>
                                  </xsl:when>
                                  <xsl:otherwise>
                                       <xsl:text>1</xsl:text>
                                  </xsl:otherwise>
                             </xsl:choose>
                        </xsl:variable>
                        <!-- insert as many empty rows as necessary to guarantee we have at least 8 rows and the total # of rows is a multiple of 8 -->
                        <xsl:call-template name="emptyRows">
                             <xsl:with-param name="seqnum" select="$startSeqnum"/>
                             <xsl:with-param name="endSeqnum" select="$startSeqnum + (8 - $remainder) - 1"/>
                        </xsl:call-template>
                   </xsl:if>
              </CHICKENROWS>
         </xsl:template>
         <!--
              Recursively insert empty rows with seqnums starting at $seqnum and going to $endSeqnum
         -->
         <xsl:template name="emptyRows">
              <xsl:param name="seqnum"/>
              <xsl:param name="endSeqnum"/>
              <xsl:if test="$seqnum &lt;= $endSeqnum">
                   <CHICKENROW seqnum= "{$seqnum}"></CHICKENROW>
                   <xsl:call-template name="emptyRows">
                        <xsl:with-param name="seqnum" select="$seqnum + 1"/>
                        <xsl:with-param name="endSeqnum" select="$endSeqnum"/>
                   </xsl:call-template>
              </xsl:if>
         </xsl:template>
    </xsl:stylesheet>
    =======================================================
    INPUT XML:
    =======================================================
    <COWS>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>1</SEQNUM>
              <CHICKEN>ACMI2</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>2</SEQNUM>
              <CHICKEN>ALTE</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>3</SEQNUM>
              <CHICKEN>ANRO2</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>4</SEQNUM>
              <CHICKEN>ARCO5</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>5</SEQNUM>
              <CHICKEN>ARFR4</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>6</SEQNUM>
              <CHICKEN>ARTRV</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>7</SEQNUM>
              <CHICKEN>ASMO7</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>8</SEQNUM>
              <CHICKEN>CAGE2</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>9</SEQNUM>
              <CHICKEN>COUM</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>10</SEQNUM>
              <CHICKEN>ERIOG</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>11</SEQNUM>
              <CHICKEN>FEID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>12</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>13</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>14</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>15</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>16</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>17</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>18</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>19</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
    </COWS>

    ... or maybe they're not bugs at all, but if they're not, they're at least a difference in implementation from MSXML and Xalan. Do I misunderstand the XPath/XSL I'm using here? Is Oracle's interpretation equally valid?

  • Translate() function in an xpath predicate

    I'm trying to use the translate() function in an xpath predicate, and it appears to be having no effect. For instance, I have the following XML document (abbreviated for clarity):
    <metadata>
    <baseObject>
    <PublicationTime>2003-06-30T21:45:56Z</PublicationTime>
    </baseObject>
    </metadata>
    The following xpath expression returns no nodes:
    metadata[translate(baseObject/PublicationTime, "-:TZ", "") = "20030630214556"]
    But this next expression does return a node:
    metadata[translate(baseObject/PublicationTime, "-:TZ", "") = "2003-06-30T21:45:56Z"]
    It appears to me that the translate function is not removing the -, :, T, and Z characters as would be expected. Am I misunderstanding the usage of the translate function, making an error in my xpath expression, or is there some other explanation?
    Thanks.
    Brian

    Brian
    This looks like a bug in the implementation of translate
    Filed as bug 3036042

  • XPath expression failed to execute.

    Hi Everybody ,
    I am working  AIA PIP 3.1 for JDE E1.I am facing some errors so that i can't proceed.
    See the log errors as below:
    javax.xml.ws.soap.SOAPFaultException: XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is ora:processXSLT('xsl/Xform_BillOfMaterialsListABM_to_BillOfMaterialsListAXML.xsl',bpws:getVariableData('InitialLoadBillOfMaterialsListReqMsg','InitialLoadBillOfMaterialsList'),bpws:getVariableData('Parameters')). The XPath expression failed to execute; the reason was: oracle.fabric.common.xml.xpath.XPathFunctionException: javax.xml.transform.TransformerException: oramds:/deployed-composites/default/InitialLoadBillOfMaterialsListJDEE1toAgileImpl_rev1.0/xsl/Xform_BillOfMaterialsListABM_to_BillOfMaterialsListAXML.xsl<Line 18, Column 271>: XML-22044: (Error) Extension function error: Error invoking 'lookupXRef':'oracle.tip.xref.exception.RepositoryException: lookup could not find values in column name "AGILE_01" for table name "oramds:/apps/AIAMetaData/xref/ITEM_ITEMID.xref" using reference column name "JDEE1_01" and reference value "731882::M30" Please ensure lookup criteria has a match.'. Check the detailed root cause described in the exception message text and verify that the XPath query is correct.
    Please reply me ASAP,
    Waiting for your response.....
    Regards
    Jyoti Nayak

    Hi,
    Ya i checked the data for same table,but i didn't get any XREF related information in xref_data table.
    Did you mean that, data should already present under AIAFPINST_XREF.Probably xref is meant for storing dynamic value.
    Please check the above error and reply me soon.
    With Regards
    Jyoti Nayak

  • Problem retrieving a list of values with XPATH

    Hi,
    I am trying to get a list of all 'Fields' (under the SubscriptionList -> EconomicIndicator -> Code) which have 'Provider' =DJ.
    I am using the below xpath expression. But It is not working. I tried other variations but none of them return mulitple items.
    Can some one please tell me if Iam missing something.
                   XPathExpression xPathExpression= xpath.compile("/SubscriptionList/EconomicIndicator[*]/Code[Provider=DJ]/Fields");
                   NodeList result = (NodeList)xPathExpression.evaluate(doc, XPathConstants.NODESET);
              for (int i = 0; i < result.getLength(); i++) {
                   Element element = (Element)result.item(i);
              System.out.println(element.getNodeValue());
    <?xml version="1.0" encoding="UTF-8"?>
    <SubscriptionList>
    <DefaultEconomicIndicatorName>US ADP Employment Change</DefaultEconomicIndicatorName>
    <!--GE IFO - Business Climate-->
    <EconomicIndicator>
    <Name>GE IFO - Business Climate</Name>
    <Active>0</Active>
    <OutputFormat></OutputFormat>
    <OutputUnits>1</OutputUnits>
    <StartDate>2007-06-22T03:50:00</StartDate>
    <EndDate>2007-06-22T04:10:00</EndDate>
    <Code>
    <Provider>BB</Provider>
    <Service>Index</Service>
    <InstrumentCode>GRIFPBUS</InstrumentCode>
    <FID>PX_LAST</FID>
    <Units>1</Units>
    <Fields></Fields>
    </Code>
    <Code>
    <Provider>BB1</Provider>
    <Service>Index</Service>
    <InstrumentCode>GRIFPBUS</InstrumentCode>
    <FID>PX_LAST</FID>
    <Units>1</Units>
    <Fields></Fields>
    </Code>
    <Code>
    <Provider>BB2</Provider>
    <Service>Index</Service>
    <InstrumentCode>GRIFPBUS</InstrumentCode>
    <FID>PX_LAST</FID>
    <Units>1</Units>
    <Fields></Fields>
    </Code>
    <Code>
    <Provider>BB3</Provider>
    <Service>Index</Service>
    <InstrumentCode>GRIFPBUS</InstrumentCode>
    <FID>PX_LAST</FID>
    <Units>1</Units>
    <Fields></Fields>
    </Code>
    <Code>
    <Provider>RFA</Provider>
    <Service>IDN_SELECTFEED</Service>
    <InstrumentCode>DEBUSS=ECI</InstrumentCode>
    <FID>356</FID>
    <Units>1</Units>
    <Fields></Fields>
    </Code>
    <Code>
    <Provider>DJ</Provider>
    <Service></Service>
    <InstrumentCode>GM_IFO</InstrumentCode>
    <FID></FID>
    <Units>1</Units>
    <Fields>GM_IFO_BUSSENTIMENT_Cur</Fields>
    </Code>
    <Code>
    <Provider>DJS</Provider>
    <Service></Service>
    <InstrumentCode>GM_IFO</InstrumentCode>
    <FID></FID>
    <Units>1</Units>
    <Fields>GM_IFO_BUSSENTIMENT_Cur</Fields>
    </Code>
    </EconomicIndicator>
    <!--GE Producer Prices (MoM)-->
    <EconomicIndicator>
    <Name>GE Producer Prices (MoM)</Name>
    <Active>0</Active>
    <OutputFormat></OutputFormat>
    <OutputUnits>1</OutputUnits>
    <StartDate>2007-06-20T01:50:00</StartDate>
    <EndDate>2007-06-20T02:10:00</EndDate>
    <Code>
    <Provider>BB</Provider>
    <Service>Index</Service>
    <InstrumentCode>GRPFIMOM</InstrumentCode>
    <FID>PX_LAST</FID>
    <Units>1</Units>
    <Fields></Fields>
    </Code>
    <Code>
    <Provider>BB1</Provider>
    <Service>Index</Service>
    <InstrumentCode>GRPFIMOM</InstrumentCode>
    <FID>PX_LAST</FID>
    <Units>1</Units>
    <Fields></Fields>
    </Code>
    <Code>
    <Provider>BB2</Provider>
    <Service>Index</Service>
    <InstrumentCode>GRPFIMOM</InstrumentCode>
    <FID>PX_LAST</FID>
    <Units>1</Units>
    <Fields></Fields>
    </Code>
    <Code>
    <Provider>BB3</Provider>
    <Service>Index</Service>
    <InstrumentCode>GRPFIMOM</InstrumentCode>
    <FID>PX_LAST</FID>
    <Units>1</Units>
    <Fields></Fields>
    </Code>
    <Code>
    <Provider>RFA</Provider>
    <Service>IDN_SELECTFEED</Service>
    <InstrumentCode>DEPPI=ECI</InstrumentCode>
    <FID>356</FID>
    <Units>1</Units>
    <Fields></Fields>
    </Code>
    </EconomicIndicator>
    <!--UK CBI Industrial Trend-->
    <EconomicIndicator>
    <Name>UK CBI Trends - Orders</Name>
    <Active>0</Active>
    <OutputFormat></OutputFormat>
    <OutputUnits>1</OutputUnits>
    <StartDate>2007-06-21T05:50:00</StartDate>
    <EndDate>2007-06-21T06:10:00</EndDate>
    <Code>
    <Provider>RFA</Provider>
    <Service>IDN_SELECTFEED</Service>
    <InstrumentCode>GBCBIO=ECI</InstrumentCode>
    <FID>356</FID>
    <Units>1</Units>
    <Fields></Fields>
    </Code>
    </EconomicIndicator>
    <!--UK CBI Industrial Trend-->
    <EconomicIndicator>
    <Name>UK CBI Distributive - Trades</Name>
    <Active>0</Active>
    <OutputFormat></OutputFormat>
    <OutputUnits>1</OutputUnits>
    <StartDate>2007-06-21T05:50:00</StartDate>
    <EndDate>2007-06-21T06:10:00</EndDate>
    <Code>
    <Provider>RFA</Provider>
    <Service>IDN_SELECTFEED</Service>
    <InstrumentCode>GBCBIS=ECI</InstrumentCode>
    <FID>356</FID>
    <Units>1</Units>
    <Fields></Fields>
    </Code>
    </EconomicIndicator>
    <!--US Unit Labor Costs-->
    <EconomicIndicator>
    <Name>US Unit Labor Costs</Name>
    <Active>0</Active>
    <OutputFormat></OutputFormat>
    <OutputUnits>1</OutputUnits>
    <StartDate>2007-09-06T08:20:00</StartDate>
    <EndDate>2007-09-06T08:40:00</EndDate>
    <Code>
    <Provider>BB</Provider>
    <Service>Index</Service>
    <InstrumentCode>COSTNFR%</InstrumentCode>
    <FID>PX_LAST</FID>
    <Units>1</Units>
    <Fields></Fields>
    </Code>
    <Code>
    <Provider>BB1</Provider>
    <Service>Index</Service>
    <InstrumentCode>COSTNFR%</InstrumentCode>
    <FID>PX_LAST</FID>
    <Units>1</Units>
    <Fields></Fields>
    </Code>
    <Code>
    <Provider>BB2</Provider>
    <Service>Index</Service>
    <InstrumentCode>COSTNFR%</InstrumentCode>
    <FID>PX_LAST</FID>
    <Units>1</Units>
    <Fields></Fields>
    </Code>
    <Code>
    <Provider>BB3</Provider>
    <Service>Index</Service>
    <InstrumentCode>COSTNFR%</InstrumentCode>
    <FID>PX_LAST</FID>
    <Units>1</Units>
    <Fields></Fields>
    </Code>
    <Code>
    <Provider>RFA</Provider>
    <Service>IDN_SELECTFEED</Service>
    <InstrumentCode>USLCTS=ECI</InstrumentCode>
    <FID>356</FID>
    <Units>1</Units>
    <Fields></Fields>
    </Code>
    <Code>
    <Provider>DJ</Provider>
    <Service></Service>
    <InstrumentCode>US_PROD2_REV</InstrumentCode>
    <FID></FID>
    <Units>1</Units>
    <Fields>US_PROD2_REV_UNITLABORCOST_CurQChgPct</Fields>
    </Code>
    <Code>
    <Provider>DJS</Provider>
    <Service></Service>
    <InstrumentCode>US_PROD2_REV</InstrumentCode>
    <FID></FID>
    <Units>1</Units>
    <Fields>US_PROD2_REV_UNITLABORCOST_CurQChgPct</Fields>
    </Code>
    </EconomicIndicator>
    </SubscriptionList>

    Hi DrClap,
    I have a similar problem again. This time I am trying to extract a list of values from a xsd. Below is the code that I am using.
              try{
                   djxsd = new FileInputStream("djei-3.1.xsd");
                   XPathFactory factory = XPathFactory.newInstance();
                   XPath xpath = factory.newXPath();
                   SimpleNamespaceContext nsContext = new SimpleNamespaceContext();
                   xpath.setNamespaceContext(nsContext);
                   nsContext.addNamespace("xs", "http://www.w3.org/2001/XMLSchema");
                   nsContext.addNamespace("xsi","http://www.w3.org/2001/XMLSchema-instance");
                   +//String exp = "//xs:element/@name/text()";+               
    String exp = "/xs:schema/xs:group/xs:sequence/xs:element";
                   XPathExpression xPathExpression= xpath.compile(exp);
                   NodeList result = (NodeList)xPathExpression.evaluate(doc, XPathConstants.NODESET);
                   FileOutputStream outputfile = new FileOutputStream("log.txt");
              for (int i = 0; i < result.getLength(); i++) {
                   Element element = (Element)result.item(i);
                   String output = element.getTextContent().trim();
                   if(output.length() > 0)
                        outputfile.write(output.getBytes());
                        //System.out.println(output);
    Highlighted in Itlalics is the actual expression that I want to use. For some reason this is not working .. it returns nothing.
    The other expression works. Please let me know if there is anything wrong with the expression.
    THE XSD FILE
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" elementFormDefault="qualified">
         <xs:element name="DJEconomicIndicator">
              <xs:complexType>
                   <xs:sequence minOccurs="0" maxOccurs="unbounded">
                        <xs:group ref="allgroup"/>
                   </xs:sequence>
                   <xs:attributeGroup ref="TopGrp-Attributes"/>
              </xs:complexType>
         </xs:element>
         <xs:group name="allgroup">
              <xs:sequence>
                   <!-- ==================== CPI ========================== -->
                   <xs:element name="US_CPI_CurMonChgPct" minOccurs="0">
                        <xs:annotation>
                             <xs:documentation> US Consumer Price Index </xs:documentation>
                             <xs:appinfo> CPI </xs:appinfo>
                        </xs:annotation>
                        <xs:complexType>
                             <xs:annotation>
                                  <xs:appinfo> MoM Pct Change (Current Period) </xs:appinfo>
                             </xs:annotation>
                             <xs:simpleContent>
                                  <xs:extension base="xs:double">
                                       <xs:attributeGroup ref="common-month"/>
                                       <xs:attributeGroup ref="common-attributes"/>
                                  </xs:extension>
                             </xs:simpleContent>
                        </xs:complexType>
                   </xs:element>
                   <xs:element name="US_CPI_ExpMonChgPct" minOccurs="0">
                        <xs:annotation>
                             <xs:documentation> US Consumer Price Index </xs:documentation>
                             <xs:appinfo> CPI </xs:appinfo>
                        </xs:annotation>
                        <xs:complexType>
                             <xs:annotation>
                                  <xs:appinfo> Forecast MoM Pct Change (Current Period) </xs:appinfo>
                             </xs:annotation>
                             <xs:simpleContent>
                                  <xs:extension base="xs:double">
                                       <xs:attributeGroup ref="common-month"/>
                                       <xs:attributeGroup ref="common-attributes"/>
                                  </xs:extension>
                             </xs:simpleContent>
                        </xs:complexType>
                   </xs:element>
                   <!-- ==================CPI Unrounded==================== -->
                   <xs:element name="US_CPI_Unrounded_CurMonChgPct" minOccurs="0">
                        <xs:annotation>
                             <xs:documentation> US Consumer Price Index </xs:documentation>
                             <xs:appinfo> CPI UnRounded</xs:appinfo>
                        </xs:annotation>
                        <xs:complexType>
                             <xs:annotation>
                                  <xs:appinfo> MoM Pct Change (Current Period) </xs:appinfo>
                             </xs:annotation>
                             <xs:simpleContent>
                                  <xs:extension base="xs:double">
                                       <xs:attributeGroup ref="common-month"/>
                                       <xs:attributeGroup ref="common-attributes"/>
                                  </xs:extension>
                             </xs:simpleContent>
                        </xs:complexType>
                   </xs:element>
                   <!-- ==================CPI Core Index==================== -->
                   <xs:element name="US_CPI_Core_CurMonChgPct" minOccurs="0">
                        <xs:annotation>
                             <xs:documentation> US Consumer Price Index </xs:documentation>
                             <xs:appinfo> CPI Core </xs:appinfo>
                        </xs:annotation>
                        <xs:complexType>
                             <xs:annotation>
                                  <xs:appinfo> MoM Pct Change (Current Period) </xs:appinfo>
                             </xs:annotation>
                             <xs:simpleContent>
                                  <xs:extension base="xs:double">
                                       <xs:attributeGroup ref="common-month"/>
                                       <xs:attributeGroup ref="common-attributes"/>
                                  </xs:extension>
                             </xs:simpleContent>
                        </xs:complexType>
                   </xs:element>
                   <xs:element name="US_CPI_Core_ExpMonChgPct" minOccurs="0">
                        <xs:annotation>
                             <xs:documentation> US Consumer Price Index </xs:documentation>
                             <xs:appinfo> CPI Core </xs:appinfo>
                        </xs:annotation>
                        <xs:complexType>
                             <xs:annotation>
                                  <xs:appinfo> Forecast MoM Pct Change (Current Period) </xs:appinfo>
                             </xs:annotation>
                             <xs:simpleContent>
                                  <xs:extension base="xs:double">
                                       <xs:attributeGroup ref="common-month"/>
                                       <xs:attributeGroup ref="common-attributes"/>
                                  </xs:extension>
                             </xs:simpleContent>
                        </xs:complexType>
                   </xs:element>

  • Appending Xpath Value to a variable in For Each loop

    So I am iterating thru an XML File collection inside a ForEach container. I have an XML Task within this loop of type Xpath.
    The Xpath expression on each file evaluates to a value which I want to append as I keep iterating.
    How do I go about doing this?? I tried something like User::CheckSum =+ User::CheckSum but it gives and error and I am not sure on which property should it be applied to.
    Please understand that it is not one file with multiple nodes but multiple XML files in my scenario.
    Any help is much appreciated
    SM

    I do not think the variable's value gets preserved between hops, anyways, it does not look like a valid approach.
    Use the XMLFile Source in the ForEach Loop and capture the needed value into a package variable that you can keep appending to say in a Script Task.
    Arthur My Blog

  • Syntax and format of a IF statement in formula XPath in a InfoPath field

    Good day
    I needed assistance with IF statement syntax in a InfoPath field formula.
    If Field_1 = null
    concat(substring-before(txtComponentNo1, "."), ".", substring-before(field17, "."), ".", substring-after(field17, "."))
    Else
    concat(substring-before(txtComponentNo1, "."), ".", substring-before(field17, "."), ".", substring-after(field17, ".")+1)
    or in Advance XPath
    If Field_1 = null
    concat(substring-before(../../../my:grpComponent_1/my:grpComponent1/my:txtComponentNo1, "."), ".", substring-before(../../my:field17, "."), ".", substring-after(../../my:field17, "."))
    Else
    concat(substring-before(../../../my:grpComponent_1/my:grpComponent1/my:txtComponentNo1, "."), ".", substring-before(../../my:field17, "."), ".", substring-after(../../my:field17, ".") + 1)
    Thanks

    Hi,
    Here is the good explanation of what you are looking for.
    http://blogs.msdn.com/b/infopath/archive/2006/11/27/conditional-default-values.aspx
    and please check this as well for basic understanding
    http://www.bizsupportonline.net/infopath2010/if-else-statements-conditions-rules-infopath-2010.htm
    Krishana Kumar http://www.mosstechnet-kk.com

  • Help with if statement in XPATH

    Hi,
    I´m using XPath to return a value for a conditional Branch in OSB, I understand that it is supposed to work with standard XPath so I post this question in this forum:
    What I want to do should be simple but have not worked for me, I want to do an IF statement and to return one value in the then part or another value in else.
    if the statement is acomplished I want tu return just a string and if it does not acomplish then in the else return a value from an Xpath expresion:
    here something similar of what I´m trying:
    if (./imp:iniciarCambio/cambios/bea:ListaDeCambios/bea:Cambio/bea:campoNombre/text() = "Name")
    then M6yBilling
    else ./imp:iniciarCambio/cambios/bea:companiaTipo/text()
    The part that is not working is where I want to return M6yBilling if the statement acomplishes, I have tried "M6yBilling" also 'M6yBilling' and fn:string(M6yBilling) but none is working at all.
    Any ideas?
    Kind Regards,
    Gerardo J

    analytical functions: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/functions2a.htm#81409
    CASE
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#36899
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/04_struc.htm#5997
    Incorporating either of these into your query should assist you in returning the desired results.

  • Xpath field details not getting displayed

    Hi all,
    I am working on a idoc to file scenario, where I want to refer the receiver to be determined based upon certain condition or values that get populated for a particular field (using receiver determination). But the problem is that when I click on the condition tab on receiver determination I get a warning "Problem loading schema description"
    with message as
    "Message interface does not exist in any software components installed on this business system"
    But since it is an Idoc at the source we dont have any msg interfaces, further if i neglect this warning message and go further, I am not getting the fields or details of the Idoc structure getting displayed in the xpath.
    But the same when I use for a file scenario(file as sender) I get the details of the context object if any.. Let me know how to resolve this..
    Thanks in advance
    Regards,
    Nithiyanandam

    Hi,
    Yes you coudl add the missing Software component as per below steps
    Even if you open Business system in Integration Directory, at last tab "Other Attributes" --> you will find the list of software components.
    Press the tab Third Party service to verify the list against SLD.
    If its not avaialbel in SLD
    1. Goto System Landscape Directory
    2. select Business Landscape and slect the apporpriate Business system and open it. (Click the name of BS)
    3. There you will get the list of Software components added in it.
    4. Verify the technical system name.
    5. Also verify if same technical system name is used after importing the software component in Integration Repository (IR).
    Goto IR -- > Explore the SCV -->Double click on name of software component version -->Check Interface Import as Import of RFC and have the same details  in Connection data as per technical system
    If everything is setup just refresh the SLD_CACH and import the scenario once again in Integration Directoy and process it.
    You will see the IDOC in Business system.
    Thanks
    Swarup
    Edited by: Swarup Sawant on Feb 4, 2008 8:00 AM

  • How to Get xml Attribute value from a given  xpath

    i'm building an xml from 3 columns a,b,c using 'SELECT EXTRACT (XMLELEMENT ("ROOT",.........)'
    and my xml looks something like this
    <ROOT>
    <categories>
    <catogory value="col a value" display="true"/>
    <catogory value="col b value" display="false"/>
    <catogory value="col c value" display="false"/>
    </categories>
    <DATAS>
    </DATA>
    </ROOT>
    now under the datas node i want to use xpath like this
    (case when '/root/categories/catogory/[@display="true"]' then '/root/categories/catogory/@value' else 0 end)
    so tat i get values under data node based on display attributes.... is it possible..
    if not is ther any alternative way of using xpath

    What version of Oracle (4 digits)?
    Are you trying to populate the Data node when you are building the XML originally via your SQL/XML statement or are you talking about modifying some existing XML to add more nodes to it based on data in the XML already?

  • Does SOA BPEL 11.1.7.0 support XPath 2.0 in XSLT mapping?

    Dear Oracle support,
    I am using SOA Suite 11.1.1.7.0 (local development) and 11.1.1.6.0 (in production, but will upgrade to 7). I came to the requirements need to do very complicated mapping using XSLT in BPEL. I would like to use some features of XPath 2.0.
    Does SOA 11.1.1.6.0 or 11.1.1.7.0 have supported XPath 2.0? If not yet, is there any plan to support in the future?
    Thank you in advance for your response,
    Alena Li

    Hi Alena Li,
    Firstly, this is not Oracle support, this is Oracle forums...
    https://wikis.oracle.com/display/Forums/Forums+FAQ
    SOA supports *some* features of XPath 2.0 in XSLT, the infrastructure also supports XSLT 2.0, but JDEV mapper does not...
    Check docs here...
    http://docs.oracle.com/cd/E28280_01/dev.1111/e10224/bp_appx_functs.htm#SOASE2127
    Cheers,
    Vlad

  • Is there any possibility to combine XPath with SAX in Java?

    HI Gentlemen,
    I have an XML instance to parse. One solution works with XPath and Document builder. However, the tree in memory is too big so that I can not build it in my storage (8 GB). Does anyone of you know a method where I use an XPath expression (Java) to select a node but with a better parser (e g SAX) which is not so space hungry? Direct access of nodes is obligatory.
    Thanks, kind regards from
    Miklos HERBOLY

    As SAX  parsers do not build a DOM structure and XPath requires a DOM structure to select elements from, XPath is not usable with SAX, but some analysers support setting the XPath expressions to analyse before invoking the SAX parser and provide the result for XPath expressions.
    Refer
    https://code.google.com/p/xpath4sax/

  • Follow up on XPATH HashMap problem

    Hi,
    I got some great help before on this & am hoping for a little direction. I have a class that calculates the tax from an xml like below:
    <Taxes>
         <Tax TaxCode='code1' Amount='101.00'/>
         <Tax TaxCode='code2' Amount='102.00'/>
         <Tax TaxCode='code3' Amount='103.00'/>
         <Tax TaxCode='code4' Amount='104.00'/>
         <Tax TaxCode='code5' Amount='105.00'/>
    </Taxes>Now, my method below, gets the last 3 values and sums them and applies the code "XT" to it & returns a HashMap that looks like:
    {code1 = 101.00, code = 102. 00, XT = 312.00}.
    public static HashMap getTaxAmounts(String xml) throws Exception {
              HashMap taxes = new HashMap();
              DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
            domFactory.setNamespaceAware(true); // never forget this!
            DocumentBuilder builder = domFactory.newDocumentBuilder();
            Document doc = builder.parse(xml);
            XPathFactory factory = XPathFactory.newInstance();
            XPath xpath = factory.newXPath();
            XPathExpression expr = xpath.compile("//Tax/@TaxCode");
            Object result = expr.evaluate(doc, XPathConstants.NODESET);
            NodeList nodes = (NodeList) result;
            XPathExpression expr1 = xpath.compile("//Tax/@Amount");
            Object result1 = expr1.evaluate(doc, XPathConstants.NODESET);
            NodeList nodes1 = (NodeList) result1;
            for ( int i = 0; i < nodes1.getLength() && (i<2); i++) {
                   taxes.put( nodes.item(i).getNodeValue(), nodes1.item(i).getNodeValue());
                    if( nodes1.getLength() >= 3){
                        float total = 0.00f;
                        for ( int i = 2; i < nodes1.getLength(); i++) {
                                total += Float.parseFloat(nodes1.item(i).getNodeValue());
                        String xt = nodes.item(2).getNodeValue();
                        xt = "XT";
                        taxes.put( xt, total);
           return taxes;     
    /code]
    all that's fine - but now I have to replace the tags in the original XML file so that they look like:<Taxes>
    <Tax TaxCode='code1' Amount='101.00'/>
    <Tax TaxCode='code2' Amount='102.00'/>
    <Tax TaxCode='XT' Amount='312.00'/>
    </Taxes>
    any odeas how I would this???

    Hi, John. I can address one of your questions here.
    However, the picture was slightly cropped at the top and it also had 2 very small borders on the left and right, being printed in landscape.
    A standard digital camera image is proportioned 4:3 (1.33:1). That doesn't match the 6:4 ratio of your paper's dimensions (1.5:1), so unless you opt either to distort the image or crop it, it can't be an exact fit on the paper.
    In the toolbar at the top of iPhoto's Edit view is a pull-down menu above the word "Constrain". You use that menu to specify standard proportions for printing the image. Select "4x6 (Postcard)", and you will see superimposed on the picture a rectangle that has those proportions. What's inside the rectangle looks normal, signifying that it will be printed; what's outside the rectangle is pale and muted, because it will be cropped away when you print. Place your cursor anywhere inside the rectangle, hold the mouse button down and drag, to move the rectangle and change what's included within the print boundary.
    The fact that your printed picture was both cropped and slightly reduced in size (creating the small left and right borders) suggests to me that your printer may not be capable of borderless printing, or that there is a setting for borderless prints you're overlooking somewhere. Since the contents of both the Print and Page Setup dialog boxes are governed by the printer's own driver software, and there's no "borderless" setting anywhere within iPhoto, I think you'll need to review the printer's documentation and/or online help files carefully to see whether you're overlooking something in one of those dialog boxes.

  • Is it possible to throw a BPELFault from a custom xpath function?

    I'm probably revealing my lack of java chops here, but I'd like to know if there's a way to throw a BPELFault from the "call" method within a custom xpath function.
    The interface for IXPathFunction seems to dictate that "call" throws only an XPathFunctionException and the bpel server doesn't handle this exception properly. It records the exception in the logs but then the process just dies.
    Right now I have this (simplified code):
    public Object call(IXPathContext context,
    List args) throws XPathFunctionException
    if (args.size() == 1)
    // do some stuff and return a value
    throw new XPathFunctionException( "hexToInt() requires one string argument." );
    What I want to have is something like this:
    public Object call(IXPathContext context,
    List args) throws BPELFault
    if (args.size() == 1)
    // do some stuff and return a value
    BPELFault fault = new BPELFault(
    new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2003/03/business-process/",
    "selectionFailure"));
    fault.setPart("code", "intToHex");
    fault.setPart("summary", "hexToInt() requires one string argument.");
    throw fault;
    If I do this, the compiler rejects it saying that "call" must throw XPathFunctionException. Is there a way to extend the IXPathFunction interface to allow it to throw a useful fault?
    Thanks!
    Sean

    Yeah, I'm using that patch (otherwise the process just crashes and you don't have a chance to catch the fault, even in a catchAll). Within the catchAll you can get the details from the error with something like this:
    <copy>
    <from expression="concat(ora:getFaultName(),'')"/>
    <to variable="processFault" part="payload" query="/ns4:summary"/>
    </copy>
    <copy>
    <from expression="concat(ora:getFaultAsString(),'')"/>
    <to variable="processFault" part="payload" query="/ns4:detail"/>
    </copy>

  • How can I call a stateful webservice from a user-defined XPath function?

    I'm calling a stateful webservice from a BPEL process using a PartnerLink which implements Custom Header Handler classes to handle the session state, storing the cookie as a property of the PartnerLink.
    I'd also like to call this same stateful webservice, in the same session, from a user-defined XPath function enabling me to call this from an XSL Transformation.
    Is this in any way possible? Can I access the cookie and attach it to the webservice call made by the user-defined XPath function?

    Actually, as long as the servlet returns valid javascript, you can indeed "call it" from the client. It will initiate a request and return the result to the browser.
    This example uses Perl, but it could be easily modified to go to a servlet instead.
    Note that it is only supported in DOM browsers (IE6+/NN6+/etc)
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
    <html>
    <head>
    <title> Test server-side JS </title>
    </head>
    <body>
    <script type="text/javascript">
    function checkIt(variable, value)
    var newScript = "cgi-bin/validateJS.cgi?"+variable+"="+value;
    var body = document.getElementsByTagName('body').item(0)
    var scriptTag = document.getElementById('loadScript');
    if(scriptTag) body.removeChild(scriptTag);
    script = document.createElement('script');
    script.src = newScript;
         script.type = 'text/javascript';
         script.id = 'loadScript';
         body.appendChild(script)
    </script>
    <p>Test.</p>
    <form id="f1" action="">
    <input type="text" name="t1" id="t1" onChange="checkIt(this.name, this.value)">
    </body>
    </html>
    validateJS.cgi
    #!/opt/x11r6/bin/perl
    use CGI qw(:all);
    my @valArray = split(/=/,$ENV{QUERY_STRING});
    print "Content-type: text/javascript\n\n";
    # myPass is the password
    $myPass = "foobar";
    if ("$valArray[1]" eq "$myPass")
    print "alert(\"Success!!\")";
    else
    print "alert(\"Failure!!\")";

Maybe you are looking for

  • Changes to Skype Premium for existing users

    I'm confused about what my former Skype Premium package now includes following an email from Skype. I had noticed that from 1st May I was no longer getting free calls to Canada as was previously the case but the latest communication from Skype isn't

  • Getting ARD to see an iMac behind Airport Express

    I have a client that has bought an iMac and is connected to the internet using Airport Express (adsl modem is connected to express with ethernet cable, and modem is connected to the telephone line, problem is that when I am in my studio and try to co

  • Importing from finalcut pro

    My projects are normally 1 hour or more. When I import into DVD pro I use quicktime and it seems to take at least 4 hours or more. Have attempted to try compressor but I am not that clear on that software. Am I missing something or is there a better

  • Insufficient privileges while creating EUL

    Hi All, I am trying to create a new EUL in Discoverer 9.0.4. Option "Select an existing user" is selected and "Grant access to Public" is unchecked. I am connected as user A. The tables are in schema for user B. So I selected the user B and entered t

  • IBooks not opening this one particular ebook

    I just downloaded iBooks on my new iPad 4, and have been attaching my PDF ebooks in emails sent to myself as my method of transferring (I don't know of any other way of transferring PDF files from my MacBook). From the emails sent to myself I've been