How to save multiple xsd with parent include references?

Hello

Unfortunately, I am a newbie to XDB and it is perhaps a fundamental question. But I don't get solved right now (also Google was not my friend help out me)...

I try to save a set of xsd for XML DB (11g Release 2 11.2.0.1.0) with the data structure:

"Demo" folder:

mainmodel.xsd

types.xsd

"Demo-detail" subfolder contains:

"submodel_a.xsd with < xs: include schemaLocation ="... /types.xsd"/ >

submodel_b.xsd with < xs: include schemaLocation = "submodel_a.xsd" / >

First of all, I created 'demo' and 'demo-detail' records in the XML DB repository using dbms_xdb. CreateFolder.

I then added the xsd as resources for XML DB, for example

declare

v_result boolean;

v_schema xmltype: = xmltype (bfilename ('DEMO', 'types.xsd'), nls_charset_id('ISO-8859-1'));

Start

v_result: = dbms_xdb. CreateResource ('/ demo/types.xsd ', v_schema);

end;

/

Then I registered my types.xsd:

Start

DBMS_XMLSCHEMA. REGISTERSCHEMA)

schemaurl = > 'types.xsd. "

schemadoc = > BFILENAME ('DEMO ','types.xsd ").

CSID = 0 >

);

end;

/

When you try to save submodel_a.xsd the same way, I get the following error:

ORA-31000: resource '... types.xsd' is not a document of schema XDB.

How can I solve this?

Best regards

Matthias

As mentioned Marco, you have to resolve and update the related URL in a local of the schema, just copy prior to registration.

This way, you can keep the original file intact while that correctly register the schema using absolute URLS.

Here is a short example, assuming that all the XSD were loaded as resources in the repository, using the same folder structure:

-It records "types.xsd' to ADDRESS ' / demo/types.xsd.

Start

() dbms_xmlschema.registerSchema

schemaURL => ' / demo/types.xsd '

(, schemaDoc-online xdburitype('/demo/types.xsd')

local-online true

genTypes-online fake

genTables-online fake

);

end;

/

-He gets a local copy of 'submodel_a.xsd' located in ' / demo/details/submodel_a.xsd ' in the repository, fixes and updates include locations, then it saves:

declare

v_schema_url varchar2 (2000): = ' / demo/details/submodel_a.xsd';

XMLType v_schema_doc: = xdburitype (v_schema_url) .getxml ();

Start

for r in)

Select x.*

from xmltable)

' for $i in fn:doc ($url) / Schema / xs: include

return fn:resolve - uri ($i/@schemaLocation, $url)"

from v_schema_url as 'url '.

columns idx for ordinalite

, path of varchar2 (4000) of schema_loc '.'

) x

)

loop

Select updatexml)

v_schema_doc

, ' / Schema / xs: include [' | to_char (r.idx) |] '] / @schemaLocation'

r.schema_loc

, "" xmlns: XS = "http://www.w3.org/2001/XMLSchema" ' ' "

)

in v_schema_doc

Double;

end loop;

dbms_output.put_line (v_schema_doc.getclobval);

() dbms_xmlschema.registerSchema

schemaURL-online v_schema_url

schemaDoc-online v_schema_doc

local-online true

genTypes-online fake

genTables-online fake

);

end;

/

(in this case the XS:include/@schemaLocation will be updated to '... / types.xsd' to ' / demo/types.xsd ')

Tags: Database

Similar Questions

  • How to rename multiple files with the extension in windows xp

    How to rename multiple files with extension in windows XP.

    1. If you want to simply rename the extension, open a run window (Windows Logo key + R), type cmd and press ENTER. Using the CD (Change Directory) command, navigate to the folder in question. Now, type ren *.mp3, *.mp4, and press enter (note the two spaces in the command). Note, rename mp3 MP4 is just an example of the command.

    2. If you want to rename files, download the 32-bit version or 64-bit Bulk Rename, here http://www.bulkrenameutility.co.uk/Main_Intro.php

  • How can save a PDF with password

    How can save a PDF with password

    Hi MacUser2,

    Trial is for 30 days.

    Once the trial is over you will be able to open PDF files by using the password that you have installed.

    Kind regards
    Nicos

  • How to save a database with several headphones

    Hi all

    Could if it you please let me know how to save a database with several headphones?

    Just a thought:-could save us a listener with several databases also?

    Thank you

    Published by: user13332773 on June 2, 2011 23:39

    If it is really necessary for a database to single instance by using different local listeners, you must set the instance parameter LOCAL_LISTENER to the listening port address list: Please read http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/listenercfg.htm#CHDCCHIC.

    Edited by: P. Forstmann on June 3, 2011 08:49

  • Save multiple pictures with a dialogue box

    Hello

    I try to add a feature to a program of mine to record multiple images with a single click, but I get these ridiculous errors saying "file not found" to "Open/create/replace the file" function, which is set to create. Of course, the file is not found, I'm trying to create it!

    Can someone look at my code and tell me what is the problem? Thank you!

    Hey manufacturer.

    I took a glance at your VI and it seems to me that the problem is in the Express VI to file dialog box, you choose a location to save the files, but this situation is never created. So if I want to save my images in TestFolder, it seems that your intended functionality is for images to be stored in a subfolder called 'Images' (or whatever the user enters a name in the file dialog box) so that the final result are images being recorded TestFolder/Images.

    If this is the case, you can simply add a node function to create a folder in your block diagram (look in the programming > e/s from file > Adv IO file for this). You can wire directly from the output of selected path in the dialog box file to the path of the node Create Folder entry. I recommend you to place this node in line with your existing code in order to ensure that the creation of files ends before you try to save files in this location.

    If, instead, you want the user to select an existing folder and save images directly into that, simply have the click of the user the "Current folder" button in the dialog box of the file, rather than enter a new name and click Save.

    I hope that helps and let us know if you have any other questions.

  • How to save a PNG with an alpha right or fat?

    Long story short, work in broadcasting and a new piece of equipment like the png files.  I know how to save png with transparency, is not the problem.  I don't know how or if this is possible is to save with an alpha right or fat.  At the moment we feather or extend the edges to past the alpha to say a logo and save it as tif, psd, or .tga.  This way once it is indexed on video or something else, the edges look good, no bad black border... it is logical, explaining probably not very well.   But move to png files, I have no idea how to do an alpha right or fat because he sees the transparency.  I mean that if I have feathers on the edges, a png will see this right, since there is no alpha?

    I hope this makes sense?

    > If we don't fill the transparent areas and semi-transparent image with the colored part of the image, we have usually get a dirty key/matte or a lot of fringes.

    This means that your other software and hardware is not reading/interpretation of the PNG file correctly.

    PNG saves with everything that is in the pixels in the transparent area - because they are supposed to be transparent and not seen.

    If you see artifacts in the transparent areas, then something is wrong with the software displaying the PNG, because 100% transparent should not be visible at all.

    Almost, it looks like someone could not read the documentation and specifications and try to treat the PNG as premultiplied format.

  • How to save JPEG photos with their LR adjustments?

    Hello Folks, please forgive this probably stupid question from a new user of Lightroom!

    I recently imported some JPEG photos in LR, made several changes that have improved the images (well, I thought they did...) but then for the life of me I couldn't work out how to save the results.

    Stored files just show the originals, but in LR, they appeared with all the settings. Tried to export, but with the same result. I don't know I am on what is obvious...

    Any help is appreciated.

    Take a look at the of gotcha ten albums LR here

    Your question is number 1.

    You do not have record in LR (LR, as it goes along). To see that your changes applied you export and create a new file. LR does not change your original file,

  • How to scan multiple pages with Photosmart 6510?

    Hello

    I am a new user of all-in one Photosmart 6510. Does anyone know how to scan multiple pages into a single document?

    Thank you!

    It is important to note that there is a limit to the DPI affecting as well. It seems that you cannot scan a document multiple pages when you set the resolution 600 or higher.

  • How to open multiple files with the same extension in one program from the Explorer

    I frequently receive several JPG (or whatever extension) files to my clients.  On Windows XP, I could just highlight the files I want to open, and then click Open.  They would be so open to 1 program cascading.  This made it easy when comparing many images.  If I do the same thing in Windows 7, it opens the default program several times and puts 1 image of each open program.  It is Paint Shop Pro in my case.  Thus, instead of so-called images 5 open cascading in Paint Shop Pro... the computer open Paint Shop Pro 5 times with 1 image of each open version of the program.  I tried this search like crazy, but cannot find the right thread for an answer.  Most of the threads are on the opening of the different file types.  My question is only about the opening of multiple files with the same exact file inside 1 free program extension.

    Is this the same version of Paint Shop?

    One thing you might try is to open Paint Shop, then select and drag all the files in this window of the paint shop.  Various programs to manage this type of action differently from the DDE, but it might give you the expected results.

  • How to watermark multiple images with different dimensions in Photoshop?

    Is there a way I can place a watermark on the bottom right of the multiple images, any size images? I tried to use Photoshop Scripts > image processor, but it only works for images of the same size. I want to put the watermark on multiple images of different sizes. It is the output I got.

    For the first image watermark placed properly, but for the second picture watermark is distracted. As you can clearly see the dimensions are different. Please suggest me a solution.

    additional1.jpg

    test.jpg

    As this video should help you.

    How to watermark multiple images in Photoshop CS6 - YouTube

  • How to prevent multiple objects with the same key being stored?

    Hello
    I use of DPL and I want to know if we have any way of preventing multiple objects with the same primary key is stored in the database or not.

    Thank you

    Hello

    Primary keys are unique - there may be multiple objects with the same key. Did you look in the javadoc for the PrimaryIndex and methods put ()?

    -mark

  • How to save multiple images on film?

    Hi crew

    I have around 700 photos in a collection of Lightroom Mobile I want to record on the camera.

    So far, Ive only understood how to do it manually (i.e. by selecting a single image at a time).

    Does anyone know how to bulk export or "save all"?

    Thank you!!!

    JJ

    I had the same problem. But the solution is simple:

    - to choose any image, tap the share icon in the top right corner (the u-shape with the up arrow)

    -Press on ' Save to Camera Roll.

    -Now you can select up to 15 images at once and then click the check mark in the upper right > your selections will be saved as a batch to the film

    Your camera shows the original file and to his right will be the exported file. So it is quite easy to identify and remove the original (if you want that)

    Now, you'll be apx. 15 x faster

    @Adobe: fix the limitation of 15 images. You know we turn digital, you know we have some important batches of files to process, right?

  • LR 4.3: How to save * existing * Tiff with Zip Compression

    Dear all,

    -J' using LR 4.3 on a windows 7 x 64 PC.

    -J' use a catalog for each wedding/event/shoot.

    -J' I import all my images as CR2 or DNG and work with those files in LR and Photoshop CS6.

    -Once I finished making changes on a marriage, I find myself with, for example, 300 16-bit uncompressed Tiff images in a dozen different files (I shoot big 600 pax + marriages sometimes).


    -I want: Re-save/overwrite all these images as Tiff 8 bit images with ZIP compression.

    How can I do this?

    -J' tried to select all images and exporting 8 bit Tiffs Zip with the tab replace originals without selected warning. However I get the error that the file already exists and LR can do nothing about it.

    -J' tried to create an Action in Photoshop, but there are two problems: 1) photos are spread over several files and selecting each via file > batch > controller means the process requires manual intervention to reselect TIFF of the next file - I want to hit the action, go to lunch and come back to find ALL registered. (2) the action is outside the LR and I would like rather to avoid mistakes of "metadata has changed outside ' even though this is not really a biggie.

    Why not just save the images as TIFF Zip initially? I use a number of freelance retouchers, many complain that the compression process slows down their workflow initial (slower material).

    I would be very grateful for any ideas.

    (and yes - the space is considerable, there where I live the memory is still not cheap enough!)

    Thanks in advance...

    Have you determined the steps you want for a single photo in Photoshop?

    You have an action of these steps that does what you want in a folder?

    It would be wise to leave things as a 16 - bit where the layer blending options change too, but you can confirm one way or the other by testing with a complicated overlay of the edges carefully to feather situation and make sure that nothing looks bad after you convert to 8-bit.

    It seems it would work to use Bridge to select the whole lot of hair in a marriage to compress and eventually convert to 8-bit.  With the help of your file (s) example:

    Bridge point to the Jack and Jill marriage file, set the view to display items in subfolders, define the filtering in TIF, leave the bridge find all hair and then do a Select All on them and choose tools / Photoshop / lot... then indicate your photo-simple action and make sure that the source is bridge and whatever other parameters are required and let it go.

    You would like to experiment and perfect your batch processing on a copy of the records so it wouldn't destroy the real business until you were sure it was working.  It is possible that some thing would not work because you substitute on top of photos or make several subfolders or something else - I'm not much of an expert of action PS, but it should be relatively easy to check if it would work or not.

  • How to 'save for web' with information from a dataset

    I created psd to design web page set up with a master image.  The main image is defined as a pixel replacement variable and uses a dataset to load in images of a local folder.  I have more than 100 images in this folder and I need to resize the image to 250 pixels wide and "save for web".   Resizing and registration is easy with an action, but the thing, it's that I need to use a different column in my DataSet as the name of the saved files.

    Is it possible to create an action that will loop through each row in my dataset, do the replacement of pixel on the image, enter the name of the file in the next column, flatten & resize the image and then save it as the file name?  Of course, would cancel the flattening and resizing to start on the next line.

    I guess I could break in two actions.  One who reads the dataset, to replace the pixels and export for the web with the new file name.  Then I could set up a second action to run in batch on the folder that contains the images recently exported and just resize all the.

    I don't know how (if it is even possible) is to loop through the dataset by using the action, get the variable of the object dataset for file name and export for the web with that name.  Any ideas?  Thank you.

    Here's a function I use. With this function, you can import a CSV dataset to your document. Get names of groups of data csv form. Then in a loop applies a set of data by name, and then save as in any format you like. The loop repeats until all sets of data are processed.

    fileImportDataSets = function( file ) {
        var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putClass( stringIDToTypeID( "dataSetClass" ) );
        desc.putReference( charIDToTypeID( "null" ), ref );
        desc.putPath( charIDToTypeID( "Usng" ), new File( file ) );
        desc.putEnumerated( charIDToTypeID( "Encd" ), stringIDToTypeID( "dataSetEncoding" ), stringIDToTypeID( "dataSetEncodingAuto" ) );
        desc.putBoolean( stringIDToTypeID( "eraseAll" ), true );
        desc.putBoolean( stringIDToTypeID( "useFirstColumn" ), true );
    executeAction( stringIDToTypeID( "importDataSets" ), desc, DialogModes.NO );
    };
    function applyDataSet(setName);{
        var desc = new ActionDescriptor();
            var setRef = new ActionReference();
            setRef.putName( stringIDToTypeID( "dataSetClass" ), setName );
        desc.putReference( charIDToTypeID( "null" ), setRef );
    executeAction( charIDToTypeID( "Aply" ), desc, DialogModes.NO );
    };
    function getDataSetNames(csvFileRef) {
        _ftn = function(string){
        var csvItems = string.split(",");
        datasetName = csvItems[0]
        return datasetName;
    };
    csvFileRef.open();
    var datasetArray = new Array();
    var i = 0;// assumes the dataSet name is the first field
    while (csvString = csvFileRef.readln()) {
       if (csvString.length < 2) continue; // Skip empty lines
      datasetArray[i] = _ftn(csvString);
      i++;
    }
    csvFileRef.close();
    return datasetArray;
    } 
    
    //sample usage
    var csvFileRef = File.openDialog("Please select CSV file");
    var datasetNames = getDataSetNames(csvFileRef);
    alert(datasetNames.length-1);//number of data sets
    alert(datasetNames[1]);// first data set name
    
  • How to register multiple files with the same name with different num revision

    Hello

    Can someone please tell me, how to register several different files with the same name with the revision number using the RIDC API.

    For example:
    First of all I will be saved in a file (TestFile.txt) in a content server with revision number 1 using the RIDC API in application of the ADF. Then after awhile, will change the same line (TestFile.txt) check-in and once again. I tried to check the same file several times, however first Check-in correctly in server showing revision 1, so that Check-in same file again, her gives no error message, and also its not reflecting only not to the server. Single file (TestFile.txt) reflecting on the server.

    How to implement this feature using the RIDC API? Any suggestions would be helpful.

    Concerning
    REDA

    Published by: 887680 on March 6, 2013 10:48

    (1) get the content ID (dDocName), call CHECKOUT_BY_NAME
    (2) call check-in service with dRevLabel = previous dRevlabel + 1

Maybe you are looking for