How can I control creation of empty tags when using ora:view syntax?

I'm using XMLQuery and ora:view syntax to create xml resources in the database but I'd like to be able to prevent the creation of empty tags for null values in the table.
CREATE OR REPLACE PROCEDURE proc_ctsi_build is
XMLdoc XMLType;
BEGIN
DBMS_XDB.deleteResource('/public/CTSI/ctsi_phsall_rpt1.xml',1);
SELECT XMLQuery(
'<Progress_Report>
<Personnel_Roster>
{for $c in ora:view("CTSI_INVEST_SOURCE_V")
    let $username  := $c/ROW/COMMONS_USERNAME/text(),
$expertise  := $c/ROW/AREA_OF_EXPERTISE/text()
     return
  <Investigator>
   <Commons_Username>{$username}</Commons_Username>
<Area_of_Expertise>{$expertise}</Area_of_Expertise>
</Investigator>}
</Personnel_Roster>
</Progress_Report>'
RETURNING CONTENT) INTO XMLdoc FROM DUAL;
IF(DBMS_XDB.CREATERESOURCE('/public/CTSI/ctsi_phsall_rpt1.xml', XMLdoc)) THEN
DBMS_OUTPUT.PUT_LINE('Resource is created');
ELSE
DBMS_OUTPUT.PUT_LINE('Cannot create resource');
END IF;
COMMIT;
END;
In this example how can I prevent getting <Area_of_Expertise/> in my output when AREA_OF_EXPERTISE is null in the table?
Thanks

Hi,
you can use if else conditions.
{if ($expertise) then
<Area_of_Expertise>{$expertise}</Area_of_Expertise>
else ()}
**not tested**
Ants
Message was edited by:
Ants Hindpere

Similar Messages

  • How can i control the timings of my slideshow using iphoto on my ipad

    Q: 1 how can i control the timings of my pupil's slideshows using iPhoto on the iPad?
    Q: 2 then how can i export them?
    Q: 3 how can i combine them from 8 individual slideshows to 1 for showing to their parents at an assembly?
    many thanks in anticipation of your collective help
    brian

    Here's my take on the same thing:
    Short answer: the dpi is set when you decide what size you're printing at.
    Long Answer: Dpi means nothing in the digital world of your computer. There are no "inches" to have "dots per..." Size is measured in pixels. That's the same on your camera. It doesn't take 10 x 8 or 6 x 4 shots. It takes shots measured in megapixels. For instance 4,000 x 3,000 is a 12 megapixel camera.
    Using that example, that shot from that camera has 12 million pixels. So that's how many "Dots" there are. To decide the ratio of dots per inch, you now need to decide the "inches" part. And that's printing. Print at 10 x 8 and the dpi will be 4,000/10 or about 400 dpi. At 6 x 4 then it's 4,000/6 or 660 dpi. Work the other way: Print at 300 dpi and the resulting image will be about 13 inches on the longer side.
    So, your photo as a fixed number of pixels. Changing the dimensions of the print will vary the dpi, changing the dpi will vary the dimensions of the print.
    For more see http://www.rideau-info.com/photos/mythdpi.html
    Regards
    TD

  • How can I disenable the EXCEL field format when use ALV download to excel ?

    Dear friends,
         I have a problem with the ALV download to EXCEL. One field Value in ALV is like u2018-abcdeu2026u2019.the character u201C-u201Cis the first   position  in field value.when I download  the value to EXCEL,the field value u2018-abcdeu2026u2019 changed u2018=-abcdeu2026u2019 in EXCEL.how can I remove u2018=u2019 in EXCEL when I down to excel used ALV.
    I add a space in u2018  -abcdeu2026u2019,So this value can be download to Excel .
    Have you any solve method?
    User does not use excel logo button to download.
    User use Local fileu2026 button to download
    Thanks
    Sun

    add a single quote to the beginning of the field.
    like:  '-abcde
    in excel it will be shown as : -abcde

  • How can I keep a state machine readable when using large amounts of in/outputs

    Hello, I am new to Labview,
    Read trough the fundamentals and the
    getting started and a lot of examples.
    What I want to do is use a standard
    state machine from the template, and add some stages, for example
    orange, apple, banana. At this point I can use numeric controls to
    put in the amount of oranges, apples, bananas there are. I can even
    use a led to tell the user which state of the state-machine is
    active.
    The thing is there will be more numeric
    controls and more leds and it would be nice if the code would still
    be readable when there are 20 inputs and 20 outputs.
    Questions
    (1) It would be nice if I could use the
    typedef to select the right state AND the corresponding numeric
    controls and leds out of a cluster or an array kind of structure to
    keep the number of wires low. Is this possible, how can I do this?
    (2) I tried to put the numeric controls
    into a cluster but that way I can't put the numeric control for the
    apples in the upper right corner and the numeric control for the
    oranges in the lower left down corner of the front panel.
    (3) An example would be really nice, I
    know that I saw some examples describing this problem but there are
    so many examples that after a few hours of searching I haven't found
    the right one yet.
    Thanks in advance for the effort.
    p.s. I will not use Labview to do
    calculations on fruit, I am only using this to make the question
    easier to understand.

    I can only start a proper answer but I might as well start with that.
    When I am developing State Machines I have to think about what data is used and manipulated in each state. I then have to think about where am i going to keep and manage the data. I list all of the fields that are "touched" in each state and what values are used together and which are independent form the others. After this phase of the analysis, I usually have some data structure defined (cluser array etc).
    Then I flipp from thinking about the state to thinking about the data (after all this is LabVIEW and the data-flow paradigm is critical). If I see data that is only used by the State machine and is used in many of the states, then the data structure get put in a shift-register for easy access in each state. This maybe enough of an answer for your fruity question.
    When i see data that is shared or only used in a handful of states then I concider putting the data in an Action Engine. Depending on how you design your AE, you can access each of the fruit totoal by name or increment etc as required.
    If your app demands many fileds that are all related (can't be broken into distinct data structures) then create a cluster that has all of your values that are used by the AE. Then create an Wrapper VI for each call of the AE but only put the associated fields on the FP of the wrapper and then bundle that value into the cluster and invoke the AE.
    Ben
    PS: Sorry about reverting to neBulus mode but this topic could take days to cover in detail.
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • In MIRO, how can I get a credit to balance when using dr/cr lines?

    When processing a logistics invoice verification document via MIRO, we're trying to post a credit memo against a purchase order with muliple lines (one return, and on non-return line).  The value of the return line is greater, and the invoice is billing for receipts/returns on mulitple lines on the PO (it has a credit amount for the entire return to be posted against the return line, and a restocking fee to be posted against a text based PO line). 
    In MIRO, I have selected credit memo and am posting a credit for a gross amount of $550 in the header.  The return line I'm trying to post against is for $575, and the non-return line for the restocking fee is for $25.  However, when I'm posting against both, the system is indicating that I'm out of balance by $50.  It appears that it's not calculating the $25 as a credit.  I've tried looking at documents around posting against returns and posting credits, but haven't seen anything that addresses this scenario.  I've also tried using negative amounts, but SAP does not accept these.  We're currently using SAP ECC 6.0.  How can I get this to balance?

    Only Apple Account Security could help at this point. You can try calling Apple Support in Canada - you'll have to find one of the several ways, such as Skype, to call an 800 number from outside of the relevant country - and ask for Account Security and see if they can help. Or you can find a friend who speaks Chinese and ask them to help you talk to Apple Support in China. There are really no other options that I know of.
    Note, by the way, that these are user-to-user support forums. You aren't speaking with Apple when you post here.
    Regards.

  • How can we correct a blocked plug in when trying to view internet videos?

    My son's computer suddenly started stating "Blocked plug in" when trying to view any videos on the internet.  We followed the instructions to upgrade Adobe Flashplayer but have been unsuccessful on many attempts and we have no leads to follow to correct the problem.
    Can anyone help or suggest something?  Thanks.

    Try this, uninstalling and then reinstalling Adobe Flash:
    Uninstall flash:
    http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-mac-os.html
    Reinstall Flash:
    http://get.adobe.com/flashplayer/otherversions/
    Select the OSX for you run the .dmg installer (you can go to Safari Preferences/General "Save doenloaded file to:" select other and then select desktop from the left column.
    Run the installer pkg.
    When it has completed, reboot your computer to finish the install.
    Hope this helps

  • How can i control which iView gets updated when a nav node gets clicked?

    Hello,
    Following setting: the content area of the desktop inner page inside the default frameworkpage usually consist of just one iView.
    But what happens when there are 3 iViews inside? How do i have to call the pageloader which of the 3 iViews should get updated when a nav node of the detailed navigation is clicked?
    Thanx

    Hi
    Since you will be using the Merger Id property, they will be linked to a single link in navigational area.
    Refreshing a page / clicking the link in navigation Pane will result in refreshing of all the iViews.
    Regards
    Chander Kararia
    # Please close the thread once get the correct answer. Give rewards for answers.

  • How can I retain the local user name when using imported network tags?

    I am using network tags that have been imported from a remote DSC module 6.1 application. I would like to retain the remote user in the tag records instead of whoever is logged in locally. Is this possible?

    See answer there:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=137&HOID=50650000000500000084B20000&HIsQuestionPoster=No&HTHREAD=000045700&UCATEGORY_0=_18_%24_17_&UCATEGORY_S=0
    Cyril Bouton
    Active LabVIEW Developper

  • Exporting to PDF - How Can I Get A Small File Size When Using Lots of Vector Art?

    I am trying to create a small PDF file for e-book distribution purposes. My Indesign pages contain a variety of photographs, vector icons and vector maps.
    A publisher in Britain who does similar books on a Mac using Creative Suite was able to create a 22-page document very similar to mine (similar icons, graphics, density, etc) that is only 2.84 mb, a small fraction of the file size that I'm getting! I've included a sample page of his below, which is a low-res jpeg, but on the original PDF all of the text and images (except the jpeg cliff background) are super sharp - they look like vectors when you zoom in. I've also included screenshots of his PDF export settings.
    I don't know if he's exporting directly out of Indesign, but my best guess is that he is.
    My vector-based icons, numbers and maps are bloating my PDFs considerably. When I remove them, the Indesign and exported PDF file sizes drop dramatically. For the life of me, I can't figure out how he got such small PDF files sizes using so much vector art! The PDF graphic compression settings don't seem to include any options for vector art.
    My vector art graphics (numbering, icons, maps) are all saved as Illustrator AI files and then placed in Indesign as linked graphics. My best guess as to why I can't achieve smaller PDF files is I'm either doing something wrong with the vector graphics themselves or handling/exporting them improperly out of Indesign.
    I am using CS4 for PC and am on a Dell Machine running Windows 7.

    I am trying to create a small PDF file for e-book distribution purposes. My Indesign pages contain a variety of photographs, vector icons and vector maps.
    A publisher in Britain who does similar books on a Mac using Creative Suite was able to create a 22-page document very similar to mine (similar icons, graphics, density, etc) that is only 2.84 mb, a small fraction of the file size that I'm getting! I've included a sample page of his below, which is a low-res jpeg, but on the original PDF all of the text and images (except the jpeg cliff background) are super sharp - they look like vectors when you zoom in. I've also included screenshots of his PDF export settings.
    I don't know if he's exporting directly out of Indesign, but my best guess is that he is.
    My vector-based icons, numbers and maps are bloating my PDFs considerably. When I remove them, the Indesign and exported PDF file sizes drop dramatically. For the life of me, I can't figure out how he got such small PDF files sizes using so much vector art! The PDF graphic compression settings don't seem to include any options for vector art.
    My vector art graphics (numbering, icons, maps) are all saved as Illustrator AI files and then placed in Indesign as linked graphics. My best guess as to why I can't achieve smaller PDF files is I'm either doing something wrong with the vector graphics themselves or handling/exporting them improperly out of Indesign.
    I am using CS4 for PC and am on a Dell Machine running Windows 7.

  • How can I customize the auto-generated WSDL when using a PL/SQL webservice?

    My webservice returns a refcursor as an ArrayOfString. (I followed the sample code.) Instead of everything being returned in one large array, I need to create a correct record hierarchy, like <rec1><fld1></fld1></rec1>, etc.
    As far as I know, this grouping has to be done in a WSDL file. However, following this sample, the WSDL is auto-generated and overwritten with each launch of the webservice.
    Am I missing something, or are there other secrets/tips?
    thanks

    Very Nice:) Thanks!
    1. I added this to my HTM HEADER:
    <script language="JavaScript" type="text/javascript">
    function test_javaprompt () {
    var Hours = prompt("How Many Hours?");
    $x('P142_HOURS').value = Hours;
    doSubmit()
    </script>
    2. I Created an Item:
    P142_HOURS
    3. I Created a Button:
    TEST_JAVA
    a. In the Button area for, Optional URL Redirect, I selected- Target is a URL
    b. URL Target- javascript:test_javaprompt();
    When I press the Button then it does Exactly what I want it to do.
    Except....
    Ultimately, I do not want this javascript assigned to the button.
    I would like to run this javascript when the value of a DatePicker Item, (P142_DROPS_SUBMITTED) is changed.
    If you can help me with that then I'll be forever grateful:)
    -Gary

  • How can I get to the photo tray when using iphoto with HP C6280 all-in-one printer

    How do I get the photo tray option to come up in iphoto from my mac notebook when I have an HP C6280 all-in-one printer

    I have an HP all-in-one C5140.  When I print from iPhoto the dialog that comes up has a "Presets" drop down at the bottom.  One of the choices is "Print from Photo Tray."  Is that there on yours?  If not make sure you have the latest software from HP.
    Dan

  • How can I save downloaded iOS system updates when using multiple iPhones

    I have multiple iPhones, and every time I want to update them, I have to wait forever for these downloads to transfer. The update downloads, but is not saved so that I can use it for another iPhone, requiring me to download the same file yet again, and again, and again, wasting my time. Any ideas or is this a lost cause?
    Message was edited by: Ron Yochum

    Not sure about a Mac, but on Windows it does save the file to a location in the users profile area and if the phones are identical (eg: both 3GS) I have been able to copy the file to the location in the other users profile and have it use it to update.

  • How can I get which radiobutton is checked when using jsf?

    I can't seem to find a way to get which of the radiobuttons in my form is checked. Help...

    I followed your advice and it apparently worked. We'll see for sure when I log in tomorrow.
    The black box actually asked for a password for a new keyring that I created yesterday named. When the box requested that specific keyring, I believed I know who was asking and why.
    That solved my problem.
    Thanks Matt!

  • How can I disable DNS queries in Firefox (when using a proxy) ?

    I am behind a "Chinese wall" and use an HTTP proxy to tunnel and encrypt my data traffic.
    Unfortunately, Firefox still sends DNS queries for the websites, that I visit and reveals more information than I want.
    Is there a way to disable DNS, when I use an HTTP/S proxy ?
    My current workaround is to set a firewall rule for outbound DNS traffic of Firefox. But not all users are able to configure their firewall.

    That is done via an onbeforeunload or onunload event that displays a JavaScript alert.
    *https://developer.mozilla.org/en/DOM/window.onbeforeunload
    *https://developer.mozilla.org/en/DOM/window.onunload
    You can try to search for a Greasemonkey script to reset and block such events.
    *http://www.greasespot.net/ - Greasemonkey
    *http://wiki.greasespot.net/Main_Page - GreaseSpot

  • How can I create a line width 0 when using a line style other than solid?

    Every time I select a line style other than solid,
    the line width gets reset to 0. This makes for a
    VERY faint line on the printed output.

    If this question is for the HiQ box, this is not a product that is supported by general technical support Applications Engineers any longer. The help for HiQ is exclusively online, and can be found at http://www.ni.com/support/hiqsupp.htm
    Of course, this question can still be answered by other HiQ users that visit this forum. Please post back if you have any questions. Thanks, and have a great day.
    Daniel McChane
    Application Engineer
    National Instruments

Maybe you are looking for

  • Add not 1 but 2 to 3 rows at a time?

    I have worked hard at my project and with my question can someone help me in which no one did. Maybe it is because it was too long and the length of the code was throwing people off. That wasn't the whole code. Anyways I have managed to add 1 row to

  • Eim mapping reports changed from tools to webclient?

    can anyone tell me how to generate eim mapping report which was on tools for siebel 7.7? i heard it is now generated through client and when trying to generate it is giving error "No file has been attached to a record please attach a file SBL-SVC-001

  • Login message. How to display computer usage policies upon login

    Hi Everyone, I currently am working at a school, and we have recently had a large number of iMacs installed in the classrooms. My question is: When a student logs in to the computer, I would like to be able to display the school usage policies, and f

  • Crystal Report Windows Forms Viewer problems - table could not be found

    Hi, I installed Crystal Report Viewer in SAP Business One 2007. All the while, I can run the reports without any problem. but when I loaded some of the new report, it gives me the following error message: the caption says: "Crystal Reports Windows Fo

  • Thumnails disappeared! How to get them back? Tried every solution on the forums

    I tried changing "browser.newtab.url" value to "about:newtab" but after when i restart the browser(after changing the value) the value of "browser.newtab.url" resets to default automatically :( I have also tried by resetting my browser to default. Bu