INPATH problem: doesnt work as expected?

Hi everyone,
i need your help on something i ran into yesterday.
Consider the following XML that is the content of XMLType field in our novels db:
<record>
<leader>01127nam 2200385 a 4500</leader>
<controlfield tag="001">0000795331</controlfield>
<controlfield tag="005">20040816135746.0</controlfield>
<controlfield tag="008">010402s2000 fr f fre </controlfield>
--- more fields here not revelant to our case ----
<datafield tag="100" ind1="1" ind2=" ">
<subfield code="a">Lord, Jeffrey.</subfield>
</datafield>
<datafield tag="245" ind1="1" ind2="4">
<subfield code="a">Les affins d'Oniris /</subfield>
<subfield code="c">Jeffrey Lord ; adapté de l'américain par Yves Chéraqui.</subfield>
</datafield>
--- more fields here not revelant to our case ----
</record>
Now when i execute the following query (either from SQL+ or from Java):
select rowid,r.notice
from roman r where CONTAINS(notice,' (roch and carrier INPATH(/record/datafield[@tag="245"]/subfield[@code="a"]))')>0
As you see, the constraint check for a value on a particular path that is a subfield with an attribute code=a that is a child of a datafield with an attribute tag=245.
So, the previous XML record shouldn't be returned when i execute the query, but it is. It's look like the the INPATH is done also on subfield with attribute code="c" which contains the values "roch and carrier".
I ve done test changing the query INPATH to something like: /record/datafield[@tag=245]/subfield[@code="Z"]
Like expected, no rows are returned, because there's no subield with an attribute code="Z".
So why, my query expands the INPATH constraint to unspecified element?
Is it just my query that is badly build (im still a newbie with Oracle XML and Text)?
Any help/advices will be welcome!
Have a nice day!
Dave

Argh!
Made an error in the post... Thats what happen with cut/paste :(
In the previous post... The query should be:
select rowid,r.notice
from roman r where CONTAINS(notice,' (lord INPATH(/record/datafield[@tag="245"]/subfield[@code="a"]))')>0
So instead of looking for "roch and carrier", i look for the word "lord".
The rest is all the same...
Sorry guys :)
Dave

Similar Messages

  • NOT IN doesnt work as expected!!

    Hi
    I need to count data in a table after comparing the values from another table. Following are the details of the test tables that worked fine and the result was the expected one.
    DESC A
    Name Null? Type
    ID VARCHAR2(10)
    DESC B
    Name Null? Type
    ORGID VARCHAR2(10)
    select * from a;
    ID
    1I
    2I
    3I
    4I
    select * from b;
    ORGID
    1I
    2
    SELECT COUNT(*) FROM A WHERE ID NOT IN (SELECT ORGID FROM B);
    COUNT(*)
    3
    So far so good. Here is my problem
    desc org
    Name Null? Type
    ORGID VARCHAR2(100)
    desc newintlorgs
    Name Null? Type
    ID VARCHAR2(100)
    SELECT DISTINCT ORGID FROM ORG WHERE ORGID LIKE '9258%';
    ORGID
    9258
    92580
    92581
    select distinct id from newintlorgs where id like '9258%';
    ID
    9258I
    select count(*) from newintlorgs where id not in (select orgid from org);
    COUNT(*)
    0
    It should show atleast 1 record ie 9258I since it is not present in ORG table but present in NEWINTLORGS table but the count shows 0 record.
    Any ideas why it is not showing?
    thanks in advance

    Probably you have NULL values in your ORG table.
    From the documentation:
    »If any item in the list following a NOT IN operation evaluates to null, then all rows evaluate to FALSE or UNKNOWN, and no rows are returned.«
    So you need to add a »where not null« condition:
    michaels>  with org as
    (select cast('9258' as varchar2(100)) orgid from dual union all
    select '92580' orgid from dual union all
    select '92581' orgid from dual union all
    select null orgid from dual
    newintlorgs as
    select cast('9258I' as varchar2(100)) id from dual
    select count(*) from newintlorgs where id not in (select orgid from org where orgid is not null)
      COUNT(*)
             1Alternativly you can use the NOT EXISTS condition.

  • Call Executable​, absolute path doesnt work as expected

    Hi all,
    i have a problem with the step call executable.
    I configure the step (call a .exe or bat file) with absolute path.
    As long as Teststand runs with the seq-file loaded all works fine.
    The problem shows up when i close the seq-file and reload it later.
    Then the configuration seems to be ok (still the absolute path).
    But when i execute the seq-file it runs the .exe or .bat file as it only has
    the relative path in the configuration.
    I know that, because it wanna load some files from the same folder
    and it doesn't find them after reloading the seq-file.
    Sincerely Stefan Bölsterli

    I use Teststand 3.0

  • AlphaComposite doesnt work as expected

    From the tutorial [http://download.oracle.com/javase/tutorial/2d/advanced/compositing.html]
    Source-in (SRC_IN): If pixels in the source and the destination overlap, only the source pixels in the overlapping area are rendered.
    Output from the code below is different from the description.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.geom.*;
    public class Main
    {   public static void main(String[] args)
        {   SwingUtilities.invokeLater(new Runnable()
            {   public void run()
                {   createAndShowGUI();
        private static void createAndShowGUI()
        {   JFrame f = new JFrame("My GUI");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            CompositionGUI GUI = new CompositionGUI();
            f.setContentPane(GUI);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setSize(1200, 300);
            f.setVisible(true);
    class CompositionGUI extends JPanel
    {   public CompositionGUI(){}
        private int getRule(int rule)
        {   switch( rule )
            {   case 0: return AlphaComposite.CLEAR;
                case 1: return AlphaComposite.DST;
                case 2: return AlphaComposite.DST_ATOP;
                case 3: return AlphaComposite.DST_IN;
                case 4: return AlphaComposite.DST_OUT;
                case 5: return AlphaComposite.DST_OVER;
                case 6: return AlphaComposite.SRC;
                case 7: return AlphaComposite.SRC_ATOP;
                case 8: return AlphaComposite.SRC_IN;
                case 9: return AlphaComposite.SRC_OUT;
                case 10: return AlphaComposite.SRC_OVER;
                case 11: return AlphaComposite.XOR;
                default: return AlphaComposite.SRC;
        private String getRuleName(int i)
        {   switch(i)
            {   case 0: return "CLEAR";
                case 1: return "DST";
                case 2: return "DST_ATOP";
                case 3: return "DST_IN";
                case 4: return "DST_OUT";
                case 5: return "DST_OVER";
                case 6: return "SRC";
                case 7: return "SRC_ATOP";
                case 8: return "SRC_IN";
                case 9: return "SRC_OUT";
                case 10: return "SRC_OVER";
                case 11: return "XOR";
                default: return "Unknow";
        public void paintComponent(Graphics g)
        {   super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            BufferedImage buffImg = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
            Graphics2D gbi = buffImg.createGraphics();
            g2.setColor(Color.ORANGE);
            Composite def = gbi.getComposite();
            for(int i=0;i<3;i++)
                for(int j=0;j<12;j++)
                {   gbi.setColor(new Color(0.0f, 0.0f, 1.0f, 1.0f));
                    gbi.setComposite(def);
                    gbi.fill(new Rectangle2D.Double(0, 0, 50, 50));
                    gbi.setColor(new Color(1.0f, 0.0f, 0.0f, 1.0f));
                    gbi.setComposite(AlphaComposite.getInstance(getRule(j),i*0.5f));
                    gbi.fill(new Ellipse2D.Double(25, 25, 50, 50));
                    g2.drawImage(buffImg, null, j*100, i*100);
                    g2.drawString(getRuleName(j), 10+j*100, i*100+20);
    }

    This might work:
    @Override public void paintComponent(Graphics g) {
      super.paintComponent(g);
      Graphics2D g2 = (Graphics2D)g;
      for(int i=0; i<3; i++) {
        for(int j=0; j<12; j++) {
          BufferedImage buffImg = new BufferedImage(100,100,BufferedImage.TYPE_INT_ARGB);
          Graphics2D gbi = buffImg.createGraphics();
          Composite def = gbi.getComposite();
          gbi.setColor(new Color(0.0f, 0.0f, 1.0f, 1.0f));
          gbi.setComposite(def);
          gbi.fill(new Rectangle2D.Double(0, 0, 50, 50));
          gbi.setColor(new Color(1.0f, 0.0f, 0.0f, 1.0f));
          gbi.setComposite(AlphaComposite.getInstance(getRule(j),i*0.5f));
          gbi.fill(new Ellipse2D.Double(25, 25, 50, 50));
          gbi.dispose();
          g2.drawImage(buffImg, null, j*100, i*100);
          g2.setColor(Color.ORANGE);
          g2.drawString(getRuleName(j), 10+j*100, i*100+20);
    }

  • HT201436 Calling doesnt work as expecting

    Can someone help me ? When i am calling someone i cant hear voice clear there !!

    Check "Call and Connection Issues" here:
    http://support.apple.com/kb/TS2802

  • Images in Multicolumn Listbox doesn't work as expected

    In the attached example, the symbols are getting displayed in the correct order but missing the symbol for the first row. I can manually select the symbol but by default only the 2nd symbol from the provided array list appear.
    Any idea what's the issue?
    How to display correct symbol?
    Thanks in advance.
    Cross-post from LAVA: http://lavag.org/topic/15788-images-in-multicolumn-listbox-doesnt-work-as-expected/page__pid__95584#...
    Solved!
    Go to Solution.
    Attachments:
    Images & Multicolumn ListBox.vi ‏10 KB

    Hello, Vidula
    It seems that index 0 is reserved for the empty symbol, no matter what custom symbol you provided. Adding one image in front before setting symbols array and incrementing ItemSyms indexes solves this problem. However, I can't find any information about this in documentation, which would be nice
    Attachments:
    Images & Multicolumn ListBox.vi ‏12 KB

  • LinkedList toArray() doesnt work well

    toArray() doesnt work as expected
    any suggestion?
    thx~
    >
    Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.Integer;
         at util.ArrayUtil.main(ArrayUtil.java:22)
    {quote}
    package util;
    import java.util.*;
    public class ArrayUtil
    {   public static <E> E[] merge(E[]... e)
        {     LinkedList<E> ll = new LinkedList();
         for(E[] e_temp : e)
         {   if(e_temp == null) continue;
             for(E e_temp2 : e_temp) if(e_temp2 != null) ll.add(e_temp2);
         return (E[])ll.toArray();
        public static void main(String[] args)
        {     Integer[] a1 = null;
         Integer[] a2 = null;
         Integer[] a3 = {1,2,3};
         Integer[] a4 = {4,5,6};
         Integer[] a = (Integer[])merge(a1, a2);                //ClassCastException is triggered
         System.out.println(a.length);
         for(int i=0; i<a.length; i++)
         System.out.println(a);

    could you pls show me a sample?
    public static <E> E[] merge(E[]... e)
        {     LinkedList<E> ll = new LinkedList<E>();
         for(E[] e_temp : e)
         {   if(e_temp == null) continue;
             for(E e_temp2 : e_temp) if(e_temp2 != null) ll.add(e_temp2);
         E[] out = (E[])Array.newInstance(e.getClass(), ll.size());
         return ll.toArray(out);
        }Exception in thread "main" java.lang.ClassCastException: [[[Ljava.lang.Integer; cannot be cast to [Ljava.lang.Integer;
         at util.ArrayUtil.main(ArrayUtil.java:23)
    {quote}

  • My macbook seems to be going crazy. At certain points (and for hours) I get the oh snap page on chrome, safari doesnt work, macbook wont let me create any files or for example upload music to itunes. I restored my mac so im sure its not a malware problem.

    My macbook seems to be going crazy. At certain points (and for hours) I get the oh snap page on chrome, safari doesnt work, macbook wont let me create any files or for example upload music to itunes. I restored my mac so im sure its not a malware problem. The only thing that solves it is switching off and on , but sometimes I have to do that for 6-7 times before its ok or wait for a few hours. Some help please

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a Fusion Drive or a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • Hey my lock screen button and home button jammed it doesnt work.How can I fix this problem.But first of all I live in Turkey.But my Iphone 4 is bought from apple store victoria gardens CA.Do I have warranty in Turkey ?

    Hey my lock screen button and home button jammed it doesnt work.How can I fix this problem.But first of all I live in Turkey.But my Iphone 4 is bought from apple store victoria gardens CA.Do I have warranty in Turkey ?

    The warranty is only good in the country of purchase.

  • Hello. Having a problem with skype. i am online, all buttons work, however i can not make a video call the button simply doesnt work. Messages works. voice calls works. Please help.

    Hello. Having a problem with skype. i am online, all buttons work, however i can not make a video call the button simply doesnt work. Messages works. voice calls works. Please help.

    Sounds like you need to contact skype.

  • I am facing a weird problem with my iphone 4s Wi-Fi connectivity. As i connect my iphone to my office Wi-Fi, internet works in one building, but it doesnt work in the other building, although the phone shows Wi-Fi is connected. Please help me out!!

    I am facing a weird problem with my iphone 4s Wi-Fi connectivity. As i connect my iphone to my office Wi-Fi, internet works in one building, but it doesnt work in the other building, although the phone shows Wi-Fi is connected in the other building. This problem was not there earlier but has occured recently. I would also like to mention that none of my other colleauges who uses iphone are not facing this issue. Please help me out!!

    Assuming you entered the correct WiFi password for your network, see these articles:
    iOS: Troubleshooting Wi-Fi networks and connections
    iOS and OS X: Recommended settings for Wi-Fi routers and access points

  • Hello! My iMac frozed and I had to switch the electricty supply off and on in order to start again the system, with the problem that the screen looks wierd, I tried to calibrate it... doesnt works any suggestion?

    hello! My iMac frozed and I had to switch the electricty supply off and on in order to start again the system, with the problem that the screen looks wierd, I tried to calibrate it... doesnt works any suggestion?

    Dear Paul, thank you very much for your time and answer, I followed those steps, somehow it helped the performance of my Imac, is faster now, but the screen issue about the very High contrast colours is still there. Since I am a photographer I am very depending on the screen calibration. I am worried that I came to damage the video card when I shut down the computer from the swicth when It was frozed.

  • Hey Community, i have an iphone 5 recently doesnt work, it's showing apple in middle even i connect to itunes there is nothing. Can someone tells me the problem please thank you

    Hey Community, i have an iphone 5 recently doesnt work, it's showing apple in middle even i connect to itunes there is nothing. Can someone tells me the problem please thank you

    you could try forcing it into recovery mode by turning it off, hold the home button and plug it into iTunes at the same time, keep holding the home button until iTunes says its detected a device that needs to be updated or restored. Then restore.

  • Having problem with my iphone camera,doesnt work when i click the camera app,but it does work when i double click when my phone is off.

    having problem with my iphone camera,doesnt work when i click the camera app,but when i double click when my phone is locked it works.

    The Basic Troubleshooting Steps are:
    Restart..  Reset..  Restore...
    Reset your phone:
    Press the sleep/wake button & home button at the same time, keep pressing until you see the Apple logo, then release the buttons...
    Restart / Reset
    http://support.apple.com/kb/ht1430
    Backing up, Updating and Restoring
    http://support.apple.com/kb/HT1414

  • Great Problemes after installing Yosemite (10.10.2 ) with Photoshop CS6....The program crashes --last time 10 times during my work session..wacomtable doesnt work..it is slow...and get error messages about the graphic card....It s a Terror to work with my

    great Problemes after installing Yosemite (10.10.2 ) with Photoshop CS6....The program crashes --last time 10 times during my work session..wacomtable doesnt work..it is slow...and get error messages about the graphic card....It s a Terror to work with my beloved Photoshop!

    The Yosemite upgrade very often damages existing Photoshop installations.  Thank Apple for that.
    You need to uninstall and re-install Photoshop, then apply all the Photoshop upgrades from scratch.
    But first, give us details about your setup:
    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    A screen shot of your settings or of the image could be very helpful too,
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

Maybe you are looking for

  • Itunes wont burn my CD disc error 4280?

    I have a toshiba satellite computer running windows 7 and itunes 11. It wont let me burn my playlist to a disk. Im using memorex CD-R blank cd. I have tried every disc write speed and nothing worked and ran diagnostics everything checks out. Can some

  • Lphone 4 water damage

    Hi, I stupidly ! dropped my iphone in water for the 2nd time within 2 months and this was a couple days ago I was washing my face and accidently knocked the phone in the water filled sink the first time, i put the phone straight into a bowl of rice a

  • Movement type 542

    hello, friends. the requirement is to reflect the number of the customer/vendor in material document associated with movement type 542.  can this be copied from sales documents like the returns order or inbound delivery? thanks.

  • Facetime picture freezes A LOT

    Hi my mom and I have iphones and we facetime A LOT since i'm away at college. We've always had issues with the picture disconnecting (and only being able to hear eachother through audio) but it's getting worse and now even when the picture is there s

  • Chrome crash on 10.8.5

    Im on a macbook pro with os x 10.8.5 and i can not get chrome to work i have deleted it and the chrome files in /appsupport/ and still get a crash even after a restart and clean install of chrome here is the crash report. Process:         Google Chro