Schema registration for storing XML documents in XMLDB repository

Hi,
Can I store only the XMLSchema based documents in the XMLDB repository?.Cant I save documnts which do not have a schema?.
Thanks in advance,
Sirisha.

Testing with 10.1.0.3.0 I get
SQL*Plus: Release 10.1.0.3.0 - Production on Thu Sep 16 23:53:30 2004
Copyright (c) 1982, 2004, Oracle. All rights reserved.
SQL> spool registerSchema_&4..log
SQL> set trimspool on
SQL> connect &1/&2
Connected.
SQL> --
SQL> declare
2 result boolean;
3 begin
4 result := dbms_xdb.createResource('/home/&1/xsd/&4',
5 bfilename(USER,'&4'),nls_charset_id('AL32UTF8'));
6 end;
7 /
old 4: result := dbms_xdb.createResource('/home/&1/xsd/&4',
new 4: result := dbms_xdb.createResource('/home/OTNTEST/xsd/pdbx.xsd',
old 5: bfilename(USER,'&4'),nls_charset_id('AL32UTF8'));
new 5: bfilename(USER,'pdbx.xsd'),nls_charset_id('AL32UTF8'));
PL/SQL procedure successfully completed.
SQL> commit
2 /
Commit complete.
SQL> alter session set events='31098 trace name context forever'
2 /
Session altered.
SQL> begin
2 dbms_xmlschema.registerSchema
3 (
4 schemaURL => '&3',
5 schemaDoc => xdbURIType('/home/&1/xsd/&4').getClob(),
6 local => TRUE,
7 genTypes => TRUE,
8 genBean => FALSE,
9 genTables => &5
10 );
11 end;
12 /
old 4: schemaURL => '&3',
new 4: schemaURL => 'pdbx.xsd',
old 5: schemaDoc => xdbURIType('/home/&1/xsd/&4').getClob(),
new 5: schemaDoc => xdbURIType('/home/OTNTEST/xsd/pdbx.xsd').getClob(),
old 9: genTables => &5
new 9: genTables => TRUE
begin
ERROR at line 1:
ORA-31084: error while creating table "OTNTEST"."datablock1708_TAB" for element
"datablock"
ORA-01792: maximum number of columns in a table or view is 1000
ORA-02310: exceeded maximum number of allowable columns in table
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 17
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26
ORA-06512: at line 2
SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
$
This issue is dealt with in
http://download-west.oracle.com/docs/cd/B13789_01/appdev.101/b10790/xdb03usg.htm#sthref181
See the section working with large XML Schemas

Similar Messages

  • Using XSU for Storing XML data

    Please how can I use the XSU API for storing XML documents in Oracle8i? I know part of the code to store a document but how do I import the XSU API?
    Do I have to download it or use it via Oracle?
    example:
    String xmlDoc = "my_xml_document";
    Connection conn = >>DriverManager.getConnection(...);
    OracleXMLSave sav = new OracleXMLSave
    (conn,"purchaseOrderTab");
    sav.insertXML(xmlDoc);But how do I use OracleXMLSave? How do I import the XSU API?
    thanks for your help
    null

    What is XSU? I think you question should be posted at the XML or XDK forum.

  • How to obtain the encoding scheme for an XML document

    How do you go about reading the encoding scheme for an XML document??
    More specifically how do I read the line:
    <?xml version="1.0" encoding="UTF-8"?>
    (Using Win32 C++ XML Parser 2.0.3 as SAX).
    null

    I work mostly with the Java versions of the parser so you'll have to make the translation to C++. As far as I know, you can't use the SAX API to access to the encoding.
    You need to use the DOM along with Oracle's extension to the basic DOM functionality. Oracle's package, oracle.xml.parser.v2 defines a class which implements the Document interface called XMLDocument. This class has a method, getEncoding(), which returns the encoding. You would use the method in getDocument() in the Parser base class inherited by DOMParser to retrive the XMLDocument.
    Jeff

  • XML SCHEMA registration for XML TYPE (storing XML files in Oracle 10g)

    I have created the XML Schema for the XML file stored in Oracle 10g and also added this Schema into the database. I have related that schema with the column in the table which contains the XML file. When i execute the query to fetch the data from the stored file i am getting a blank resultset. Is registering the XML Schema is necessary, if yes then please let me know the process of doing it. I have tried following steps to register Schema, but it is not working
    Step1:
    DECLARE
    v_return BOOLEAN;
    BEGIN
    v_return := dbms_xdb.createFolder('/home/');
    v_return := dbms_xdb.createFolder('/home/DEV/');
    v_return := dbms_xdb.createFolder('/home/DEV/xsd/');
    v_return := dbms_xdb.createFolder('/home/DEV/messages/');
    v_return := dbms_xdb.createFolder('/home/DEV/employees/');
    COMMIT;
    END;
    STEP 2:
    Connecting To XML DB
    Step3:
    Register XML schema
    I am failing to execute step number 2 and hence not able to register the schema also.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by sudeepk:
    If a java exception is thrown probably during ur install u might have forgotten
    grant javauserpriv to scott;
    grant javasyspriv to scott;
    Thanks
    [email protected]
    <HR></BLOCKQUOTE>
    Thank you!!!

  • Creating an Element for an XML Document

    Assuming I have an XML file
    file.xml
    <root>
    <child1>
    <child2>
    <child100>
    <root>
    i do
    SAXBuilder parser = new SAXBuilder();
    doc = parser.build(file);
    root = doc.getRootElement();This returns a root elemnet for the entire tree.Now my question is how do i create a root element for say jus the top 10 children? That is, is there a way i can create a document just reading the first 10 elements from the file tree above so that when i do a getChildren on root I should have only 10 elements in the list.

    | 1. How are the attributes of an XML element can be stored to the database
    XML SQL Utility (which XSQL uses under the covers) only stores
    documents in the canonical format. You'll need to use an XSLT
    transformation to transform data into the canonical format
    (including transforming attribute values into elements whose
    names correspond to the column in which you'd like to store it)
    | 2. How can I store a single XML document to multiple database tables?
    I outline several techniques for this in my upcoming
    O'Reilly book, "Building Oracle XML Applications".
    The basic idea is to either:
    (1) Use an Object View with an INSTEAD OF INSERT trigger, or
    (2) Use a technique that transform the inbound document
    into a multi-table insert-format and passes each
    relevant part for insert to the XML SQL Utility separately.
    null

  • Schema Parsing to create xml documents(Urgent)

    Hi,
    I'm new to XML and need some help for my course project. I need to parse xml schema and get the values of element name, attributes etc so that user can input values to create xml documents. Also I need to write a code that extracts the schema once the user selects schema of his choice. So its basically I need to provide dynamic interface for user to input values based on various schema.
    It would be helpful if some advices me or let me know where I can proceed.
    Thanx
    swetha

    Hello Swetha,
    If you choose an XML binding technology go with JAXB 2.0. This is an industry standard included in Java since Java SE 6. Oracle offers a JAXB implementation as part of the TopLink product see the latest tech preview), and has recently open sourced it through Eclipse (Eclipse Persistence Services or EclipseLink). EclipseLink/TopLink offers features beyond what is available in standard JAXB that you may need.
    TopLink object-to-XML/JAXB:
    http://www.oracle.com/technology/products/ias/toplink/oxm/index.html
    EclipseLink:
    http://www.eclipse.org/eclipselink/
    http://wiki.eclipse.org/EclipseLink
    You may also consider using SDO. SDO can be viewed as a dynamic object model, the metadata can be loaded from XML Schemas (even the XML Schema for XML Schema). TopLink & EclipseLink include SDO implementations. The dynamic model is very rich in metadata which may be useful to you in creating a dynamic interface. For more information on SDO see:
    http://www.osoa.org/display/Main/Service+Data+Objects+Specifications
    If you are interested in the SDO approach post back, and I can provide more details.
    -Blaise

  • How to indicate the Schema path for a XML file when parsing?

    I have to validate a XML file. At the header line of this file, I need to specificate only the name of the schema but not the full path:
    <DATAMODULES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Datamodules.xsd">
    When validating, there is any way to specify to the parser the correct location of the XSD file?
    I know I could copy the XSD file to the XML file directory or vice versa, but I cannot do that and I need a software solution.
    Could someone help me?

    An External Parsed Entity could be used to reference a schema.
    In your DTD:
    <!ENTITY datamodules SYSTEM "file:///c:/Datamodules/Datamodules.xsd">
    Refer the external entity in xml document:
    <datamodules>&datamodules;</datamodules>

  • ALDSP 3.0 -- schema owner for stored procedure or SQL Statement

    Using ALDSP, I have a need to create a physical service based on a stored procedure or a SQL statement. I am wondering what will happen when I move to another deployment environment where the schema owner changes. In our QA and Prod environments, we have a different schema owner for all tables in the application (the DBAs believe this prevents unwanted updates to a prod environment). DSP elegantly supports this for normal table- and view-based physical services by mapping schemas through the DSP console after deployment. Will I get the same type of mapping capability for stored procedures and SQL statements? I noticed that I can add a SQL-based function to a physical service...is there a way to pass in the physical table name from that data service to the procedure or SQL statement?
    Thanks,
    Jeff

    Schema name substitution should work for stored procedures just like it does for tables. If it doesn't - report a bug.
    You don't get any help for sql-statement based data services - dsp doesn't parse the sql provided. One thing you could do is use the default schema (following the user of your connection pool), and not specify the schema in your sql-statement.

  • Storing XML Document as Data question...

    Hi,
    I read the document from http://technet.oracle.com/tech/xml/info/htdocs/otnwp/about_oracle_xml_products.htm and
    this document mention that can store XML Document as Data.
    How does it work? and is there any example code tha I can try?
    Thanks for you kindly help!
    Good day.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Kelly:
    I read the document about XSU and where I can download the XSU for testing?<HR></BLOCKQUOTE>
    Go to http://technet.oracle.com/tech/xml/oracle_xsu/
    That's the same URL where you found the XSU document.
    Then click the Software tab at the top of the main frame.
    If you don't see the Software tab, you may need to enable JavaScript. If you can't (or don't want to) enable JavaScript, try this URL: http://technet.oracle.com/software/tech/xml/oracle_xsu/htdocs/listing.htm
    Thanks,
    -rh
    null

  • Use JAXP for creating XML document

    Hi,
    I have used JAXP to create a XML docuemnt. But when I use Jaxp to parse it, it returns parsing error ''null''.
    I open the XML document in XMLspy and save again, then it can be parsed.
    Any suggestion for that? Thanks a lot.

    Are there any differences between the version created with jaxp and the one with xmlspy? are you using the validating parser? if you aren't you might be having trouble with white space. just a guess.

  • Any available tools for formating xml document?

    Hi, I'm just looking for a java tool can help me sorting the xml document and text in alphabetical order. Anybody has any suggestion? Thanks a lot.

    Well, you don't have to write your own sort necessarily. You'll have to write a Comparator to use with an existing sort routine, and you'll probably have to do some non-trivial manipulation of data just to get it to a point where you can use the existing sort routine.
    Of course, depending on the situation, writing your own sort might be easier. (Say, if you were merging two sorted documents into one.)

  • Need XMLDiffer package for compare XML documents

    Support Cell,
    Can you please let me know or guide me where can I get XMLDiff class package? I tried to find out everywhere but couldn't locate it yet. Even, XDK 10g kit packet for NT doesn't contains the desired package.
    I am using Oracle 10g R2 and have to compare xml documents and display in JSP page.
    Would appreciate your prompt support!
    With Thanks!
    Shyam

    Deepak,
    Thank you for the URL!
    I got the XMLDiffer package.It's there in XML.JAR file of XDK.
    Once again, thank you for your time and support.
    Newkid

  • Can I set the DocumentType for an XML document? If so how? please help

    Hi,
    I am porting some code from jdom to xerces.
    jdom's document class provides a setDocType(String, String) function to set the DTD for the document.
    Is there anything similar in dom?
    The javadocs only mentions a getDocType() for the document interface in org.w3c.dom.Node interface. Is there any way I can SET the document type (DTD) for a given document object?
    TIA,
    Srinivas.

    In iOS, the spellcheck language follows the keyboard.
    The forum for questions about iOS Pages is at
    https://discussions.apple.com/community/app_store/iwork_for_ios

  • Setting content server for storing PPM documents

    Hi Folks,
    We have followed the steps outlined the PPM config doc for setting up the content server (pages 117). Summary of the steps are shown below. (We are on PPM5.0)
    Creating a Content Server Entry
    1. In Customizing for SAP NetWeaver under Application Server Basis Services
    Knowledge Provider Content Management Service Define Content
    Repositories , choose Content Repository Display/Change .
    2. Choose Content Repository Create .
    3. Enter a name and a description for the content server.
    4. Enter CFF in the Document Area field and HTTP in the Storage Type field.
    Creating a Storage Category for a Repository
    1. In Customizing for SAP NetWeaver under Application Server Basis Services
    Knowledge Provider Content Management Service Define Content Categories
    , choose New entries.
    2. Enter a name and description, and then enter CFF in the Document Area field.
    3. Enter the name of the newly-created content repository in the Content Repository
    field.
    Setting the new Content Server as the Default Storage Category
    1. Choose transaction DMWB.
    2. Choose model area CFF in the tree.
    3. Navigate to PHIO-classes, node CFF_VERSION_V.
    4. Change the standard attribute STORAGE_CATEGORY from CFFCONTENT to the
    category you have defined above.
    5. Repeat this for node CFF_ADD_FILES_V and for CFF_VERS in node
    CFF_VERSION_V.
    After doing the above steps I did the following tests.
    1. Tried to access documents stored at the portfolio item level before doing the above content server config. I was able to access the documents which leads me to believe that files are still getting stored in the DB.
    2. Checked the table CFF_CONT before and after storing a 1kb file and the number of entries increased by 2, which again leads me to believe the file is not stored in the content server.
    Appreciate any input on whether we have followed the correct steps and if there is a better way check if files are actually being stored in the content server.
    Thanks,
    Lashan
    Edited by: Lashan Wanigatunga on Apr 28, 2011 7:08 AM

    Hi Lashan,
    I didn't same steps as you explain in your first post but it isn't working.
    Why didn't it work for you when you posted your 1st post, and now is is working? Is there some installation or Add-on that we need you have? Is there any Basis system parameters that we need to put?
    thanks in advance,
    aupalaura

  • Best approach for storing XML files long term

    We have a legal requirement to store the XML files that relate to SAP billing documents for 10 years. (This is a "digital seal" requirement in Mexico.) The files will be sent to SAP server by the third party software. We'll attach them as GOS objects to the billing documents, but we need another option for safekeeping the files for 10 years. Files need to be accessible somewhat easily if there is an audit down the road. We expect to have about 500 files per month, 5k each.
    The simplest solution that comes to mind is just to copy the files to a designated folder (or rather several folders by year or month) and backing it up regularly, but I'm wondering if there could be another solution.
    Has anyone had a similar requirement and what approach would you recommend? I'm also checking with our Basis support, but thought I'd ask here as well.
    Thank you.

    You may also check here: http://help.sap.com/saphelp_nw70/helpdata/en/26/72a1376f6cd903e10000009b38f8cf/content.htm

Maybe you are looking for