There must be some intelligent way to use Oracle 9i XML capabilities here

Hello all
I have to perform what is essentially a simplification of an XML interface. There is a company, OurProvider, who do lots of clever stuff with XML, and have tens of interfaces, XSDs etc and many ways to skin a cat. My company is using them as a backbone/provider but is embarking on a consolidation and simplification of the services they provide. We've boiled it down to 2 interfaces and 1 report.
Taking just one of the interfaces as an example:
OurClient <-- xml --> Us <-- xml --> OurProviderI have the XSDs for both sides of this.
When our client sends a file, I will transform it and add a unique transaction reference, then submit it to the provider
By way of return file, the provider sends us XML of what was done
Using the unique tx ref we submitted, we'll respond to the client
Later we might get a report in XML of activity the provider has engaged in on our behalf and some of that our client will want to know, so there is another feed that is "report" style rather than "request response" style
At the moment, I'm planning to receive the XML from the client, deserialize it in .net, insert it into a relational table (it's not a deeply nested or complex xml) having an oracle sequence provide the unique transaction reference. I'll then run a query to select the contents back into .net dataset constructed so that when I serialize it, it forms XML valid for the provider and then I can send it off.
On the return, I will deser the provider XML, look up the txn ref, look up the source record data from the client and append more info to it (sometimes jsut a result, but we return to them most of what they submit as confirmation), including THEIR ref
I'm just wondering if there is a more intelligent way of doing this? Maybe like having a table that has a column triggered to get an autonumber, and to be able to say to oracle "here's an xml document, store it into that table so that each node under the root becomes one row, then give me a document back after having applied this transform, and with the sequence number in the xml"
Example, the client presents:
<fruits>
  <fruit>apple</fruit>
  <fruit>pear</fruit>
</fruits>
The table could be:
id, xmltype
0, <fruit>apple</fruit>
1, <fruit>pear</fruit>
The provider wants:
<menu>
  <desserts>
    <dessert>
      <id>0</id>
      <name>apple</name>
    </dessert>
    <dessert>
      <id>1</id>
      <name>pear</name>
    </dessert>
  </desserts>
</menu>Any suggestions welcome!
Thanks
CJ
Edited by: charred on Aug 7, 2009 10:03 AM

I would suggets using XSLT. With XSLT you can apply a transformation to the original xmldocument. For your example it would look something like this:
DECLARE
newxml sys.xmltype;
sourcexml sys.xmltype;
xsltsrc sys.xmltype;
reslt VARCHAR2(4000);
BEGIN
newxml := xmltype('<fruits>
  <fruit>apple</fruit>
  <fruit>pear</fruit>
</fruits>
xsltsrc := xmltype.createxml('<?xml version="1.0" ?>
                             <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
                             <xsl:template match="/">
                                   <menu>
                                     <xsl:apply-templates/>
                                   </menu>
                             </xsl:template>
                             <xsl:template match="fruits">
                                   <desserts>
                                     <xsl:apply-templates/>
                                   </desserts>
                             </xsl:template>
                             <xsl:template match="fruit">
                                   <dessert>
                                       <xsl:choose>
                                        <xsl:when test="text() = ''apple''">
                                           <id>0</id>
                                         </xsl:when>
                                         <xsl:when test="text() = ''pear''">
                                           <id>1</id>
                                         </xsl:when>
                                         <xsl:otherwise>
                                          <id>-1</id>
                                         </xsl:otherwise>
                                       </xsl:choose>
                                     <name>
                                        <xsl:apply-templates/>
                                     </name>
                                   </dessert>
                             </xsl:template>
                             </xsl:stylesheet>');          
sourcexml := newxml.transform(xsltsrc);
reslt := sourcexml.getstringval(); -- print the result
dbms_output.put_line(substr(reslt, 1, 255));
END;

Similar Messages

  • There must be some way to load Firmware 1.62.02 into My Vision M?

    O/S Vista- Home 32 bit's Zen Vision M
    I have sucessfully downloaded Firmware .62.02.
    There must be some way to get this into the Zen Vision M...

    Please check my reply to your other thread. I believe that's the only step missing to successfully update your ZVM.

  • Adobe support is hopeless, there must be a better way, if not it might be better to get a different movie program. is anyone having the same problem?

    adobe support is hopeless, there must be a better way, if not it might be better to get a different movie program. is anyone having the same problem? 

    This is like buying a GM car and being told to talk to otherGM customers on how to fix your car yourself.  It it the blind leading the blind.   I have wasted many days and weeks because I cannot find solutions.  I have rarely gotten a solution from any similar forum, and more often been told by other members that I should buy what they have or that I should not want to make this or that type a disc, etc., and rarely a suggestion that is useful.

  • RESTORE to free up fragmented iPod disc space? There must be a better way!

    I've owned iPods since day one and yet I continue to (barely) tolerate an annoying circumstance, as follows: manually deleting songs and videos (mind you, I'm not referring to playlists) will free up some space on [put your iPod iteration here] but NEVER results in freeing up space equal to the size of the songs or videos deleted. As a result, the remaining "fragmented" space builds up over time and creates a serious loss of available "free" space — unless one performs a Restore and starts loading from scratch. Happily, Restore will double — or triple! — the amount of available (re: writable) space on iPods — but serious cost in personal time and trouble
    For those of us with high capacity iPods — I can hear you yelling, "Me! Me!" — why, alas, does Restore continue to be the only way for us to manually rebuild the iPod library (thereby resulting in much more writable (rer: available) disk space)?
    There must be an easier way? Countless searches of Apple Discussions produces nothing more than endless refrains of "Restore, Restore, Restore!"
    Me, I'm tired of manually restoring 25 GBs of songs/videos in order to free up that extra 50 percent of writable space.
    How about you?
    5G 30GB ipod   Mac OS X (10.4.4)  

    Welcome to Apple Discussions.
    Me, I'm tired of manually restoring 25 GBs of songs/videos in order to free up that extra 50 percent of writable space.
    Buy a larger-capacity iPod, then.
    If you really feel like Apple will hear you with your complaints, then do it here. Unless you have something that I can help you with, then please ask.
    rjl

  • How can I bulk delete contacts from my iPhone 4S? I've imported contacts from gmail and hotmail, many of which I don't need. Deleting them individually will take ages, there must be a quicker way. Also, are my contacts taking up space on my iPhone or

    How can I bulk delete contacts from my iPhone 4S? I've imported them from gmail and hotmail and there are many more than I need. Deleting them one by one will take ages, there must be a quicker way! Also, do contacts take up space on the phone or are they stored remotely?
    Thanks.. J

    You should be syncing your contacts with an app on your computer or cloud service (iCloud, Gmail, Yahoo, etc), and not relying on a backup.  If you haven't been doing this, start now and then restore your old backup.  You will then be able to sync the new contacts back into the phone.  However, you will lose all messages, etc newer thant the backup.

  • Signing Applications - There must be an easier way

    Hello, I want to put free-iSMS on my N97 however it's unsigned so I can't. I've been reading up a lot on Google on how to sign an app or how to hack the N97 both of which are very long winded processes. There must be an easier way I can do it. It's all quite new to me and everything appears to be Chinese (literally).
    Does anyone know of the simplist guide that wont confuse me? 
    And is it safe to put all my phone details on the web???

    I followed the guide found within the forum you suggested, however when I went to download the certificate my (works) proxy server stopped the download due to the following reason
    [code]
    WARNING: ProxyAV has detected a virus in this
    file!
    File has been dropped.
    ProxyAV Administrator: unknown
    2009-10-09 14:47:52+00:00UTC
    Hardware serial number: 2205050030
    ProxyAV (Version 3.1.1.3(29863)) - http://www.BlueCoat.com/
    Antivirus Vendor: Sophos, Plc.
    Scan Engine Version: 2.90.1
    Pattern File Version: 4.45E.989453.1691461856 (Timestamp: 2009/10/09 12:16:00)
    Machine name: ProxyAV
    Machine IP address: 172.18.31.55
    Server: 221.238.19.22
    Client: 172.18.16.1
    Protocol: ICAP
    Virus: "Mal/Generic-A" found!
    URL: http://theme.esqimg.com/eshequn/isign/theme/isign/SignTool2.zip
     [/code]
    Is this a problem?
    Message Edited by rhysgm on 09-Oct-2009 05:06 PM

  • I lose cellular network on my iPhone 5s every few minutes. In fact, I barely have cellular network snce updating to iOS 8.0.2. There must be some fix for this. It's ridiculous!

    I lose cellular network on my iPhone 5s every few minutes. In fact, I barely have cellular network snce updating to iOS 8.0.2. There must be some fix for this. It's ridiculous!

    Hey nazifab,
    Thanks for the question. I understand that you are experiencing issues with your iPhone 5s. The following resource provides troubleshooting information for cellular connection issues:
    iPhone cellular data connection issues
    http://support.apple.com/kb/ts3780
    Thanks,
    Matt M.

  • There must be a simpler way ( from start to finish ). .

    ( I did a search, but the keywords must have been too broad )
    What i describe below worked, but i know a more experienced editor would smile at the unnecessary amount of effort . . .
    At a recent School Centenary I was contracted to spend the whole day collecting stories
    I kept some rough paper notes on the start and stop times of each group interview sessions over 6 tapes
    so
    To reduce wear and tear on the camera transport I captured each tape as low grade clips of about 25 min each ( equated roughly to each interview session )
    from there I:
    a - set up a sequence named as Seq # and dragged only each 1 long clip into it
    b - used the razor tool on THE TIMELINE to cut each clip containing one anecdote per slice
    c - deleted stuff that was obviously unusable
    d - set up a bin titled something like "session #"
    e - dragged the whole of the remaining clips in that sequence # into the bin
    f - repeated the above steps 10 more times .
    so then :
    g - I set up about 20 bins, named to match categorizations that the anecdotes could be "collected" into
    h - took one slice ( from b ) at a time from each Interview session into THE VIEWER
    i - trimmed the in and out points closer to where i wanted them
    j - dropped them back into one of the 'subject' bins set up in (g) according to content
    k - there were some that needed markers to cut away long pauses, flights of irrelevancies etc, and i made a sub-clip of each
    l - spent some time renaming clips, filling text in log note and label fields in case things went awry later
    then for recapture:
    m - I set up a new sequence named for each category to match (g)
    n - dragged the whole contents of each of those bins on to it
    o - did the media manager cut down thing
    p - opened the original bins at (d) and made all the [ now discrete ] clips offline
    q - re-captured that tape.
    at the end of all that ( 11 times over ) I did the final polish and went from there.
    It looks long, and in a sense it was, but I was trying to avoid problems that I usually have with relying too much on Sub-clips.
    Indeed, between steps (p) and (q), some clips had different In/Out points but shared media start and finish, so I manually added offline clips, and with some fancy dancing, got them to replace the disobedient clips that were sending my deck into infinity.
    You'll spot a better way to do things, and no doubt it may involve a different handling of Sub-clips.
    suggestions, anyone?
    thanks
    ~rob v

    sorry not to get back sooner - I've been too flat busy
    Mostly after creating subclips from markers, when time came to recapture, they would run the deck (cam) over and over the same parts of the whole clip for just their little extent to be lifted, even though their defined regions were not overlapping and indeed nowhere near each other. I also remember a tim ewhen they'd recapture the full amount of the parent clip anywaywith the I/O markers set as per prior to recapture.
    In essence, what i've described in a very verbose manner from (a) to (l) above is all the stuff along the way of rough cutting. Admittedly i didn't need to do (m) or (n) and could have done the recapture after Making Clips Offline without the need for setting up sequences in parallel.
    As it was when i did do the deed from the different tapes, they all nicely uprez'd in their positions in the sequences i wanted them - so in that regard i did do it all in one swoop.
    What I choose to do however is always have my work at such a self-explanatory stage so that if my assistant or even i get interrupted for a few weeks on something else and have to return, we dont want to spend any time readjusting our head-space to what we were were doing ( and risk a costly mistake if we interpreted wrongly where the project was at )
    And besides i never trust any machine, code routine or whatever other smarts presented before me. I like things where i can keep track of what the programme is doing in the background, in case i need to snaffle the very thing from the disk cache manually. Its happened! and I didn't lose time or money. I'll pay the price of doing things the long way round.
    however i will take advice if there is a more elegant way of being so-minded.

  • 2 way replication using Oracle 10g OID

    Hi Friends,
    Is it possible to have 2 way replication between Oracle E-Biz R12.1.3 and Microsoft Active Directory(windows 2008 server) at the same time using Oracle 10g OID.
    Regards,
    DB

    Hi Leoncio,
    Thanks and the requirement is :
    1) user will be cretaed in Oracle e-biz R12.1.3 HRMS application and it should be replicated to Microsoft Active Directory (windows 2008 server)
    2)E-mail address will be cretaed in Microsoft Active Directory (windows 2008 server) against an existing user and it shoule be replicated/updated in Oracle e-biz application User
    Regards,
    DB

  • URGENT! SEGV-errors when using Oracle C XML Parser for Solaris

    I often (not always) got SEGV-error with core dump when I use Oracle Oracle C XML Parser for Solaris. This Error is always got in the call of the the function xmlinit(...) with all params as NULL but the first required for the error code and the second which i assign a macro that evaluates to "US-ASCII". Does anyone knows about this problem?
    I am using a very short, wellformed and validated XML document.
    I would be very glad for some help about this!
    null

    Please provide a sample program along with the version number of the XML parser.

  • Hi there,I have just purchased an apple mac air and i want to delete       some photos i have put on in iPhoto. Can anybody tell me how to do it?i am used to windows right click and press delete, there must be an easy way to do this. Cheers Pete.

    Hi there, I have just purchased an apple mac air and i want to delete some photos i have  put on i photo.I am used to windows where you right click and press delete.Does anybody know how to do it? Cheers Pete.

    lamptramp wrote:
    Hi there, I have just purchased an apple mac air and i want to delete some photos i have  put on i photo
    Open iPhoto and from the Menu Bar... Click on Help... Type in Delete and choose from the Selected Topics.
    lamptramp wrote:
    ... am used to windows ...
    See >  http://www.apple.com/support/macbasics/

  • HT4847 There must be some way of finding out how much storage I'm currently using. One would think that this would easy but apparently not.

    Anyone know how to find out how muh iCloud storage 'm currently using?

    If you're on a Mac, open System Preferences, and open iCloud option.
    Or if you're on an iOS device, open Settings - iCloud - Storage
    You can see the Total Storage and the Available Storage.
    This should solve your question

  • There must be some way to backup purchased audiobooks from my iPhone to my reformatted Mac.

    I reformatted my MacBook Pro about a month ago, and have recently tried syncing my iPhone 5s with iTunes on my MacBook Pro, so that I can temporarily remove some purchased audiobooks, in order to make room to sync over some other audiobooks that I haven't listened to in awhile.
    However, you guessed it, if I proceed with this process to add additional audiobooks to my iPhone, I get the warning that all music, books, audiobooks, and photos will be removed from the iPhone.  That's not an option.  I know that iTunes purchased audiobooks are one-time downloads, unlike purchased iTunes music.  Since I have purchased two expensive audiobooks on my iPhone, since the time that I reformatted my MacBook Pro, I am not willing to double-spend in order to buy them again.  Nor, I am willing to lose these books.  I'd like to re-listen to them monthly, for the foreseeable future. 
    If I were to try using a backup of my iTunes library (from just before the MB Pro reformat), it wouldn't include those recent audiobook purchases.
    Is there a proper method to achieve an up-do-date merged sync, and not lose any audiobooks?   If not, is there a reliable third-party software or system I could use?  I'm hoping for something above the worst case scenario of simply playing the audiobooks from my iPhone, and recording them into an mp3 using AudioHijack Pro on my Mac.
    This has been the only glitch in my drive reformat issue.
    Thanks for any help you can offer!!!!

    Friends helped get this figured out.  Things appear to be ok now. 

  • TS3367 what can be done if i want to use facetime over my cellular data connection? i have i phone 4 there must be some soultion to at least get the face time audio

    please help me guys

    No, there is no work around.  Facetime over cellular requires at a minimum an iPhone 4s, and that your carrier support the feature.  Sorry, but the requirements are what they are.
    http://www.apple.com/ios/facetime/

  • Callouts and anchored objects - there must be a better way to do this

    I've spent a lot of time in the last six months rebuilding PDF files in InDesign. It's part of my ordinary responsibilities, but I'm doing a lot more of it for some reason. Because I'm sending the text of these rebuild documents out for translation, I like to keep all of the text in a single story. It really helps to have the text in "logical order," I think; when I'm prepping a trifold brochure, I try pretty hard to make sure that the order in which the readers will read the text is duplicated in the flow of the story throughout the ID document.
    So, I'm rebuilding a manual that has a 3-column format on lettersize paper, and it's full of callouts. Chock full of 'em. They're not pull quotes, either; each of these things has unique text. Keeping in mind that I'd like the text in these callouts to remain in the same position in the text once I've linked all the stories and exported an RTF for translation, what's the best way to handle them? What I've been doing is inserting an emptly stroked frame as an anchored object, sized and positioned to sit above the text that is supposed to be called out. When my translations come back, they're always longer than the source document, so as I crawl through the text, I resize the anchored frames to match the size and position of the newly expanded translated text, and then nudge them into place with the keyboard.
    There Has To Be a Better Way.
    There is a better way, right? I'm not actually too sure. If I want to actually fill those anchored frames with text, I can't thread them into the story. I suppose that I could just thread the callout frames and assign two RTFs for translation instead of one, but then the "logical order" of my text is thrown out the window. So, I'm down to asking myself "what's more important? reduction of formatting time or maintenance of the flow of the story?" If there's something I'm missing that would let me dodge this decision, I'd love to hear about it. The only thing I can think of would work like this:
    1) Duplicate callout text in the story with a custom swatch "Invisible"
    2) Create "CalloutText" parastyle with "Invisible" swatch and apply it to callout text
    3) Insert anchor for anchored frame immediately before the CalloutText content
    4) Send it out for translation
    5) While I'm waiting for it to come back, write a script that would (dunno if this is possible):
       a) Step through the main story looking for any instance of CalloutText
       b) Copy one continguous instance of that style to the clipboard
       c) Look back in the story for the first anchor preceeding the instance of CalloutText
       d) Fill the anchored object with the text from the clipboard (this is where I'm really clueless)
       e) Apply a new parastyle to the text in the callout
       f) Continue stepping through the story looking for further instances of CalloutText
    If this really is the only decent solution, I'll just head over to the Scripting forum for some help with d). Can any of you make other suggestions?

    In-Tools.com wrote:
    The use of Side Heads saves weeks of manual labor.
    Yup, Harbs, that is exactly what I was describing. If I use the Side Heads plugin to set up a job, will my clients get a missing plug-in warning when they open up the INDD? Will roundtripping through INX strip the plugin but leave the text in the callout? (My clients don't care if the logical flow of the story is broken; it's just me.)
    I'm just curious; seems like a pretty obvious purchase to me. I'll probably try to script a solution anyways, after I buy the plugin; that way I get to learn about handling anchored objects in scripts AND deliver the job on time!

Maybe you are looking for

  • Disk Utility Crashed during an "erase free space" and now no space exists

    So i have no idea how to recover my space after disk utility crashed while I was out today, All I know is I had close to two hundred gigs freed that I wanted to wipe clean after resetting some things in various applications. I figure I could go find

  • My Mac book pro turns on with a grey screen with a blinking folder   question mark. Help!

    My bag carrying my computer fell on the ground as I was entering a cab. I checked my computer immediately for damage and it seemed to work fine. After about an two hours, I went back to my computer and it had a black screen and was getting very hot.

  • Searching for segment data in an IDOC!

    I had created some MATERIALVALUATION_PRICECHANGE idocs (approx 1000). Some idocs failed to update the material standard price. How can I search which IDOC is having material X in the segment data? Please suggest. Thanks,

  • Swedish characters....

    I am having serious problems with swedish characters under Oracle 8.0.5 for Linux. I have selected the WE8DEC charset for my ORCL instance and the NLS_TERRITORY AND NLS_LANGUAGE are properly set in the initORCL.ora file, but i just cant get the chara

  • My I tunes app was deleted on my iPad

    All of my music is gone from my iTunes library. The I tunes app was deleted. How do I get it back?