XML Schema: annotation

Hello everybody,
here is a minor problem:
XML Schema allows an annotation as Child of schema:
<schema
blockDefault = #all or (possibly empty) subset of {equivClass, extension, list, restriction,
reproduction} : ''
finalDefault = #all or (possibly empty) subset of {extension, restriction, reproduction} : ''
id = ID
targetNamespace = uri-reference
version = string>
Content: ((include | import | annotation)* , ((simpleType | complexType | element | group |
attributeGroup | notation) , annotation*)+)
</schema>
but when I use it as in
<xsd:schema ...>
<xsd:annotation>
<xsd:documentation>
MusiXML schema for music notation.
Copyright [1999 - 2000] Gerd Castan.
</xsd:documentation>
</xsd:annotation>
I get a message
<Line 3, Column 60>: XSD-2027: (Error) Invalid element 'annotation' in 'schema'
that seeems to be not correct to me.
Cheers,
Gerd

Hi,
This is a bug and will be fixed in the next release.
Thanks,
Oracle XML Team

Similar Messages

  • XDB annotations on complex XML Schema

    I am currently testing this in 11gr2 Express, while I wait for our DBA to upgrade our main AIX dev instance to 11gr2 enterprise edition.
    I have a fairly complex xmlschema, provided by the IPTC and trying to annotate it to override some of the default sqltype mappings, but running into problems with how/where to annotate.
    From what I have learned so far, annotations to override the sqltype mappings can only be done on complexType and simpleTypes. ComplexTypes must map to a sql object type, and simpleTypes map to a basic atomic sqlType.
    How would you handle an instance where a complex type extends an xs:string.. but need to have this string map to a CLOB and not a varchar2(4000)?
    <xs:element name="inlineData">
                                                      <xs:annotation>
                                                           <xs:documentation>A rendition of the content using plain-text or encoded inline data</xs:documentation>
                                                      </xs:annotation>
                                                      <xs:complexType>
                                                           <xs:simpleContent>
                                                                <xs:extension base="xs:string">
                                                                     <xs:attributeGroup ref="newsContentAttributes" />
                                                                     <xs:attributeGroup ref="newsContentTypeAttributes" />
                                                                     <xs:attribute name="encoding" type="QCodeType">
                                                                          <xs:annotation>
                                                                               <xs:documentation>The encoding applied to the content before inclusion</xs:documentation>
                                                                          </xs:annotation>
                                                                     </xs:attribute>
                                                                     <xs:attributeGroup ref="newsContentCharacteristics" />
                                                                     <xs:attributeGroup ref="i18nAttributes" />
                                                                     <xs:anyAttribute namespace="##other" processContents="lax" />
                                                                </xs:extension>
                                                           </xs:simpleContent>
                                                      </xs:complexType>
                                                 </xs:element>Adding the xdb: mapUnboundedStringToLob annotation to element "inlineData" fails... not valid... and can't add it to the extension either.. so would a viable valid option in this case, be to create a simpleType, call it say "LargeStringToClob"..with a restriction of type xs:String... then annotate this simpleType to map it to a CLOB.
    Then change the inlineData element extension from xs:string to "LargeStringToClob" ? I plan to use an XMLType column with BinaryXML storage...
    I was hoping to not have to modify the xml schema too much, but I guess its to be expected when trying to map it into Oracle.
    I am faced with a similar issue when trying to annotate for Timestamp with time zone...
    some elements are declared as unions of other types. From what I have read, Oracle maps these to varchar2(4000)
    Example:
    <xs:simpleType name="DateOptTimeType">
              <xs:annotation>
                   <xs:documentation>The type of a date (required) and a time (optional).</xs:documentation>
              </xs:annotation>
              <xs:union memberTypes="xs:date xs:dateTime" />
         </xs:simpleType>Even though this is a simpleType... I cannot annotate it to map it to a TimeStamp with Timezone ... would I have to again... create simpleTypes for each of the memberTypes in the union, annotate each one to map to Timestampt with time zone.. then use these new simpleTypes in the union?
    Thanks for any tips or advice!

    odie_63 wrote:
    so if using Binary XML, you are stuck with what Oracle gives you? for instance, the inlineData element is an unbounded string in the schema... Oracle maps it to varchar2(4000).No, Binary XML stores data differently.
    Consider this simple example :
    SQL> begin
    2   dbms_xmlschema.registerSchema(
    3   schemaURL => 'test.xsd',
    4   schemaDoc => '<?xml version="1.0"?>
    5  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb">
    6  <xs:element name="note" xdb:defaultTable="NOTES_TABLE">
    7    <xs:complexType>
    8      <xs:sequence>
    9        <xs:element name="content" type="xs:string"/>
    10        <xs:element name="dt" type="xs:dateTime"/>
    11      </xs:sequence>
    12    </xs:complexType>
    13  </xs:element>
    14  </xs:schema>',
    15   local => true,
    16   genTypes => false,
    17   genTables => false,
    18   enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_NONE,
    19   options => dbms_xmlschema.REGISTER_BINARYXML
    20   );
    21  end;
    22  /
    PL/SQL procedure successfully completed
    SQL> CREATE TABLE notes_table OF XMLTYPE
    2  XMLTYPE STORE AS binary xml
    3  XMLSCHEMA "test.xsd"
    4  ELEMENT "note"
    5  ;
    Table created
    SQL> insert into notes_table values(xmltype(
    2  '<note>
    3  <content>'||lpad(to_clob('X'),8000,'X')||'</content>
    4  <dt>2011-11-16T11:56:23+01:00</dt>
    5  </note>'));
    1 row inserted
    SQL> select x.dt
    2       , x.content
    3       , length(x.content)
    4  from notes_table t
    5     , xmltable('/note' passing t.object_value
    6       columns dt      timestamp with time zone  path 'dt'
    7             , content clob                      path 'content'
    8       ) x
    9  ;
    DT                                CONTENT                                                                          LENGTH(X.CONTENT)
    16/11/11 11:56:23,000000 +01:00   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX              8000No issue in storing large strings.Very cool... that works... .. the string limit exceeded expcetion I got earlier was no fault to Binary XML.. but me pasting in too much text in SQLDeveloper insert statement.
    I think I may have been on this for too long... brain is getting fuzzy ;-)
    The approach you outline shows promise and I will go with BinaryXML storage option.
    I need to decide whether to use virtual columns or non-trivial columns at this point, to enforce integrity constraints and possibly some partitioning. We do have a few relational lookup tables to tie into this as well... and will also need to implement VPD.

  • Null value for int and datetime date type in xml schema

    hi:
    I am embarrassed by a qustion in xml schema; i defined a xml schema file like
    this:
    <elementFormDefault="qualified" attributeFormDefault="qualified">
    <xs:element name="test">
    <xs:annotation>
    <xs:documentation>Comment describing your root element</xs:documentation>
    </xs:annotation>
    <xs:complexType>
    <xs:sequence>
    <xs:element name="name" type="xs:string"/>
    <xs:element name="password" type="xs:string" nillable="true"/>
    <xs:element name="user" type="xs:int" nillable="true"/>
    <xs:element name="s_time" type="xs:dateTime"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    and I send this file to workflow clientrequest() node, I wanted to receive data
    in this schema file.but when i send null value to the element "user" and "s_time"
    in workshop test tool(test soap),and use function in xmlbean like isNilUser or
    isNilStime, one error occur.
    I don't kown why, I had to ask the engineer of bea in china, one told me a bug.
    is that true?

    Visakh16 I cant agree more with you on it, it is good but in production u cant have them change maxrows. I think
    Patrick  Hurst is a better option. debug the package have it running and move up
    Please mark as helpful and propose as answer if you find this as correct!!! Thanks,Dia Agha .
    Hmm..Why do you need to change it in production?
    What I suggested was to tweak the setting in dev machine so that it interprets the Excel file datatypes correctly when doing development. Once mapping is set correctly then it will work fine when in production or in any other environment. The tweaking is
    just to make sure it interprets the datatype correctly at design time and has nothing to do with production deployment 
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How can i change a xmltype column's xml schema?

    i create a table that have a xmltype column.this column is schema-based.
    my problem is ,
    now i want to this column's schema will be redefined to a global schema?
    [b]how can i change the column's schema which already have a schema?

    When a schema is registered a lot of additonal annotations are added to the XML schema by the schema registration process - Look at the version of the XML schema under /sys/schemas/... in the XML DB repository. This information is unqiue to that version of the XML schema and is used internally to manage instance level metadata.
    When instance documents are stored in the DB a set of metadata is generated for each document so that we can make sure that we can maintain DOM Fidelity. This metadata is tied directly to the XML schema the document is associated and is only valid in the context of that XML Schema.
    So when the schema is registered locally and instances are stored the generated metadata is only valid in the context of the local schema. If the same schema is now registered globally new values will be generated for the annotations applied to the global version of the XML schema. Consequently the metadata associated with a document belonging to the local version of the XML schema has no meaning when viewed in the context of the global version of the XML schema.
    The net effect of this is that you will need to copy the data in order to get documents where the metadata for each document is based on the global version of the XML SChema.

  • Insert data into the xml schema-based xmltype table problem!

    Hello, there,
    I got problem in inserting data into the xmltype table after registered XML schema and created table. details see below:
    1) xml schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSpy v2007 sp2 (http://www.altova.com) by Constantin Ilea (EMERGIS INC) -->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.emergis.com/eHealth/EHIP/data/meta/profile:v1" targetNamespace="http://www.emergis.com/eHealth/EHIP/data/meta/profile:v1" elementFormDefault="qualified">
         <!-- ************** PART I: BEGIN SIMPLE OBJECT TYPE DEFINITIONS ********************************** -->
         <xs:simpleType name="RoutingType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="Synch"/>
                   <xs:enumeration value="Asynch"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="StatusType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="ACTIVE"/>
                   <xs:enumeration value="VOID"/>
                   <xs:enumeration value="PENDING"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="SenderApplicationType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="PR"/>
                   <xs:enumeration value="CR"/>
                   <xs:enumeration value="POS"/>
                   <xs:enumeration value="CPP"/>
                   <xs:enumeration value="Other"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="ServiceTypeType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="IS"/>
                   <xs:enumeration value="WS"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="RouteDirect">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="Request"/>
                   <xs:enumeration value="Reply"/>
                   <xs:enumeration value="None"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="Indicator">
              <xs:annotation>
                   <xs:documentation>can we also change the value to "ON" and "OFF" instead? in this way this cn be shared by all type of switch indicator</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="YES"/>
                   <xs:enumeration value="NO"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="RuleType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="ControlAct"/>
                   <xs:enumeration value="WSPolicy"/>
                   <xs:enumeration value="AccessControl"/>
                   <xs:enumeration value="Certification"/>
                   <xs:enumeration value="MessageConformance"/>
                   <xs:enumeration value="Variant"/>
                   <xs:enumeration value="Routing"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="HL7Result">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="ACCEPT"/>
                   <xs:enumeration value="REFUSE"/>
                   <xs:enumeration value="REJECT"/>
                   <xs:enumeration value="ACK"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="IIPType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="PUT"/>
                   <xs:enumeration value="GET/LIST"/>
                   <xs:enumeration value="NOTIF"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="ProfileTypeType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="IIPProfile"/>
                   <xs:enumeration value="BizOperationProfile"/>
                   <xs:enumeration value="OrchestrationProfile"/>
                   <xs:enumeration value="DomainObjectProfile"/>
                   <xs:enumeration value="ServiceProfile"/>
                   <xs:enumeration value="ExceptionProfile"/>
                   <xs:enumeration value="CustomizedProfile"/>
                   <xs:enumeration value="SystemProfile"/>
                   <xs:enumeration value="HL7XMLSchemaProfile"/>
                   <xs:enumeration value="EnricherParametersProfile"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="ParameterType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="String"/>
                   <xs:enumeration value="Object"/>
                   <xs:enumeration value="Number"/>
                   <xs:enumeration value="Document"/>
              </xs:restriction>
         </xs:simpleType>
         <!-- ************** PART I: END SIMPLE OBJECT TYPE DEFINITIONS ********************************** -->
         <!-- ************** PART II: BEGIN COMPLEX OBJECT TYPE DEFINITIONS ********************************** -->
         <!-- *********************** begin new added objects, by rshan *************************************** -->
         <xs:complexType name="ProfileType">
              <xs:annotation>
                   <xs:documentation>
              1.Profile IS USED TO BE AN WRAPPER ELEMENT FOR ALL KIND OF PROFILES NO MATTER WHAT KIND OF PROFILE IT IS
              2.ProfileID used to uniquely identify the current profile
              3.ProfileData used to hold all the necessary profile related data
              </xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="ProfileID" type="ProfileIDType">
                        <xs:annotation>
                             <xs:documentation>this will hold all the common attributes, espically the global unique identifier to the profile, no matter what type of profile is</xs:documentation>
                        </xs:annotation>
                   </xs:element>
                   <xs:element name="ProfileData" type="ProfileDataType">
                        <xs:annotation>
                             <xs:documentation>all the non-common profile meta data that attached to each specific profile type such as IIPProfile, OrchestrationProfile, and BizOperationProfile will be placed here</xs:documentation>
                        </xs:annotation>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="ProfileIDType">
              <xs:annotation>
                   <xs:documentation>global unique identifier and all the common attributes across all different profiles, the @ID and @Type together will be used as the primary key to identify the profile data</xs:documentation>
              </xs:annotation>
              <xs:attribute name="ID" type="xs:ID" use="required">
                   <xs:annotation>
                        <xs:documentation>ID is the global unique identifier to the profile, no matter what type of profile it is</xs:documentation>
                   </xs:annotation>
              </xs:attribute>
              <xs:attribute name="Name"/>
              <xs:attribute name="Description"/>
              <xs:attribute name="Version">
                   <xs:annotation>
                        <xs:documentation>version of the profile data</xs:documentation>
                   </xs:annotation>
              </xs:attribute>
              <xs:attribute name="Type" type="ProfileTypeType" use="required">
                   <xs:annotation>
                        <xs:documentation>value to identify the ProfileType type within
                        IIPProfile,BizOperationProfile,OrchestrationProfile,DomainObjectProfile
                        ServiceProfile,ExceptionProfile,SystemProfile,HL7XMLSchemaProfile,
                        EnricherParametersProfile,CustomizedProfile
                        </xs:documentation>
                   </xs:annotation>
              </xs:attribute>
              <xs:attribute name="Status" type="StatusType" default="ACTIVE">
                   <xs:annotation>
                        <xs:documentation>used to show the related profile data status like "ACTIVE","PENDING","VOID"...</xs:documentation>
                   </xs:annotation>
              </xs:attribute>
              <!--
              <xs:sequence>
                   <xs:element name="ProfileReference" type="ProfileIDType" minOccurs="0" maxOccurs="unbounded">
                        <xs:annotation>
                             <xs:documentation>this will be the place to hold the integrity relationship with other profiles like foreign key if existed and necessary to show up</xs:documentation>
                        </xs:annotation>
                   </xs:element>
              </xs:sequence>
              -->
         </xs:complexType>
         <xs:complexType name="ProfileDataType">
              <xs:annotation>
                   <xs:documentation>meta data associated tightly to each specific type of profile</xs:documentation>
              </xs:annotation>
              <xs:choice>
                   <xs:element name="EnricherParametersProfileData" type="EnricherParametersDataType">
                        <xs:annotation>
                             <xs:documentation>Enricher Parameters related profile data
                   1. one instance of this type may contains all the related System metadata.
                   2. idType part may use to identify different version/release/status
                   </xs:documentation>
                        </xs:annotation>
                   </xs:element>
                   <xs:element name="ExtendProfileData" type="ExtendProfileDataType">
                        <xs:annotation>
                             <xs:documentation>If needed, any profile data not defined within the current release scope can be added here </xs:documentation>
                        </xs:annotation>
                   </xs:element>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="ExtendProfileDataType">
              <xs:sequence>
                   <xs:element name="ExtendProfile" type="xs:anyType" minOccurs="0"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="EnricherParametersDataType">
              <xs:sequence>
                   <xs:element name="EnricherParameter" type="EnricherParameter" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="EnricherParameter">
              <xs:sequence>
                   <xs:element ref="Enricher"/>
              </xs:sequence>
              <xs:attribute name="serviceName" type="xs:string" use="required"/>
              <xs:attribute name="interactionID" type="xs:string"/>
         </xs:complexType>
         <xs:element name="Enricher">
              <xs:annotation>
                   <xs:documentation>Comment describing your root element</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Parameters" type="Parameters"/>
                        <xs:element ref="Section" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:complexType name="ValueType">
              <xs:attribute name="field" use="required"/>
              <xs:attribute name="value"/>
              <xs:attribute name="action"/>
         </xs:complexType>
         <xs:element name="Section">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Value" type="ValueType" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Section" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
                   <xs:attribute name="path" use="required"/>
              </xs:complexType>
         </xs:element>
         <xs:complexType name="Parameters">
              <xs:sequence>
                   <xs:element name="Parameter" minOccurs="0" maxOccurs="unbounded">
                        <xs:complexType>
                             <xs:attribute name="name" use="required"/>
                             <xs:attribute name="reference"/>
                        </xs:complexType>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RuleList">
              <xs:annotation>
                   <xs:documentation>an array of rules</xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="Rule" type="RuleProfile" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RuleProfile">
              <xs:attribute name="RName" use="required"/>
              <xs:attribute name="RType" type="RuleType" use="required"/>
              <xs:attribute name="Status" default="ON">
                   <xs:annotation>
                        <xs:documentation>By default is ON (or if is missing)</xs:documentation>
                   </xs:annotation>
              </xs:attribute>
              <xs:attribute name="Order"/>
              <xs:attribute name="Direction" type="RouteDirect">
                   <xs:annotation>
                        <xs:documentation>Request / Reply</xs:documentation>
                   </xs:annotation>
              </xs:attribute>
         </xs:complexType>
         <!-- ************** PART II: END COMPLEX OBJECT TYPE DEFINITIONS *********************************** -->
         <!-- ************** PART III: BEGIN ROOT ELEMENTS DEFINITIONS ********************************* -->
         <!-- 0) Profile wrapper root element
    Profile IS USED TO BE AN WRAPPER ELEMENT FOR ALL KIND OF PROFILES NO MATTER WHAT KIND OF PROFILE IT IS
    -->
         <xs:element name="Profile" type="ProfileType">
              <xs:annotation>
                   <xs:documentation>Profile IS USED TO BE AN WRAPPER ELEMENT FOR ALL KIND OF PROFILES NO MATTER WHAT KIND OF PROFILE IT IS</xs:documentation>
              </xs:annotation>
         </xs:element>
    </xs:schema>
    2)register xml schema:
    SQL> begin
    2 dbms_xmlschema.registerSchema
    3 (
    4 schemaurl=>'http://rac3-1-vip:8080/home/'||USER||'/xsd/EHIPProfile_v00.xsd',
    5 schemadoc=>xdbURIType('/home/'||USER||'/xsd/EHIPProfile_v00.xsd').getClob(),
    6 local=>True,
    7 gentypes=>True,
    8 genbean=>False,
    9 gentables=>False
    10 );
    11 End;
    12 /
    PL/SQL procedure successfully completed.
    SQL>
    SQL>
    3) xml data:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSpy v2007 sp2 (http://www.altova.com)-->
    <Profile xmlns="http://www.emergis.com/eHealth/EHIP/data/meta/profile:v1">
         <ProfileID Type="EnricherParametersProfile" Status="ACTIVE" ID="EnricherPP.ID.0001" Name="EnricherPP.ID.0001" Description="EnricherPP.ID.0001" Version="01"/>
         <ProfileData>
              <EnricherParametersProfileData>
                   <EnricherParameter serviceName="LRS_BusinessDomainObject.lrs.businessDomainObject.domainObjectBuilder.concrete.ExceptionCreators:createExceptionV50CategoryCanonicalPart" interactionID="">
                   <Enricher>
                        <Parameters>
                             <Parameter name="MESSAGE_ID" reference="test"/>
                        </Parameters>
                        <Section path="HEADER">
                             <Section path="RESPONSE_TYPE">
                                  <Value field="value" value="I"/>
                             </Section>
                             <Section path="HL7_STANDARD_VERSION">
                                  <Value field="value" value="HL7V3"/>
                             </Section>
                             <Section path="DESIRED_ACKNOWLEDGMENT_TYPE">
                                  <Value field="value" value="NE"/>
                             </Section>
                             <Section path="SENDING_NETWORK_ADDRESS">
                                  <Value field="value" value=""/>
                             </Section>
                             <Section path="SENDING_APPLICATION_IDENTIFIER">
                                  <Value field="root" value="2.16.840.1.113883.3.133.1.3"/>
                                  <Value field="extension" value=""/>
                             </Section>
                             <Section path="SENDING_APPLICATION_NAME">
                                  <Value field="value" value="NL HIAL"/>
                             </Section>
                        </Section>
                   </Enricher>
         </EnricherParameter>
              <EnricherParameter serviceName="LRS_BusinessDomainObject.lrs.businessDomainObject.domainObjectBuilder.concrete.DomainObjectCreators:createFindClientsAssociatedIdentifersRequestObject" interactionID="PRPA_IN101105CA">
                   <Enricher>
                        <Parameters>
                             <Parameter name="MESSAGE_ID" reference="test"/>
                        </Parameters>
                        <Section path="HEADER">
                             <Section path="RESPONSE_TYPE">
                                  <Value field="value" value="I"/>
                             </Section>
                             <Section path="HL7_STANDARD_VERSION">
                                  <Value field="value" value="HL7V3"/>
                             </Section>
                             <Section path="PROCESSING_CODE">
                                  <Value field="value" value="T"/>
                             </Section>
                             <!--
                             <Section path="PROCESSING_MODE_CODE">
                                  <Value field="value" value="T"/>
                             </Section>
                             -->                         
                             <Section path="DESIRED_ACKNOWLEDGMENT_TYPE">
                                  <Value field="value" value="NE"/>
                             </Section>
                             <Section path="RECEIVER_NETWORK_ADDRESS">
                                  <Value field="value" value="prsunew.moh.hnet.bc.ca"/>
                             </Section>
                             <Section path="RECEIVER_APPLICATION_IDENTIFIER">
                                  <Value field="root" value="2.16.840.1.113883.3.40.5.1"/>
                                  <Value field="extension" value=""/>
                             </Section>
                             <Section path="SENDING_NETWORK_ADDRESS">
                                  <Value field="value" value=""/>
                             </Section>
                             <Section path="SENDING_APPLICATION_IDENTIFIER">
                                  <Value field="root" value="2.16.840.1.113883.3.133.1.3"/>
                                  <Value field="extension" value=""/>
                             </Section>
                             <Section path="SENDING_APPLICATION_NAME">
                                  <Value field="value" value="NL HIAL"/>
                             </Section>
                        </Section>
                   </Enricher>
         </EnricherParameter>
              <EnricherParameter serviceName="LRS_BusinessDomainObject.lrs.businessDomainObject.domainObjectBuilder.concrete.DomainObjectContentEnrichers:enrichPRRequest" interactionID="">
    <!--Sample XML file generated by XMLSpy v2007 sp2 (http://www.altova.com)-->
    <Enricher>
         <Parameters>
              <Parameter name="MESSAGE_IDENTIFIER" reference="test"/>
         </Parameters>
         <Section path="HEADER">
              <Section path="HL7_STANDARD_VERSION">
                   <Value field="value" value="V3PR2"/>
              </Section>
              <!--POS/CPP populated ?-->
              <!--Not sure if this should be set as a variance within EHIP or if we expect the POS/CPP to provide this value-->
              <Section path="PROCESSING_CODE">
                   <Value field="value" value="T"/>
              </Section>
              <!--POS/CPP populated ?-->
              <Section path="PROCESSING_MODE_CODE">
                   <Value field="value" value="T"/>
              </Section>
              <!--POS/CPP populated ?-->
              <Section path="DESIRED_ACKNOWLEDGMENT_TYPE">
                   <Value field="value" value="NE"/>
              </Section>
              <!-- note:We Expect PRS to give us a web service address -->                    
              <!--<Section path="RECEIVER_NETWORK_ADDRESS">
                   <Value field="value" value="_http://PRSServer/svcName"/>
              </Section>
              -->
              <Section path="RECEIVER_APPLICATION_IDENTIFIER[0]">
                   <Value field="root" value="2.16.840.1.113883.3.40.1.14"/>
                   <Value field="extension" value="SIT1"/>
              </Section>
              <!-- note: values of the fields to be provided by PRS -->
              <Section path="RECEIVER_APPLICATION_NAME[0]">
                   <Value field="value" value="receiverAppName"/>
              </Section>
              <!-- note: RECEIVER_ORGANIZATION has an extra trailing space, as in the Excel mapping spreadsheet -->
              <!-- note: values of the fields to be specified by PRS later -->
              <Section path="RECEIVER_AGENT/RECEIVER_ORGANIZATION/RECEIVER_ORGANIZATION_IDENTIFIER[0]">
                   <Value field="root" value="2.16.840.1.113883.3.40.4.1"/>
                   <Value field="extension" value="receiverOrgId"/>
              </Section>
              <Section path="SENDING_APPLICATION_NAME[0]">
                   <Value field="value" value="NLPRSCLNT"/>
              </Section>
              <!-- note: SENDING_ORGANIZATION has an extra trailing space, as in the Excel mapping spreadsheet -->
              <!-- note: values of the fields to be specified by PRS later -->
              <Section path="SENDING_AGENT/SENDING_ORGANIZATION/SENDING_ORGANIZATION_IDENTIFIER[0]">
                   <Value field="root" value="2.16.840.1.113883.4.3.57"/>
                   <Value field="extension" value="3001"/>
              </Section>
              <Section path="PERFORMER/HEALTHCARE_WORKER_IDENTIFIER[0]">
                   <Value field="root" value="2.16.840.1.113883.4.3.57"/>
                   <Value field="extension" value="HIAL_USR"/>
              </Section>          
         </Section>
         <Section path="PAYLOAD">
              <!--<Section path="QUERY_STATUS_CODE">
                   <Value field="value" value="New"/>
              </Section>-->
              <!-- note: AUDIT has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="AUDIT[0]/AUDIT_INFORMATION">
                   <Value field="code" value="LATEST"/>
                   <Value field="codeSystem" value="PRSAuditParameters"/>
              </Section>
              <!-- note: CONFIDENCE has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="CONFIDENCE/CONFIDENCE_VALUE">
                   <Value field="value" value="100"/>
              </Section>
              <!-- note: HISTORY has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="HISTORY/INCLUDE_HISTORY_INDICATOR">
                   <Value field="value" value="false"/>
              </Section>
              <!-- note: JURISDICTION has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="JURISDICTION/JURISDICTION_TYPE">
                   <Value field="value" value="NL"/>
              </Section>
              <!-- note: RESPONSE_OBJECT has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[0]">
                   <Value field="code" value="GRS_ADDRESS"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[1]">
                   <Value field="code" value="GRS_ELECTRONIC_ADDRESS"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[2]">
                   <Value field="code" value="GRS_IDENTIFIER"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[3]">
                   <Value field="code" value="GRS_ORGANIZATION_NAME"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[4]">
                   <Value field="code" value="GRS_PERSONAL_NAME"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[5]">
                   <Value field="code" value="GRS_REGISTRY_IDENTIFIER"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[6]">
                   <Value field="code" value="GRS_TELEPHONE"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[7]">
                   <Value field="code" value="PRS_CONDITION"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[8]">
                   <Value field="code" value="PRS_CONFIDENTIALITY_INDICATOR"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[9]">
                   <Value field="code" value="PRS_DEMOGRAPHIC_DETAIL"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[10]">
                   <Value field="code" value="PRS_DISCIPLINARY_ACTION"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[11]">
                   <Value field="code" value="PRS_INFORMATION_ROUTE"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[12]">
                   <Value field="code" value="PRS_NOTE"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[13]">
                   <Value field="code" value="PRS_PROVIDER_CREDENTIAL"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[14]">
                   <Value field="code" value="PRS_PROVIDER_EXPERTISE"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[15]">
                   <Value field="code" value="PRS_PROVIDER_RELATIONSHIP"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[16]">
                   <Value field="code" value="PRS_STATUS"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[17]">
                   <Value field="code" value="PRS_WORK_LOCATION"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[18]">
                   <Value field="code" value="PRS_WORK_LOCATION_ADDRESS"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[19]">
                   <Value field="code" value="PRS_WORK_LOCATION_DETAIL"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[20]">
                   <Value field="code" value="PRS_WORK_LOCATION_ELECTRONIC_ADDRESS"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[21]">
                   <Value field="code" value="PRS_WORK_LOCATION_INFORMATION_ROUTE"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[22]">
                   <Value field="code" value="PRS_WORK_LOCATION_TELEPHONE"/>
              </Section>
              <!-- note: ROLE_CLASS has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="ROLE_CLASS /ROLE_CLASS_VALUE">
                   <Value field="value" value="LIC"/>
              </Section>
              <Section path="SORT_CONTROL[0]/SORT_CONTROL_ELEMENT_NAME">
                   <Value field="code" value="PrincipalPerson.name.value.family"/>
              </Section>
              <Section path="SORT_CONTROL[0]/SORT_CONTROL_DIRECTION_CODE">
                   <Value field="value" value="A"/>
              </Section>
         </Section>
    </Enricher>
         </EnricherParameter>
              </EnricherParametersProfileData>
         </ProfileData>
    </Profile>
    the data is valid against the schema through XML Spy tool... and loaded into the XDB repository...
    4) create table and insert data:
    SQL> CREATE TABLE EHIP_PROFILE OF SYS.XMLTYPE
    2 XMLSCHEMA "http://rac3-1-vip:8080/home/EHIPSBUSER1/xsd/EHIPProfile_v00.xsd" ELEMENT "Profile"
    3 ;
    Table created.
    SQL>
    SQL> alter table EHIP_PROFILE
    2 add CONSTRAINT EHIP_PROF_PK PRIMARY KEY(XMLDATA."ProfileID"."ID",XMLDATA."ProfileID"."Type");
    Table altered.
    SQL>
    SQL>
    SQL>
    SQL>
    SQL> select xdbURIType('/home/'||USER||'/ProfileData/EnricherPP.ID.0001.xml').getClob() from dual;
    XDBURITYPE('/HOME/'||USER||'/PROFILEDATA/ENRICHERPP.ID.0001.XML').GETCLOB()
    <?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSpy
    SQL>
    SQL>
    SQL> insert into ehip_profile values(xmltype.createXML(xdbURIType('/home/'||USER||'/ProfileData/EnricherPP.ID.0001.xml').getClob()));
    insert into ehip_profile values(xmltype.createXML(xdbURIType('/home/'||USER||'/ProfileData/EnricherPP.ID.0001.xml').getClob()))
    ERROR at line 1:
    ORA-21700: object does not exist or is marked for delete
    what's the problem caused the "ORA-21700: object does not exist or is marked for delete" error?
    Thanks in advance for your help?

    Thanks Marco,
    Here're my environment:
    SQL> select INSTANCE_NUMBER, INSTANCE_NAME,HOST_NAME,VERSION from v$instance;
    INSTANCE_NUMBER INSTANCE_NAME HOST_NAME VERSION
    2 rac32 RAC3-2 10.2.0.3.0
    I followed your suggested in the above, and always purge recyclebin, but still got the same problem. because in 10gr2, there's no dbms_xmlschema.purge_schema available,
    and I did checked the recyclebin after force the delete of schema, nothing inside. any other recommendation?

  • XML Schema any element

    I have a list of schema files and they a number of elements in them. But for my data extraction i use only close to 300 tags. When i register the schema I get an error that a table cannot of have more than 1000 columns. My work mate is working on Annotations and I am planning to build a new schema to make extract only these 300 tag names and also make sure the XML file can be validated like it did earlier. Explaining this i came across a complex type element called *<any>* which can be used to allow elements to be available which are not declared within the schema file.
    My Original schema file looks something like below,
    <xsd:complexType name="WfInformation">
    <xsd:all minOccurs="0">
    <xsd:element name="Company" type="WfCompany" minOccurs="0" />
    <xsd:element name="HeadOffice" type="WfOffice" minOccurs="0" />
    <xsd:element name="IndependentOffice" type="WfIOffice" minOccurs="0" />
    <xsd:element name="AffiliateCompany" type ="WfIAOffice" minOccurs="0" />
    <xsd:element name="Number" type="xsd:string" minOccurs="0" />
    <xsd:element name="ReferenceID" type="xsd:string" minOccurs="0" />
    </xsd:all>
    </xsd:complexType>
    of the above list of items i use only elements Company, HeadOffice, Number. After reading through some documentation I wanted to <any> tag like below,
    <xsd:complexType name="WfInformation">
    *<xsd:sequence>*
    <xsd:element name="Company" type="WfCompany" minOccurs="0" />
    <xsd:element name="HeadOffice" type="WfOffice" minOccurs="0" />
    *<xsd:any processContents="lax"/>*
    *<xsd:any processContents="lax"/>*
    <xsd:element name="Number" type="xsd:string" minOccurs="0" />
    *<xsd:any processContents="lax"/>*
    *</xsd:sequence>*
    </xsd:complexType>
    My question is if I am correcting the lines as i mentioned above will be Register schema again fail with same reason that i have 1000 columns. As i understand every element inside an Complex element is stored as a column value. In that case will this redesign work. Or is there any other way to approach re-desgin the XML Schema.

    Thanks. I think that leaves out my option to create a totally new Schema to suit my XML files.
    Only other option we have is to use Annotations.
    I think my colleague - eoin62 would have shared the XML Schema files earlier through your oracle email address.
    Please refer thread - How to register multiple XSD files
    But we received a reply and we knew very little on how to make changes to Admin.xsd and how would that solve our problem. Please correct me if i am incorrect. Because the biggest Schema was estimate.xsd that has close to 800+ elements. I am not sure if my colleague sent you the necessary tag names we use within the Schema. We have close to around 300 tags we use. But our combined XML Schema has close to 1600+ If we have to annotate, i thought it would be better we tell Oracle which tagswe need, which inturn should should help better create XMLtype table against a Schema and work on performance.
    Your earlier reply was,
    Basically in XML Schema Admin.xsd element AdminCompin WorkfileTypeneeds to be stored Out of line..
    Add the annotations xdb:SQLInline=”false” and xdb:defaultTable=”ADMIN_COMP_XML”. to the element..
    if you can share with our XML Schema on how to annotate or if you can share a location that shows how an annotated or non-annotated Schema works that would help us correcting our Schema files.
    Thanks for all your support. We have gone a long way in XML Parsing in the last 6 weeks.
    Edited by: beta32c on Feb 19, 2013 12:09 AM

  • JAXB 1.3 can't parse W3 SOAP 2003-05 envelope XML schema

    Hello,
    I was trying to use JAXB to parse the MMAP schema from the SMS Forum
    (http://www.smsforum.net/schemas/mmap/v1.0/mmap.xsd). I finally
    tracked it down to XJC choking on the included SOAP envelope schema's
    use of the xml:lang attribute for a tag called reasontext. Here's the
    pared-down test case:
    C:\java\src\baz>%JWSDP_HOME%\jaxb\bin\xjc.bat http://www.w3.org/2003/05/soap-envelope/soap-envelope.xsd
    %JWSDP_HOME%\jaxb\bin\xjc.bat http://www.w3.org/2003/05/soap-envelope/soap-envelope.xsd
    parsing a schema...
    [ERROR] src-resolve: Cannot resolve the name 'xml:lang' to a(n) attribute declaration component.
      line 97 of soap-envelope.xsd
    [ERROR] src-ct.0.1: Complex Type Definition Representation Error for type 'reasontext'.  Element 'attribute' is invalid, misplaced, or occurs too often.
      line 97 of soap-envelope.xsd
    Failed to parse a schema.
    C:\java\src\baz>I believe that the relevant portions of the schemas and namespaces in
    question are:
    http://www.w3.org/2003/05/soap-envelope/soap-envelope.xsd
    <xs:complexType name="reasontext">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute ref="xml:lang" use="required" />
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>http://www.w3.org/2001/XMLSchema.xsd
    <xs:complexType name="attribute" mixed="false">
    <xs:complexContent>
    <xs:extension base="xs:annotated">
    <xs:sequence>
    <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType" />
    </xs:sequence>
    <xs:attributeGroup ref="xs:defRef" />
    <xs:attribute name="type" type="xs:QName" />
    <xs:attribute name="use" use="optional" default="optional">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="prohibited" />
    <xs:enumeration value="optional" />
    <xs:enumeration value="required" />
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="default" type="xs:string" />
    <xs:attribute name="fixed" type="xs:string" />
    <xs:attribute name="form" type="xs:formChoice" />
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>http://www.w3.org/2001/XMLSchema.xsd
    <xs:attributeGroup name="defRef">
    <xs:annotation>
    <xs:documentation>for element, group and attributeGroup, which both define and reference</xs:documentation>
    </xs:annotation>
    <xs:attribute name="name" type="xs:NCName" />
    <xs:attribute name="ref" type="xs:QName" />
    </xs:attributeGroup>http://www.w3.org/XML/1998/namespace
    The namespace whose name is http://www.w3.org/XML/1998/namespace is
    bound by definition to the prefix xml: according to Namespaces in XML,
    W3C Recommendation 14 Jan 1999. Note that unlike all other XML
    namespaces, both the name and the prefix are specified; i.e., if you
    want XML 1.0 processors to recognize this namespace, you must use the
    reserved prefix xml:.
    xml:lang and xml:space
    As of the last update of this document, the XML 1.0 Specification
    defines two attribute names in this namespace:
    xml:lang
    Designed for identifying the human language used in the scope of the
    element to which it's attached.
    .I'm no XML schema expert, but it looks to me like "name" and "ref"
    are both valid attributes for an <xs:attribute> tag and that the XML
    namespace standard requires XML processors to recognize the xml:lang
    attribute. Hence, this appears to me to be a bug in JAXB.
    A secondary bug is that the original error message left the name of
    the offending included schema blank:
    C:\java\src\foo>d:\java\jwsdp\jwsdp-1.3\jaxb\bin\xjc.bat http://www.smsforum.net/schemas/mmap/v1.0/mmap.xsd
    parsing a schema...
    [ERROR] src-resolve: Cannot resolve the name 'xml:lang' to a(n) attribute declaration component.
      line 97 of
    [ERROR] src-ct.0.1: Complex Type Definition Representation Error for type 'reasontext'.  Element 'attribute' is invalid, misplaced, or occurs too often.
      line 97 of
    Failed to parse a schema.
    C:\java\src\foo>In case it helps with problem diagnosis, I'm running with J2SDK 1.4.2
    and have copied the endorsed jar files into the JRE lib as instructured
    with JAXB:
    C:\java\src\baz>java -version
    java -version
    java version "1.4.2"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
    Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
    C:\java\src\baz>dir %JAVA_HOME%\jre\lib\endorsed
    dir %JAVA_HOME%\jre\lib\endorsed
    Volume in drive D has no label.
    Volume Serial Number is 70AE-6E52
    Directory of D:\java\j2se\j2sdk1.4.2\jre\lib\endorsed
    03/31/2004  09:41 AM    <DIR>          .
    03/31/2004  09:41 AM    <DIR>          ..
    03/29/2004  01:28 PM            56,619 dom.jar
    03/29/2004  01:28 PM            60,963 sax.jar
    03/29/2004  01:28 PM         2,823,241 xalan.jar
    03/29/2004  01:28 PM         2,667,618 xercesImpl.jar
    10/10/2003  06:36 PM         1,379,810 xsltc.jar
                   6 File(s)      6,989,573 bytes
                   2 Dir(s)   7,889,731,584 bytes free
    C:\java\src\baz>I'm quite interested in the resolution of this issue as I'm stopped in
    my tracks on progress here. Help with resolution, whether in JAXB or
    my usage of it, will be much appreciated. I did a search of existing
    issues but didn't notice a duplicate. Thanks in advance.

    I have also come across a similar problem with validating an xml file with an xml:lang attribute. It seems to be common across the schema validation and dtd validation. I get the following error with both schema and dtd validation:
    Validation Error Msg (0): unexpected attribute "xml:lang"
    Validation Error Location (0): FreeFormText
    The test file extract looks like this:
    <FreeFormText xml:lang="EN">Pelle</FreeFormText>
    The schema defines the node as:
    <xs:complexType name="FreeFormText">
              <xs:simpleContent>
                   <xs:extension base="FreeFormTextType">
                        <xs:attribute name="lang" type="xs:language"/>
                   </xs:extension>
              </xs:simpleContent>
    </xs:complexType>
    and the dtd defines the node as:
    <!ELEMENT FreeFormText
         (#PCDATA)>
    <!ATTLIST FreeFormText xml:lang CDATA #IMPLIED >
    This looks like a bug in JAXB to me aswell. Any help on it would be much appreciated as i am also stuck.

  • Updating registered XML Schema

    We're going to use Oracle XML DB (Oracle 9.2.0.5). We will register our XML Schema files to Oracle. In case we later want to update one of the registered schemas I tested updating some example schemas.
    I found a thread here in the forum with some steps to update a registered schema we:
    forum
    >
    For each table or column based on the schema
    1. Create a table with a column of XMLType which is not based on the
    XMLSchema. EG XMLType stored as CLOB
    2. Copy the content of the existing table into the CLOB based table.
    3. Delete the existing schema
    4. REgister the New Schema.
    5. Recreate teh tables and columns
    6. COpy the data into the new tables using supplied XSL transformation where
    necessary
    7. Delete tempoarary tables....
    I followed the steps and it works.
    But there is one thing I want to know:
    I have a schema A and a schema B and I want to use definitions of schema B in schema A, using the <import> element. Now I want to update schema B. When i follow the steps above i have to backup all tables/coloumns which contain elements defined in schema B. Then i delete the schema and reregister it. When trying to query data in schema A i get an error message: ORA-04045: errors during recompilation/revalidation. This is even if i reregister the previous schema with annotations.
    For now i have to delete schema A too and reregister schema A and B. Is there a way to only update a single schema without affecting the schemas using definitions of this schema?
    Imagine i use a library schema with a lot of type definitions and other schemas import this schema because they need to use some of these types, then i have to update/reregister all the schemas. So any suggestions are welcomed.

    Please check if this helps:
    http://www.oracle.com/technology/oramag/oracle/03-jul/o43xml.html

  • XML Schemas and "Type"

    I'm having a brutal time working with this program, it doesn't even seem like it should be this hard. I won't get in to the situation yet, I keep tripping across other problems as I go. Here's the next one:
    According to Eclipse, I'm not allowed to put an element with a type if it also has a restriction, because the restriction seems to (as far as I can tell) automatially attach an "anonymous type" to the element. That is to say:
    <element name="foo" type="string">
        <simpleType>
            <restriction base="string">
                [restriction tags]
            </restriction>
        </simpleType>
    </element>doesn't work. It also doesn't work if I don't have a "base='x'" line, but that makes a bit more sense. On the other hand:
    <element name="foo">
        <simpleType>
            <restriction base="string">
                [restriction tags]
            </restriction>
        </simpleType>
    </element>
    does work, but causes a number of problems because "foo" no longer has a type to call its own. I'm sure I'm missing something here but I can't work out what.
    Here's the exact error from Eclipse's XML Schema Validator, which places an error on foo's declaration line:
    "Multiple Annotations found on this line:
    - src-element.3: Element 'foo' has both a 'type' attribute and a 'anonymous type' child. Only one of these is allowed for an element.
    - Element type "element" must either be followed by attribute types, '>' or '/>'."
    Any help would be appreciated, thanks. :)

    As the message below indicates you are defining a new simple type but in line with the element definition (enclosed by element tags). As it is in-line it is classed as an anonymous type i.e. has no name. You therefore cannot give an element a type and then specify its type in line.
    Athough essentially it is a string (hence requires base type) it is nontheless a new type i.e a string with restrictions. The other way to do this, which will allow you to reuse the type is is as follows
        <xsd:element name="foo" type="myRestrictedString"/>
        <xsd:element name="foo2" type="myRestrictedString"/>
        <xsd:simpleType name="myRestrictedString">
            <xsd:restriction base="xsd:string">
                <xsd:pattern value="[0-9]{3}"/>
            </xsd:restriction>
        </xsd:simpleType>
    >
    "Multiple Annotations found on this line:
    - src-element.3: Element 'foo' has both a 'type'
    attribute and a 'anonymous type' child. Only one of
    these is allowed for an element.
    - Element type "element" must either be followed by
    attribute types, '>' or '/>'."

  • XML Schema Class Generator Problem compiling generated java programs

    Hi,
    I ran oracg on the po.xsd schema from X3Cs XML Schema Part 0: Primer which successfully generated the java codes. I ran into problems when I compile the generated classes. Here's what I'm getting:
    C:\oracle\xml\xdk\demo\java\classgen\Po2>javac -classpath ".;C:\oracle\xml/lib/xmlparserv2.jar;C:\oracle\xml/lib/xschema.jar;C:\oracle\xml/l
    ib/classgen.jar;.;C:\Program Files\VicunaJ521\java\lib\collections.jar;C:\Program Files\VicunaJ521\java\lib\vicunalite.jar;C:\Program Files\
    XConverter\XConverter.jar;C:\Program Files\XConverter\IDLGenerator.jar; c:\jdk1.2.2\lib\dt.jar;c:\jdk1.2.2\lib\jvm.jar;c:\jdk1.2.2\lib\tools
    .jar;c:\oracle\ora81\jdbc\lib\classes12.zip;c:\oracle\ora81\jdbc\nls_charset12.zip;C:\oracle\xml\lib\classgen.jar;C:\oracle\xml\lib\xmlparse
    rv2.jar" *.java
    .\types\PurchaseOrderType.java:75: Type expected.
    public void addComment(null.Comment thecomment)
    ^
    .\types\Items.java:141: Type expected.
    public void addComment(null.Comment thecomment)
    ^
    2 errors
    Running the demo which comes with oracles version of po.xsd was OK. What's the difference between the po.xsd from oracle and the po.xsd from W3C? Are there any W3C recommendation for XML Schema not supported by Oracle's class generator?

    Which po.xsd do you use? Would you post it?
    Thanks. Here's the copy of the po.xsd from the W3C website. (http://www.w3.org/TR/xmlschema-0/#po.xsd)
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:annotation>
    <xsd:documentation xml:lang="en">
    Purchase order schema for Example.com.
    Copyright 2000 Example.com. All rights reserved.
    </xsd:documentation>
    </xsd:annotation>
    <xsd:element name="purchaseOrder" type="PurchaseOrderType"/>
    <xsd:element name="comment" type="xsd:string"/>
    <xsd:complexType name="PurchaseOrderType">
    <xsd:sequence>
    <xsd:element name="shipTo" type="USAddress"/>
    <xsd:element name="billTo" type="USAddress"/>
    <xsd:element ref="comment" minOccurs="0"/>
    <xsd:element name="items" type="Items"/>
    </xsd:sequence>
    <xsd:attribute name="orderDate" type="xsd:date"/>
    </xsd:complexType>
    <xsd:complexType name="USAddress">
    <xsd:sequence>
    <xsd:element name="name" type="xsd:string"/>
    <xsd:element name="street" type="xsd:string"/>
    <xsd:element name="city" type="xsd:string"/>
    <xsd:element name="state" type="xsd:string"/>
    <xsd:element name="zip" type="xsd:decimal"/>
    </xsd:sequence>
    <xsd:attribute name="country" type="xsd:NMTOKEN"
    fixed="US"/>
    </xsd:complexType>
    <xsd:complexType name="Items">
    <xsd:sequence>
    <xsd:element name="item" minOccurs="0" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="productName" type="xsd:string"/>
    <xsd:element name="quantity">
    <xsd:simpleType>
    <xsd:restriction base="xsd:positiveInteger">
    <xsd:maxExclusive value="100"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="USPrice" type="xsd:decimal"/>
    <xsd:element ref="comment" minOccurs="0"/>
    <xsd:element name="shipDate" type="xsd:date" minOccurs="0"/>
    </xsd:sequence>
    <xsd:attribute name="partNum" type="SKU" use="required"/>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    <!-- Stock Keeping Unit, a code for identifying products -->
    <xsd:simpleType name="SKU">
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="\d{3}-[A-Z]{2}"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:schema>

  • Unable to create xml from xml schema

    JDeveloper 10.1.3 EA1
    I am unable to create a new xml file from an xml schema when the starting root element is a complex type (but it works with a simple type). It does not matter if the xml schema is registered within JDeveloper.
    Is this a bug or intended behaviour?
    Error message:
    ''XML Document from XML Schema creation could not be competed succesfully. Make sure the source schema is valid and that you have write permissions to the output directory."
    NB The xml schema is valid and I have write permissions on the specified directory.

    When I do not register this (or other) schema with JDeveloper, I can create an xml document from xml schema. However, when I register this schema and then try to generate an xml document (either from the registered xsd either from a filesystem xsd) with person as starting node it fails with the mentioned error. However, when I use city as starting node it is generated successfully.
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.amis.nl/demo/hrm"
    targetNamespace="http://www.amis.nl/demo/hrm"
    elementFormDefault="qualified">
    <xsd:element name="person">
    <xsd:annotation>
    <xsd:documentation>
    A sample complex element
    </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="name" type="xsd:string"/>
    <xsd:element name="length" type="xsd:int"/>
    <xsd:element name="weight" type="xsd:int" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="city" type="xsd:string">
    <xsd:annotation>
    <xsd:documentation>
    A sample simple element.
    </xsd:documentation>
    </xsd:annotation>
    </xsd:element>
    </xsd:schema>

  • How can I  refer an xml  Schema that was registred in Oracle xml DB

    How can I refer an xml Schema that was registred in Oracle xml DB, from other xml schema?
    I have the follow schema,:
    <?xml version="1.0" encoding="AL32UTF8"?>
    <xsd:schema targetNamespace="schemastipostasa.xsd"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb/XDBSchema.xsd"
    elementFormDefault="unqualified" version="1.0"
    attributeFormDefault="unqualified">
    <xsd:simpleType name="codigosType" xdb:SQLType="NUMBER(4)">
    <xsd:restriction base="xsd:positiveInteger" >
    <xsd:totalDigits value="4" />
    </xsd:restriction>
    </xsd:simpleType >
    <xsd:simpleType name="integerUnoType" xdb:SQLType="NUMBER(1)">
    <xsd:restriction base="xsd:int" >
    <xsd:totalDigits value="1" />
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="condicionType" xdb:SQLType="VARCHAR2(1)">
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="S" >
    <xsd:annotation>
    <xsd:documentation>Condicion si es S</xsd:documentation>
    </xsd:annotation>
    </xsd:enumeration>
    <xsd:enumeration value="N" >
    <xsd:annotation>
    <xsd:documentation>Condicion no es N</xsd:documentation>
    </xsd:annotation>
    </xsd:enumeration>
    </xsd:restriction>
    </xsd:simpleType >
    </xsd:schema>
    I registred the schema written above with the folowwing pl*sql :
    DECLARE
    direc varchar2(2000);
    nombreArch BFILE;
    mens varchar2(2000);
    BEGIN
    direc:=uso_comun.pack_mail.fun_valor_param('TASA','DIR_DBSERVER');
    nombreArch:=bfilename(direc,'schemas_tipos_tasa.xsd');
    DBMS_XMLSCHEMA.registerSchema(
    SCHEMAURL => 'http://xmlns.oracle.com/tasa/schemas.tipos.tasa.xsd',
    SCHEMADOC => nombreArch,
    LOCAL => TRUE,
    CSID => nls_charset_id('AL32UTF8'));
    dbms_lob.CLOSE(nombreArch);
    dbms_output.put_line('salio sin cancelar');
    exception
    when others then
    mens:=sqlerrm;
    dbms_lob.CLOSE(nombreArch);
    rollback;
    raise_application_error (-20001,'en registro shcema='||mens);
    END;
    Then, I want to register the following schema, that mention de schema above:
    <?xml version="1.0" encoding="AL32UTF8"?>
    <xsd:schema targetNamespace="schema.repuesto.xsd"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb/XDBSchema.xsd"
    xmlns:tns="http://xmlns.oracle.com/tasa/schemas.tipos.tasa.xsd"
    elementFormDefault="qualified" version="1.0"
    attributeFormDefault="unqualified" >
    <xsd:element name="PRECIORENG" type="preciorepType" />
    <xsd:complexType name="preciorepType" >
    <xsd:sequence minOccurs="1" maxOccurs="unbounded">
    <xsd:element name="CODIGO_MARCA" type="tns:codigosType" />
    <xsd:element name="ORIGEN_PRECIO" type="tns:integerUnoType" />
    <xsd:element name="INGRESO_POR_FALTANTE" type="tns:condicionType" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    But when a run the following script whith the same db-user:
    DECLARE
    direc varchar2(2000);
    nombreArch BFILE;
    mens varchar2(2000);
    BEGIN
    direc:=uso_comun.pack_mail.fun_valor_param('TASA','DIR_DBSERVER');
    -- nombreArch:=bfilename(direc,'prueba_schema_seis.xsd');
    nombreArch:=bfilename(direc,'Schema_repuesto_nuevo.xsd');
    DBMS_XMLSCHEMA.registerSchema(
    SCHEMAURL =>'http://xmlns.oracle.com/tasa/schema.repuesto.xsd',
    SCHEMADOC => nombreArch,
    LOCAL => TRUE,
    CSID => nls_charset_id('AL32UTF8'));
    dbms_lob.CLOSE(nombreArch);
    dbms_output.put_line('salio sin cancelar');
    --commit;
    exception
    when others then
    mens:=sqlerrm;
    dbms_lob.CLOSE(nombreArch);
    rollback;
    raise_application_error (-20001,'en registro shcema='||mens);
    END;
    tell me the error: ORA: 01031, insufficient privileges!!!!, what’s wrong??,

    Hi,
    To register schema, you require XDBADMIN system privilege granted to the user.
    Please verify this and retry.
    Rgds,
    Rakesh Tripathi

  • Help me some xml scheme problem

    hi, everybody
    I'm have some question about xml document, that can have xml scheme more than one on a document ?. please.

    I want put 2 xml schemes,a.xsd and b.xsd, in a xml document.
    Example:
    <?xml version="1.0" encoding="UTF-8"?>
    <selfTest xmlns="mySelfTestNameSpace"
    xmlns:myNameSpace="myTestComplexType"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="mySelfTestNameSpace D:\My-Work\MasterDegree\Thesis-Lab\selfTest.xsd myTestComplexType
    D:\My-Work\MasterDegree\Thesis-Lab\testComplexType.xsd">
         <ElementA></ElementA>
         <ElementB>valueEleB1</ElementB>
         <myNameSpace:hMessageInfo childOfMsgAttri="xxx" domain="top" port="001">
              <myNameSpace:Message></myNameSpace:Message>
         </myNameSpace:hMessageInfo>
    </selfTest>
    // In example If removed Element:<myNameSpace:hMessageInfo> .... , It can validated, but If take with above the error message follow.
    - Error Message
    This file is not valid:
    Unexpected child element 'myNameSpace:hMessageInfo'
    File: selfTest.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by SE (TU) -->
    <xs:schema targetNamespace="mySelfTestNameSpace" xmlns:mySelftTest="mySelfTestNameSpace" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="selfTest" type="mySelftTest:TranstionType">
              <xs:annotation>
                   <xs:documentation>Comment describing your root element</xs:documentation>
              </xs:annotation>
         </xs:element>
         <xs:complexType name="TranstionType">
              <xs:sequence>
                   <xs:element name="ElementA">
                        <xs:complexType>
                             <xs:simpleContent>
                                  <xs:extension base="xs:string">
                                       <xs:attribute name="attriElementA" type="xs:string"/>
                                  </xs:extension>
                             </xs:simpleContent>
                        </xs:complexType>
                   </xs:element>
                   <xs:element name="ElementB">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="valueEleB1"/>
                                  <xs:enumeration value="valueEleB2"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
              </xs:sequence>
              <xs:attribute name="externalTranstion">
                   <xs:simpleType>
                        <xs:restriction base="xs:string">
                             <xs:enumeration value="aa"/>
                             <xs:enumeration value="bb"/>
                        </xs:restriction>
                   </xs:simpleType>
              </xs:attribute>
         </xs:complexType>
    </xs:schema>
    File:testComplexType.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by SE (TU) -->
    <xs:schema targetNamespace="myTestComplexType" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:testComplexType="myTestComplexType" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="test">
              <xs:annotation>
                   <xs:documentation>Comment describing your root element</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="hMessageInfo" type="testComplexType:ChildOfMsgInfo"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:complexType name="MessageInfo">
              <xs:sequence>
                   <xs:element name="Message">
                        <xs:complexType>
                             <xs:simpleContent>
                                  <xs:extension base="xs:string"/>
                             </xs:simpleContent>
                        </xs:complexType>
                   </xs:element>
              </xs:sequence>
              <xs:attribute name="domain">
                   <xs:simpleType>
                        <xs:restriction base="xs:string">
                             <xs:enumeration value="top"/>
                             <xs:enumeration value="bottom"/>
                        </xs:restriction>
                   </xs:simpleType>
              </xs:attribute>
              <xs:attribute name="port" type="xs:string"/>
         </xs:complexType>
         <xs:complexType name="ChildOfMsgInfo">
              <xs:complexContent>
                   <xs:extension base="testComplexType:MessageInfo">
                        <xs:attribute name="childOfMsgAttri" type="xs:string"/>
                   </xs:extension>
              </xs:complexContent>
         </xs:complexType>
    </xs:schema>

  • Jax-ws and xml schema

    hello,
    i'm developping a web service that returns an object person(String name, int age) as result, when generating my wsdl using jax-ws I've found that just the name of the xml schema representing my object person is present (relatif path), so i want either to generate the absolute path in my wsdl or to incorporate the xsd in it.
    thanks.

    chutchai.chailuecha wrote:
    Are there any part in JAX-WS, JSR181, JSR109 specification or any document state something about how a Java EE container should discover the webservices annotation? Hi,
    i only know about JSR181 (chapter "processor responsibilities" or something...)
    maybe on https://glassfish.dev.java.net/ people will tell you, how they are processed on glassfish server.
    Regards

  • Removing xml schema fails

    When i try to remove an xml schema using the enterprise manager (10.1.0.2.0) console i receive the following error:
    VB0-8051: ...
    ORA-31000: Resource ... is not an xdb-schema document
    ORA-06512: in XDB.DBMS_XMLSCHEMA_INT: row 70
    ORA-06512: in XDB.DBMS_XMLSCHEMA: row 103
    ORA-06512: in row 1
    Thanks for any hint,
    Christian
    What i see in the schema code (see below) is that the <xs:schema>-tag is directly following the comment.
    Even if i register a schema without a comment, i can't remove it from xdb :-((((
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!-- edited with XMLSpy v2005 sp2 U (http://www.altova.com) by --><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:oraxdb="http://xmlns.oracle.com/xdb" oraxdb:flags="279" oraxdb:schemaURL="stdb1296/objects.xsd" oraxdb:schemaOwner="ISMED_XML" oraxdb:numProps="12">
    <xs:element name="objects" oraxdb:propNumber="2408" oraxdb:global="true" oraxdb:SQLName="objects" oraxdb:SQLType="objects137_T" oraxdb:SQLSchema="ISMED_XML" oraxdb:memType="258" oraxdb:defaultTable="objects143_TAB" oraxdb:defaultTableSchema="ISMED_XML">
    <xs:annotation>
    <xs:documentation>Top level element als Klammer über alle Instanzen.</xs:documentation>
    </xs:annotation>
    .....

    Christian,
    I run the following code from sql to remove the schemas I register.
    I've noticed when I try to register schemas multiple times I will get errors.
    I got this code from one of the XML documents or XDB documents. I don't remember where I found it. You may be able to do a search if you want more information.
    declare
    unregistered_schema exception;
    PRAGMA EXCEPTION_INIT( unregistered_schema -31000 );
    begin
    dbms_xmlschema.deleteschema('schemaregisterednamehere',dbms_xmlschema.DELETE_CASCADE_FORCE);
    exception
    when unregistered_schema then
    null;
    end;

Maybe you are looking for