Substitution groups support?

Does xmlbeans support substitution groups in xml schema? I read xml beans documentation
saying it has 100% xml schema support. But I got the following error when I use
xmlbeans to generate java classes:
[xmlbean] ObjectLinking.xsd:27: warning: Element substitution groups not supported
in this release
I appreciate if anyone can help me on this.

Does xmlbeans support substitution groups in xml schema? I read xml beans documentation
saying it has 100% xml schema support. But I got the following error when I use
xmlbeans to generate java classes:
[xmlbean] ObjectLinking.xsd:27: warning: Element substitution groups not supported
in this release
I appreciate if anyone can help me on this.

Similar Messages

  • Problem with abstract complex type in substitution group.

    Hi all,
    I have three xsds, A, B, C.XSD respectively. A.xsd:There is a substitution group and its complex type declared as abstract and element that uses them. B.xsd has the same structure as A except that it has complex type derived from complex type from A. C.xsd is same as B.xsd.
    The xml files of A and B validate but not of C.
    It gives the following error:
    This file is not valid. Unexpected element'signatureString' in element author. Expected signatureString,signatureText.
    Any help at the earliest is greatly appreciated.
    the code of each xsds is as follows:
    A.XSD:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:PARTICIPATION="Participation" targetNamespace="Participation">
         <!-- ================================================= -->
         <!-- Package: Participation -->
         <!-- ================================================= -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- Class: <<ST>> SignatureString -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <xs:element name="signatureString" type="PARTICIPATION:SignatureString" substitutionGroup="PARTICIPATION:signatureText"/>
         <xs:complexType name="SignatureString">
              <xs:complexContent>
                   <xs:extension base="PARTICIPATION:SignatureText">
                        <xs:attribute name="value" type="xs:string" use="required"/>
                   </xs:extension>
              </xs:complexContent>
         </xs:complexType>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- Class: SignatureText -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <xs:element name="signatureText" type="PARTICIPATION:SignatureText" abstract="true"/>
         <xs:complexType name="SignatureText" abstract="true"/>
    </xs:schema>
    B.xsd:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:CM3202="Common3202" xmlns:PARTICIPATION="Participation" targetNamespace="Common3202">
         <xs:import namespace="Participation" schemaLocation="Datatypes3203/RDT/Participation.xsd"/>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- Class: <<Participation>> PractitionerParticipation -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <xs:element name="practitionerParticipation" type="CM3202:PractitionerParticipation" abstract="true"/>
         <xs:complexType name="PractitionerParticipation" abstract="true">
              <xs:sequence>
                   <!--xs:element name="signatureText" type="PARTICIPATION:SignatureText" minOccurs="0"/-->
                   <xs:element ref="PARTICIPATION:signatureText"/>
                   </xs:sequence>
         </xs:complexType>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- Class: <<Participation>> Author -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <xs:element name="author" type="CM3202:Author" substitutionGroup="CM3202:practitionerParticipation"/>
         <xs:complexType name="Author">
              <xs:complexContent>
                   <xs:extension base="CM3202:PractitionerParticipation"/>
              </xs:complexContent>
         </xs:complexType>
    </xs:schema>
    C.xsd
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:VS3203="VitalSigns3203" xmlns:CM3202="Common3202" targetNamespace="VitalSigns3203">
         <xs:import namespace="Common3202" schemaLocation="Common3202.xsd"/>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- Class: <<Observation>> VitalSignsObservationEvent -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <xs:element name="vitalSignsObservationEvent" type="VS3203:VitalSignsObservationEvent"/>
         <xs:complexType name="VitalSignsObservationEvent">
              <xs:sequence>
                   <xs:element name="author" type="CM3202:Author" minOccurs="0">
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
    </xs:schema>

    Hi all,
    This seems to be a bug unless someone of you have a solution.
    Also I ma new to xml/xsd world, so could someone please give the differences between xsi:type vs substitution groups with both element and complex type being abstract. Can this scenario be accomplished by usuage of choice groups.
    Also can anyone suggest any other good xml forums.
    Please let me know.
    Thanks in advance.

  • JAXB: Abstract Types and Substitution Group Errors

    I am using several schemas as defined below:
    Schema 1 defines an abstract type
    Schema 2 extends abstract type
    Schema 3 makes reference to abstract type in 1 and is using substitution groups on the abstarct type
    The error only occurs when the element is Abstract and what extends
    the abstract element specify a substitution group (which I believe is
    correct according to
    http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/#abstract). I can't
    remove the substitution group because declaring the element as abstract
    requires this. Is there a way to fix this?
    code that generates error:
    When attempting to do a JAXBContext jaxbContext = JAXBContext.newInstance(Schema3.class) I get the following error
    Exception in thread "main" com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
    There's no ObjectFactory with an @XmlElementDecl for the element {[http://test.com/FeatureBase.xsd|http://seams.csp.com/FeatureBase.xsd]}FeatureBase.
         this problem is related to the following location:
              at com.test.blah
         at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
         at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:448)
         at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:297)
         at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
         at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:214)
         at javax.xml.bind.ContextFinder.find(ContextFinder.java:375)
         at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
         at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)

    Hi all,
    This seems to be a bug unless someone of you have a solution.
    Also I ma new to xml/xsd world, so could someone please give the differences between xsi:type vs substitution groups with both element and complex type being abstract. Can this scenario be accomplished by usuage of choice groups.
    Also can anyone suggest any other good xml forums.
    Please let me know.
    Thanks in advance.

  • Xmlbeans and substitution groups

    I am working with the new GoogleEarth .xsd files and I have compiled them using xmlbeans. There are a number of elements that make use of substitutiongroups. for example:
    <element name="Placemark" type="kml:PlacemarkType"
        substitutionGroup="kml:AbstractFeatureGroup"/>
      <complexType name="PlacemarkType" final="#all">
        <complexContent>
          <extension base="kml:AbstractFeatureType">
            <sequence>
              <element ref="kml:AbstractGeometryGroup" minOccurs="0"/>
            </sequence>
          </extension>
        </complexContent>
      </complexType>how do I "replace" the substitution group with the actual element so that instead of:
    <AbstractGeometryGroup>
              <Point>
                <extrude>true</extrude>
                <altitudeModeGroup>
                  <altitudeMode>relativeToGround</altitudeMode>
                </altitudeModeGroup>
                <coordinates>32.18582907768492, -107.85250271267361, 50</coordinates>
              </Point>
            </AbstractGeometryGroup>I would get just           <Point>
                <extrude>true</extrude>
                <altitudeModeGroup>
                  <altitudeMode>relativeToGround</altitudeMode>
                </altitudeModeGroup>
                <coordinates>32.18582907768492, -107.85250271267361, 50</coordinates>
              </Point>I have tried casting, the substitute method, and the replace method to no avail. I think casting is the right way to go, but I throw a class cast exception when I try to cast. Here is my code
    PointType point = (PointType)placemark.addNewAbstractGeometryGroup();
         AltitudeModeDocument altModeDoc = AltitudeModeDocument.Factory.newInstance();
         AltitudeModeEnumType.Enum altModeEnum = AltitudeModeEnumType.Enum.forString("relativeToGround");
         altModeDoc.setAltitudeMode(altModeEnum);
         point.setAltitudeModeGroup(altModeDoc);
         point.setExtrude(true);
         Vector<String> coordinates = new Vector<String>(3);
         coordinates.add("32.18582907768492,");
         coordinates.add("-107.85250271267361,");
         coordinates.add("50");
         point.setCoordinates(coordinates);With the cast exception thrown on the first line. Which I would understand, but I can call
    placemark.setNewAbstractGeometryGroup(), which takes a AbstractGeometryType as an argument and will accept a PointType as an argument which I assume means PointType isa AbstractGeometryType. Is the issue that that I am casting the wrong direction? Any help is greatly appreciated. I would much prefer to build the xml messages using the beans rather then hacking together a StringBuffer.

    Hi Pon -
    Do you mean groups of users or group of pages?
    If you mean groups of users, you can create your sub-groups as a regular groups, and then when assigning users to your Main Finance group ... add the 2 groups which are your subGroups.
    If you are talking about the Portal Page Group structure, you cannot nest page groups, but you can create pages and subpages.
    Hope this helps,
    Candace

  • Element's substitution group with Xerces Schema API

    Hi,
    I am using Xerces Schema API and I can not figure out how to find an element's substitution group. There are some methods in XSElementDeclaration that look like they could help but they return null even if globally defined element has a substitution group. Any help would be greatly appreciated.
    Thanks

    Upps...please ignore this post.

  • XML Schema Substitution Group

    Hi,
    Can anybody please explain what are ***Substitution Groups*** in XML Schema with a simple example as this concept is little bit fuzzy for me.
    Thanks.

    This concerns with internationalization (i18N):
    http://www.w3schools.com/schema/schema_complex_subst.asp

  • I need a sample about how substitution groups are rewrited

    Hi
    As mentioned in a documentation, substitution groups in 10g are rewritten:
    The XML Schema constructs for the XPath expression are rewritable.
    XML Schema constructs such as complex types, enumerated values, lists, inherited (derived) types, and substitution groups are rewritten.
    Can anybody give me a link to a topic or a blog where this subject is discussed?
    I'm very need to.
    Thanks
    Dmitry

    Hi
    As mentioned in a documentation, substitution groups in 10g are rewritten:
    The XML Schema constructs for the XPath expression are rewritable.
    XML Schema constructs such as complex types, enumerated values, lists, inherited (derived) types, and substitution groups are rewritten.
    Can anybody give me a link to a topic or a blog where this subject is discussed?
    I'm very need to.
    Thanks
    Dmitry

  • HT1923 the older version of apple sofware update cannot be removed. contact your technical group support

    he older version of apple sofware update cannot be removed. contact your technical group support?

    Download the Windows Installer CleanUp utility from the following page (use one of the links under the thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    To install the utility, doubleclick the msicuu2.exe file you downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any Apple Software Update entries and click "Remove", as per the following screenshot:
    Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • AIA comms O2C PIP 11.2:  Is creation of subscription group  supported ?

    HI AIA gurus
    I am confused from documentation and source code of AIA comms O2C PIP 11.2. From documentation, it seems like Creation of Service group along with creation of services during order fulfillment. But, in the transformations for making input flistfor opcodes PCM_OP_CUST_MODIFY_CUSTOMER or PCM_OP_PURCHASE_SUBSCRIPTION_DEAL in composite      ProcessFulfillmentOrderBillingBRMCommsAddSubProces do not have Field SUBSCRIPTION_OBJ field which indicates the Subscription parent of all services.
    So, it is not clear if subscription group is supported in AIA comms O2C PIP 11.2. From research i found that AIA 2.0.1 did not support subscription groups. So, i am not sure if 11.2 or 11.3 PIPS support this feature.
    Please help me to know if subscription group is supported or not. If supported, please help with Product configurations we need to do in Siebel to test subscription group creation.
    Regards
    Arun

    Hi,
    No, te AIAConfigurationProperties originally did not contain any section (nor Module Config or Service Config) describing AIA Session Pool Manager. how is it that the 11.2 documentation does not mention this composite as part of the "Verify Deployment" sections for both Comms AABC and O2C PIPs?
    As a workaround we've currently took the composite project from $AIA_HOME/utilities/SessionPoolManager/V1/AIASessionPoolManager......, deployed it and also changed the AIAConfigurationProperties files by adding the Module config section for SessionPoolManager. That seemed to work after running the ant script for the update of the xml file and restarted the managed server.
    Still curious as to why it was not deployed as part of the install.

  • SCOM 2012 Single Management Group Supporting ?

    Dear all,
    Can any one tell me , for single SCOM management group howmany management server and Gateway server can support?
    Thanks,
    Sengo

    Hi,
    Take a look in the System Center 2012 Operations Manager sizing tool which you can find
    here.
    Agents
    3 000
    agents reporting to a management server
    2 000
    agents reporting to a gateway server
    15 000
    agents (Windows, UNIX or Linux) in a single management group
    Regards,
    Daniel
    IT Consultant at Viridis IT

  • Sun ld comdat group support

    While this may be a little OT, given that it discusses gcc/binutils, the underlying topic is the solaris linker in /usr/ccs/bin/ld, and this seemed like the most likely forum for linker expertise.
    The following discussion concludes that the sun linker does not support COMDAT groups adequetly to build gcc 4 with the gnu assembler and the sun linker (as is recommmended by the gcc folks, and as is done by sun for /usr/sfw/bin/gcc in solaris 10)
    http://gcc.gnu.org/ml/gcc/2005-04/msg01332.html
    But the documentation for the linker seems to suggest otherwise:
    http://docs.sun.com/app/docs/doc/817-1983/6mhm6r4fj?a=view#chapter7-11598
    In the most recent binutils ld testsuite, there is a test for comdat support:
    -------- group1a.s ---------
    .section .text,"axG",%progbits,foo_group,comdat
    .weak foo
    foo:
    .word 0
    -------- group1b.s ---------
    .section .text,"axG",%progbits,foo_group,comdat
    .global foo
    .global bar
    foo:
    .word 0
    bar:
    Run these through the gnu assembler:
    /usr/local/binutils-2.16.1/bin/as --gdwarf2 group1a.s -o group1a.o
    /usr/local/binutils-2.16.1/bin/as --gdwarf2 group1b.s -o group1b.o
    And then link them, once with the sun linker, and once with the gnu linker:
    /usr/local/binutils-2.16.1/bin/ld group1a.o group1b.o -o linked.gnu
    /usr/ccs/bin/ld group1a.o group1b.o -o linked.sun
    Now, if we look at foo and bar in the generated images
    elfdump -s -N .symtab linked.gnu | egrep "foo|bar"
    [8] 0x08048074 0x00000000 NOTY WEAK D 0 .text foo
    [11] 0x00000000 0x00000000 NOTY GLOB D 0 UNDEF bar
    elfdump -s -N .symtab linked.sun | egrep "foo|bar"
    [15] 0x080501ef 0x00000000 NOTY GLOB D 0 .text bar
    [21] 0x080501ed 0x00000000 NOTY GLOB D 0 .text foo
    we can see that the gnu linker generated foo as a weak symbol, and left bar undefined, while the sun linker emitted foo as a global, and defined bar.
    ok. so now try without the comdat flags:
    ----- nogroup1a.s -----
    .section .text,"ax",%progbits
    .weak foo
    foo:
    .word 0
    ----- nogroup1b.s -----
    .section .text,"ax",%progbits
    .global foo
    .global bar
    foo:
    .word 0
    bar:
    and assemble and link as above. Now, if we look at the output from elfdump:
    elfdump -s -N .symtab nogroup.linked.sun | egrep "foo|bar"
    [15] 0x080501f2 0x00000000 NOTY GLOB D 0 .text bar
    [21] 0x080501f0 0x00000000 NOTY GLOB D 0 .text foo
    elfdump -s -N .symtab nogroup.linked.gnu | egrep "foo|bar"
    [8] 0x08048078 0x00000000 NOTY GLOB D 0 .text foo
    [11] 0x0804807a 0x00000000 NOTY GLOB D 0 .text bar
    Now, we get identical results for foo and bar with the two linkers. Even more interesting is that for the sun linker, the results did not change when we removed the comdat flags. It is as if the sun linker happily absorbs and then ignores the fact that the sections are marked as COMDAT. So what is going on here? Does the sun linker really support COMDAT? Have I misinterpreted something? Which linker is right, according to the ELF spec?
    Sorry for the long post, any insight would be appreciated.

    Ok. That is a reasonable, if not very helpful answer.
    In the meantime, here is a simpler example that shows the problem a little more clearly:
    cat foobar.s.section .text,"axG",%progbits,foo_group,comdat
    .global foo
    foo:
    .word 0
    .section .text,"ax",%progbits
    .global bar
    bar:
    .word 0
    .section .text,"ax",%progbits
    .global baz
    baz:
    .word 0
    Now, assemble this twice into two different object files:
    /usr/local/binutils-2.16.1/bin/as gdwarf2 foobar.s -o foobar2.o /usr/local//binutils-2.16.1/bin/as gdwarf2 foobar.s -o foobar1.o
    If we link these two object files together, we should get two errors about undefined symbols: one for bar, and one for baz. foo should be ok because its COMDAT.
    So:
    /usr/local/binutils-2.16.1/bin/ld -shared foobar1.o foobar2.o foobar2.o: In function `bar':
    : multiple definition of `bar'
    foobar1.o:: first defined here
    foobar2.o: In function `baz':
    : multiple definition of `baz'
    foobar1.o:: first defined here
    Which is what we expect. But /usr/ccs/bin/ld gives:
    /usr/ccs/bin/ld -G foobar1.o foobar2.o
    ld: fatal: symbol `foo' is multiply-defined:
    (file foobar1.o type=NOTY; file foobar2.o type=NOTY);
    ld: fatal: symbol `bar' is multiply-defined:
    (file foobar1.o type=NOTY; file foobar2.o type=NOTY);
    ld: fatal: symbol `baz' is multiply-defined:
    (file foobar1.o type=NOTY; file foobar2.o type=NOTY);
    ld: fatal: File processing errors. No output written to a.out
    which seems incorrect to me.

  • Cisco ASASM Bridge-group support

    How many bridge groups total are supported. If I have 100 contexts, can each context run 8 bridge groups each for a total of 800 bridge groups? What is the max?

    How many bridge groups total are supported. If I have 100 contexts, can each context run 8 bridge groups each for a total of 800 bridge groups? What is the max?

  • Non-system wide DNS Lookups on RBL  (i.e. logical groups supported)

    Sun Java System Messaging Server documetation seems to state that RBL filtering can only exist in one of three files that are used for filtering based off of inbound connection IP address. My question is, can conditional execution occur for a section of one of these files based of destination e-mail address?
    I'd like to have multipule levels of e-mail filtering using RBL and allow users to be assinged to the level of filtering they desire by joining a logical group which will enable a level of RBL filtering for that logical group.
    Any help is greatly appreciated, as far as I can see, I can only have one system wide filtering set, so I can't possibly have one set of e-mail ids using 10 RBL (remote black lists) and another group e-mail ids using a smaller set of RBLs.
    ======= From the documentation =======
    MAIL_ACCESS : Used to block incoming connections based on combined information found in SEND_ACCESS and PORT_ACCESS tables: that is, the channel and address information found in SEND_ACCESS combined with the IP address and port number information found in PORT_ACCESS.
    ORIG_MAIL_ACCESS : Used to block incoming connections based on combined information found in ORIG_SEND_ACCESS and PORT_ACCESS tables: that is, the channel and address information found in ORIG_SEND_ACCESS combined with the IP address and port number information found in PORT_ACCESS.
    PORT_ACCESS : Used to block incoming connections based on IP number.
    ====================================

    Alas, the RBL stuff is done before iMS even knows who the message is addressd to. That stuff is done at the initial connection phase, as our philosophy is to reject a message just as soon as possible . . .
    After the message is accepted, then you can opt-in/out for things like spamassassin, brightmail, etc.

  • Handling substitution groups and Tables generation

    Hi
    This is concerning the generation of tables from xml schema containing "substitutionGroup" attributes and "extension" elements for
    deriving from abstract types.
    I want to know how the tables are generated when schema has subsitution groups.
    I went through the generated tables and observed that it creates a table for each extension...but also generates a table for the head of the subsitution group.
    This table would have columns for each of the members in the derivatives of the abstract type.This is resulting in more than 1000 columns in my case
    Any suggestions?
    Thanks
    Devashish

    When a subsitution group is used each of the type of each of the elements in the substition group must be an extension of the type of the head element. In the case where the head type is based on an abstract empty complexType this makes no sense. Since the type inheritiance system implies that anywhere a parent type can appear it is legal for the chlild type to appear in it's place we have to create a storage structure for the head element which can handle any of the possible child types. This means that at the storage level we have to generate a table with a column for each possible descendant of the head element. This means that we are effectively restricting the number of direct elements and attributes that can be defined by members of the substition group to a number that is a little less than 1000.
    This can be be seen in the first example below.
    However in the case where the substition group contains no common element we can model this as choice. as is shown in the second XML Schema. Since every member of the choice is independant of the other members of the choice there is no need for the inheritance hierarchy in the type definitions. This means that each member of the choice can now be mapped to a seperate table. This structure allows for a choice with approxamately a 1000 entries and no practicle limits on the number of decendant elements and attributes for each member of the choice..
    This can be seen in the second example bleow;
    The key point is the number of columns in ROOT_TABLE. In the First Example it is 17, the fixed overhead plus the number of columns required to persist headType, member1Type and member2Type. In the Second example it is 12, the fixed overhead plus a REF XMLType to point at instances of member1Type and REF XMLType to point at instnaces of member2Type.
    I hope this answers your question
    SQL> var schemaURL varchar2(256)
    SQL> var schemaPath varchar2(256)
    SQL> --
    SQL> column qualified_col_name format A64
    SQL> column data_type format A40
    SQL> --
    SQL> set lines 150 pages 25 long 10000
    SQL> --
    SQL> begin
      2    :schemaURL := 'testcase.xsd';
      3    :schemaPath := '/public/testcase.xsd';
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SQL> call dbms_xmlSchema.deleteSchema(:schemaURL,4)
      2  /
    Call completed.
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(
      4  '<?xml version="1.0" encoding="UTF-8"?>
      5  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" attribute
    FormDefault="unqualified" xdb:storeVarrayAsTable="true">
      6     <xs:element name="root" type="rootType" xdb:defaultTable="ROOT_TABLE"/>
      7     <xs:complexType name="rootType" xdb:SQLType="ROOT_T">
      8             <xs:sequence>
      9                     <xs:element ref="head"/>
    10             </xs:sequence>
    11     </xs:complexType>
    12     <xs:complexType name="headType" xdb:SQLType="HEAD_T" abstract="true"/>
    13     <xs:complexType name="member1Type" xdb:SQLType="MEMBER1_T">
    14             <xs:complexContent>
    15                     <xs:extension base="headType">
    16                             <xs:sequence>
    17                                     <xs:element name="Member1.Child1" type="xs:string"/>
    18                                     <xs:element name="Member1.Child2" type="xs:string"/>
    19                             </xs:sequence>
    20                     </xs:extension>
    21             </xs:complexContent>
    22     </xs:complexType>
    23     <xs:complexType name="member2Type" xdb:SQLType="MEMBER2_T">
    24             <xs:complexContent>
    25                     <xs:extension base="headType">
    26                             <xs:sequence>
    27                                     <xs:element name="Member2.Child1" type="xs:string"/>
    28                                     <xs:element name="Member2.Child2" type="xs:string"/>
    29                             </xs:sequence>
    30                     </xs:extension>
    31             </xs:complexContent>
    32     </xs:complexType>
    33     <xs:element name="head" type="headType" xdb:defaultTable="GLOBAL_HEAD_TABLE"/>
    34     <xs:element name="member1" type="member1Type" substitutionGroup="head" xdb:defaultTable="GLOBAL_MEMBER1_TABLE"/>
    35     <xs:element name="member2" type="member2Type" substitutionGroup="head" xdb:defaultTable="GLOBAL_MEMBER2_TABLE"/>
    36  </xs:schema>');
    37  begin
    38    if (dbms_xdb.existsResource(:schemaPath)) then
    39      dbms_xdb.deleteResource(:schemaPath);
    40    end if;
    41    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    42  end;
    43  /
    PL/SQL procedure successfully completed.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      :schemaURL,
      5      xdbURIType(:schemaPath).getClob(),
      6      TRUE,TRUE,FALSE,TRUE
      7    );
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> --
    SQL> desc ROOT_TABLE
    Name                                                                                Null?    Type
    TABLE of SYS.XMLTYPE(XMLSchema "testcase.xsd" Element "root") STORAGE Object-relational TYPE "ROOT_T"
    SQL> --
    SQL> desc ROOT_T
    ROOT_T is NOT FINAL
    Name                                                                                Null?    Type
    SYS_XDBPD$                                                                                   XDB.XDB$RAW_LIST_T
    head                                                                                         HEAD_T
    SQL> --
    SQL> desc HEAD_T
    HEAD_T is NOT FINAL
    HEAD_T is NOT INSTANTIABLE
    Name                                                                                Null?    Type
    SYS_XDBPD$                                                                                   XDB.XDB$RAW_LIST_T
    SQL> --
    SQL> desc GLOBAL_HEAD_TABLE
    Name                                                                                Null?    Type
    TABLE of SYS.XMLTYPE(XMLSchema "testcase.xsd" Element "head") STORAGE Object-relational TYPE "HEAD_T"
    SQL> --
    SQL> desc GLOBAL_MEMBER1_TABLE
    Name                                                                                Null?    Type
    TABLE of SYS.XMLTYPE(XMLSchema "testcase.xsd" Element "member1") STORAGE Object-relational TYPE "MEMBER1_T"
    SQL> --
    SQL> desc MEMBER1_T
    MEMBER1_T extends SCOTT.HEAD_T
    MEMBER1_T is NOT FINAL
    Name                                                                                Null?    Type
    SYS_XDBPD$                                                                                   XDB.XDB$RAW_LIST_T
    Member1.Child1                                                                               VARCHAR2(4000 CHAR)
    Member1.Child2                                                                               VARCHAR2(4000 CHAR)
    SQL> --
    SQL> desc GLOBAL_MEMBER2_TABLE
    Name                                                                                Null?    Type
    TABLE of SYS.XMLTYPE(XMLSchema "testcase.xsd" Element "member2") STORAGE Object-relational TYPE "MEMBER2_T"
    SQL> --
    SQL> desc MEMBER2_T
    MEMBER2_T extends SCOTT.HEAD_T
    MEMBER2_T is NOT FINAL
    Name                                                                                Null?    Type
    SYS_XDBPD$                                                                                   XDB.XDB$RAW_LIST_T
    Member2.Child1                                                                               VARCHAR2(4000 CHAR)
    Member2.Child2                                                                               VARCHAR2(4000 CHAR)
    SQL> --
    SQL> select qualified_col_name, data_type from user_tab_cols where table_name = 'ROOT_TABLE'
      2  /
    QUALIFIED_COL_NAME                                               DATA_TYPE
    SYS_NC_OID$                                                      RAW
    SYS_NC_ROWINFO$                                                  XMLTYPE
    XMLEXTRA                                                         XMLTYPEEXTRA
    "XMLEXTRA"."NAMESPACES"                                          XMLTYPEPI
    "XMLEXTRA"."EXTRADATA"                                           XMLTYPEPI
    XMLDATA                                                          ROOT_T
    SYS_TYPEID("XMLDATA")                                            RAW
    "XMLDATA"."SYS_XDBPD$"                                           XDB$RAW_LIST_T
    "XMLDATA"."head"                                                 HEAD_T
    SYS_TYPEID("XMLDATA"."head")                                     RAW
    "XMLDATA"."head"."SYS_XDBPD$"                                    XDB$RAW_LIST_T
    TREAT("XMLDATA"."head" AS "MEMBER2_T")."Member2.Child1"          VARCHAR2
    TREAT("XMLDATA"."head" AS "MEMBER2_T")."Member2.Child2"          VARCHAR2
    TREAT("XMLDATA"."head" AS "MEMBER1_T")."Member1.Child1"          VARCHAR2
    TREAT("XMLDATA"."head" AS "MEMBER1_T")."Member1.Child2"          VARCHAR2
    ACLOID                                                           RAW
    OWNERID                                                          RAW
    17 rows selected.
    SQL> select qualified_col_name, data_type from user_tab_cols where table_name = 'GLOBAL_MEMBER1_TABLE'
      2  /
    QUALIFIED_COL_NAME                                               DATA_TYPE
    SYS_NC_OID$                                                      RAW
    SYS_NC_ROWINFO$                                                  XMLTYPE
    XMLEXTRA                                                         XMLTYPEEXTRA
    "XMLEXTRA"."NAMESPACES"                                          XMLTYPEPI
    "XMLEXTRA"."EXTRADATA"                                           XMLTYPEPI
    XMLDATA                                                          MEMBER1_T
    SYS_TYPEID("XMLDATA")                                            RAW
    "XMLDATA"."SYS_XDBPD$"                                           XDB$RAW_LIST_T
    "XMLDATA"."Member1.Child1"                                       VARCHAR2
    "XMLDATA"."Member1.Child2"                                       VARCHAR2
    ACLOID                                                           RAW
    OWNERID                                                          RAW
    12 rows selected.
    SQL> select qualified_col_name, data_type from user_tab_cols where table_name = 'GLOBAL_MEMBER2_TABLE'
      2  /
    QUALIFIED_COL_NAME                                               DATA_TYPE
    SYS_NC_OID$                                                      RAW
    SYS_NC_ROWINFO$                                                  XMLTYPE
    XMLEXTRA                                                         XMLTYPEEXTRA
    "XMLEXTRA"."NAMESPACES"                                          XMLTYPEPI
    "XMLEXTRA"."EXTRADATA"                                           XMLTYPEPI
    XMLDATA                                                          MEMBER2_T
    SYS_TYPEID("XMLDATA")                                            RAW
    "XMLDATA"."SYS_XDBPD$"                                           XDB$RAW_LIST_T
    "XMLDATA"."Member2.Child1"                                       VARCHAR2
    "XMLDATA"."Member2.Child2"                                       VARCHAR2
    ACLOID                                                           RAW
    OWNERID                                                          RAW
    12 rows selected.
    SQL> insert into ROOT_TABLE values( XMLType (
      2  '<root>
      3    <member1>
      4      <Member1.Child1>AAA</Member1.Child1>
      5      <Member1.Child2>BBB</Member1.Child2>
      6    </member1>
      7  </root>'))
      8  /
    1 row created.
    SQL> insert into ROOT_TABLE values( XMLType (
      2  '<root>
      3    <member2>
      4      <Member2.Child1>CCC</Member2.Child1>
      5      <Member2.Child2>DDD</Member2.Child2>
      6    </member2>
      7  </root>'))
      8  /
    1 row created.
    SQL> set long 1000 pages 20
    SQL> --
    SQL> select * from ROOT_TABLE
      2  /
    SYS_NC_ROWINFO$
    <root>
      <member1>
        <Member1.Child1>AAA</Member1.Child1>
        <Member1.Child2>BBB</Member1.Child2>
      </member1>
    </root>
    <root>
      <member2>
        <Member2.Child1>CCC</Member2.Child1>
        <Member2.Child2>DDD</Member2.Child2>
      </member2>
    </root>
    SQL> var schemaURL varchar2(256)
    SQL> var schemaPath varchar2(256)
    SQL> --
    SQL> begin
      2    :schemaURL := 'testcase.xsd';
      3    :schemaPath := '/public/testcase.xsd';
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SQL> call dbms_xmlSchema.deleteSchema(:schemaURL,4)
      2  /
    Call completed.
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(
      4  '<?xml version="1.0" encoding="UTF-8"?>
      5  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" attribute
    FormDefault="unqualified" xdb:storeVarrayAsTable="true">
      6     <xs:element name="root" type="rootType" xdb:defaultTable="ROOT_TABLE"/>
      7     <xs:complexType name="rootType" xdb:SQLType="ROOT_T">
      8             <xs:choice>
      9                     <xs:element ref="member1" xdb:SQLInline="false" xdb:defaultTable="MEMBER1_TABLE"/>
    10                     <xs:element ref="member2" xdb:SQLInline="false" xdb:defaultTable="MEMBER2_TABLE"/>
    11             </xs:choice>
    12     </xs:complexType>
    13     <xs:complexType name="member1Type" xdb:SQLType="MEMBER1_T">
    14                             <xs:sequence>
    15                                     <xs:element name="Member1.Child1" type="xs:string"/>
    16                                     <xs:element name="Member1.Child2" type="xs:string"/>
    17                             </xs:sequence>
    18     </xs:complexType>
    19     <xs:complexType name="member2Type" xdb:SQLType="MEMBER2_T">
    20                             <xs:sequence>
    21                                     <xs:element name="Member2.Child1" type="xs:string"/>
    22                                     <xs:element name="Member2.Child2" type="xs:string"/>
    23                             </xs:sequence>
    24     </xs:complexType>
    25     <xs:element name="member1" type="member1Type"  xdb:defaultTable="GLOBAL_MEMBER1_TABLE"/>
    26     <xs:element name="member2" type="member2Type" xdb:defaultTable="GLOBAL_MEMBER2_TABLE"/>
    27  </xs:schema>');
    28  begin
    29    if (dbms_xdb.existsResource(:schemaPath)) then
    30      dbms_xdb.deleteResource(:schemaPath);
    31    end if;
    32    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    33  end;
    34  /
    PL/SQL procedure successfully completed.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      :schemaURL,
      5      xdbURIType(:schemaPath).getClob(),
      6      TRUE,TRUE,FALSE,TRUE
      7    );
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> --
    SQL> desc ROOT_TABLE
    Name                                                                                Null?    Type
    TABLE of SYS.XMLTYPE(XMLSchema "testcase.xsd" Element "root") STORAGE Object-relational TYPE "ROOT_T"
    SQL> --
    SQL> desc ROOT_T
    ROOT_T is NOT FINAL
    Name                                                                                Null?    Type
    SYS_XDBPD$                                                                                   XDB.XDB$RAW_LIST_T
    member1                                                                                      REF OF XMLTYPE
    member2                                                                                      REF OF XMLTYPE
    SQL> --
    SQL> desc GLOBAL_MEMBER1_TABLE
    Name                                                                                Null?    Type
    TABLE of SYS.XMLTYPE(XMLSchema "testcase.xsd" Element "member1") STORAGE Object-relational TYPE "MEMBER1_T"
    SQL> --
    SQL> desc MEMBER1_T
    MEMBER1_T is NOT FINAL
    Name                                                                                Null?    Type
    SYS_XDBPD$                                                                                   XDB.XDB$RAW_LIST_T
    Member1.Child1                                                                               VARCHAR2(4000 CHAR)
    Member1.Child2                                                                               VARCHAR2(4000 CHAR)
    SQL> --
    SQL> desc GLOBAL_MEMBER2_TABLE
    Name                                                                                Null?    Type
    TABLE of SYS.XMLTYPE(XMLSchema "testcase.xsd" Element "member2") STORAGE Object-relational TYPE "MEMBER2_T"
    SQL> --
    SQL> desc MEMBER2_T
    MEMBER2_T is NOT FINAL
    Name                                                                                Null?    Type
    SYS_XDBPD$                                                                                   XDB.XDB$RAW_LIST_T
    Member2.Child1                                                                               VARCHAR2(4000 CHAR)
    Member2.Child2                                                                               VARCHAR2(4000 CHAR)
    SQL> --
    SQL> select qualified_col_name, data_type from user_tab_cols where table_name = 'ROOT_TABLE'
      2  /
    QUALIFIED_COL_NAME                                               DATA_TYPE
    SYS_NC_OID$                                                      RAW
    SYS_NC_ROWINFO$                                                  XMLTYPE
    XMLEXTRA                                                         XMLTYPEEXTRA
    "XMLEXTRA"."NAMESPACES"                                          XMLTYPEPI
    "XMLEXTRA"."EXTRADATA"                                           XMLTYPEPI
    XMLDATA                                                          ROOT_T
    SYS_TYPEID("XMLDATA")                                            RAW
    "XMLDATA"."SYS_XDBPD$"                                           XDB$RAW_LIST_T
    "XMLDATA"."member1"                                              XMLTYPE
    "XMLDATA"."member2"                                              XMLTYPE
    ACLOID                                                           RAW
    OWNERID                                                          RAW
    12 rows selected.
    SQL> select qualified_col_name, data_type from user_tab_cols where table_name = 'GLOBAL_MEMBER1_TABLE'
      2  /
    QUALIFIED_COL_NAME                                               DATA_TYPE
    SYS_NC_OID$                                                      RAW
    SYS_NC_ROWINFO$                                                  XMLTYPE
    XMLEXTRA                                                         XMLTYPEEXTRA
    "XMLEXTRA"."NAMESPACES"                                          XMLTYPEPI
    "XMLEXTRA"."EXTRADATA"                                           XMLTYPEPI
    XMLDATA                                                          MEMBER1_T
    SYS_TYPEID("XMLDATA")                                            RAW
    "XMLDATA"."SYS_XDBPD$"                                           XDB$RAW_LIST_T
    "XMLDATA"."Member1.Child1"                                       VARCHAR2
    "XMLDATA"."Member1.Child2"                                       VARCHAR2
    ACLOID                                                           RAW
    OWNERID                                                          RAW
    12 rows selected.
    SQL> select qualified_col_name, data_type from user_tab_cols where table_name = 'GLOBAL_MEMBER2_TABLE'
      2  /
    QUALIFIED_COL_NAME                                               DATA_TYPE
    SYS_NC_OID$                                                      RAW
    SYS_NC_ROWINFO$                                                  XMLTYPE
    XMLEXTRA                                                         XMLTYPEEXTRA
    "XMLEXTRA"."NAMESPACES"                                          XMLTYPEPI
    "XMLEXTRA"."EXTRADATA"                                           XMLTYPEPI
    XMLDATA                                                          MEMBER2_T
    SYS_TYPEID("XMLDATA")                                            RAW
    "XMLDATA"."SYS_XDBPD$"                                           XDB$RAW_LIST_T
    "XMLDATA"."Member2.Child1"                                       VARCHAR2
    "XMLDATA"."Member2.Child2"                                       VARCHAR2
    ACLOID                                                           RAW
    OWNERID                                                          RAW
    12 rows selected.
    SQL> insert into ROOT_TABLE values( XMLType (
      2  '<root>
      3    <member1>
      4      <Member1.Child1>AAA</Member1.Child1>
      5      <Member1.Child2>BBB</Member1.Child2>
      6    </member1>
      7  </root>'))
      8  /
    1 row created.
    SQL> insert into ROOT_TABLE values( XMLType (
      2  '<root>
      3    <member2>
      4      <Member2.Child1>CCC</Member2.Child1>
      5      <Member2.Child2>DDD</Member2.Child2>
      6    </member2>
      7  </root>'))
      8  /
    1 row created.
    SQL> set long 1000 pages 20
    SQL> --
    SQL> select * from ROOT_TABLE
      2  /
    SYS_NC_ROWINFO$
    <root>
      <member1>
        <Member1.Child1>AAA</Member1.Child1>
        <Member1.Child2>BBB</Member1.Child2>
      </member1>
    </root>
    <root>
      <member2>
        <Member2.Child1>CCC</Member2.Child1>
        <Member2.Child2>DDD</Member2.Child2>
      </member2>
    </root>
    SQL>
    SQL>
    SQL>

  • Substitution Group

    Hi All,
    Recently I have started using XMLBean in our project.
    I went through the documentation and mailing list to see if any one else had solution
    to the problem that i was facing.
    Since it was not listed, thought we would ask for help.
    I have generated the class files using the utility "scomp".
    The problem I am facing is how to read this xml and get A1Record object from Record
    type.
         XMLSchema
         <?xml version="1.0" encoding="UTF-8"?>
         <schema targetNamespace="http://www.me.com/abc" xmlns:q="http://www.me.com/abc"
    xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"
    version="3.0.0.0">
              <include schemaLocation="A1Record.xsd"/>
              <include schemaLocation="A2Record.xsd"/>
              <include schemaLocation="A3Record.xsd"/>
              <include schemaLocation="A4Record.xsd"/>
              <element name="RecordGroup" type="q:RecordGroupType">
              </element>
              <complexType name="RecordGroupType">
                   <complexContent>
                        <extension base="q:GroupType">
                             <sequence>
                                  <element ref="q:Record"/>
                             </sequence>
                        </extension>
                   </complexContent>
              </complexType>
              <complexType name="GroupType" abstract="true">
                   <sequence>
                        <element name="Owner" type="q:OwnerType">
                        </element>
                        <element name="Timestamp" type="dateTime">
                        </element>
                   </sequence>
              </complexType>
         </schema>
         XML Data File
         <?xml version="1.0" encoding="UTF-8"?>
         <RecordGroup xmlns="http://www.me.com/abc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://www.me.com/abc c:\RecordGroup.xsd" id="1" name="1234"
    seq="1" batchID="57301">
              <Owner>
              <Name></Name>
         </Owner>
         <Timestamp></Timestamp>
    <A1Record>
    <?A1Record>
         </RecordGroup>     
         Code Used
         RecordGroupType recordType = RecordGroupType.Factory.parse(xmlfile);
    RecordType has only getOwner(), getTimestamp(), and getRecord() getter method.
    Record is not being parsed and getRecord() is returning null always.
    How do I get hold of A1Record?
    Thanks For Your help
    Ramesh R

    This concerns with internationalization (i18N):
    http://www.w3schools.com/schema/schema_complex_subst.asp

Maybe you are looking for

  • Assign direct material cost to value field in copa while issue to Prod orde

    Dear All, My requirement is like this: There are some 16 material groups from A to P each containing some materials(finished goods). I want to allocate overhead to different material groups(Charecteristic in copa) in COPA using the periodic assesment

  • Anyone had problems with BouncyCastle on AIX using IBM's JVM 1.3.0?

    I'm having an issue on AIX with IBM's JVM 1.3.0; the same code and configuration has worked on other OSs and JVMs, including the IBM JVM on Linux and Win2K. The JVM is barfing with a ClassCastException before even the first line of my code is being e

  • 2504 and Airplay

    Hello All, I've got a large residential site which has a 2504 and has a couple of AppleTV and Airport Expresses.  THe 2504 is running image 7.4.100.0 which has the mDNS features.  I have been able to get the AppleTV's working no problem you can airpl

  • Installation error - CE 7.1

    Dear all, My installation stops with an error asking me to check the following file : xuser_c_J2EE.log The log shows the following error: FATAL: Put xuser entry failed: USER data newer than component I am trying to install SAP NetWeaver CE 7.1 SP5 on

  • Hey, what the.... new warranty extension?????!?!?

    I was just reading around and I found a post by some kid that said the ZMs with the headphone jack problem has the service warranty extended to one year... is there any legitimacy in that?!?! (please say yes) Anyway, I think it has something to do wi