Database schema generation from an XML schema

From XDK FAQ:
Question:
Given a DTD, will XML SQL Utility generate the database schema?
Answer:
No. Due to a number of shortcomings of the DTD, this >functionality is not available. Once the W3C XML Schema >recommendation is finalized this functionality will become >feasible.Has this capability been implemented yet? I want to go from an XML schema to a database schema. If not is it still in the plan to do so? Are there other tools someone can recommend that can do this?
Thanks,
John

The XML Schema support will be part of XDB in 9i Release 2.

Similar Messages

  • Creating an XML instance from an XML Schema

    Hello,
    Does anyone know how to create a skeleton XML instance from the mandatory fields taken from an XML Schema?
    There might be a way with XSLT, however I cannot find the relevant tutorials for this issue.
    Can you please help me out?
    Thanks.

    Of course I meant how to achieve this "on the fly" using XSLT and Java.

  • Urgent: Help required for fetching CHILDNODE from an XML schema.

    Hi All,
    Good Morning to all, i have problem in extracting the child node name. I have created a xml schema say "emrxmlsample3.xsd" based on this schema i have created a xmltype table and inserted a value to the table. I have a problem in fetching the "CHILDNODE" name. Kindly help me in solving this problem. Here by i am posting all the workings i have done...
    I am using the following client:
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 31 11:44:59 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    ////////////////////////////////// XML Schema ///////////////////////
    begin
    dbms_xmlschema.registerSchema(
    'http://www.oradev.com/emrxmlsample3.xsd',
    '<schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.oradev.com/emrxmlsample3.xsd"
    xmlns:samp="http://www.oradev.com/emrxmlsample3.xsd"
    version="1.0">
         <element name="HISTORY">
              <complexType>
                   <sequence>
                        <element name="HPI">
                             <complexType>
                                  <sequence>
                                       <element name = "PAIN">
                                            <complexType>
                                                 <sequence>
                                                      <element name = "SET">
                                                           <complexType>
                                                                <sequence>
                                                                     <element name = "LOCATION">
                                                                          <complexType>
                                                                               <sequence>
                                                                                    <element name = "HEAD" type = "string"/>
                                                                                    <element name = "NECK" type = "string"/>
                                                                                    <element name = "BACK" type = "string"/>                                                       
                                                                                    <element name = "CHEST" type = "string"/>                                                       
                                                                                    <element name = "ABDOMEN" type = "string"/>     
                                                                                    <element name = "JOINTS" type = "string"/>     
                                                                                    <element name = "OTHERS" type = "string"/>
                                                                               </sequence>
                                                                          </complexType>
                                                                     </element>
                                                                     <element name = "SEVERITY">
                                                                          <complexType>
                                                                               <sequence>
                                                                                    <element name = "MILD" type = "string"/>
                                                                                    <element name = "MODERATE" type = "string"/>
                                                                                    <element name = "SEVERE" type = "string"/>                                                       
                                                                                    <element name = "VERYSEVERE" type = "string"/>                                                       
                                                                               </sequence>
                                                                          </complexType>
                                                                     </element>     
                                                                     <element name = "CHARACTER">
                                                                          <complexType>
                                                                               <sequence>
                                                                                    <element name = "DIFFUSE" type = "string"/>
                                                                                    <element name = "PRICKING" type = "string"/>
                                                                                    <element name = "CUTTING" type = "string"/>                                                       
                                                                                    <element name = "PIERCING" type = "string"/>                                                       
                                                                               </sequence>
                                                                          </complexType>
                                                                     </element>                                                                      
                                                                </sequence>
                                                           </complexType>      
                                                      </element>
                                                 </sequence>     
                                            </complexType>
                                       </element>
                                  </sequence>
                             </complexType>
                        </element>
                   </sequence>
              </complexType>
         </element>
         </schema>',
    TRUE, TRUE, FALSE, FALSE);
    end;
    ////////////////////////// Table which has multiple Column //////////////////////////
    CREATE TABLE chipsemr3 (
    id number, CHIPSEMR XmlType)
    XMLTYPE CHIPSEMR STORE AS OBJECT RELATIONAL
    XMLSCHEMA "http://www.oradev.com/emrxmlsample3.xsd"
    ELEMENT "HISTORY";
    ///////////////////////////////// Insert Query in chipsxmltable //////////////////////////
    INSERT INTO chipsemr3 VALUES(1,
    xmltype.createxml('<?xml version="1.0"?>
    <samp:HISTORY xmlns:samp="http://www.oradev.com/emrxmlsample3.xsd" >
              <HPI>
                   <PAIN>
                        <SET>
                             <LOCATION>
                                  <HEAD> YES </HEAD>
                                  <NECK> NO </NECK>
                                  <BACK> N </BACK>
                                  <CHEST> N </CHEST>
                                  <ABDOMEN> N </ABDOMEN>
                                  <JOINTS> N </JOINTS>
                                  <OTHERS> N </OTHERS>
                             </LOCATION>
                             <SEVERITY>
                                  <MILD> N </MILD>
                                  <MODERATE> N </MODERATE>
                                  <SEVERE> N </SEVERE>
                                  <VERYSEVERE> N </VERYSEVERE>
                             </SEVERITY>
                             <CHARACTER>
                                  <DIFFUSE> N </DIFFUSE>
                                  <PRICKING> N </PRICKING>
                                  <CUTTING> N </CUTTING>
                                  <PIERCING> N </PIERCING>
                             </CHARACTER>
                        </SET>
                   </PAIN>
              </HPI>
    </samp:HISTORY>'));
    To show the Root Node Name:
    1. Query
    select x.CHIPSEMR.getrootelement() CHIPSNODES from chipsemr3 x, table(xmlsequence(x.CHIPSEMR.extract('//node()'))) x
    Apologies if the description is not clear. Kindly let me know if further details are needed. Many thanks for your help.
    Very best regards,
    Godwin Jebakumar C.V.

    Hi,
    I'm not sure what you want actually.
    You can get all elements names with :
    SELECT value(x).getRootElement() chipsnodes
    FROM chipsemr3 t,
         TABLE(
           XMLSequence(
             Extract(t.chipsemr, '//*')
         ) x
    ;or, starting with 10.2 :
    SELECT x.*
    FROM chipsemr3 t,
         XMLTable(
          'for $i in //* return local-name($i)'
          passing t.chipsemr
          columns chipsnode varchar2(30) path '.'
         ) x
    ;

  • How to generate a XML file from a XML schema...?

    Hi guys...!
    I have a XML schema and I want to write a XML file based on that schema. I have heard about this feature that eclipse has, which given a XML schema, can generate a XML file for you.
    Does anyone of you know about this feature? or is there another way to do it. The schema that I have is very huge...
    I will really appreciate any help from you guys...
    Thank...you..
    --- Spirit Away...

    don't cross post
    http://forum.java.sun.com/thread.jspa?threadID=649205&tstart=10

  • Forms pulling Multiple Records from an XML Schema and XML data files - Adobe LiveCycle Designer

    I built a form in Adobe LiveCycle with an xml schema and data file.  The problem is with how the form renders the xml data file.
    I have a statement element that consists of about 6 fields (statementID, statementName, statementAddress, statementCountry, statementZip, statementDate, etc) of data in the schema that allows for multiple iterations - so one xml data file can contain multiple statements. These fields allow for null values.
    But here's the problem:  When any of the statements - say statement 2 of 6 - has a null value in one of the fields, if the xml data file doesn't have a placeholder
    (example of placeholder:  <statementName type="String"/>   )in the xml for that field, my form pulls the field value from the NEXT statement.
    This corrupts all the rest of the statement records, as this field is shifted up for all the rest.
    I know that in the past I haven't needed a placeholder when a field was null. But I'm wondering if when the data allows for multiple records the xml data file needs to generate the placeholder.  And where is the problem? In the Schema? The xml data file? My form?  And the 64-thousand-dollar question:  How to fix it?

    If your <statement> element is the one that repeats, it should be bound to a subform with the binding string of something like $.statement[*]. Then in that subform should be your fields and they should have bindings of $.statementID, $.statementName, $.statementAddress, etc.
    Kyle

  • Get schemaURL from registered XML Schema

    Hallo,
    I need to find out the schemaURL from an registered schema? My only available data is the xml schema itself as an xmltype variable. I know there is the all_xml_schemas view with the schema_url column but it is not possible to compare the all_xml_schemas.schema column with my xmltype variable.
    Can anybody help me?
    Thanks

    If you have the registered version of the XML Schema in an XML variable it should be
    schemaURL := xml.extract('/xsd:schema/@xdb:schemaURL','xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb"')
    M.

  • How to fire a schema trigger from outside the schema

    A user is using an ad hoc tool similar to SQL Developer called PeopleSoft Application Designer.
    He creates a connection to the db, then issues an alter session set current_schema = 'restricted_schema'. The connected user does not have direct privileges on the "restricted_schema" which they call SYSADM.
    After changing the schema context in that manner he creates objects in SYSADM. A schema trigger is then fired and grants privileges on the new objects created in SYSADM. Doing the same in either SQL Plus or SQL Developer does not fire the schema trigger.
    I think SQL Plus and SQL Dev are working as they should. Altering the session like that does not change your identity - just the schema context. But, when you examine v_$session, the connection with this other tool looks exactly the same as one from SQL Plus or SQL Dev when changing the schema context in the session.
    Instead of trying to figure out what this other tool is doing, is there any way for that schema trigger to fire when using this process from one of our tools?

    >
    A user is using an ad hoc tool similar to SQL Developer called PeopleSoft Application Designer.
    He creates a connection to the db, then issues an alter session set current_schema = 'restricted_schema'. The connected user does not have direct privileges on the "restricted_schema" which they call SYSADM.
    After changing the schema context in that manner he creates objects in SYSADM. A schema trigger is then fired and grants privileges on the new objects created in SYSADM. Doing the same in either SQL Plus or SQL Developer does not fire the schema trigger.
    >
    The user CANNOT create objects in any schema without the proper privileges.
    Setting the current_schema parameter does not confer ANY additional privileges to a user. See ALTER SESSION in the SQL language doc
    http://docs.oracle.com/cd/E14072_01/server.112/e10592/statements_2013.htm
    >
    CURRENT_SCHEMA
    Syntax:
    CURRENT_SCHEMA = schema
    The CURRENT_SCHEMA parameter changes the current schema of the session to the specified schema. Subsequent unqualified references to schema objects during the session will resolve to objects in the specified schema. The setting persists for the duration of the session or until you issue another ALTER SESSION SET CURRENT_SCHEMA statement.
    This setting offers a convenient way to perform operations on objects in a schema other than that of the current user without having to qualify the objects with the schema name. This setting changes the current schema, but it does not change the session user or the current user, nor does it give the session user any additional system or object privileges for the session.
    >
    If the user connects and sets SYSADM as the current schema and creates objects in SYSADM the user already had privileges to create objects in the SYSADM schema; setting the current schema has nothing to do with it.
    So your issue is that the user has privileges to create objects in the SYSADM schema; you need to revoke those privilges (or the role that grants them) to solve your problem.

  • Generation of java classes from XML Schema.

    Hi All,
    I am working with JWSDP-2.0 but got stucked.:
    To generate Java classes from an XML Schema with the JAXB ,I need to have following jar file in thils location with this JWSDP-2.0
    <JWSDP>/jaxb/lib/jaxb-api.jar
    <JWSDP>/jaxb/lib/jaxb-impl.jar
    <JWSDP>/jaxb/lib/jaxb-libs.jar
    <JWSDP>/jaxb/lib/jaxb-xjc.jar
    <JWSDP>/jwsdp-shared/lib/namespace.jar
    <JWSDP>/jwsdp-shared/lib/jax-qname.jar
    <JWSDP>/jwsdp-shared/lib/relaxngDatatype.jar
    And here I m not finding as jaxb-libs.jar,namespace.jar and jax-qname.jar on respective location.
    If I m putting these left jar file from another place it is not generating all the classes as at least in number it should be 45 but it is generating merely 5 classes.
    Can any one help me regarding this.
    Regards.
    Shelly.

    These JAXB JAR files are for JAXB 1.0.
    For JAXB 2.0 the following JAR files are required.
    C:\Sun\jwsdp-2.0\jaxb\lib\jaxb-api.jar
    C:\Sun\jwsdp-2.0\jaxb\lib\jaxb-impl.jar
    C:\Sun\jwsdp-2.0\jaxb\lib\jaxb-xjc.jar
    C:\Sun\jwsdp-2.0\jwsdp-shared\lib\activation.jar
    C:\Sun\jwsdp-2.0\sjsxp\lib\jsr173_api.jar
    C:\Sun\jwsdp-2.0\sjsxp\lib\sjsxp.jar

  • Generate XML Schema from Java classes?

    Hi,
    Considering an XML Mapping, i would like to generate a default XML Schema from my Java class.
    Is there a tool in toplink (10.1.3) to do that or does anyone have an easy way to generate this XML schema?
    Thanks,
    Ludovic

    Hi Ludovic,
    We don't have support for schema generation from Java classes in TopLink 10.1.3. It's required for JAXB 2.0 so it will be available in a future release.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                           

  • Create table from XML schema

    HI,
    is there any possibilty to create a relational table from a XML schema?

    Can you use a schema when we compose XML doc from Database tables?
    Actually, I'm using SQL Server (sorry, wrong forum). But, I thought a Java tool would have a solution for me.

  • XML Schema validator fails to load XML Schema from URL

    I'm trying to validate an XML document against a set of XML Schemas and the parser seems to freak out: even though all the schemas are referred to in the XML and are properly recognized by Schemas field in XML document properties, I get warnings (multiple
    instances):
    Request for the permission of type 'System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed
    Cannot resolve the 'schemaLocation' attribute
    The schema referenced from this location in your document contains errors
    The warning locations are also seemingly random - errors in schema locations are reported on closing tags inside XML or on whitespaces, and so on.
    The first warning (System.Net.WebPermission) suggests it has something to do with access to remote schemas, but all the necessary remote schemas are visible in XML Schema Set editor for the document. I also enabled downloading of XML schemas in XML text
    editor options.

    Hi Tomasz,
    Thank you for posting in MSDN forum.
    Since this issue is related to the XML Schemas, so we will move this case to the XML forum:https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=xmlandnetfx
    , you will get better support.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • XML Document from XML Schema Bug

    When an XML document is generated from an XML Schema the XML document does not have all the elements specified in the XML Schema. The XML document only has the root element.
    1. Register an XML Schema.
    2. Create an XML document with File>New>General>XML>XML Document from XML Schema. The "Generate only Required Elements" is unchecked.
    3. The XML document has only the root element.
    In JDeveloper 10.1.3 all the elements in the XML Schema get generated.

    Also, the component palette for the XML document generated from the XML Schema does not list all the elements in the XML Schema, only the root element is listed. Even if elements are specified as required in the XML Schema with minOccurs="1" and the "Generate only Required Elements" checkbox is selected only the root element gets generated.

  • 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>

  • GUI built from  Xml schema

    I want to edit my Xml through the GUI .This GUI built from My Xml schema file .This is my requirement tell me how to achieve my requirement .you have any sample code please forward it to me .my platform is java .
    For example: NetBeans IDE provide the GUI for edit the web.xml file .
    Thanks in Advance ,
    With Regards,
    Ganesh kumar.L

    Also, the component palette for the XML document generated from the XML Schema does not list all the elements in the XML Schema, only the root element is listed. Even if elements are specified as required in the XML Schema with minOccurs="1" and the "Generate only Required Elements" checkbox is selected only the root element gets generated.

  • Create xml from xml schema in java

    If can i create a xml document framework from xml schema in java, then i can fill the value in java?
    thanks

    An XML document may be created from an XML Schema with JAXB.

Maybe you are looking for