Generating DTD's from an existing DB schema

We have an existing schema defined by a large number of table creates. We need our messaging infrastructure to be in XML.
Use of the Oracle XDK and associated tools and components looks very promising for the problem before us. We are faced with writing the required XSQL, XSLT and "INSTEAD OF" triggers etc. of course ..... but my question is this: Is there a utility or product that can scan out schema definitions and generate a reasonable set of matching DTD's that would define nested elements taking account of the associated one-to-many relationaships in our schema? Or are we bound to do this also by hand?
Here is a trivial example:
+++++++++++++++++++
drop table Account;
drop table AcctUser;
create table Account (
accName varchar ( 50 ) primary key,
description varchar ( 255 )
create table AcctUser (
userName varchar ( 255 ),
acctID varchar ( 50 ),
foreign key (acctID) references Account( accName ),
description varchar( 255 )
++++++++++++++++++++
would be run though such a tool and
give us something like the following:
<!ELEMENT Account (User+)>
<!ATTLIST Account accName CDATA #REQUIRED
description CDATA #IMPLIED >
<!ELEMENT AcctUser EMPTY>
<!ATTLIST AcctUser userName CDATA #REQUIRED
description CDATA #IMPLIED >
++++++++++++++++++++++++++++++++
Evan if we could get 90% of the way there
and then have to refine by hand, it would be a big win.
Does anyone know of such a beast?
Thanks,
-- Mike Berrow
-- InsureZone
null

Ooops ... of course, I meant ....
<!ELEMENT Account (AcctUser +)>
<!ATTLIST Account accName CDATA #REQUIRED
description CDATA #IMPLIED >
<!ELEMENT AcctUser EMPTY>
<!ATTLIST AcctUser userName CDATA #REQUIRED
description CDATA #IMPLIED >
-- Mike Berrow
null

Similar Messages

  • How to generate .DTD file from IDOC?

    Dear All,
    On behalf of my colleague,
    How to generate .DTD file from IDOC? I want to generate this file for importing into the WebMethod Tool. Please share relevant content regarding the same.
    IDOC name is: BOMMAT01
    Let me know if you need any other information.
    Regards,
    JK

    Hi Jitendra,
    When PI receives idoc from ECC it will be in xml format.
    Are you telling that you want to convert this xml to .dtd file?
    check this for converting xml into .dtd file.
    How to convert XML file into DTD or XSD
    could you please explain about what you are doing in this requirement?
    After importing into WebMethod what is the next action?
    do they want to send the file to PI?

  • Generate XML instance from a given XSD schema

    Is there an Oracle XDK Java API, which given an XSD as input, will
    generate a sample XML instance corresponding to that XSD.
    XMLSpy Tool can do this.
    I know JAXB can be used to generate Java Classes, which can then be used programmatically to generate XML Instances.
    I am looking for a solution other than JAXB where Java classes does not need to be generated.

    In JDeveloper an XML document instance may be generated from an XML Schema.
    Select File>New>General>XML. Select XML Document from XML Schema in Items listed. Click on OK button. The Create XML Document from XML Schema wizard gets started. Click on Next button. In File Location frame, specify XML file name. Select Use Registered Schemas, to create an XML document from a registered schema. Click on Next button. In Options frame, select Root Element and click on Next button. In the Finish frame, click on Finish button. An XML document instance gets added. The XML document has all of the elements defined in the XML Schema from which the XML document is instantiated.

  • Generating PL/SQL from WSDL or XML Schema

    Has anybody built a code generator that will read a WSDL or an XSD and generate a skeleton of the appropriate PL/SQL code for shredding documents.
    I'm needing to do a bunch of shredding for schemas. One option appears to be to load the schemas into XMLTypes, add annotations, and get the database to handle it. I'll be looking at that.
    But another would be to have a program (PL/SQL or other) which would read the WSDL or XSD and generate a skeleton that would read through the structure of the document and give me access to the elements without having to write all the XPATH statements manually.
    Just looking for the best approach where I can work at the right level of abstraction and minimize hand-coding.
    Thanks,
    -- jim

    One option appears to be to load the schemas into XMLTypes, add annotations, and get the database to handle it. I'll be looking at that. That's the correct approach.
    See the {forum:id=34} forum if you have specific questions regarding schema registration.

  • Batch process to generate thumbnail pictures from a long raw column

    Hello,
    I need to generate thumbnail pictures from already existing pictures. The existing pictures are stored in a long raw column, the option to convert to BLOB col is not possible at the moment so I'm stuck with long raws.
    Is there an easy way to generate those new pictures? do I have to build a form to download the picture, resize it and then upload it to the db in a loop for 16,000 pictures?
    Any ideas would be appreciated.
    Thanks,

    Sarvan,
    You can have MRP propose two lots of SFG2 based upon lot sizing.  For instance, if you always will want SFG2 to have orders of 50 each, then one way to achieve this would be to set the 'maximum lot size' to 50.  MRP1 Tab of the material master.
    There are other lotsizing methodologies that may be better suited to your business requirements as well.
    Lot-Size Calculation - Consumption-Based Planning (MM-CBP) - SAP Library
    Best Regards,
    DB49

  • Errors generating Java classes from XML schema

    I received the following errors when generating Java classes from the schema located at: http://imsproject.org/xsd/ims_qti_rootv1p1.xsd and http://imsproject.org/xsd/ims_xml.xsd
    XML Spy v4 claims that the schema is well-formed and valid. Could this be a problem with the class generators, or is XML Spy not telling the truth?
    Thanks.
    D:\IMS_QTI\Java>java -classpath .;lib/xmlparserv2.jar;lib/xschema.jar;lib/classgen.jar oracle.xml.classgen.oracg -schema ims_qti_rootv1p1.xs
    d -outputDir src\com\icld\qti -package com.icld.qti -comment
    file:/D:/IMS_QTI/Java/ims_qti_rootv1p1.xsd<Line 235, Column 21>: XSD-2209: (Error) Duplicated definition for: 'attr.view'
    file:/D:/IMS_QTI/Java/ims_qti_rootv1p1.xsd<Line 303, Column 21>: XSD-2209: (Error) Duplicated definition for: 'grp.labels'
    file:/D:/IMS_QTI/Java/ims_qti_rootv1p1.xsd<Line 1834, Column -12236>: XSD-2209: (Error) Duplicated definition for: 'qtimetadatafield'
    file:/D:/IMS_QTI/Java/ims_qti_rootv1p1.xsd<Line 1834, Column -9642>: XSD-2209: (Error) Duplicated definition for: 'typeofsolutionType'
    file:/D:/IMS_QTI/Java/ims_qti_rootv1p1.xsd<Line 2252, Column -3019>: XSD-2026: (Error) Invalid attribute 'use' in element 'attribute'
    Error: Schema Class Generator failed to generate classes. oracle.xml.parser.schema.XSDException: Duplicated definition for: 'attr.view'

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jinyu Wang ([email protected]):
    Which version are you using? I can't reproduce the error with 9.0.2B version.<HR></BLOCKQUOTE>
    Thanks for having a look at the problem. I am using the 9.0.2.0B version with Java 2 Standard Edition Build 1.3.1-b24. The classgen -version option returns 9.0.2.0b-beta - and xmlparserv2.jar and xschema.jar are from the same distribution. Running the corresponding DTD from the same source work fine - I'm just havinf this problem with the XSD. Anything else I should look at?

  • Java code to generate XML File from XML Schema

    Hi I need this asap... "Java code to generate XML File from XML Schema i.e XML Schema Definition, XSD file".
    Thankz in advance...

    JAXB has been available as an early release download for some time. There are also XML Binding packages available from Borland (JBuilder) and Castor. These tools create Java classes from a source document, xml,dtd etc. You can use these classes to marshal-unmarshal XML documents.
    Dave

  • Generate DTD from Report Writer

    I am generating XML output from Report Writer and sending out to clients . Client wants the DTD of the XML or the XML schemas .
    does anyone know how to generate them for my reports. I have lot of reports , so can we do them directly from Report Writer.

    tahnk you for your help
    while i tape
    http://diabdev.siege.france3.fr:7781/reports/rwservlet?clapbudg&destype=cache&desformat=DELIMITEDDATA&mimetype=application/vnd.ms-excel&p_user=MOURAVA&report=INT_RET_RECETTE.rdf
    i have an excel page whith this caractere
    %PDF-1.4
    1 0 obj
    &lt;&lt;
    /Creator (Oracle9iAS Reports Services)
    /CreationDate (Tue Mar 22 01:22:09 PM 2005)
    /Author (Oracle Reports)
    /Producer (Oracle PDF driver)
    /Title ()
    &gt;&gt;
    endobj
    5 0 obj
    &lt;&lt;/Length 6 0 R
    /Filter [ASCII85Decode /FlateDecode]
    &gt;&gt;
    stream
    Gb!;f9lJcU&A@C2m*05F;&gt;\ULD_so%11Ws"WO0pp5hs4F@(2#7keHTUHR[7CR)ir&gt;"gJ%j^3MNH
    bLtins-bZ6"2RR-A0;&lt;n.L_[kN!GT1irf+F4O($erZVr-RM&lt;ru@RUTej[I.,ZSuS1(M&rr,YO&3
    Q_\o@hJI?/"b'"jU.Fkt8Fa_O/S=GW-,7@t[ker,.,kBr7Rk7]MSSfQpDF&gt;a,ru[8D&)V,9#AKc
    S)8Yt&gt;,WYLf,LJPpkg9?8t+`SO/k#C`G*-(5nPO%n7l4N.#9^7]A+ifY:LV)BN^,9#bu8#DiaWg
    +%c&gt;)V2DMRH*5'5$+TWPk4-ou#7Ft6.O?V/n)pTl&lt;191STHRoNKe1E&gt;C=a&lt;%h9^^2,R!AcO#MjS
    T;8bH(F=(H==_"5r:Kp8kQ4m`;9n$'8$2Pk1\_2-eU1b&=aSb&Qnp/pKgF2\-(OQ,`l5N@N(e1H
    0L8H-bb^W%53Gdaa^W5kOkfDh-&^kcEI5Jh(R"r=+p.O7,r0\Na)J_p.em;T1islEDAu)Me*iHb
    &frZ[p=qa/4Br&lt;^\2O^/$fU*&gt;k^UIW`]6\X8[2JrM48\(X_iU;]=j8b_6:oY`Qq$3=(?/t?2E1j
    CpDlqKo_504aRo^efH^V&gt;O:\3f#Pd&lt;Mk-s,qUcX$Z#BTp)#Tr/2i#&gt;l*l.Qr"oCou.FoGrL1G/*
    N&lt;Qa@i:e26E.cmeT0IdMXLC,pH&gt;)\%jCG$JVVXhs9l??VPMKZRc&gt;tBIQ&lt;/hne-:\VEQD$7`_"c?
    _\Hg0\rAYISMA\CUYDh/K7X7cMM$o=47MQaSA\V[F\#4"lYIRhW#&gt;&gt;p0Kjp1(c,1*!`^&$,n-de
    BpBu]n^Um?H!-T$&lt;`a!AXP_&;EZ9N'!+f2YGe`*O;SnpZGYi)H.^CPocD\Mu[`cIX]W[L*bR)fZ
    4Z%@UFsJ\XdObk8R)&.ms$b1;Hk2P0\WfFQ+(Zn5.PBDNLQ!bpUtELBp0l*"W=fQEZV*gZ&=nMJ
    [:qH@&lt;$orqFVe]49j0_*Cp"%[]P3[T5'Smf,d[+4;MrKkXdY!:O&HnoWc;cp5#)]I=,g.X$#usN
    NAKE,EE90u*Dus89ErgnK8&BMQ#&dc;PTpl+Nr#_BE`nQB]636*am=8ZKS]kV//K*&lt;2%]+Fh%^q
    m0`L-oqBV,-QeC)2rXR_H,S*\02i?.Cj8(\2nV!#JJ_A+Bsum&lt;lYIj5&lt;Ru7YbSo@X02n1qKU&lt;Ll
    =7p0rUa3]I[nsGj&lt;6m!$EW.lY_Vbh!,%XLs`!hna(,J(&'TafJC(IP0TF5+0`MoF?2\aM=g_[#t

  • Hi I need this asap... "Java code to generate XML File from XML Schema"

    Hi all....
    I need this asap... "Java code to generate XML File from XML Schema i.e XML Schema Definition, XSD file".
    Thankz in advance...
    PS: I already posted in the afternoon... this is the second posting.

    take look at :
    http://sourceforge.net/projects/jaxme/
    this might help...

  • About generating Java classes from XSD Schema ???

    I need a powerfull tool to generate Java classes from XML Schema. I want that generated classes to have the option to validate XML(to be JAXP1.2 compliant).
    I used XML Spy 5.4 but the generated classes can't validate an XML file.
    Can you help me with other tools that:
    - generate Java classes from XSD
    - generate sample XML from XSD
    - are JAXP1.2 compliant(validate a XML file with a schema)
    Thanks.

    You can also use Castor: http://www.castor.org
    It generates classes from XML Schemas and enables data
    binding without writing any line of a fuckin SAX
    parser :-)I evaluated Castor and JAXB and while JAXB isn't perfect, it's got some things over Castor. Castor almost looks abandonded when I go to the site. The documentation just sort of trails off.

  • How to Read and Generate XML file from java code.

    hi guys,
    how to read the xml file (Condition :we know only DTD or Shema only).
    How to Generate the new xml file ?(using Shema )
    And one more how directly Generate the xml from DB?
    Pleas with code or any URL

    Using XMLbeans you can generate Java objects from an XSD schema (perhaps DTDs aswell)
    Then you can create an instance of the Document object and ask it to write itself.
    This will create an XML document complient to the schema.
    XMLBeans generates a "type" safe DOM where you can only ever have a structure compilent to you schema.
    matfud

  • Error when generating Java Classes from XSD

    I'm getting the following error when using oragc to generate Java classes from a schema:
    Error: Schema Class Generator failed to generate classes. oracle.xml.parser.schema.XSDException: Invalid facet 'pattern' in element 'simpleType'
    Any thoughts?
    Here's the part where it is getting the error:
    +111 <!-- Timestamp Type - Timezone portion is required and fractional seconds are prohibited -->
    +112 <xsd:simpleType name="TimestampType">
    +113 <xsd:annotation>
    +114 <xsd:documentation>Base type for a date and time stamp</xsd:documentation>
    +115 </xsd:annotation>
    +116 <xsd:restriction base="xsd:dateTime">
    +117 <xsd:pattern value="[1-9][0-9]{3}\-.+T[^\.]+(Z|[\+\-].+)" />
    +118 </xsd:restriction>
    +119 </xsd:simpleType>

    I would recommend using JAXB instead of the Oracle class generator. This will give a standards based object-to-XML platform.
    Oracle provides two JAXB implementations: one in the TopLink product, and the other in the XDK.
    For an example of using TopLink JAXB see:
    http://www.oracle.com/technology/products/ias/toplink/technical/tips/jaxb/index.htm
    TopLink also provides the ability to map existing Java objects to an existing XML Schema, for an example of this see:
    http://www.oracle.com/technology/products/ias/toplink/technical/tips/ox/index.htm
    -Blaise

  • Error while Generating PDF file from Datagridview .

    Hi every one,
         I'm trying to generate pdf file from datagridview,while executing my code getting nullvalue exception..
    Here is my code:
    private void btnexportPDF_Click(object sender, EventArgs e)
                //Creating iTextSharp Table from the DataTable data
                PdfPTable pdfTable = new PdfPTable(dataGridView1.ColumnCount);
                pdfTable.DefaultCell.Padding = 3;
                pdfTable.WidthPercentage = 30;
                pdfTable.HorizontalAlignment = Element.ALIGN_LEFT;
                pdfTable.DefaultCell.BorderWidth = 1;
                //Adding Header row
                foreach (DataGridViewColumn column in dataGridView1.Columns)
                    PdfPCell cell = new PdfPCell(new Phrase(column.HeaderText));
                    cell.BackgroundColor = new iTextSharp.text.BaseColor(240, 240, 240);
                    pdfTable.AddCell(cell);
                //Adding DataRow
                foreach (DataGridViewRow row in dataGridView1.Rows)
                    foreach (DataGridViewCell cell in row.Cells)
                        pdfTable.AddCell(cell.Value.ToString());//nullvalue exception
                //Exporting to PDF
                string folderPath = "C:\\PDFs\\";
                if (!Directory.Exists(folderPath))
                    Directory.CreateDirectory(folderPath);
                using (FileStream stream = new FileStream(folderPath + "DataGridViewExport.pdf", FileMode.Create))
                    Document pdfDoc = new Document(PageSize.A2, 10f, 10f, 10f, 0f);
                    PdfWriter.GetInstance(pdfDoc, stream);
                    pdfDoc.Open();
                    pdfDoc.Add(pdfTable);
                    pdfDoc.Close();
                    stream.Close();
    Thanks & Regards RAJENDRAN M

    Hi Rajendran,
    The second question is about the usage of iTextSharp library, which is not a MS product, please post in their forum for help:
    http://support.itextpdf.com/forum
    Thanks for your understanding.
    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.

  • Help with creating a new XML file from an existing DOM tree!!

    i want to create a new XML file from an existing DOM tree
    i used this code to create a new document:
    static public Document createDocument(String fileName) throws ParserConfigurationException//,IOException,SAXException
              try {
                   DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   factory.setIgnoringComments(true);
                   factory.setIgnoringElementContentWhitespace(true);
                   factory.setValidating(true);
                   DocumentBuilder builder =factory.newDocumentBuilder();
                   return builder.newDocument();
    //          handle exception creating DocumentBuilder
              catch ( ParserConfigurationException parserError ) {
                        throw new ParserConfigurationException();
              }then i used this code to transform the DOM :
    public void exportDocument(Document document) {
              try {
                   Source xmlSource = new DOMSource( document );
                   Result result = new StreamResult( System.out );
                   TransformerFactory transformerFactory =
                        TransformerFactory.newInstance();
                   Transformer transformer =transformerFactory.newTransformer();
                   transformer.setOutputProperty( "indent", "yes" );
                   transformer.transform( xmlSource, result );
           //then catching the exceptions
    But the file was not created and i didn't find where can i specify the DTD that the XML file should use and where can i enter the name of the XML file itself
    Another questoin can i write a DTD file dynamically during the execution of the program??

    Cross-post: http://forum.java.sun.com/thread.jspa?threadID=784467&messageID=4459240#4459240

  • Enquiry:  Any tool to reverse engineer an existing db schema in Oracle 8i

    Dear All,
    Do you know whether Oracle SQL Developer Data Modeler (3.1.1.703) supports Oracle 8i? If not, is there any tool that can be used to reverse engineer an existing database schema in Oracle 8i?
    Your early reply is appreciated.
    Thanks a lot.
    LAWRENCE CHOW

    That's a pity. The initial version of Data Modeler used to support import from Oracle 8i.
    You could try setting up an ODBC connection to your database and using the JDBC tab (rather than the Oracle tab) when entering the Connection details into Data Modeler.
    Alternatively, if you can get hold of an earlier version of Data Modeler (e.g. version 3.0 or earlier), you could try this (and if it works you could then upgrade your model to the current version).
    David

Maybe you are looking for

  • Error Occuring at the time of Reply

    Hi, When i am giving reply for notification of More Information Requested in PO WF, The notification is not going to the person which i want to send instead of its giving error. Can anyone guide me what are thing i need to check for this. Thanks & Re

  • Can I change a field that is displayed on a Purchase Order Message Output

    I have read on a couple message threads that have stated that it is not recommended to change the length of a field on a purchase order.  If I am unable to  change a field length, can I instead use another field that is long enough to fit in the info

  • Channel Scan installation starts when TV is turned on

    Toshiba 46UL605U LED TV - When you turn on the TV it always goes into channel scan (installation mode).  Just started within the last month. Is there a correction for this. What causes this

  • JNDI Exception on re-deployment to a cluster

    I'm getting an error that I have not seen in the newsgroups so far. It           happens when I deploy what I believe to be a properly configured clusterable           application (.ear file) to my cluster.           Here's my setup:           WebLog

  • 3D's R3D content display not correctly

    Here is the question , i have a content that left.r3d and right.r3d. And it's frame is 24fps.  Speedgrade can import it. But when i see the only left , it was correct. When i see only right , it shows the message : frame index out of range. And when