How to constraint occurrence of element?

Hi,
I have an element while has two child elements A and B in sequence, A' occurrence can be 0 to unbound, B's occurrence can be 0 to 1, but at least one of the two elements must be occurred.
How to express such contraint in xsd?
Thanks. Robin

The schema is for only one of the two elements to occur. The requirement is:
but at least one of the two elements must be occurred
<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">     
<xs:element name="ROOT">     
     <xs:complexType>
<xs:choice>     
<xs:sequence>               
<xs:element name="A" maxOccurs="unbounded"/>     
<xs:element name="B"/>                              
</xs:sequence>     
<xs:sequence>                    
<xs:element name="A" minOccurs="0" maxOccurs="unbounded"/>     
<xs:element name="B"/>                                                       
</xs:sequence>     
<xs:sequence>                    
<xs:element name="A" maxOccurs="unbounded"/>     
<xs:element minOccurs="0" name="B"/>                                                       
</xs:sequence>     
</choice>     
</xs:complexType>     
</xs:element>     
</xs:schema>

Similar Messages

  • How can I install photoshop elements on a 64 bit windows system?

    How can I install photoshop elements on a 64 bit windows system?

    You just use the appropriate install disk/ download. See this:
    Install Premiere Elements, Photoshop Elements
    Or are you asking about some specific procedures?
    Mylenium

  • How can I use photoshop Elements 8 to make a DVD to play on a regular TV-DVD? [was:DVD-CD-r]

    How can I use photoshop Elements 8 to make a DVD that will show on a regular TV-DVD set-up

    You can't do this in PSE by itself. I'm assuming you have windows, so output your slideshow as a wmv file and then use Premiere Elements to finalize the disc, if you have that. If not, use whatever you do have (if you can burn DVDs, you have software). Even windows dvd maker will do this.

  • How can I create an element in the model node?

    Hi, Experts,
    I create a model node that name is containerNode in the contxt. Cadinility is: 1..n
    I write the code in the method:
      private String getDataForOutputTable( IWDNode wageTypePayslip, IWDNode containerNode ){
           String betrgSumStr = "";
         int index = 0;
         Vector containerVector = new Vector();
         int size = wageTypePayslip.size();
         IWDNodeElement element = containerNode.createElement();// The system report error when I run the application.
         BigDecimal betrgSum = new BigDecimal( 0 );
    I try to create a element in the containerNode, But the system report error when I run the application.
    java.lang.IllegalArgumentException: model object must not be null
         at com.sap.tc.webdynpro.progmodel.context.ModelNodeElement.<init>(ModelNodeElement.java:66)
         at besuretech.com.wdp.IPrivatePayDataDispView$IOContainerElement.<init>(IPrivatePayDataDispView.java:1537)
         at besuretech.com.wdp.IPrivatePayDataDispView$IContextNode.doCreateElement(IPrivatePayDataDispView.java:88)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.createElement(NodeInfo.java:884)
         at com.sap.tc.webdynpro.progmodel.context.Node.createElementInternal(Node.java:1351)
         at com.sap.tc.webdynpro.progmodel.context.Node.createElement(Node.java:1370)
         at besuretech.com.PayDataDispView.getDataForOutputTable(PayDataDispView.java:251)
         at besuretech.com.PayDataDispView.getAllData(PayDataDispView.java:196)
         at besuretech.com.PayDataDispView.onPlugPayListViewIn(PayDataDispView.java:154)
         at besuretech.com.wdp.InternalPayDataDispView.wdInvokeEventHandler(InternalPayDataDispView.java:391)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.navigate(ClientApplication.java:826)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.navigate(ClientComponent.java:881)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doNavigation(WindowPhaseModel.java:498)
    How can I create an element in the model node ?
    Best regards,
    tao

    Hi,
    You need to execute the model before creating the element.
    Regards
    Ayyapparaj

  • How do I move my Elements photo files to a new computer keeping the catalog & version sets?

    How do I move my Elements photo files to a new computer keeping the catalog & version sets?

    I recommend you ask that in the PSE forum. I'm sure there is some import/ export hocuspocus involved...
    Mylenium

  • How to color the text  elements in script?

    how to color the text  elements in script?
    byeeeee
    plz send the answers

    Hi,
    Please go through my blog to know how to do color printing in SAP scripts.
    White Paper on 'Color Printing in SAP Scripts'
    Regards,
    Sireesha Ch

  • How to add a new element to a model node in the view controller?

    View Context
        myNode
             attri1
             attri2
    myNode is a web service model node. How to add a new element to this node?
    Regards,
    Hui
    Edited by: Hui Wang on Feb 15, 2008 12:05 PM

    Sudhir Gorantla wrote:>
    > Hi,
    >
    > myNode
    > attri1
    > attri2
    >
    > IMyNodeElement ele=wdContext.myNode().createMyNodeElement();
    >
    > ele.setAttri1("");
    > ele.setAttri2("");
    >
    > wdContext.nodeMyNode().addElement(ele);
    >
    > Regards,
    > Sudhir
    Hi we need a model as an input parameter when creating a element for a model node. How to get the instance of the model?
    Regards,
    Hui

  • How to instantiate a DOM Element in Forms to call Web Service?

    Hi All,
    I need to call a Java Class that has been converted into PL/SQL in order to run a Web Service.
    The PL/SQL function looks like this:
    -- Method: GetPIValue (Lorg/w3c/dom/Element;)Ljava/util/Vector;
    FUNCTION GetPIValue(
    obj ORA_JAVA.JOBJECT,
    a0 ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    cls := JNI.GET_CLASS('oracle/forms/demos/webservice/ConnectToPI');
    mid := JNI.GET_METHOD(FALSE, cls, 'GetPIValue', '(Lorg/w3c/dom/Element;)Ljava/util/Vector;');
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_OBJECT_ARG(args, a0, JNI.GET_CLASS('org/w3c/dom/Element'));
    RETURN JNI.CALL_OBJECT_METHOD(obj, mid, args);
    END;
    where "a0" is of org.w3c.dom.Element argument that is passed into the function as an obj_java.jobject.
    How can I create an ELEMENT object and call this function by passing this Element and its related Attributes. I have tried the following so far but I am getting this ERROR "Unable to call out to Java, Argument 1 can not be null.
    Element.setAttribute(param_1,
    'piTAG',
    'A3TI006.pv');
    It seems to be Complaining about "param_1" and it CANNOT BE NULL. How can I initialize or Create such an Object in Oracle Forms?
    Does any one have a Sample on how to Create an Element Object in PL/SQL?
    Your help is much appreciated.
    Regards,
    Baz

    Hello,
    I am sure that Jan is certainely THE expert. It would be so great if he would find time to blog a litttle bit on this topic, that generates, in fact, a lot of questions ;D
    Francois

  • How to bind a UI element to the context

    Hi Experts,
               I have a problem binding UI element to the context. In my code i have to create TabStrips dynamically and under this tabstrip number of UI elements would be there. For this i have a code like this..
    IWDTransparentContainer theActionContainer =(IWDTransparentContainer)view.getElement("RootUIElementContainer");
         IWDTabStrip ts = (IWDTabStrip) view.createElement(IWDTabStrip.class,"TabStrip");
              IWDTab tab1 = (IWDTab) view.createElement(IWDTab.class,"Tab1");
              IWDInputField in = (IWDInputField) view.createElement(IWDInputField.class,"in");
              IWDCaption header1 = (IWDCaption) view.createElement(IWDCaption.class,"Header1");
              header1.setText("Tab1");
              tab1.setContent(in);
              ts.addTab(tab1);
              IWDTab tab2 = (IWDTab) view.createElement(IWDTab.class,"Tab2");
              IWDInputField in2 = (IWDInputField) view.createElement(IWDInputField.class,"in2");
              IWDCaption header2 = (IWDCaption) view.createElement(IWDCaption.class,"Header2");
              header2.setText("Tab2");
              tab2.setHeader(header2);
              ts.addTab(tab2);
              theActionContainer.addChild(ts);
    <b>when i run this code it is giving following exceptions..</b>
    The initial exception that caused the request to fail, was:
       com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Property 'value' of AbstractInputField with id 'in' in view 'LoginView' must be bound to the context
        at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.getValue(AbstractInputField.java:1260)
        at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.InputFieldAdapter.getValue(InputFieldAdapter.java:582)
        at com.sap.tc.ur.renderer.ie6.InputFieldRenderer.render(InputFieldRenderer.java:56)
        at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:435)
        at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:134)
        ... 63 more
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Property 'value' of AbstractInputField with id 'in' in view 'LoginView' must be bound to the context
         at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.getValue(AbstractInputField.java:1260)
         at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.InputFieldAdapter.getValue(InputFieldAdapter.java:582)
         at com.sap.tc.ur.renderer.ie6.InputFieldRenderer.render(InputFieldRenderer.java:56)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:435)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:134)
         at com.sap.tc.ur.renderer.ie6.TabStripRenderer.renderTabStripItemContentFragment(TabStripRenderer.java:1867)
         at com.sap.tc.ur.renderer.ie6.TabStripRenderer.renderTabStripFragment(TabStripRenderer.java:838)
    From these exceptions what  i understood is, i need to bind these UI elements to context.
       Can any body tell me how to bind a UI element to the context if I understood the exceptions correct..
    Thanks in Advance,
    Murthy.

    HI,
    lets say Ctx is your context attribute,
    IWDAttributeInfo attrInfo = wdContext.getNodeInfo.getAttribute("Ctx");
    then , as per your code,
    IWDInputField in = (IWDInputField) view.createElement(IWDInputField.class,"in");
    <b>in.bindValue(attrInfo);</b>
    if your contex attribute is child of some other node then do like this,
    IWDAttributeInfo attrInfo = wdContext.getNodeInfo.getChildNode("SalesOrder",0)getAttribute("Ctx");
    //this is when Ctx is child of node SalesOrder, and we are taking Ctx from its 0th element
    then ,
    IWDInputField in = (IWDInputField) view.createElement(IWDInputField.class,"in");
    <b>in.bindValue(attrInfo);</b>
    include this in your code ,
    let me know if you face any problem
    regards
    reward points if it helps

  • How do I install Photoshop Elements 6 on the Mac-mini?

    How do I install Photoshop Elements 6 on the Mac-mini? I keep getting the following message:
    x Installation cannot continue until the following applications are closed:
    flash_server
    Please close the application(s) listed above and click "Try Again" to continue the installation. Click Cancel to exit Setup.
    How can I resolve this problem without screwing anything up? Your help will be greatly appreciated.
    Thanks

    Your right. It won't make any sense to subscribe for a software that I don't own. I have CS5 on my Dell Laptop which has been giving me issues, so I re-installed the Operating System along with all my editing programs and nothing more. So I can toggle between the Mac and the PC to get the job done in the meantime. I will eventually get CS6 for the Mac.

  • How do I install photoshop elements without a disk drive

    How do I install photoshop elements without a disk drive. My Mac does not have one and have just bought Elements

    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5.5 (win), 5.5 (mac) | 5.4 (win), 5.4 (mac) | 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • I need to change my computer... how can I uninstall Photoshop element 11 to reinstall it on my new c

    I need to change my computer... how can I uninstall Photoshop element 11 to reinstall it on my new computer with the same key ?

    Just go to Help>Deactivate in the editor before you uninstall.

  • How to Install Adobe Premiere Elements 11 on my Mac

    Hi
    How do I install adobe elements 11 on my mac book.
    I don't have a CD drive...
    The pamphlet that came with the product does not tell you how to install if there is no CD drive
    Your help woud be much appreciated!
    Nushie

    Where can i find Elements 11 download, everytime i get directed to 12.

  • How do I install Photo Elements on a mac that does not have a DVD/CD drive?

    How do I install Photo Elements on a mac that does not have a DVD/CD drive?

    Hi Lauren,
    You can download it from : http://www.adobe.com/downloads and then install.
    If you are using an older version you can try downloading it from :
    http://prodesigntools.com/all-adobe-cs5-direct-download-links.html

  • How to completely delete Photoshop Elements from my computer??

    Hi
    I am trying to completely remove Photoshop Elements from my computer.   So far, I have failed in my attempts to do this.   The reason I'm doing this is b/c for some reason that I can't fathom, the folders in My Pictures -- the folders named by shot date -- contain random duplicates.When this happens, the file names folow the convention of DSC_0222 and DSC_0222-1. Exactly the same file size and metadata.  In some folders, every picture is duplicated. In other folders, only selected pitcures within the folder are duplicated.   I can't figure out how they got there -- e.g. it doesn't seem to bear any connection to the photos I've edited, which was one theory I had for a while.   Is Elements responsible? Or is this some sort of bug in the download process from the camera (I have a Nikon D40).  Anyway, I've given up on trying to sovle this problem and decided I would go back to the beginning and reload everything from my camera.   So, my real question here is about how to completely uninstall Elements.
    Here's what I did:    I uninstalled Photoshop Elements through the Add/remove programs utility.  I got no errors during the uninstall process.   Then I completely deleted the My Pictures directory (don't worry -- I have it backed up in multiple places!!).   So, at this point there are *no* pictures on my computer at all.    I reinstall Elements, open it up and -- you guessed it!!! -- the catalog is still there with all the thumbnails of the pictures that i deleted from my hard disk.   Of course, each thumbnail is flagged as "Missing File".
    So, how do I uninstall/reinstall Elements and get it to forget all memory of the previous catalog?   Why is it "remembering" it in this way when the pictures aren't even on the computer anymore?  Isn't this a bug???
    I've been working on this issue for much longer than I care to remember-- if anyone can tell me how to get myself truly back to ground-zero so I can start over I would be deeply grateful.   After upgrading to Elements 9 (from 7) to try to solve this problem I am close to just abandoning Elements entirely.....
    WHile we're at it, if anyone has any idea where the duplicates pictures are coming from and how I prevent that from happening, I'm' all ears!!!!
    Thanks!

    Hi
    Thanks so much for the response.   So, Help/System Info says that the catalog is here:
    Catalog Location: C:\Documents and Settings\All Users\Application Data\Adobe\Elements Organizer\Catalogs\My Catalog\
    but no such file appaers to exist.  In fact, I can only get as far as All Users.   Then there is no directory under that called "Application Data".
    i'm still seeing the thumbnails when I got into Elements tho'....   :-(
    hjr

Maybe you are looking for