XML treatment

Hi!!
How can i count the nodes of a XML inside the design of the Workflow.
I have a function getxmltagValue but i want to count the number of elements of a XML.
XPATH have a function called Count('Node') but if i included this function, an error occur.
please help me!!!

Out of the box, Oracle Workflow has external java function activities to Get XML Tag Values, Compare XML Tag Values, and apply stylesheets.
If you wish to use other XML related functionality, Oracle provides an Oracle XML Parser in PL/SQL or Java and you could use these, which is basically what Workflow has done.
Hi!!
How can i count the nodes of a XML inside the design of the Workflow.
I have a function getxmltagValue but i want to count the number of elements of a XML.
XPATH have a function called Count('Node') but if i included this function, an error occur.
please help me!!!

Similar Messages

  • LOAD FILE with xml

    HI
    I want to load an xml file into a RDBMS table, using sunopsis xml driver.
    I try to use an other xml file than the initial that is defined in the driver url.
    I cannot run this instruction in a XML treatment before the interface :
    LOAD FILE "C:/AXYUS/SURSAUD/entree/sosmed1.xml" WITH DTD "C:/AXYUS/SURSAUD/entree/sosmed.dtd" REPLACE READONLY AUTO_UNLOCK
    the file doesn't change at alll and I always load the initial file ( sosmed.xml )
    any idea ?

    Make sure that you issue your LOAD FILE command
    - on the SAME Transaction (0, 1, 2, etc...) than the one used in the LKM,
    - with the SAME logical schema as the source table logical schema
    - and with the SAME Context (if you use the execution context - leave it unset).
    This should do the trick, and the connection created in the procedure will be reused in the interface, provided that you chain both in a package.
    Regards,
    -FX

  • Updating XML content

    Please, I would to know how I could update XML content from
    Spry... I need a dbless system (i means, without convencional db
    engine, with XML only). Could someone help me?
    Thanks in advance

    John:
    I need to:
    - Load an XML file
    - Modify or insert a node
    - Store the results in the XML file loaded no beginning. (I
    can do it through server side code, as Slade said)
    I need to know if Spry offer a support to do the second
    feature (modify or increase a XML file).
    Thanks for the responses; if Spry have not that features I
    think that I will use Sarissa to do that; I´m really looking
    for a unique library-framework that cover all features for XML
    treatments, but I think that doesn´t exists.

  • XSLT Transformation ABAP to XML speacial treatment of empty elements

    Dear All,
    I have created a deep abap structure which basically reflects the structure of my XML file which I would like to generate later. I have created a transformation via transaction SE80->create XSLT Program. I am also using the ABAP command call transformation...
    I have made a few ammendments to my XSLT program where required.
    I am outputting data in a loop.
    But I got a problem with one field. I must check if this date field is initial.
    Which I did by using statement:
    <xsl:if test="ENDDATE='0000-00-00'">
    But if this field is initial I have to output the following tag:
    <ENDDATE ReasonForNull="9"></ENDDATE>
    Hence I defined an attribute below in my element as follows:
       <xsl:for-each select="INSTANCE/_-PIQGB_-INSTANCE_XML">
    <xsl:if test="ENDDATE='0000-00-00'">
       <xsl:element name="ENDDATE">
           <xsl:attribute name="ReasonForNull"/>  
        </xsl:element>
    </xsl:if>
       </xsl:for-each>
    Which generates now the output as follows and is quitwe close to the desired output:
    <ENDDATE ReasonForNull=""></ENDDATE>
    Can anybody make a suggestion how I can generate the desired output.
    I assume that I would have to assign a value to the attribute to get the right output. But I got no idea how I could this in the loop.
    Many thanks in advance.
    Rainer

    Hello Rainer
    The solution is quite simple. See the example below.
    " Sample XML file:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="../tmp_EDI_ZZ_tests/Untitled2.xsl"?>
    <INVOIC02>
        <INSTANCE>
            <ENDDATE>2008-07-31</ENDDATE>
        </INSTANCE>
        <INSTANCE>
            <ENDDATE>0000-00-00</ENDDATE>
        </INSTANCE>
    </INVOIC02>
    " Stylesheet:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
        <xsl:output encoding="ISO-8859-1" method="xml" indent="yes"/>
        <xsl:template match="/*">
            <xsl:for-each select="INSTANCE">
                <xsl:choose>
                    <xsl:when test="ENDDATE='0000-00-00' ">
                        <xsl:element name="ENDDATE">
                            <xsl:attribute name="ReasonForNull">
                                <xsl:value-of select=" '9' "/>   " Set value for attribute !!!
                            </xsl:attribute>
                        </xsl:element>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:copy-of select="node()"/>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:for-each>
        </xsl:template>
    </xsl:stylesheet>
    " Result of transformation:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <ENDDATE>2008-07-31</ENDDATE>
    <ENDDATE ReasonForNull="9"/>
    Regards
      Uwe

  • Tab And New Line in XML data

    I have a formatted text which I store as a text node. By default the new line char's are converted into white spaces. I read elsewhere on this forum, that we should use the charecter entity reference equivalent &#A; for new line. I did not understand this idea clearly, so I tried this out:
    In my formatted string, I replaced all instances of '\n' with '&#A;'. I create my text node as follows:
    script.replaceAll("\n","&#A;");
    scriptElement = document.createTextNode(script);
    As expected when the XML is written the &#A10; is further encoded into "&#A10". And when I read back my XML from the parser, I get my string back with all the "&#A10;". I again need to do a replace all to get the new line charecters back.
    My question is : Is there any other standard solution to this problem or the bottom line is to replace the new line and tabs with "MUMBOJUMBO" or a standard charecter entity ref and look for the same while reading back.
    Is there anyway I could tell my XMLwriter to convert '\n' into "&#A;" and get back '\n' when I parse the XML?

    by default, all white spaces collapse: http://www.w3.org/TR/xsl/slice7.html#white-space-collapse
    you can use xml:space="preserve" in your XML elements (tags) or
    you can use <fo:block white-space-collapse="false" linefeed-treatment="preserve"> in XSL if you use XSL to format the XML.

  • XSLT and XML - Splitting out address data for a single XML item?

    Hi,
    I am currently having to change my XSLT code for processing XML feeds from the NHS because the technolgy has been moved from SOAP-based to RESTful (both of which mean very little to me!).  While most of the XML feeds display correctly I have been unable to resolve the following:
    The address data seems to be located under a single item <s.addressLine> rather than <address1>, <address2> <address3> <address4> as in the previous setup.  As a consequence of this I am unable to split out my address data into seperate address fields (in column 2 below).  The code below ....
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:s="http://syndication.nhschoices.nhs.uk/services">
    <xsl:output method="html" encoding="UTF-8"/>
    <xsl:template match="/">
    <table class="xslt_table">
      <tr>
        <th>1</th>
        <th>2</th>
        <th>3</th>
      </tr>
      <xsl:for-each select="atom:feed/atom:entry">
        <tr>
          <td><xsl:value-of select="atom:content/s:organisationSummary/s:name"/></td>
          <td><xsl:value-of select="atom:content/s:organisationSummary/s:address"/></td>
          <td><xsl:value-of select="atom:content/s:organisationSummary/s:address/s:addressLine"/></td>
        </tr>
      </xsl:for-each>
    </table>
    </xsl:template>
    </xsl:stylesheet>
    ....generates the following result:
    1
    2
    3
    Royal Eye Infirmary
    Apsley RoadPlymouthDevonPL4 6PL
    Apsley Road
    Mount Gould Hospital
    Mount Gould RoadPlymouthDevonPL4 7QD
    Mount Gould Road
    Scott Hospital
    Beacon Park RoadPlymouthDevonPL2 2PQ
    Beacon Park Road
    Peninsula NHS Treatment Centre
    20 Brest RoadPlymouthDevonPL6 5XP
    20 Brest Road
    Derriford Hospital
    Derriford RoadCrownhillPlymouthDevonPL6 8DH
    Derriford Road
    Nuffield Health, Plymouth Hospital
    Derriford RoadPlymouthDevonPL6 8BG
    Derriford Road
    Plympton Hospital
    Market RoadPlymouthDevonPL7 1QR
    Market Road
    St Barnabas Hospital
    Higher Port ViewSaltashCornwallPL12 4BU
    Higher Port View
    Liskeard Community Hospital
    Clemo RoadLiskeardCornwallPL14 3XD
    Clemo Road
    I would be very, very grateful for any thoughts and suggestions on what I might be able to do to resolve this.
    Best wishes
    Simon

    Thanks dvohra
    But in my servlet, I already have the transformer factory defined as follows
    public class JDOMServlet extends HttpServlet {
         private TransformerFactory tFactory = TransformerFactory.newInstance();
         private ResultSet rs = null;
         private StreamSource xsltSource;
         private Templates template;
         public void init(ServletConfig config) throws ServletException {
              super.init(config);
              ServletContext ctx = config.getServletContext();
              try {
                   //Want to cache the stylesheet for future resuse
                   //then it doesnt have to be loaded constantly
                   URL xslURL = ctx.getResource("/WEB-INF/viewStudentDetails.xsl");
                   System.out.println(xslURL);
                   xsltSource = new StreamSource(new java.net.URL(xslURL.toString()).openStream());
                   //xsltSource = new StreamSource(ctx.getResourceAsStream("/Web-inf/viewStudentDetails.xsl"));
                   template = tFactory.newTemplates(xsltSource);
              catch (Exception e) {
                   e.printStackTrace();
    I think the key point is that, this transformation servlet worked fine, when all it was outputting was the xml data, styled in a table. As soon as I enter more table info, (i.e. for the banner and navigation bar), the null pointer exception pops up.
    ....a lost and puzzled jase....
    Thanks again.
    JS

  • Creating XML using DBMS_XMLGEN with a namespace

    Is it possible to create an XMLTYPE using the DBMS_XMLGEN function set that contains a namespace. As far as I can see only the 'setrowsettag' function allows any control over what goes into the root element - should I be including, for example, an attribute called 'xmlns' with a value?
    The reason I ask all this is I'm trying to validate xml created from a select statement against a registered xsd.
    The xsd I've registered:
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <xs:schema targetNamespace="http://www.sepa.org/2007/XMLSchemas/Site" xmlns:sit="http://www.sepa.org/2007/XMLSchemas/Site" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sepa.org/2007/XMLSchemas/Site Site.xsd" xmlns:oraxdb="http://xmlns.oracle.com/xdb" oraxdb:flags="311" oraxdb:schemaURL="http://www.sepa.org/2007/XMLSchemas/Site.xsd" oraxdb:schemaOwner="XMLDBMASTER" oraxdb:numProps="14">
    <xs:element name="site" oraxdb:propNumber="5953" oraxdb:global="true" oraxdb:SQLName="site" oraxdb:SQLType="site1681_T" oraxdb:SQLSchema="XMLDBMASTER" oraxdb:memType="258" oraxdb:defaultTable="site1683_TAB" oraxdb:defaultTableSchema="XMLDBMASTER">
    <xs:annotation>
    <xs:documentation>Comment describing your root element</xs:documentation>
    </xs:annotation>
    <xs:complexType oraxdb:SQLType="site1681_T" oraxdb:SQLSchema="XMLDBMASTER">
    <xs:sequence>
    <xs:element name="SiteIDType" type="xs:ID" oraxdb:propNumber="5940" oraxdb:global="false" oraxdb:SQLName="SiteIDType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
    <xs:element name="SiteNameType" type="xs:string" minOccurs="1" oraxdb:propNumber="5941" oraxdb:global="false" oraxdb:SQLName="SiteNameType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
    <xs:element name="SiteAddressStructure" oraxdb:propNumber="5947" oraxdb:global="false" oraxdb:SQLName="SiteAddressStructure" oraxdb:SQLType="SiteAddressStructure1682_T" oraxdb:SQLSchema="XMLDBMASTER" oraxdb:memType="258" oraxdb:SQLInline="true" oraxdb:MemInline="false" oraxdb:JavaInline="false">
    <xs:complexType oraxdb:SQLType="SiteAddressStructure1682_T" oraxdb:SQLSchema="XMLDBMASTER">
    <xs:sequence>
    <xs:element name="AddressLine1" type="xs:string" minOccurs="1" oraxdb:propNumber="5942" oraxdb:global="false" oraxdb:SQLName="AddressLine1" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
    <xs:element name="AddressLine2" type="xs:string" minOccurs="0" oraxdb:propNumber="5943" oraxdb:global="false" oraxdb:SQLName="AddressLine2" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
    <xs:element name="AddressLine3" type="xs:string" minOccurs="0" oraxdb:propNumber="5944" oraxdb:global="false" oraxdb:SQLName="AddressLine3" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
    <xs:element name="AddressLine4" type="xs:string" minOccurs="1" oraxdb:propNumber="5945" oraxdb:global="false" oraxdb:SQLName="AddressLine4" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
    <xs:element name="PostCode" type="xs:string" minOccurs="0" oraxdb:propNumber="5946" oraxdb:global="false" oraxdb:SQLName="PostCode" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="SiteTelephoneNoType" type="xs:string" minOccurs="0" oraxdb:propNumber="5948" oraxdb:global="false" oraxdb:SQLName="SiteTelephoneNoType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
    <xs:element name="SiteMobilePlantType" type="xs:string" minOccurs="0" oraxdb:propNumber="5949" oraxdb:global="false" oraxdb:SQLName="SiteMobilePlantType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
    <xs:element name="SiteFaxNoType" type="xs:string" minOccurs="0" oraxdb:propNumber="5950" oraxdb:global="false" oraxdb:SQLName="SiteFaxNoType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
    <!--***Location code must reference the code in the Location Dataset***-->
    <xs:element name="SiteLocationCode" type="xs:string" minOccurs="1" oraxdb:propNumber="5951" oraxdb:global="false" oraxdb:SQLName="SiteLocationCode" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
    <xs:element name="SitePopulationEquivType" type="xs:positiveInteger" minOccurs="0" oraxdb:propNumber="5952" oraxdb:global="false" oraxdb:SQLName="SitePopulationEquivType" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    The method for generating the XML:
    DECLARE
    v_ctx DBMS_XMLGEN.ctxhandle;
    v_xml XMLTYPE;
    BEGIN
    v_ctx:=DBMS_XMLGEN.newcontext
    SELECT e.site_id "SiteIDType", e.site_name "SiteNameType", sit_address(e.addr_line1, e.addr_line2,
    e.addr_line3, e.addr_line4, e.post_code) AS "SiteAddressStructure", e.tel_no "SiteTelephoneNoType"
    , e.mobile_plant "SiteMobilePlantType",
    e.fax_no "SiteFaxNoType", e.ge1_location_code "SiteLocationCodeType" ,e.population_equivalent "SitePopulationEquivType"
    FROM EL03_SITES e
    WHERE e.site_id = 15'
    DBMS_XMLGEN.setrowsettag (v_ctx, 'site');
    DBMS_XMLGEN.setrowtag (v_ctx, NULL);
    v_xml := DBMS_XMLGEN.getxmltype (v_ctx);
    INSERT INTO js_xml_test
    (ID, xml_data
    VALUES ('site test', v_xml
    COMMIT;
    DBMS_XMLGEN.closecontext (v_ctx);
    END;
    The resulting XML:
    <site>
    <SiteIDType>15</SiteIDType>
    <SiteNameType>Finlas Water Treatment Works</SiteNameType>
    <SiteAddressStructure>
    <AddressLine1>Finlas Water Treatment Works</AddressLine1>
    <AddressLine2>Shermor Farm</AddressLine2>
    <AddressLine3>Luss</AddressLine3>
    <AddressLine4>Alexandria</AddressLine4>
    <PostCode>G83 8RH</PostCode>
    </SiteAddressStructure>
    <SiteTelephoneNoType>01389 850224</SiteTelephoneNoType>
    <SiteMobilePlantType>N</SiteMobilePlantType>
    <SiteLocationCodeType>123428</SiteLocationCodeType>
    </site>
    When I try to validate it, I get:
    ORA-30937: No schema definition for 'site' (namespace '') in parent '/'
    ORA-06512: at "SYS.XMLTYPE", line 345
    ORA-06512: at line 30
    How do I get a namespace declaration in the XML? Any suggestions gratefully received.

    Did you change any of the text in the lob write statements ?
    I believe you get this error if you increase the number of characters without increasing the 1st argument which looks as though it represents the number of characters

  • Connecting a CSS doc to an XML file, in a dynamic text field in Flash

    Hi all,
    I am trying to connect a CSS file such that it applies it
    self to the content of an XML file, viewed inside a dynamic text
    field. So far I have managed to gather the code that "calls" the
    contents of the XML file and also the code that calls the CSS file.
    However, when I test the flash movie I get "undefined" instead of
    the actual copy.
    Attached then is the the AS code, XML file, and CSS file. I
    hope you could help me connect everything together.
    And of course, THANKS!!
    -----AC------
    Scrolling Text XML by Digital Science |
    www.digitalscience.za.org
    /////////////Load XML Data/////////////
    function loadXML(loaded) {
    if (loaded) {
    xmlNode = this.firstChild;
    header = [];
    txt = [];
    total = xmlNode.childNodes.length;
    for (i=0; i<total; i++) {
    header
    = xmlNode.childNodes.childNodes[0].firstChild.nodeValue;
    txt
    = xmlNode.childNodes.childNodes[1].firstChild.nodeValue;
    gotoAndStop(11);
    } else {
    errorMsg.text = "Error loading XML";
    xmlData = new XML();
    xmlData.ignoreWhite = true;
    xmlData.onLoad = loadXML;
    xmlData.load("ewmn_content.xml");
    stop();
    import TextField.StyleSheet;
    var ss:StyleSheet = new StyleSheet();
    ss.onLoad = function() {
    txt_mc.styleSheet=this; // where yourTF is your textfield
    ss.load("jokes.css"); // where yourSS.css is your css file.
    -----XML----------
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/css" href="jokes.css"?>
    <JOKES>
    <ONE>Tirza Sapir</ONE>
    <JOKE>Founder and choreographer of the RikudNetto dance
    group, teacher and lecturer, researcher, documenter and
    choreographer within the framework of Eshkol-Wachman Movement
    Notation. She was Head of the School of the Arts of Dance at the
    Seminar Hakibbutzim College of Education, 2000–2007, where
    she established the Dance Theatre and the Practicing Teachers
    courses, and specialized training in Teaching and Treatment of
    Learning Disabilities by means of Eshkol-Wachman Movement Notation.
    She has written three books containing the movement scores of dance
    suites: Birds, Landscapes, and Hanukka Notebooks. Member of the
    Movement Notation Society, 1968–2008. Student and colleague
    of the late Professor Noa Eshkol who was the co-founder and
    inventor of Eshkol-Wachman Movement Notation.</JOKE>
    <ONE>Sharon Reshef-Armony</ONE>
    <JOKE>Head of the School for the Arts of dance at the
    Kibbutzim College of Education in Tel Aviv. Teaches EWMN,
    dance-theatre and composition. Choreographer of theatre plays and
    film. Selected works: Hunger (Tmuna Theatre 2003-09), Film - Live
    (Haifa Theatre 2007-08), Yakish &amp; Pupche (Gesher Theatre
    2007-09), Children of a lesser God (Beer Sheva Theatre 2008-09).
    M.Ed (1997) from Lesley College MA in Creative Arts in Learning.
    Doctoral student at ResCen, Middlesex University/ London.
    Dancing in Rikudnetto group since 1990.</JOKE>
    <ONE>Tally Ronen</ONE>
    <JOKE>M.Ed. at Lesley University in Integrating Arts in
    Learning.
    Educational instructor at Kibbutzim College of Education and
    teaching dance in schools and at Clore Center, Upper Galilee. Dance
    choreographer for children.
    Dancing in Rikudnetto group since 1991.</JOKE>
    <ONE>Nira Al-Dor, Ph.D</ONE>
    <JOKE>20 years of Teaching EWMN at the School of the
    Dance Arts in Kibbuzim College of Education and at the School of
    Arts in Tel Aviv. Her study was focused on the impact of learning
    EWMN on the development of coordination.
    Dancing in Rikudnetto group since 1986.</JOKE>
    <ONE>Henner Drewes</ONE>
    <JOKE>Lectures at the Kibbutzim College of Education in
    Tel Aviv on dance and notation related technology. In 2008 he
    started working as a research assistant at Salzburg University in
    the project Visualizing Dance Archives.
    He was awarded the Tanzwissenschaftwpreis NRW, Germany 2006
    for his research on 3D representation of movement and notation.
    Ph.D. (2002) at the University of Leipzig. He is the author
    of the software EW Notator, a 'word-processor' for creating EWMN
    scores.</JOKE>
    <ONE>Shlomit Ofer</ONE>
    <JOKE>M.A. at Haifa University at the Faculty of
    Education with distinction, and currently doctoral student there.
    Educational instructor and teacher of EWMN at Kibbutzim
    College of Education. Staging performances of dance theatre in the
    community.
    Dancing in Rikudnetto group since 1993.</JOKE>
    <ONE>Lilach Shalit</ONE>
    <JOKE>M.A. in Expressive Therapies with specialization
    in dance-movement therapy at Lesley University.
    Educational instructor and teacher of EWMN in the course for
    Dance-Theatre at Kibbutzim College of Education. Also teaching EWMN
    in the School for Advanced Studies of the college, course for
    Learning Disabilities, and at Orot College.
    Dance-movement therapist and team coordinator at 'Tom' school
    for learning disabilities and owner of a private clinic for
    dance-movement therapy.
    Dancing in Rikudnetto group since 1998.</JOKE>
    <ONE>Michal Manor-Amir</ONE>
    <JOKE>M.A. at the University of Leeds (Bretton Hall
    College and Israel Extention) in Arts Education specialization in
    Dance. Doctoral student at the Hebrew University of Jerusalem, in
    the Faculty of Humanities, the School of Education.
    Teaching movement in the Kibbutzim College of Education
    within preparatory courses of Dance, Dance-Theatre and within the
    Preschool course.
    A corrective teacher through movement and EWMN in elementary
    and high schools, and a national teacher-instructor at the dance
    supervisor's office in the Israeli ministry of education.
    Dancing in Rikudnetto group since 1998.</JOKE>
    <ONE>Amit Chesny-Bahari</ONE>
    <JOKE>B.Ed. at Kibbutzim College of Education.
    Teaching movement and dance to preschool and high school
    children.
    Dancing in Rikudnetto group since 2004.</JOKE>
    <ONE>Orly Yaakov</ONE>
    <JOKE>B.Ed. at Kibbutzim College of Education, and
    graduating from the special education faculty.
    Teaching EWMN and creative movement at elementary schools as
    well as special education school for children ages 6-21 with medium
    to deep retardation. Also teaching creative movement and
    preparation for ballet to preschool children.
    Dancing in Rikudnetto group since 2006.</JOKE>
    </JOKES>
    ------CSS-----
    JOKE
    COLOR: #333333;
    DISPLAY: block;
    FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
    WHITE-SPACE: normal;
    font-size: 11px;
    MARGIN-BOTTOM: 15px;
    BODYBLD
    COLOR: #990000;
    DISPLAY: block;
    FONT-SIZE: 11pt;
    FONT-WEIGHT: bold;
    MARGIN-BOTTOM: 0px
    BODYBOLDUN
    COLOR: #00CCFF;
    DISPLAY: block;
    LINE-HEIGHT: normal;
    MARGIN-BOTTOM: 10px;
    TEXT-ALIGN: left;
    font-size: 11px;
    text-decoration: underline;
    font-weight: bold;
    ONE
    COLOR: #00CCFF;
    DISPLAY: block;
    LINE-HEIGHT: normal;
    TEXT-ALIGN: left;
    font-size: 14px;
    font-weight: bold;
    white-space: normal;
    QUESTION
    COLOR: red;
    DISPLAY: block;
    FONT-FAMILY: Arial;
    FONT-SIZE: larger;
    FONT-VARIANT: normal
    TITLE
    COLOR: black;
    DISPLAY: block;
    FONT-FAMILY: 'Arial Black';
    FONT-SIZE: 14pt
    CATEGORY
    FONT-FAMILY: Arial;
    FONT-SIZE: 8pt;
    FONT-VARIANT: small-caps;
    TEXT-TRANSFORM: uppercase

    In essence you can just do:
    TextField.text = XML.node1 + XML.node2;

  • Interactive medical report with Flex/AIR, XML, U3D and PDF

    Hello,
    I am computer science student and during my master thesis I want to program an interactive medical report which should include some 3D models (U3D) and which should provide the following options:
    Interactive manipulation of the 3D models
    Typing in a structured medical report
    Loading of a XML file with additional information
    Loading of medical image data (jpg images)
    At best, only one pdf file as resulting report
    And: A nice user interface (I like the interface elements of Flex...)
    I think, the best way is a pdf file which includes all the needed data. The problem is that I don't know exactly what software combination fulfills my requirements... I read some things about Adobe Flex and AIR and the U3D format and I suppose, the great interface builder "Flash Builder 4" might be useful to generate a nice user interface. BUT: I was not able to find out, how to include U3D in Flex/AIR.
    Then I found the nice pdf library iText (http://itextpdf.com/examples/index.php?page=chapters) which is able to produce a pdf file from a swf file and to include a U3D-model with an additional JavaScript file for manipulations.
    BUT again: If I have a swf flash file with the nice user interface (generated with the Flash Builder), how can I access the U3D model in the final pdf document? Imagine: I click on a "rotate" button in the swf and then the U3D-Model in the pdf should rotate...
    Ok, as you can see, it is a complex szenario.
    My questions summarized:
    What, in your opinion, is the best technology for my task? Flex? AIR?
    How can I import the U3D-models? Should I use PaperVision, Sandy3D or something else?
    Is there a way to save user inputs directly in the pdf file, or as new pdf file or as xml file?
    What is the best way to produce the user interface? Flashbuilder, or maybe a html container with "normal" html interface elements and then the events communication between JavaScript and ActionScript?
    How can I export all the stuff to one pdf document? Should I use iText?
    Best regards,
    Steven

    Thanks for making my point - perfect is the enemy of good.  We tolerate less capable, less perfect system that are in place now, because of the false expectation that it should be perfect.  Incremental improvements are rejected, because they are not perfect.  Even an imperfect algorithm can find 'Broken' as a common thread in your example, and highlight them for the clinician to evaluate their impact on the current treatment.  This no less likely to miss the connection than a clinician trying to scan through handwritten notes, in the 5 - 10 minutes he/she has to interact with the patient and determine what to do. 
    Because of legal concerns, incremental but imperfect improvements don't get implemented, so nothing ever moves forward.  Imagine if after the Wright Brothers first flight, no improvements were considered acceptable unless they completely eliminated the risk of failure - there wouldn't be any airlines to go bankrupt today!
    For the most part, IT has focused on activities where 'perfect' is achievable.  Accounting in its various forms have been the primary focus of most IT systems.  In that area, the vocabulary is very limited, well defined, and consistent.  A debit is always a debit, and a credit is always a credit.  Medicine is completely different. It is much larger in scope, poorly defined, the vocabularies are mostly non-existent, and where they exist are incomplete and inconsistent.  Despite the huge leaps forward in the last century, there is still more unknown than known about how and why the body works.  This environment makes most individuals trained in IT uncomfortable.  Until we learn how to deal with 'fuzzy', Healthcare IT is going to be limited to the billing and collection functions that it mostly accomplishes today.
    Mark

  • Is it possible that 1 RTF template with 1 xml file produces many PDF files

    Hello,
    We are using XML publisher with eBS.
    As part of it, we've got treatments that generate invoices.
    One treatment produces 1 big XML file with many invoices in it.
    Currently, this big XML file generates one big PDF file with all the invoices.
    I'd like to know if it's possible to keep the big XML file (with many invoices), and instead, generate 1 PDF file per invoice ?
    Basically we would like to split the big PDF file into small PDF, one PDF file per invoice .
    If it's possible, then, how can we do it ?
    I hope my explanation is clear.
    Thanks in advance for your help,
    Olivier

    Have you tried the BI publisher bursting feature?
    Take a look at this:
    http://www.strsoftware.com/wp-content/uploads/2011/09/Oracle-EBS-and-BI-Publisher-Report-Creation-Bursting-and-Delivery.pdf
    http://garethroberts.blogspot.com/2008/03/bi-publisher-ebs-bursting-101.html
    Thanks,
    Bipuser

  • XML + XSLT - Retaining LF's in output

    Hi
    I am using FOP to process an XML file to a PDF using a XSLT. The
    description column can have LF characters in it, which currently are
    getting filtered out. I have converted teh LF's to the escape codes,
    but this has had no effect (I do something similar with the greater
    than symbol and that works). How do I go about retaining them. This
    has been driving me around the bend for ages. Some guidence in this
    would be most appreciated.
    Below is some sample code illustrating the issue. The second row is
    supposed to span multiple lines in the text cell.
    ------------- XML --------------------------------
    <SERVERS>
    <SERVER>
    <NAME>SERV1.DOMAIN.COM</NAME>
    <DESCRIPTION>This description does not have any LF's in the
    text</DESCRIPTION>
    </SERVER>
    <SERVER>
    <NAME>SERV2.DOMAIN.COM</NAME>
    <DESCRIPTION>This is intended to be a line with a LF between here
    and here and another LF between here
    and here and another
    LF between here
    and here</DESCRIPTION>
    </SERVER>
    </SERVERS>
    ------------- XSLT -------------------------------
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.1"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:fo="http://www.w3.org/1999/XSL/Format"
    xmlns:java="http://xml.apache.org/xslt/java"
    exclude-result-prefixes="java">
    <!-- C:\Files\xml>"C:\Program Files\Apache Software
    Foundation\fop-0.20.5\fop.bat" -xml c:\files\xml\servercr.xml -xsl
    C:\files\xml\servercr.xsl -pdf c:\temp\xml\servercr.pdf -->
    <xsl:template match="SERVERS">
    <xsl:variable name="CR" select="'
    '"/>
    <xsl:variable name="LF" select="'
    '"/>
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
    xmlns:fox="http://xml.apache.org/fop/extensions">
    <fo:layout-master-set>
    <fo:simple-page-master master-name="A4-L" page-width="297mm"
    page-height="210mm" margin-top="10mm" margin-bottom="10mm"
    margin-left="10mm" margin-right="10mm">
    <fo:region-body margin="10mm"/>
    <fo:region-before extent="20mm"/>
    <fo:region-after extent="10mm"/>
    <fo:region-start extent="10mm"/>
    <fo:region-end extent="10mm"/>
    </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="A4-L">
    <fo:flow flow-name="xsl-region-body">
    <fo:block>
    <fo:table table-layout="fixed" border-color="rgb(0,0,0)"
    border-style="solid" border-width="1pt">
    <fo:table-column column-width="40mm"/>
    <fo:table-column column-width="200mm"/>
    <fo:table-header background-color="rgb(214,214,214)"
    font-size="8pt" font-weight="bold" text-align="center">
    <fo:table-row text-align="center" font-size="8pt">
    <fo:table-cell border-color="rgb(0,0,0)"
    border-style="solid"
    border-width="1pt"><fo:block>Server</fo:block></fo:table-cell>
    <fo:table-cell border-color="rgb(0,0,0)"
    border-style="solid"
    border-width="1pt"><fo:block>Description</fo:block></fo:table-cell>
    </fo:table-row>
    </fo:table-header>
    <fo:table-body>
    <xsl:for-each select="SERVER">
    <fo:table-row text-align="center" font-size="8pt">
    <fo:table-cell border-color="rgb(0,0,0)"
    border-style="solid" border-width="1pt">
    <fo:block vertical-align="middle">
    <xsl:value-of select="NAME"/>
    </fo:block>
    </fo:table-cell>
    <fo:table-cell border-color="rgb(0,0,0)"
    border-style="solid" border-width="1pt">
    <fo:block vertical-align="middle">
    <xsl:value-of select="DESCRIPTION"/>
    </fo:block>
    </fo:table-cell>
    </fo:table-row>
    </xsl:for-each>
    </fo:table-body>
    </fo:table>
    </fo:block>
    </fo:flow>
    </fo:page-sequence>
    </fo:root>
    </xsl:template>
    </xsl:stylesheet>
    I know this isn't an oracle issue, but hopefully someone can point me in the right direction.
    Thanks for your help.
    Nick.

    Hi
    Thanks for your response it was very useful.
    The attribute linefeed-treatment on its own didn't solve the problem, and another link I found suggested that may be a bug. However making use of the attribute white-space-collapse did seem to do what I wanted!
    So it loks like the solution is to use one bug to fix another :) I'm sure that can't be good and is asking for problems later on. But for now it will do.
    Many thanks for your guidance.
    Nick.

  • Detecting Change in Elements between Versions of XML Doc

    Hi There
    I have a structured XML Schema based table in XMLDB 9.2.0.4 and am trying to detect when a non-repeating element off the root element changes (audit).
    I have created a row level update trigger and each time one element is changed via UPDATEXML two or three other elements are detected as changed. I am wondering if I have some sort of DOM fidelity issue here and perhaps my trigger is not the best for detecting this. we use XS:ANY elements in the XML schema and I know that there appears to be space injection into the element tag content and also extraneous namespace tags on tags in the XS:ANY elements.
    Can you give me any advice on my schema XSD and perhaps my trigger. Maybe what I am trying to do is not possible until 10g version of XMLDB.
    XSD
    ====
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSpy v2005 U (http://www.xmlspy.com) by Martyn J Ricks (University of Tasmania) -->
    <!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Grant John Hyland (University of Tasmania) -->
    <xs:schema xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns="http://www.utas.edu.au/cu" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.utas.edu.au/cu" elementFormDefault="qualified" attributeFormDefault="unqualified" xdb:storeVarrayAsTable="true">
         <xs:element name="UnitSetYear" type="UnitSetYearType" xdb:defaultTable="CU_UNIT_SET_YEARS_XML">
              <xs:annotation>
                   <xs:documentation>Comment describing your root element</xs:documentation>
              </xs:annotation>
         </xs:element>
         <xs:complexType name="OfferedInCoursesType" xdb:SQLType="CU_UN_OFFEREDINCRSS_TYP">
              <xs:sequence>
                   <xs:element name="Course" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="OFFERED_IN_COURSE" xdb:SQLType="VARCHAR2" xdb:SQLCollType="CU_UN_OFFERED_IN_CRS_COLTYP">
                        <xs:annotation>
                             <xs:documentation>Unit set is involved in these courses, as specified in the quality assurance manual.</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:length value="3"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RecommendedTextType" mixed="true" xdb:SQLType="CU_UN_RECOMMENDEDTEXT_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded" xdb:SQLType="VARCHAR2"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RecommendedTextsType" xdb:SQLType="CU_UN_RECOMMENDEDTEXTS_TYP">
              <xs:sequence>
                   <xs:element name="RecommendedText" type="RecommendedTextType" minOccurs="0" maxOccurs="unbounded" xdb:SQLCollType="CU_UN_RECOMMEND_TEXT_COLTYP" xdb:SQLName="RECOMMENDED_TEXT"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RequiredTextType" mixed="true" xdb:SQLType="CU_UN_REQUIREDTEXT_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded" xdb:SQLType="VARCHAR2"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RequiredTextsType" xdb:SQLType="CU_UN_REQUIREDTEXTS_TYP">
              <xs:sequence>
                   <xs:element name="RequiredText" type="RequiredTextType" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="REQUIRED_TEXT" xdb:SQLCollType="CU_UN_REQUIRED_TEXT_COLTYP">
                        <xs:annotation>
                             <xs:documentation>Prescribed texts</xs:documentation>
                        </xs:annotation>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="BAMajorsType" xdb:SQLType="CU_UN_BAMAJORS_TYP">
              <xs:sequence>
                   <xs:element name="BAMajor" maxOccurs="unbounded" xdb:SQLName="BA_MAJOR" xdb:SQLType="VARCHAR2" xdb:SQLCollType="CU_UN_BA_MAJORS_COLTYP">
                        <xs:annotation>
                             <xs:documentation>Majors that this unit applies to in the BA degree course</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="20"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="AssessType" mixed="true" xdb:SQLType="CU_UN_ASSESS_TYPE">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="ReqTextType" mixed="true" xdb:SQLType="CU_UN_REQTEXT_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RequisiteType" xdb:SQLType="CU_UN_REQUISITE_TYP">
              <xs:sequence>
                   <xs:element name="ReqType" xdb:SQLName="REQUISITE_TYPE" xdb:SQLType="VARCHAR2">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="6"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="ReqText" type="ReqTextType" xdb:SQLName="REQUISITE_TEXT"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RequisitesType" xdb:SQLType="CU_UN_REQUISITES_TYP">
              <xs:sequence>
                   <xs:element name="Requisite" type="RequisiteType" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="REQUISITE" xdb:SQLCollType="CU_UN_REQUISITE_COLTYP"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="TeachPatternType" mixed="true" xdb:SQLType="CU_UN_TEACHPATTERN_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded" xdb:SQLType="VARCHAR2"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="DescType" mixed="true" xdb:SQLType="CU_UN_DESC_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="SpecialNoteType" mixed="true" xdb:SQLType="CU_UN_SPECIALNOTE_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="UnitSetYearType" xdb:SQLType="CU_UN_UNITSETYEAR_TYP">
              <xs:sequence>
                   <xs:element name="UnitSetID" xdb:SQLName="UNITSET_ID">
                        <xs:simpleType>
                             <xs:restriction base="xs:integer">
                                  <xs:minInclusive value="10000000"/>
                                  <xs:totalDigits value="8"/>
                                  <xs:fractionDigits value="0"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="Year" xdb:SQLName="YEAR">
                        <xs:annotation>
                             <xs:documentation>The academic year of the unit set</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:integer">
                                  <xs:totalDigits value="4"/>
                                  <xs:fractionDigits value="0"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="UnitSetLabel" xdb:SQLName="SET_LABEL" xdb:SQLType="VARCHAR2">
                        <xs:annotation>
                             <xs:documentation>The label that will be used as terms of reference for the unit set</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="20"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="UnitSetTitle" xdb:SQLName="UNIT_TITLE" xdb:SQLType="VARCHAR2">
                        <xs:annotation>
                             <xs:documentation>The Unit Set Title for the Year</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="100"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="Offered" xdb:SQLName="OFFERED" xdb:SQLType="VARCHAR2">
                        <xs:annotation>
                             <xs:documentation>Is the unit on offer this year (Y/N). Defaults to Y.</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:length value="1"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="SpecialNote" type="SpecialNoteType" xdb:SQLName="SPECIAL_NOTE"/>
                   <xs:element name="InWeb" xdb:SQLName="IN_WEB" xdb:SQLType="VARCHAR2">
                        <xs:annotation>
                             <xs:documentation>Should this Unit Set appear on the web.</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:length value="1"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="Desc" type="DescType" xdb:SQLName="DESCRIPTION" xdb:SQLType="CLOB">
                        <xs:annotation>
                             <xs:documentation>Short description of Unit content</xs:documentation>
                        </xs:annotation>
                   </xs:element>
                   <xs:element name="Staff" xdb:SQLName="STAFF" xdb:SQLType="VARCHAR2">
                        <xs:annotation>
                             <xs:documentation>Staff teaching this unit.</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="500"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="TeachPattern" type="TeachPatternType" xdb:SQLName="TEACHING_PATTERN">
                        <xs:annotation>
                             <xs:documentation>Number of lectures , tutorials, laboratories and workshops</xs:documentation>
                        </xs:annotation>
                   </xs:element>
                   <xs:element name="Requisites" type="RequisitesType" xdb:SQLName="REQUISITES"/>
                   <xs:element name="Assess" type="AssessType" xdb:SQLName="ASSESSMENT">
                        <xs:annotation>
                             <xs:documentation>Mode of assessment and percentages</xs:documentation>
                        </xs:annotation>
                   </xs:element>
                   <xs:element name="BAMajors" type="BAMajorsType" minOccurs="0" xdb:SQLName="BA_MAJORS"/>
                   <xs:element name="RequiredTexts" type="RequiredTextsType" xdb:SQLName="REQUIRED_TEXTS"/>
                   <xs:element name="RecommendedTexts" type="RecommendedTextsType" xdb:SQLName="RECOMMENDED_TEXTS"/>
                   <xs:element name="OfferedInCourses" type="OfferedInCoursesType" xdb:SQLName="OFFERED_IN_COURSES"/>
              </xs:sequence>
         </xs:complexType>
    </xs:schema>
    Trigger
    ========
    CREATE OR REPLACE TRIGGER CU_UNITSETYR_XML_AUDR_TRG
    AFTER DELETE OR UPDATE
    ON CU_UNIT_SET_YEARS_XML
    FOR EACH ROW
    DECLARE
    v_user VARCHAR2(30);
    v_old_xml_doc xmltype;
    v_new_xml_doc xmltype;
    v_old_unitset_id cu_unit_sets.unitset_id%TYPE;
    v_old_offered VARCHAR2(1);
    v_new_offered VARCHAR2(1);
    v_old_inweb VARCHAR2(1);
    v_new_inweb VARCHAR2(1);
    v_old_title VARCHAR2(100);
    v_new_title VARCHAR2(100);
    v_old_staff VARCHAR2(500);
    v_new_staff VARCHAR2(500);
    v_old_special_note xmltype;
    v_new_special_note xmltype;
    v_old_unit_desc xmltype;
    v_new_unit_desc xmltype;
    v_old_teach_pattern xmltype;
    v_new_teach_pattern xmltype;
    v_old_assess xmltype;
    v_new_assess xmltype;
    v_old_offered_in_courses xmltype;
    v_new_offered_in_courses xmltype;
    v_old_BA_Majors xmltype;
    v_new_BA_Majors xmltype;
    v_old_req_texts xmltype;
    v_new_req_texts xmltype;
    v_old_reco_texts xmltype;
    v_new_reco_texts xmltype;
    v_old_year INTEGER;
    v_mod_type VARCHAR2(1);
    BEGIN
    -- Establish the username from the CUM_PORTAL_APP context
    v_user := sys_context('CUM_PORTAL_APP','CURRENT_USER');
    IF (v_user IS NULL) THEN
    -- Means that CUM Portal App did not make the change
    v_user := USER;
    END IF;
    -- Determine modification type
    IF (updating) THEN
    v_mod_type := 'U';
    ELSIF (deleting) THEN
    v_mod_type := 'D';
    END IF;
    v_old_xml_doc := :OLD.sys_nc_rowinfo$;
    v_new_xml_doc := :NEW.sys_nc_rowinfo$;
    SELECT extractvalue(v_old_xml_doc, '/UnitSetYear/UnitSetID'),
    extractvalue(v_old_xml_doc, '/UnitSetYear/Year'),
    extractvalue(v_old_xml_doc, '/UnitSetYear/Offered'),
    extractvalue(v_new_xml_doc, '/UnitSetYear/Offered'),
    extractvalue(v_old_xml_doc, '/UnitSetYear/UnitSetTitle'),
    extractvalue(v_new_xml_doc, '/UnitSetYear/UnitSetTitle'),
    extract(v_old_xml_doc, '/UnitSetYear/SpecialNote'),
    extract(v_new_xml_doc, '/UnitSetYear/SpecialNote'),
    extract(v_old_xml_doc, '/UnitSetYear/Desc'),
    extract(v_new_xml_doc, '/UnitSetYear/Desc'),
    extractvalue(v_old_xml_doc, '/UnitSetYear/Staff'),
    extractvalue(v_new_xml_doc, '/UnitSetYear/Staff'),
    extractvalue(v_old_xml_doc, '/UnitSetYear/InWeb'),
    extractvalue(v_new_xml_doc, '/UnitSetYear/InWeb'),
    extract(v_old_xml_doc, '/UnitSetYear/TeachPattern'),
    extract(v_new_xml_doc, '/UnitSetYear/TeachPattern'),
    extract(v_old_xml_doc, '/UnitSetYear/Assess'),
    extract(v_new_xml_doc, '/UnitSetYear/Assess'),
    extract(v_old_xml_doc, '/UnitSetYear/OfferedInCourses'),
    extract(v_new_xml_doc, '/UnitSetYear/OfferedInCourses'),
    extract(v_old_xml_doc, '/UnitSetYear/BAMajors'),
    extract(v_new_xml_doc, '/UnitSetYear/BAMajors'),
    extract(v_old_xml_doc, '/UnitSetYear/RequiredTexts'),
    extract(v_new_xml_doc, '/UnitSetYear/RequiredTexts'),
    extract(v_old_xml_doc, '/UnitSetYear/RecommendedTexts'),
    extract(v_new_xml_doc, '/UnitSetYear/RecommendedTexts')
    INTO v_old_unitset_id,
    v_old_year,
    v_old_offered,
    v_new_offered,
    v_old_title,
    v_new_title,
    v_old_special_note,
    v_new_special_note,
    v_old_unit_desc,
    v_new_unit_desc,
    v_old_staff,
    v_new_staff,
    v_old_inweb,
    v_new_inweb,
    v_old_teach_pattern,
    v_new_teach_pattern,
    v_old_assess,
    v_new_assess,
    v_old_offered_in_courses,
    v_new_offered_in_courses,
    v_old_BA_Majors,
    v_new_BA_Majors,
    v_old_req_texts,
    v_new_req_texts,
    v_old_reco_texts,
    v_new_reco_texts
    FROM dual;
    IF (v_old_unitset_id IS NOT NULL AND v_old_year IS NOT NULL) THEN
    -- Had to do this to avoid problems with create resource statement which on insert appears
    -- to manifest itself as an update of a null document????
    IF (updating OR deleting) THEN
    -- Audit the XML document
    INSERT INTO cu_unit_set_years_xml_audit
    (unitset_id, YEAR, xml_doc, mod_type, mod_by, mod_date)
    VALUES
    (v_old_unitset_id,
    v_old_year,
    v_old_xml_doc.getclobval(), -- convert to clob
    v_mod_type,
    USER,
    SYSDATE);
    END IF;
    IF (updating AND v_old_offered != v_new_offered) THEN
    cu_events_pkg.log_event(p_event_type => 'USOFF',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Offered">'||v_old_offered||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_inweb != v_new_inweb) THEN
    cu_events_pkg.log_event(p_event_type => 'USINWEB',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Publish on Web">'||v_old_inweb||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_title != v_new_title) THEN
    cu_events_pkg.log_event(p_event_type => 'USTIT',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="UnitSet Title">'||v_old_title||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_special_note.getClobVal() != v_new_special_note.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USSPECN',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Special Note">'||NVL(v_old_special_note.getStringVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_unit_desc.getClobVal() != v_new_unit_desc.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USDESC',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Description">'||NVL(v_old_unit_desc.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_staff != v_new_staff) THEN
    cu_events_pkg.log_event(p_event_type => 'USSTAFF',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Staff">'||NVL(v_old_staff,'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_teach_pattern.getClobVal() != v_new_teach_pattern.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USTEACHP',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Teaching Pattern">'||NVL(v_old_teach_pattern.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_assess.getClobVal() != v_new_assess.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USASSESS',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Asessment">'||NVL(v_old_assess.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_offered_in_courses.getStringVal() != v_new_offered_in_courses.getStringVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USOFFCRS',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Offered in Courses">'||NVL(v_old_offered_in_courses.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND ((v_old_BA_Majors IS NULL) OR (v_old_BA_Majors.getStringVal() != v_new_BA_Majors.getStringVal()))) THEN
    -- Special Treatment here because the BAMajors tag is optional.
    -- If missing this causes an error with the getClobVal() method.
    IF (v_old_BA_Majors IS NULL) THEN
    cu_events_pkg.log_event(p_event_type => 'USBAMAJ',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="BAMajors">NULL</Col>
    </Row>
    </RowSet>'));
    ELSE
    cu_events_pkg.log_event(p_event_type => 'USBAMAJ',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="BAMajors">' || v_old_BA_Majors.getStringVal() ||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    END IF;
    IF (updating AND v_old_req_texts.getClobVal() != v_new_req_texts.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USREQTXT',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Required Texts">'||NVL(v_old_req_texts.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_reco_texts.getClobVal() != v_new_reco_texts.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USRECOTXT',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Recommended Texts">'||NVL(v_old_reco_texts.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    END IF;
    END;

    Be aware that you could also do an ALTER SESSION instead of a ALTER SYSTEM. This would prevent to shutdown the database to make the change, within the session, active.
    M

  • Make a sort with ODI while generating XML File

    Hi all,
    I made a package whith several interfaces and a treatment.
    Each interface targets a table in my XML schema and the final treatment is a CreateXMLFile.
    Everything goes well, my XML file is generated :D
    Now I'd like to make a sort in an XML element. I know how to order the elements between them but can't find a way to sort a specific element. Excuse my poor english, I'm not really clear...
    My XML is built like this :
    <root>
    <questions>
    <question>
    <questionnumber>1</questionnumber>
    </question>
    <question>
    <questionnumber>2</questionnumber>
    </question>
    <questions>
    <root>
    So my problem is to make the questionnumber ordered.
    I tried to modify the IKM SQL Incremental Update to add a ORDER BY in the "Insert new rows" step.
    The generated code is executed with success... but in the end, my XML file is not sorted :S
    So first question, do you have an idea to be able to view the data in my XML schema tables ? This schema is stored in the memory engine and not in an external base. I ask that because when you try to execute the query "select * from XMLSchema.XMLTable" in the Operator, it appears you get the datas you had when the schema had been reversed. Idem when you try to view the datas in datastore. So first of all I'd like to do this control to be sure my order by is taken into account.
    Second question, do you know how the Odi XML driver builds the XML File with the command CreateXMLFile, because I think that my XML table is well sorted but that the CreateXMLFile doesn't repect this order. I checked the driver tutorial but couldn't find any help on that subject.
    So if anyone has got an idea to help me, I would appreciate a lot.
    Thanks,
    Thierry

    Still searching but without success

  • Temp tables with a XML target

    Hi guys,
    I posted a question last week about sorting an element while generating an XML file but didn't get any answers maybe my question wasn't clear. Here is another problem with the XML technology...which begins to upset me because I don't have any idea to solve it.
    To sum up, my XML schema named QST is stored in the memory engine and not in an external base. I have a package with a set of interfaces one for each XML table and a final CreateXMLFile treatment.
    Most of the time, my package runs well but sometimes I get this error in one interface:
    Step 1:
    +     Query+
    +     drop table QST.C$_0QUESTION+
    +     Warning message:+
    +     0 : null : java.sql.SQLException: Table not found: QST_C$_0QUESTION in statement [drop table QST_C$_0QUESTION]+
    Step 2:
    +     Query:+
    +     create table QST.C$_0QUESTION ( .... )+
    +     Error message:+
    +     0 : null : java.sql.SQLException: The table C$_0QUESTION already exists in the schema QST+
    This problem can occur at the creation of any working table C$, I$, E$ or SNP_CHECK_TAB.
    So it seems it is linked with the in build memory but what gets me mad is that I can't get the pattern to reproduce the error.
    Any idea would be greatly appreciated and I really hope this post will be more "inspiring" than my first one :D
    Thanks,
    Thierry

    Hi Rathish,
    thanks a lot for the time you spend to help me.
    As you say, the table is coming with an underscore in the error message... it's strange but I think it's just a small bug when ODI generates the error message. I say so because the package runs with success most of the time and the XML I get is well built. But maybe not, so to answer your questions.
    The KM I use is the original IKM SQL Incremental Update as it is indicated in the ODI user guide.
    So there shouldn't be any problem
    Best regards,
    Thierry

  • Join two XML sections

    Hello,
    I have a question. I wish join two XML sections set the hierarchique same level for display this in a for each boucle.
    For example:
    The XML structure:
    <General_Information>
    <TREATMENT_GROUP>839856</TREATMENT_GROUP>
    <REQUEST_DATE>28/09/2009</REQUEST_DATE>
    </General_Information>
    <General_Information>
    <TREATMENT_GROUP>739876</TREATMENT_GROUP>
    <REQUEST_DATE>28/10/2009</REQUEST_DATE>
    </General_Information>
    <Product_Information>
    <TREATMENT_GROUP>839856</TREATMENT_GROUP>
    <TREATMENT_GROUP_NAME>Nom du group treatment 839856</TREATMENT_GROUP_NAME>
    </Product_Information>
    <Product_Information>
    <TREATMENT_GROUP>739876</TREATMENT_GROUP>
    <TREATMENT_GROUP_NAME>Nom du group treatment 739876</TREATMENT_GROUP_NAME>
    </Product_Information>
    I want display in my report.
    Treatment group 839856
    Treatment group name Nom du groupe de traitement 839856
    Request date 28/06/2009
    and in other section
    Treatment group 739876
    Treatment group name Nom du groupe de traitement 739876
    Request date 28/10/2009
    Is possible?
    Thanks for futures answers.
    I'm sorry for my english I'm french :)

    Hi,
    Thanks for your answer.
    But I have a new problem. The XML structure is :
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
    <GetDataXmlResponse xmlns="http://....">
    <GetDataXmlResult>
    <IDBSEval xmlns="">
         <General_Information>
              <TREATMENT_GROUP>839856</TREATMENT_GROUP>
              <REQUEST_DATE>28/09/2009</REQUEST_DATE>
         </General_Information>
         <General_Information>
              <TREATMENT_GROUP>739876</TREATMENT_GROUP>
              <REQUEST_DATE>28/10/2009</REQUEST_DATE>
         </General_Information>
         <Product_Information>
              <TREATMENT_GROUP>739876</TREATMENT_GROUP>
              <TREATMENT_GROUP_NAME>Nom du group treatment 739876</TREATMENT_GROUP_NAME>
         </Product_Information>
         <Product_Information>
              <TREATMENT_GROUP>839856</TREATMENT_GROUP>
              <TREATMENT_GROUP_NAME>Nom du group treatment 839856</TREATMENT_GROUP_NAME>
         </Product_Information>
    </IDBSEval>
    </GetDataXmlResult>
    </GetDataXmlResponse>
    </soap:Body>
    </soap:Envelope>
    I can't do then make a relation with two sections with the new header.
    I have make a test with the XML starting by <GetDataXmlResulst> and is OK.
    Have you a solution with the new XML header?
    Thanks for futures answers.

Maybe you are looking for

  • How to i read multiple text files one bye one

    hi all I need to select the text files multiple times and read files one by one some how i managed to select the one text file and scan the data in the text file i need to do this for mutiple files at the same time please help me Solved! Go to Soluti

  • Strange error in sql*plus in a line with "&"

    Hi friends, this error is very strange: Open your SQL*PLUS. write this: DECLARE V_1 VARCHAR2(10); V_2 VARCHAR2(10); BEGIN V_1:=&var1; --V_2:=&var2; END; Why it ask me for a value to var2 ??????????? Does it ignore the -- at the begining of the line (

  • Servlet - EJB, caching home & context problem

    Hello, I just run into the following problem: I created a thin client which accesses the EJB's via a servlet. In this servlet I cached the InitialContext und and the reference to the Home interface. While creating the initial context I provided login

  • Block next calls to integration process

    Hi, I have a BPM which makes 2 succesive calls to web service (synchronous). If there is a problem in the calls to any of the 2 web services, I want to raise an error and stop all other calls to this BPM to go through. Right now, if I make 1 call and

  • RMAN IN FORMS 6i

    HI HOW CAN USE THE COMMAND 'RMAN' WITHIN FORMS 6i WITH A BUTTON ANY SAMPLE