[Moxy] json marshalling, mixed element unexpected behaviour

Hi there,
Moxy generated wrong output when there is XML mixed element type and one of the nested elements is a string type.
Then in generated json, text is put into nested element instead of "value" element.
Example:
Schema:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" >
<xs:element name="root" type="rootType"/>
<xs:complexType name="rootType">
<xs:sequence>
<xs:element type="elementType" name="element" maxOccurs="unbounded" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="elementType" mixed="true">
<xs:sequence>
<xs:element type="xs:string" name="nested" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
sample xml:
<root>
<element>should be into value element, not in nested<nested>nested content</nested></element>
</root>
Gives unexpected json output:
{"root":{"element":[{"nested":["should be into value element, not in nested","nested content"]}]}}

Similar Messages

  • Unexpected behaviour upon pressing the 'Enter' key on dialog screen

    Hi.
    I have two dialog screens that exhibit unexpected behaviour when i pressed the 'Enter' key.
    Screen 1: When I pressed the 'Enter' key, the focus shifted to another input field and the content of the previous input field is cleared. The thing is, I did not have any codes in PAI for 'Enter'. Why is this happening?
    Screen 2: On load, some of the fields on this screen will be disabled. However, when I pressed the 'Enter' key, all the disabled fields become enabled. Again, I did not have any codes that handle the 'Enter' key in PAI. Why is this happening?
    Any help is appreciated.

    Hi Atish.
    Yes, I have used CHAIN... END CHAIN.
    I thought that CHAIN... END CHAIN allows my input fields to be re-activated after an error message is displayed.
    How would CHAIN... END CHAIN cause the unexpected behaviour?
    Thanks.

  • SAP Personas: An unexpected behaviour has been detected and you have been disconnected – please log in again.

    Hallo everyone,
    We are installing Personas and facing several challenges.
    Personas 2 SP02 was installed according to instructions of Note '1848339 - Installation and Upgrade note for Personas' and configured according to the Config Guide v1.3 (rel. May 2014). The referenced notes were also applied as well as the 'How to config - FAQ' blog by Sushant.
    We are able to log on and execute transactions and perform activities successfully (e.g. SE80, SPRO, KB15, etc.).
    When trying to copy a screen the following error appears: 'An unexpected behaviour has been detected and you have been disconnected - please log in again.'
    Thereafter one can simply continue executing transactions without having to log in again.
    Please see the download of the error attached as per blog: SAP Screen Personas Support Tips – client side logging
    The HAR is unfortunately too large to attach. Are there any alternatives?
    Thank you in advance for you assistance!
    Kind regards,
    Daniel
    Message was edited by: Daniel K

    Hi,
    I have never worked on SAP PERSONA but you can try below things
    1)try to use different user or J2ee_admin since it might be same user multiple session case
    2) Try with different browser since plugins can behave unexpectedly
    3)Make entry in host file also
    4) check dev_icm logs
    5) check on ABAP side for dumps in ST22
    Warm Regards,
    Sumit

  • Unexpected behaviour of Composer with adf-config

    This is a part of my adf-config.xml file:
    <cust:customizableComponentsSecurity xmlns="http://xmlns.oracle.com/adf/faces/customizable/config">
    <cust:enableSecurity value="true"/>
    <cust:actionsCategory>
    <cust:actionCategory name="personalizeActionsCategory" value="#{securityContext.userName eq 'weblogic' ? 'true' : 'false'}"/>
    <cust:actionCategory name="customizeActionsCategory" value="#{securityContext.userName eq 'weblogic' ? 'true' : 'false'}"/>
    </cust:actionsCategory>
    </cust:customizableComponentsSecurity>
    Section upon sets a simple EL to provide security restrictions for user in Composer. When I deploy an application and login at first time everything works fine. But when I log in with user other than 'weblogic' unexpected behaviour appears. After that even 'weblogic' user can not access to personalization and customization options anymore.
    So, the question is - is it a really unexpected behaviour, bug or I missed something? Here is a pretty clear and simple manual that I followed to try to make it work: http://docs.oracle.com/cd/E29597_01/webcenter.1111/e25595/jpsdg_page_editor_security.htm#autoId18
    Edited by: Igor_Petrov on 22.02.2013 5:56
    Edited by: Igor_Petrov on 22.02.2013 5:57

    More information: I tried rebuild again. The Messages folder now has 20418 entries and takes 7.54 Gb of disk space.
    I searched using Spotlight for a unique term which appears in one of the messages and found 8 instances of it. All are the same message, but are separate .emlx files.
    This is getting crazy ...

  • Audio usb ALSA error: No suitable mixer element found

    Hello everybody.
    I've installed arch last week. I've some problem with my usb audio. The audio usb device works but i can't use a mixer, so audio control is everytime set on max.
    I can't use my normal intel audio 'cause is broken. This is my aplay -l output:
    aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: Intel [HDA Intel], device 0: ALC268 Analog [ALC268 Analog]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: Intel [HDA Intel], device 1: ALC268 Digital [ALC268 Digital]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: Intel [HDA Intel], device 6: Si3054 Modem [Si3054 Modem]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: AUDIO [USB AUDIO], device 0: USB Audio [USB Audio]
    Subdevices: 0/1
    Subdevice #0: subdevice #0
    When i try to play audio files on audacious, arch give me following error: Audio usb ALSA error: No suitable mixer element found.
    I've set the audio usb device as default with asoundconf. If i try to use hd intel audio, the mixer works good, but when i get back to usb audio, mixer is absent. There is a way to set a mixer for the usb audio device?
    Last edited by Kalamaius (2014-05-23 14:34:13)

    emeres wrote:
    As for the usb sound card I would try setting those parameters:
    autoclock=0/1
    ignore_ctl_error=0/1
    Kalamaius wrote:Intel audio is broken,  I've a crackling sound all time. I changed the previous sound card but the new one that my personal computer technician mounted never works properly, isn't a new card but a used one.
    Probably related to module options.
    If you simply want to control the volume it would be easy to implement a softvol plugin. But this headset should have a volume control. What is the output of:
    tree /proc/asound
    tree /proc/asound
    /proc/asound
    ├── AUDIO -> card1
    ├── card0
    │   ├── codec#0
    │   ├── codec#1
    │   ├── id
    │   ├── pcm0c
    │   │   ├── info
    │   │   └── sub0
    │   │   ├── hw_params
    │   │   ├── info
    │   │   ├── prealloc
    │   │   ├── prealloc_max
    │   │   ├── status
    │   │   └── sw_params
    │   ├── pcm0p
    │   │   ├── info
    │   │   └── sub0
    │   │   ├── hw_params
    │   │   ├── info
    │   │   ├── prealloc
    │   │   ├── prealloc_max
    │   │   ├── status
    │   │   └── sw_params
    │   ├── pcm1p
    │   │   ├── info
    │   │   └── sub0
    │   │   ├── hw_params
    │   │   ├── info
    │   │   ├── prealloc
    │   │   ├── prealloc_max
    │   │   ├── status
    │   │   └── sw_params
    │   ├── pcm6c
    │   │   ├── info
    │   │   └── sub0
    │   │   ├── hw_params
    │   │   ├── info
    │   │   ├── prealloc
    │   │   ├── prealloc_max
    │   │   ├── status
    │   │   └── sw_params
    │   └── pcm6p
    │   ├── info
    │   └── sub0
    │   ├── hw_params
    │   ├── info
    │   ├── prealloc
    │   ├── prealloc_max
    │   ├── status
    │   └── sw_params
    ├── card1
    │   ├── id
    │   ├── pcm0c
    │   │   ├── info
    │   │   └── sub0
    │   │   ├── hw_params
    │   │   ├── info
    │   │   ├── status
    │   │   └── sw_params
    │   ├── pcm0p
    │   │   ├── info
    │   │   └── sub0
    │   │   ├── hw_params
    │   │   ├── info
    │   │   ├── status
    │   │   └── sw_params
    │   ├── stream0
    │   ├── usbbus
    │   ├── usbid
    │   └── usbmixer
    ├── cards
    ├── devices
    ├── hwdep
    ├── Intel -> card0
    ├── modules
    ├── oss
    │   ├── devices
    │   └── sndstat
    ├── pcm
    ├── seq
    │   └── drivers
    ├── timers
    └── version
    20 directories, 63 files

  • Handling mixed element

    I have a xml file which look like this .
    Original file:
    <?xml version="1.0" encoding="UTF-8"?>
    < root xmlns ="http://www.example.org/gvxml" application="Root">
    < start/>
    < form customizable="true" id="whichDigit" idcustomize="true" scopecustomize="true">
    < field customizable="true" name="digit" text="Testing" >
    < prompt customizable="true" text="Please say a digit" />
         </field>
    </form>
         </ root>
    I am trying to create another xml file from this xml file using the dom parser. In the new file
    the text attribute should not be there but its value should come as an mixed element as shown
    in the modified file.
    File to be created should look like this one:
    <?xml version="1.0" encoding="UTF-8"?>
    <root xmlns ="http://www.example.org/gvxml" application="Root">
    <form customizable="true" id="whichDigit" idcustomize="true" scopecustomize="true">
    <field customizable="true" name="digit" > Testing
    <prompt customizable="true" > Please say a digit</prompt>
         </field>
    </form>
         </root>
    The procedure which i am following is that While parsing the xml file whenever i am getting
    text attribute then i am taking its value and putting it into the corresponding element
    using Element.setTextContent(text).
    The problem which i am facing is when both the parent element and child element are having
    text attribute and while parsing i am using settextcontent for the parent element then it is
    not going to the child element.
    Please help in handling this situation
    Thanks in advance
    Rahul

    Works for me, after correcting a few sytntax errors and wellformedness issue :
    SQL> select m.TNumber,l.ListTypeHolder,l.ListTypeOwner,l.CoverageValue
      2  from XML_SAMPLE
      3     , xmltable(
      4         xmlnamespaces(DEFAULT 'http://www.xxx.com/Pway/Workfile')
      5       , '$XS/Admin' passing object_value as "XS"
      6         columns
      7           TNumber VARCHAR2(255) PATH 'Information/TNumber',
      8           Item_Fragment XMLTYPE PATH 'Lists/ListItem'
      9       ) m
    10     , xmltable(
    11         xmlnamespaces(DEFAULT 'http://www.xxx.com/Pway/Workfile')
    12       , '$LI/ListItem' passing m.Item_Fragment as "LI"
    13         columns
    14           ListTypeHolder VARCHAR(255) PATH 'ListType/@HOLDER',
    15           ListTypeOwner VARCHAR(255) PATH 'ListType/@OWNER',
    16           CoverageValue VARCHAR(255) PATH 'CoverageValue'
    17       ) l
    18  --where l.ListTypeOwner = 'false'
    19  ;
    TNUMBER            LISTTYPEHOLDER     LISTTYPEOWNER    COVERAGEVALUE
    1-1-123456         true               true             100
    1-1-123456         false              false            200
    1-1-123456         true               true             300
    (tested on 11.2.0.3)

  • JAXB marshalling complexType elements

    Does anyone know why JAXB always marshalls complexType elements with a seperate start and end tag, even if the element has no content?
    i.e.
    Given the schema element declaration:
    <xs:element name="foo" type="fooType"/>
    <xs:complexType name="fooType">
    <xs:attribute name="value" type="xs:string" use="required"/>
    </xs:complexType>
    Why do I get:
    <foo value="bar"></foo>
    Instead of:
    <foo value="bar"/>
    Is their a setting / property to control this behaviour?
    If not then I certainly think there should be because this will bloat the 5Mb XML files I am currently dealing with by quite a lot.
    Cheers,
    Simon

    I have exactly the same trouble here. Did you find a solution? If so, please contact me. I am so afraid of increase the amount space used to store all XML files.
    Thanks in advance
    Julio Garc�a
    [email protected]

  • SimpleDateFormat unexpected behaviour

    Hi everybody,
    i'm facing an issue which is mainly due to my incomprehension of the inner mechanisms of date parsing in Java. I would like to parse a date from an input string with a specific pattern, but some inputs match this pattern when i expect them not to. Let me explain it through an example:
    public class DateIssue {
         public static void main(String[] args) {
              SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
              sdf.setLenient(false);
              try {
                   System.out.println(sdf.parse("10/02/20001"));
              } catch (ParseException pe) {
                   pe.printStackTrace();
    }Here i'm expecting a 4 digit year, but when i give "20001" as a year, the simpledateformat parses it just fine, and no exception is thrown. I checked the API where i found:
    Year:  If the formatter's Calendar is the Gregorian calendar, the following rules are applied.
    * For formatting, if the number of pattern letters is 2, the year is truncated to 2 digits; otherwise it is interpreted as a number.
    * For parsing, if the number of pattern letters is more than 2, the year is interpreted literally, regardless of the number of digits. So using the pattern "MM/dd/yyyy", "01/11/12" parses to Jan 11, 12 A.D.
    * For parsing with the abbreviated year pattern ("y" or "yy"), SimpleDateFormat must interpret the abbreviated year relative to some century. It does this by adjusting dates to be within 80 years before and 20 years after the time the SimpleDateFormat instance is created. For example, using a pattern of "MM/dd/yy" and a SimpleDateFormat instance created on Jan 1, 1997, the string "01/11/12" would be interpreted as Jan 11, 2012 while the string "05/04/64" would be interpreted as May 4, 1964. During parsing, only strings consisting of exactly two digits, as defined by Character.isDigit(char), will be parsed into the default century. Any other numeric string, such as a one digit string, a three or more digit string, or a two digit string that isn't all digits (for example, "-1"), is interpreted literally. So "01/02/3" or "01/02/003" are parsed, using the same pattern, as Jan 2, 3 AD. Likewise, "01/02/-3" is parsed as Jan 2, 4 BC.
    Otherwise, calendar system specific forms are applied. For both formatting and parsing, if the number of pattern letters is 4 or more, a calendar specific long form is used. Otherwise, a calendar specific short or abbreviated form is used.
    I suspect the following excerpt:
    For parsing, if the number of pattern letters is more than 2, the year is interpreted literally,
    to be responsible for this behaviour, but i thought parsing with lenient would avoid such a "mistake", and throw an exception because of the wrong number of digits. What is the best way to check that the year is exactly four digit long? Do I have to use string.matches() or a Pattern object just for this?
    Thanks a lot
    Edited by: calvino_ind on Aug 30, 2009 1:51 PM

    See this recent, and related thread: [Unexpected SimpleDateFormat behavior|http://forums.sun.com/thread.jspa?threadID=5404776&messageID=10802339]
    The behavior is unexpected intuitively but seems to follow the API contract. The number of digits apparently is only used to break up consecutive fields.

  • Unexpected behaviour from LSSerializer.writeToString

    I was trying to use LSSerializer to serialize a fragment of a larger XML document when I ran into some odd behaviour from Oracle's implementation.
    This sample code shows LSSerializer being used to write a org.w3c.dom.Element XML fragment in both Oracle and Xerces:
    <pre>
    import java.io.ByteArrayInputStream;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.ls.DOMImplementationLS;
    import org.w3c.dom.ls.LSSerializer;
    public class Test
    public static final String xml = "&lt;foo>&lt;bar>abc&lt;/bar>&lt;baz>xyz&lt;/baz>&lt;/foo>";
    public static void main(String[] args) throws Exception
    // Oracle
    System.out.println("Oracle LSSerializer:");
    test(new oracle.xml.jaxp.JXDocumentBuilderFactory());
    System.out.println();
    // Xerces
    System.out.println("Xerces LSSerializer:");
    test(new com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl());
    private static void test(DocumentBuilderFactory fac) throws Exception
    DocumentBuilder b = fac.newDocumentBuilder();
    Document d = b.parse(new ByteArrayInputStream(xml.getBytes()));
    Element e = d.getDocumentElement();
    System.out.println("Document root element: " + e.getNodeName());
    DOMImplementationLS di = (DOMImplementationLS) d.getImplementation();
    LSSerializer ser = di.createLSSerializer();
    System.out.println(ser.writeToString(e));
    </pre>
    Here's the output:
    <pre>
    Oracle LSSerializer:
    Document root element: foo
    &lt;bar>abc&lt;/bar>&lt;baz>xyz&lt;/baz>
    Xerces LSSerializer:
    Document root element: foo
    &lt;?xml version="1.0" encoding="UTF-16"?>
    &lt;foo>&lt;bar>abc&lt;/bar>&lt;baz>xyz&lt;/baz>&lt;/foo>
    </pre>
    As you can see, Oracle's LSSerializer implementation serializes the children of the org.w3c.dom.Element, but not the element itself.
    It's not hard to work around, but it really doesn't seem like the correct behaviour. It's certainly doesn't behave the way a reasonable developer would expect it to.

    The XDK 10g implementation is slightly different from the Xerces implementation.
    In XDK 10g, the node previous to the node to be output should be specified in the
    writeToString() method.
    Also in XDK 10g, SHOW_ELEMENT does not output the element text, in Xerces the element text is output.
    Refer
    http://www.oracle.com/technology/pub/notes/technote_dom.html

  • Default cost element unexpected OKEP

    Hi Experts,
    I ask for your help in the following situation.
    In transaction KO88, trying to settle an order, the "Message no. KD503 - Complete allocation structure Z1" arises.
    "Diagnosis :
    During settlement, the system puts the sender debits into groups (assignments), which are settled using the same settlement cost element. The settlement assignment is made in the allocation structure, which is stored in the settlement rule for the sender (under settlement parameters). Cost element 5111900300 cannot be assigned to a settlement cost assignment in allocation structure Z1, and therefore it cannot be assigned to a settlement cost element."
    This cost element "5111900300" is the default class for the controlling area (transaction OKEP).
    The strange behaviur is that in past months the settle for this order never get to the Cost element indicated; to test the settle, the cost element was added to the allocation structure Z1, and it was found out that the FI docs refering to Down Payments are the ones that take this cost element into the settle, and it is strange because in past months the down payments in the same PO takes the correct cost class.
    It is strange too that the corresponding FI doc for the Down Payment producing the error has not asociation with the Purchasing Document; that could be the reason it is not taking the cost class from the PO.
    I know is a little complex, but I can not found out a note for this and support refers to this as a consulting issue.
    Thanks in advance.

    Hi..
    System response is correct because in OKEP default cost element is posted without ref of PO.
    If you want to post in ref of PO don't assign any cost element in OKEP.
    kkumar

  • Extending class gives unexpected behaviour

    Hello forumusers
    I am making my own table model by extending DefaultTableModel. When calling insertRow(int, Object[]) in my own code, super.insertRow calls insertRow(int, Vector) in my code instead of in the superclass. I didn't think that the superclass would hold any reference to my class and when the superclass calls insertRow(int, Vector) it would be a method in the DefaultTableModel class.
    Please see the code below. Can anyone explain this behaviour to me?
    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    class TableModelTest {
      public TableModelTest() {
        BundleTableModel m = new BundleTableModel(
            new String[][]{{"aaa", "aab", "aba"}, {"ccc", "cca", "cac"}},
            new String [] {"header0", "header1", "header2"});
        m.insertRow(1, new String[]{"BBB", "BBA", "BAB"});
      public static void main(String[] args) {
        TableModelTest dut = new TableModelTest();
      public class BundleTableModel extends DefaultTableModel {
        public BundleTableModel(String[][] dataIds, String[] columnNameIds) {
          super();
          setColumnCount(columnNameIds.length);
          setRowCount(dataIds.length);
          // My own code comes here
        public void insertRow(int row, Object[] rowData) {
          System.out.println("insertRow(int, Object[] called");
          super.insertRow(row, rowData);
          // My own code comes here
        public void insertRow(int row, Vector rowData) {
          System.out.println("insertRow(int, Vector) called");
          super.insertRow(row, rowData);
          // My own code comes here
    }

    Lesson learned.
    ejp was correct from the beginning.
    JLS section 8.4.10.6 'Large Example of Overriding' explains:
    "The critical point about overriding in this example is that the method putstr, which is declared in class BufferOutput, invokes the putchar method defined by the *current object this*, which is not necessarily the putchar method declared in class BufferOutput.
    This allows a subclass of BufferOutput to change the behavior of the putstr method without redefining it."
    Thanks for all comments.

  • Regexp_substr unexpected behaviour

    While trying to come up with a constraint to check for correct RGB color codes
    (RvalueGvalueBvalue) where the value is between 0 and 255
    I saw the following:
    database used: Oracle Database 10g Express Edition Release 10.2.0.1.0
    CREATE TABLE test
    (color varchar2(12)
    ,status varchar2(1)
    insert into test
    values ('R2G2B2','G')
    insert into test
    values ('R22G22B22','G')
    insert into test
    values ('R222G222B222','G')
    insert into test
    values ('R300G2B2','F')
    insert into test
    values ('R300G256B2','F')
    insert into test
    values ('R300G256B256','F')
    select t.status
         , t.color
         , REGEXP_SUBSTR(t.color,'^R(\d{1,2}|1\d{2}|2[0-4]\d{1}|25[0-5])') red
         , REGEXP_SUBSTR(t.color,'G(\d{1,2}|1\d{2}|2[0-4]\d{1}|25[0-5])') green
         , REGEXP_SUBSTR(t.color,'B(\d{1,2}|1\d{2}|2[0-4]\d{1}|25[0-5])$') blue
         , REGEXP_SUBSTR(t.color,'^R(\d{1,2}|1\d{2}|2[0-4]\d{1}|25[0-5])G(\d{1,2}|1\d{2}|2[0-4]\d{1}|25[0-5])B(\d{1,2}|1\d{2}|2[0-4]\d{1}|25[0-5])$','1','1','i') total
    from test t
    order by redoutput
    status   color        red    green    blue  total
      G      R2G2B2       R2      G2       B2    R2G2B2
      G      R22G22B22    R22     G22      B22   R22G22B22
      G      R222G222B222 R22     G22      B222  R222G222B222
      F      R300G2B2     R30     G2       B2   
      F      R300G300B2   R30     G30      B2
      F      R300G300B300 R30     G30Expected output
    status   color        red    green    blue  total
      G      R2G2B2       R2      G2       B2    R2G2B2
      G      R22G22B22    R22     G22      B22   R22G22B22
      G      R222G222B222 R222    G222     B222  R222G222B222
      F      R300G2B2             G2       B2   
      F      R300G300B2                    B2
      F      R300G300B300 Both the total and blue colums have the output as expected
    but the red and the green give a output with a maximum of 2 digits instead of 3
    even when the string should not match (300 > 255).
    I have read the information about regular expressions in the Application Developer's Guide - Fundamentals and SQL Reference but neither explain above behaviour
    Can someone explain why this is happening?
    Or give a hint of how to correct the select statement in such a way that results are like the expected output?

    First thanks everybody for their response.
    I was wrong in assuming that R300G0B0 with above mentioned regular expression for red should return null instate of R30 because 30 is on the range 0-255 I didn't say that the expression should take all the digits into account.
    Akeeti Jyuuzou's solutions is doing just that with anchoring the red to the green and the green to the blue and the blue to the end of the line. In the blow example I have anchored the red to any non digit character.
    SQL> select t.kleur color
      2       , REGEXP_SUBSTR(t.kleur,'^R(25[0-5]|2[0-4]\d{1}|1\d{2}|\d{1,2})\D') red
      3       , REGEXP_SUBSTR(t.kleur,'G(\d{1,2}|1\d{2}|2[0-4]\d{1}|25[0-5])') green
      4       , REGEXP_SUBSTR(t.kleur,'B(\d{1,2}|1\d{2}|2[0-4]\d{1}|25[0-5])$') blue
      5       , REGEXP_SUBSTR(t.kleur,'^R(\d{1,2}|1\d{2}|2[0-4]\d{1}|25[0-5])G(\d{1,2}|1\d{2}|2[0-4]\d{1}|25[0-5])B(\d{1,2}|1\d{2}|2[0-4]\d{1}|25[0-5])$','1','1','i') total
      6  from test t
      7  /
    COLOR                 RED   GREEN   BLUE    TOTAL
    R300G0B300                   G0                                                                                                                                                               
    R0G0B20X            R0G    G0                                                                                                                                                               
    SQL Slow moe is indeed right that the alterations are read form left to right and is stopped by the first correct pattern as is shown below.
    In below example I have turned around the alterations for the red but left the green to see the difference
    SQL> select t.kleur color
      2       , REGEXP_SUBSTR(t.kleur,'^R(25[012345]|2[01234]\d{1}|1\d{2}|\d{1,2})') red
      3       , REGEXP_SUBSTR(t.kleur,'G(\d{1,2}|1\d{2}|2[01234]\d{1}|25[012345])') green
      4       , REGEXP_SUBSTR(t.kleur,'B(\d{1,2}|1\d{2}|2[01234]\d{1}|25[012345])$') blue
      5       , REGEXP_SUBSTR(t.kleur,'^R(\d{1,2}|1\d{2}|2[01234]\d{1}|25[012345])G(\d{1,2}|1\d{2}|2[01234]\d{1}|25[012345])B(\d{1,2}|1\d{2}|2[01234]\d{1}|25[012345])$','1','1','i') total
      6  from test t
      7  order by id
      8  /
    COLOR                   RED     GREEN     BLUE     TOTAL
    R222G222B222        R222     G22         B222       R222G222B222
                                                                                                                                                                 

  • Unexpected behaviour with my navigation buttons

    Hi Guys,
    I've just noticed some strange behaviour for my nav buttons in a project I've recently created. My project uses click boxes to naviage and has a Home Button which jumps from any slide (aside from Question Slides) to the first slide in the project. A next and back click box which are all set to go to the next slide / go to previous slide...
    All works fine and as expected (i.e as soon as I click on the next button it goes to the next slide regardless if audio is still playing of the if the slide has finished playing) until say I get two or three pages in to the project and click the home button. It goes to the first page as expected where I click a go to next slide click box (this one takes a few seconds to appear on this slide) which immediatly goes to the next slide. Here is where my problems start... I click on next and I hear the click sound but it refuses to skip to the next slide - It plays the whole slide (50 seconds worth of audio) before it will go to the next slide...
    For the life of me I cannot see why it would do this.
    The click box is set to infinite attempts.
    Anyone ever had a similar issue???
    Thanks
    JT

    Try fiddling with your Quiz: Settings > Required options to see if they make a difference.

  • Nokia mix radio unusual behaviour

    I have lumia 520 and I am from india.My nokia music unlimited subscription has been ended. But when i open the app i can stream songs or download offline mixes for first time only. I mean if i select any other mix to play second time it says "your subscription has ended, renew". Then if i close the app and reopen it again i can play a mix for the first time. I cant download songs though. Is it a bug or a feature... I am confused if its a feature why it doesnt allow to play a mix for second time.

    Welcome to your support community, ambar2595.
    We recommend checking this link: MixRadio Renewal and look for the response provided by michaels. Not to worry, your feedback is valued. 
    Have a good one! ;-)

  • MERGE: unexpected behaviour, oracle 11g

    Hi all,
    I'm facing a strange behaviour with Merge statement.
    In particular in doc Oracle we read:
    "MERGE is a deterministic statement. That is, you +*cannot update*+ the same row of the target table multiple times in the same MERGE statement."
    My source table has two equal key rows and the "merge statement" merge the row with the last value in the source table.
    How Is this possible ?
    thank you.

    VERSION:
    SQL> select * from v$version
      2  ;
    BANNER
    Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL>MERGE, in a dynamic context:
    v_sql :=
    'MERGE INTO dwh_cdl.dim_cost_hierarchy dim
             USING (SELECT DISTINCT TRIM (item_code) id_item,
                                    NVL (TRIM (CATEGORY), ''ND'') CATEGORY,
                                    r1.r1_code r_1,
                                    r2.r2_code r_2,
                                    r3.r3_code r_3,
                                    r4.r4_code r_4,
                                    w.item_description desc_item
                                            FROM '
                                            || v_wrk
                                            || ' w INNER JOIN dwh_cdl.lu_r1 r1
                                                 ON (w.r_1 = r1.r1_code)
                                                 INNER JOIN dwh_cdl.lu_r2 r2
                                                 ON (w.r_2 = r2.r2_code)
                                                 INNER JOIN dwh_cdl.lu_r3 r3
                                                 ON (w.r_3 = r3.r3_code)
                                                 INNER JOIN dwh_cdl.lu_r4 r4
                                                 ON (w.r_4 = r4.r4_code)
                                    ) wrk
             ON (    dim.id_item = wrk.id_item
                 AND dim.category = wrk.category
                 AND dim.r1_code = wrk.r_1
                 AND dim.r2_code = wrk.r_2
                 AND dim.r3_code = wrk.r_3
                 AND dim.r4_code = wrk.r_4
                 AND dim.wid_country = '
                || pkg_global.v_country
                || ')
             WHEN MATCHED THEN
                UPDATE
                   SET dim.desc_item = wrk.desc_item
             WHEN NOT MATCHED THEN
                INSERT (wid_item, id_item, CATEGORY, desc_item, type_item,
                        flag_valid, r1_code, r2_code, r3_code, r4_code,
                        wid_country, date_in)
                VALUES (pkg_util.get_next_val (''DIM_COST_HIERARCHY''), wrk.id_item,
                        wrk.CATEGORY, wrk.desc_item, NULL, 1, r_1, r_2, r_3, r_4,
                || pkg_global.v_country
                || ', SYSDATE)';
    EXECUTE IMMEDIATE v_sql;The USING table has duplicate key rows. So when join with "dim_cost_hierarchy" Oracle should issue error ! But, it doesn't !
    It gets the last one row value.

Maybe you are looking for

  • CSV output selects all values returned by htmldb_item.select_list_from_lov

    I have a report with several columns using htmldb_item.select_list_from_lov. When I enable CSV Output (export to Excel) All the values in each of the columns get exported to Excel, not only the one selected in the report. For example. A value of ABC

  • Make a portion of desktop viewable at all times

    I'm looking for a way to make a portion of my desktop viewable at all times. I realize that it's easy to write a script that resizes windows to accommodate this, but I'm looking for something with this added twist: Just like you can't drag a window b

  • KVM Switch seems to misbehave in kde.

    When using the kvm switch to swap between PC's when i come back to Arch all my shortcuts go haywire. Capslock reverses its self, so caps lock on means cap locks off, shift letter acts like ctrl letter i.e trying to type in a message box in konqueror

  • Satellite Pro P300 (PSPC5E-00L00CEN) - Where is the S/PDIF connector?

    Vista tells me this laptop has one, and that it is located on the front panel. It also says the headphone jack is on the front panel, and I can see that one, but I cannot find anything that looks like an optical or digital S/PDIF connector. Can someo

  • Running slow

    Hi, I have a Forms5.0 and Reports3.0 and Developer/2000 Reports server3.0 in a Client-Server Articture. My Question is: when I print a report(1 page), the reports server taking too much time to print and it is sitting for the long time9 sometime 12 h