Multi-level nested tables for repeatable XML Elements

Hi there,
Suppose we have a XML Schema „ASchema“ like this (XMLDB schema annotations are left out for simplicity):
<xs:schema xmlns:xs=" .... " />
<xs:element name=“A“>
     <xs:complexType>
          <xs:sequence>
               <xs:element name=“B“ maxOccurs=“unbounded“/>
                    <xs:complexType>
                         <xs:sequence>
                              <xs:element name = “C“ maxOccurs=“unbounded“/>
                         </xs:sequence>
                    </xs:complexType>
               </xs:element>
          </xs:sequence>
     </xs:complexType>
</xs:element>
</xs:schema>
After registering this schema in Oracle, I can define a table like this:
CREATE TABLE ATable
id NUMBER,
doc XMLTYPE
XMLTYPE COLUMN doc
XMLSCHEMA “ASchema“ ELEMENT “A“
VARARRAY doc.“XMLDATA“.“B“ STORE AS TABLE “BTable“
((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX)
This creates a nested table "BTable" within the table "ATable". So far so good, I can use this nested table to gain faster access on every possible subelement of Element B when I set an appropriate index.
I now want to create another nested table for element “C“ like this:
DROP TABLE ATable;
CREATE TABLE ATable
id NUMBER,
doc XMLTYPE
XMLTYPE COLUMN doc
XMLSCHEMA “ASchema“ ELEMENT “A“
VARARRAY doc.“XMLDATA“.“B“ STORE AS TABLE “BTable“
((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX)
VARARRAY doc.“XMLDATA“.“B“.“C“ STORE AS TABLE “CTable“
((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX)
But this statement fails with the error message something like „ ... no such attribute ... „
And here's my question: is it possible to create nested tables for repeatable XML Elements that are subelements of other repeatable XML Elements ? And if so, how can I do it ?
Thank you very much in advance
Jan

Found a (partial) solution myself:
If you add the attribute xdb:storeVarrayAsTable="true" to the root element of the XML schema, Oracle XMLDB generates nested tables for all repeatable XML Elements while registering the XML schema.
Unfortunately, the names of these nested tables are system-generated, hence it's a bit uncomfortable to set indices on them. You can find out the names of these nested tables as follows:
select table_name, parent_table_name, parent_table_column from user_nested_tables;
Further information on that subject is supplied in the following thread:
Re: default tables for elements with maxoccurs > 1
It would be nice if there was a way to name the generated nested tables via appropriate XMLDB schema annotations.
regards
Jan

Similar Messages

  • NESTED Tables for Sub-types when creating table for Super-type

    If I create the following types, as an example:
    Person with subtypes: Employee and Customer
    Appointment
    CREATE OR REPLACE TYPE Person_OT AS OBJECT (
    person#                         NUMBER,
    personSurname                    VARCHAR2(50),
    personForenames               VARCHAR2(50),
    personDateOfBirth               DATE,
    personAddress                    Address_OT,
    ) NOT FINAL ;
    CREATE OR REPLACE TYPE Employee UNDER Person_OT (
    empSalary               NUMBER,
    empNoSales          NUMBER,
    makes               Appointment_List_OT
    ) FINAL ;
    CREATE OR REPLACE TYPE Appointment_OT AS OBJECT (
    some attributes
    CREATE OR REPLACE TYPE Appointment_List_OT AS TABLE OF REF Appointment_OT ;
    When creating the table to hold objects of Person type, how can the requisite nested table for representing 'makes' be declared? The below approach is not correct, however the table will not compile without naming the nested tables.
    CREATE TABLE Person_TBL OF Person_OT (
    Person#     PRIMARY KEY)
    NESTED TABLE makes STORE AS Appointment_List_NTBL;
    Advice very much appreciated!

    CREATE TABLE Person_TBL OF Person_OT(
    Person# PRIMARY KEY)
    NESTED TABLE TREAT(SYS_NC_ROWINFO$ AS EMPLOYEE).MAKES STORE AS Appointment_List_NTBL
    Table created.
    SQL> select * from user_nested_tables
      2  /
    TABLE_NAME                     TABLE_TYPE_OWNER
    TABLE_TYPE_NAME                PARENT_TABLE_NAME
    PARENT_TABLE_COLUMN
    STORAGE_SPEC                   RETURN_TYPE          ELEMENT_SUBSTITUTABLE
    APPOINTMENT_LIST_NTBL          SCOTT
    APPOINTMENT_LIST_OT            PERSON_TBL
    TREAT(SYS_NC_ROWINFO$ AS "SCOTT"."EMPLOYEE")."MAKES"
                           DEFAULT                VALUE                         N
    SQL>  SY.

  • Rename or Tag Element for particular Xml Element.

    hi,
    How to rename or Tag Element for particular Xml Element using Java Script.
    eg)label to labels
    Thanks in advance
    Smile

    Hi,
           Thanks a lot Jeff...
            I'm doing a huge program with lot of tasks. While doing that,my mind didn't strike to check if the tag is not already exist, then only to create new tag...  Thanks for all of the indesigner experts for their replies...
    I used the following codes with ur idea.
                        var renamewith = textbox1.text;
                        try
                            alert(app.activeDocument.xmlTags.item(renamewith).name);
                            if(app.activeDocument.xmlTags.item(renamewith).name)
                               var testTag = app.activeDocument.xmlTags.item(renamewith);
                        catch(e)
                            var testTag = app.activeDocument.xmlTags.add({name: renamewith});
    With Regards,
    Vel.

  • PS tables for Network Activity elements

    Hi,
    I am trying to find the tables for Network Activity elements and its relationship with Activity (PS Module).
    There are Std BAPIs to get the data.
    But I want the table field names since it would be used by the XI team for data mapping.
    Thanks in advance

    Hi Pranav
    Thanks for yr information. we can select the object WBS, and shall be able to view PS texts in overview and create PS Texts.
    My requirement rather, question is, can we attach any documents without having DMS. ie., can we assign any of the Windows document which are available in hard disc?
    please thorough some light on this and thanks in advance and belated happy diwali wishes to you.
    Thanks
    Sudhakar

  • Repeating XML Elements

    We have a pdf form, created in designer...<br />All is well except for repeating xml tags.<br /><br /><state>IN</state><br /><statededuction>50.00</statededuction><br /><state>TX</state><br /><statededuction>150.00</statededuction><br /><br />Fields are global......<br /><br />The XML can contain one or 2 instances of the <state> tag.<br />When there is 1 instance, IN shows in both fields on the form.<br />When there are 2 instances for the <state> tag, TX shows in both fields.<br /><br />According to the documentation, the "Order" of the fields will help<br />adobe know that the first occurrence of <state> in the xml file, goes in the first occurrence of field "state" on the pdf template.  I have correctly ordered the fields, to no avail.<br /><br />Any thoughts?<br />Thank you!

    Thank you very much for your reply!<br /><br />You are correct, removing the global makes the 2 occurrences show correctly.  <br /><br />However, I have to have a 2nd copy of the same form and without the fields being global, they won't show on the 2nd copy.<br /><br />You are right, it works very well if I have unique names.<br /><state1>....<br /><state2>....<br /><br />Unfortunately, I'm not sure I can edit the inbound data.<br />I will try.  We are trying to minimize the impact on the application<br />and handle the data exactly as it is used for the html copy of the form.<br /><br />PS:  Are there other options:<br />1) can I somehow use a subform?<br />2) can designer apply a style sheet to convert the repeating <br />tags to unique names.<br />3) Transformation Editor is not an option, right - since it doesn't<br />allow xml input, right?<br />4) Other thoughts?<br /><br />LarryG

  • Null value in Nested table of nested table for xml guru Steve Muench

    The procedure I am using takes xml document with nested levels and insert into single table using DBMS_XMLSave.insertXML.
    I am able to insert into table without any error message but when I am selecting row from table, it is showing null values in all the column of nested table's inner nested table.
    When I am removing nested table's nested table by replacing with object type, it is showing data of object type for the first occurance and ignoring the rest nested occurance.
    Help is greatly appreciated.
    Below is the sql I used to create objects and table:-
    Create or Replace Type addressType as Object
    Line_one     varchar2(40),
    Line_two     varchar2(40),
    City          Varchar2(30),
    State          Varchar2(2),
    zip          Varchar2(10)
    Create or Replace Type ce_reqType as Object
    Status               varchar2(25),
    Status_date          Date,
    type_code          Varchar2(25),
    review_begin_date     Date,
    assigned_review_date     date
    Create or Replace type ce_reqListType
    as table of ce_reqType;
    Create or Replace Type LicenseType as Object
    type_code          Varchar2(10),
    license_number          Varchar2(16),
    ce_requirements      ce_reqListType
    Create or Replace type LicenseListType
    as table of LicenseType;
    Create table IndividualType
    individual_id          Number(9),
    social_security_number Varchar2(9),
    Last_name          varchar2(40),
    First_name          Varchar2(40),
    Middle_name          Varchar2(40),
    Birth_date          Date,
    address          addressType,
    Licenses          LicenseListType
    nested table licenses store as licensestab
    (nested table ce_requirements store as lic_ce_reqtab);

    Maddy wrote:
    dbms_output.put_line('The count is '||bookset.count); --> I can see COUNT =1 (why)Because instead of adding an element to bookset collectionto are assigning (ergo replacing) it a collection containing last fetched book. Use:
    declare
        bookset book_table;
        ln_cnt pls_integer;
    begin
        bookset := book_table(book_obj('madhu','kongara','sudhan'));
        dbms_output.put_line('The count is '||bookset.count); --> I can see COUNT =1
        bookset := book_table(); --> Assigning back to NULL.
        dbms_output.put_line('The count is '||bookset.count); --> I can see count as 0
        for rec in (select * from book) loop --> Now Looping two times.
          dbms_output.put_line(' name > '||rec.name);
          bookset.extend;
          bookset(bookset.count) := book_obj(rec.name, rec.author, rec.abstract);
        end loop;
        dbms_output.put_line('The count is '||bookset.count); --> I can see COUNT =1 (why)
    end;
    The count is 1
    The count is 0
    name > Harry Potter
    name > Ramayana
    The count is 2
    PL/SQL procedure successfully completed.
    SQL> Or better use bulk collect:
    declare
        bookset book_table;
        ln_cnt pls_integer;
    begin
        bookset := book_table(book_obj('madhu','kongara','sudhan'));
        dbms_output.put_line('The count is '||bookset.count); --> I can see COUNT =1
        bookset := book_table(); --> Assigning back to NULL.
        dbms_output.put_line('The count is '||bookset.count); --> I can see count as 0
        select  book_obj(name,author,abstract)
          bulk collect
          into  bookset
          from  book;
        for i in 1..bookset.count loop --> Now Looping two times.
          dbms_output.put_line(' name > '||bookset(i).name);
        end loop;
        dbms_output.put_line('The count is '||bookset.count); --> I can see COUNT =1 (why)
    end;
    The count is 1
    The count is 0
    name > Harry Potter
    name > Ramayana
    The count is 2
    PL/SQL procedure successfully completed.
    SQL> SY.

  • Nested table for PO Output (Item texts) - trying again.

    Hi experts
    I posted this question already, but the formatting disappeared, so trying again.
    I have created a PDF version of the Purchase Order output. Everything works well, except for the last step - a nested table where I want to display Item texts from the PO for every item.
    The steps I followed:
    1. In the Interface, I read the item texts, and placed them in an internal table, where the table has a field EBELP (item number) and a field for the text. So, for a PO with 5 items, where 2 items have texts, the table might look like this:
         00010    First line of text for item 10.
         00010    Second line of text for item 10.
         00040    Only line of text for item 40.
    2. In the context of the form, I put this table 'under' the existing 'ITEM' entry. In other words, for every item, the texts must be displayed. Obviously I then put in an entry under the WHERE CONDITIONS to say that EBELP = ITEM-EBELP, otherwise it would repeat every line of text for every item.
    The problem is that it does not behave quite as I expected. It currently prints:
    Item 10 information
             First line of text for item 10.
             Second line of text for item 10.
    Item 20 information
             Only line of text for item 40.
    Item 30 information
    Item 40 information
    Item 50 information
    Where it should print:
    Item 10 information
             First line of text for item 10.
             Second line of text for item 10.
    Item 20 information
    Item 30 information
    +Item 40 information+
             Only line of text for item 40.
    Item 50 information
    In other words, it simply 'breaks' on change of EBELP, and moves the text to the next line, as opposed to the correct line.
    I tried debugging, and it does appear to be doing things in the right order, but it is still doing the output incorrectly. I also searched the forums for similar problems, but I could not find a solution to the problem I am experiencing.
    I also put 'dummy' (empty) rows into the table - that fixes it, but then it messes with my layout and I get something like:
    Item 10 information
             First line of text for item 10.
             Second line of text for item 10.
    Item 20 information
    Item 30 information
    Item 40 information
             Only line of text for item 40.
    Item 50 information
    In the above, I don't want the gaps where the empty rows are.
    Please advise?
    Thanks and kind regards
    Casper

    Reposted without formatting...
    I have created a PDF version of the Purchase Order output. Everything works well, except for the last step - a nested table where I want to display Item texts from the PO for every item.
    The steps I followed:
    1. In the Interface, I read the item texts, and placed them in an internal table, where the table has a field EBELP (item number) and a field for the text. So, for a PO with 5 items, where 2 items have texts, the table might look like this:
         00010    First line of text for item 10.
         00010    Second line of text for item 10.
         00040    Only line of text for item 40.
    2. In the context of the form, I put this table 'under' the existing 'ITEM' entry. In other words, for every item, the texts must be displayed. Obviously I then put in an entry under the WHERE CONDITIONS to say that EBELP = ITEM-EBELP, otherwise it would repeat every line of text for every item.
    The problem is that it does not behave quite as I expected. It currently prints:
    Item 10 information
             First line of text for item 10.
             Second line of text for item 10.
    Item 20 information
             Only line of text for item 40.
    Item 30 information
    Item 40 information
    Item 50 information
    Where it should print:
    Item 10 information
             First line of text for item 10.
             Second line of text for item 10.
    Item 20 information
    Item 30 information
    Item 40 information
             Only line of text for item 40.
    Item 50 information
    In other words, it simply 'breaks' on change of EBELP, and moves the text to the next line, as opposed to the correct line.
    I tried debugging, and it does appear to be doing things in the right order, but it is still doing the output incorrectly. I also searched the forums for similar problems, but I could not find a solution to the problem I am experiencing.
    I also put 'dummy' (empty) rows into the table - that fixes it, but then it messes with my layout and I get something like:
    Item 10 information
             First line of text for item 10.
             Second line of text for item 10.
    Item 20 information
    Item 30 information
    Item 40 information
             Only line of text for item 40.
    Item 50 information
    In the above, I don't want the gaps where the empty rows are.
    Please advise?
    Thanks and kind regards
    Casper

  • Help how to create full set of nested table with given xml schema?

    Hi everyone, I am new to oracle and programming language. Recently I was asked to create nested table with given a complex xml schema. I knew that after the registration of xsd file, oracle will generate few tables( including nested table) and types for the users. But it seems to be not complete set of tables. Can anyone please help me with the problem. Really thanks a lot on the help given. I would like to give extra explanation if what I have given above is not clear enough. Thanks

    How about posting the XML Schema, the code you used to register it, the database version you are using and the list of nested tables that were generated...

  • How to update a column in a nested table for a given record in the master t

    Hi I have translations for all attributes of an item stored as a nested table
    CREATE OR REPLACE TYPE T_ITM_ATTR AS OBJECT(
    ATTR_NM VARCHAR2(30),
    ATTR_VAL VARCHAR2(200 CHAR),
    ATTR_STS_BL NUMBER(1))
    INSTANTIABLE
    FINAL
    CREATE OR REPLACE TYPE T_ITM_ATTRIBUTES AS TABLE OF T_ITM_ATTR;
    CREATE TABLE XGN_MOD_ITEMS_T
    IDS NUMBER,
    MOD_IDS NUMBER NOT NULL,
    MOD_ITM_IDS NUMBER NOT NULL,
    LGG_ID VARCHAR2(3 CHAR) NOT NULL,
    ITM_TYPE VARCHAR2(50 CHAR) NOT NULL,
    ITM_NM VARCHAR2(50 CHAR) NOT NULL,
    ITM_BLOCK VARCHAR2(50 CHAR),
    ITM_ATTR T_ITM_ATTRIBUTES,
    ITM_COL1 VARCHAR2(1 CHAR),
    ITM_DSC VARCHAR2(100 CHAR),
    CREATED_BY VARCHAR2(30 CHAR) DEFAULT USER NOT NULL,
    CREATION_DATE DATE DEFAULT SYSDATE NOT NULL,
    LAST_UPDATED_BY VARCHAR2(30 CHAR),
    LAST_UPDATE_DATE DATE
    NESTED TABLE ITM_ATTR STORE AS NESTED_ITM_ATTR_T
    TABLESPACE XGN4_TAB
    PCTUSED 40
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    FREELISTS 1
    FREELIST GROUPS 1
    BUFFER_POOL DEFAULT
    What I want to do is to update only the attr_val of each item to a value coming from a temporary table where the user inserted his translations
    So how can I update ?
    this doesn't work since I have to know the previous value?
    update table(
    select t2.attr_val
    from XGN_MOD_ITEMS_T t1, table(t1.itm_attr) t2
    where t1.mod_itm_ids=160) attr
    set value(attr) = 'Profil'
    where value(attr) = 'Profile'
    This updates all occurences for all entries wich doesn't work either because I have for each language another record
    UPDATE /*+ NESTED_TABLE_GET_REFS */
    NESTED_ITM_ATTR_T
    SET attr_val = 'SHIT'
    WHERE attr_val = 'Profile'

    http://www.psoug.org/reference/nested_tab.html
    Look for UPDATE. There is a working demo on the page.
    That said nested tables are not a good place to store data. Reconsider using relational tables with, if necessary, object views.

  • Imported XSLT cannot create attributes for generated XML element

    I have two xslts. One imports the other.
    The imported xslt creates XML elements with attributes and this XML is stored in a variable in the main stylesheet
    If I perform the transformation with JRE prior to 1.6.0.18 then all works fine
    If I use 1.6.0.18 or 1.6.0.19 then the attributes aren't added.
    If I add attributes in the main xslt it works fine or if I output the element directly instead of first storing it in a variable then it also works fine.
    Problem seems to be when you try to add attributes from an imported stylesheet and store the generated element in a variable.
    Below two stylesheets to illustrate :
    First MainStylesheet.xsl
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Copyright 1993-2005 Seagull Software Systems, Inc. -->
    <xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:exsl="http://exslt.org/common"
    extension-element-prefixes="exsl"
    exclude-result-prefixes="xs">
    <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes" />
    <xsl:import href="innerstylesheet.xsl"/>
    <xsl:template match="/TestData">
    <xsl:variable name="generatedElementXml">
    <xsl:call-template name="generateElement">
    <xsl:with-param name="s">testValue</xsl:with-param>
    </xsl:call-template>
    </xsl:variable>
    <xsl:for-each select="exsl:node-set($generatedElementXml)">
    *** GeneratedElementXML {<xsl:text>
    </xsl:text><xsl:copy-of select="*"></xsl:copy-of>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>Next innerstylesheet.xsl
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:exsl="http://exslt.org/common"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    extension-element-prefixes="exsl" >
            <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>
            <xsl:template name="generateElement">
                       <xsl:param name="s"/>
                    <TestElement testAttribute="$s" />
            </xsl:template>
    </xsl:stylesheet>The result output by jres before 1.6.0.18 is :
    <?xml version="1.0" encoding="UTF-8"?>
                   *** GeneratedElementXML {
              <TestElement xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" testAttribute="testValue"/>
                   }          The result output by jres since 1.6.0.18 is :
    <?xml version="1.0" encoding="UTF-8"?>
                   *** GeneratedElementXML {
              <TestElement xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                   }          Note : the 'testAttribute' attribute is missing

    Have found the difference in the code
    In both JRE1.6.0_17 & JRE1.6.0_18, the class 'com.sun.org.apache.xalan.internal.xsltc.dom.AdaptiveResultTreeImpl' has the following method
    public void addUniqueAttribute(String qName, String value, int flags)
            throws SAXException
            addAttribute(qName, value);
        }In JRE1.6.0_17 the next method is
    public void addAttribute(String name, String value)
         if (_openElementName != null) {
             _attributes.add(name, value);
         else {
             BasisLibrary.runTimeError(BasisLibrary.STRAY_ATTRIBUTE_ERR, name);
        }In JRE1.6.0_18 the next method is
    public void addAttribute(String uri, String localName, String qname,
                String type, String value)
         if (_openElementName != null) {
             _attributes.addAttribute(uri, localName, qname, type, value);
         else {
             BasisLibrary.runTimeError(BasisLibrary.STRAY_ATTRIBUTE_ERR, qname);
        }Note - the addAttribute method has additional parameters in JRE1.6.0_18 but the call from addUniqueAttribute wasn't updated.
    So in JRE1.6.0_18 addUniqueAttribute actually invokes the following method in the base package com.sun.org.apache.xml.internal.serializer.EmptySerializer
    public void addAttribute(String name, String value)
            aMethodIsCalled();
    void aMethodIsCalled()
            // throw new RuntimeException(err);
            return;
        }and as you can see this does nothing. Hence the fact that the attribute isn't added.

  • Tables For Secondary Cost Elements

    Dear Folks,
    Please Help me for getting details (TABLES) of Secondary Cost elements Actual Line items Date wise and Cost Center wise
    Thanks in advance
    Regaards
    ASHOK K

    Hi Ashok,
    some important Costing tables
    COEP  - Line Items (by Period) 
    COEJ  - Line Items (by Fiscal year 
    COKA  - Control Data for Cost center wise
    COEJT - Line Items for Prices  
    COEPT - Line Items for Prices
    CSKA Cost Elements (Data Dependent on Chart of Accounts)
    CSKB Cost Elements (Data Dependent on Controlling Area)
    CSKS - Cost Center Master Data
    CSLA Activity Master
    COBK  - Document Header       
    COEJL - Line Items for Activity 
    COEJR - Line Items for SKF
    COEPL - Line Items for Activity
    COEPR - Line Items for SKF  
    COKL  - Control Data for Activity
    COKP  - Control Data for Primary
    COKR  - Control Data for Statics
    COKS  - Control Data for Secondary 
    AUSP - Characteristic Values       
    A132 - Price per Cost Center             
    A136 - Price per Controlling Area      
    A137 - Price per Country / Region        
    COSC - CO Objects: Assignment of Original 
    CSSK - Cost Center / Cost Element       
    CSSL - Cost Center / Activity Type      
    KAPS - CO Period Locks -  
    regards
    Gokul

  • Table For Secondary Cost Elements

    Dear Folks,
                  Please Help me for getting details (TABLES)  of Secondary Cost elements Actual Line items Date wise and Cost Center wise
    Thanks in advance
    Regaards
    ASHOK K

    check this might help you..
    Tables to be refered for secondary cost element.
    Regards
    Kumar

  • Check for existing XML element

    Dear all,
    I'm trying to write a simple script first checking to see whether an XML element exists, and then creating it if it doesn't. I've tried editing a piece of code that I used previously to do the same for paragraph styles, but apparently it's not that straightforward. Currently, all I get is the error "Cannot execute the script in target engine 'main'!" Without the checking, adding the XML element based on the search result works fine.
    /* Find all instances of the word "Superscript" */
    app.findTextPreferences.findWhat = "Superscript";
    var mySuperscript = myDocument.findText(); // Save search result for future reference
    /* See if an XML element named "Superscript" already exists, and create it if that's not the case; then add it to all instances of the word "Superscript" */
    var myXMLElementSuper = myDocument.xmlElements.item("Superscript");
    try {
    var myName = myXMLElementSuper.name;
    catch (myError){
        var myXMLElementSuper = myDocument.xmlElements.add({markupTag:"Superscript", xmlContent:mySuperscript[i]});}
    Any assistance would be greatly appreciated!
    Kind regards and thanks in advance,
    Julian

    Try this,
    app.findTextPreferences=app.changeTextPreferences=null; 
    app.findTextPreferences.findWhat = "Superscript"; 
    var mySuperscript = app.activeDocument.findText();
    for(var i=0; i< mySuperscript.length; i++)
        if(mySuperscript[i].associatedXMLElements[0].markupTag.name != "Superscript")
            app.activeDocument.xmlElements[0].xmlElements.add({markupTag:"Superscript", xmlContent:mySuperscript[i]}); 
    app.findTextPreferences=app.changeTextPreferences=null; 
    Vandy

  • Any examples of using XSU for multi level nesting

    Are there any examples of inserting into a set of object tables using the XSU where the parent-child relationship is more than 2 levels deep. i.e where you have to use REF's or views to do this.
    I have had no problems with a 2 level insert using object tables but that's not much use to me.
    I know that natively only 2 levels of nesting are supported.
    I may have to resort to parsing the data manually using the PL/SQL parser if I can't get the XSU to do it.
    null

    lAnubisl wrote:
    My customer's solution has several issues generating PDF files and we are looking at the Acrobat SDK as at the instance of the final truth.
    I use Interop.Acrobat.dll as a .NET project reference to open and resave PDF documents. I'd like to do all things I mentioned above.
    After years and years, I have concluded that if you do serious PDF development, you need a set of libraries. For instance, if you are doing typesetting type of work ("vertical center", "horizontal center", "margin", etc., etc) , there is an excellent library from a guy in Germany (land of Johannes Gutenberg and printing presses)...
    ... which turned out to be useless in my next project which dealt with AcroForms.
    I know exactly what you mean by "the final truth", sometimes I wish Adobe had some sort of official validating tool (like XML does).
    Per your comments, I would recommend you to consider this library. It is available in all languages and its output is the same quality as Adobe's or at least in the same league:
           http://www.pdftron.com/pdfnet/index.html
    If you want to comment further, we must go to a different forum, since we are not supposed to discuss any non-Adobe products here.

  • Re:Need link for supported XML elements

    Can someone post the official sap link for supported and unsupported elements in xml schema.
    BP.

    Satish,
    I appreciate the reply, However that is not what i was looking for EVEN REMOTELY.
    I was looking for elements supported /not supported in PI 7.0.
    The link you gave me is to map xsd to Java.
    Replies like this spoil the quality of SDN.
    BP

Maybe you are looking for

  • Horizontal spry menu style appears turned off when on the internet though can view it in live mode!?

    The style of the horizontal spry menu seems as to have been turned off when on the web though is visible and functioning on CS4 Dreamweaver design and live views. I have styled the spry menu and can view it in the properties section though the style

  • No longer getting internet over E2500

    My E2500 was working great for the past 3 months, and now it seems to be broken since I cannot access the internet anymore. I can connect to the router via wireless or wired at 192.168.1.1 and play with all the settings. On the status page, I have en

  • Can't import from iMovie HD

    I can't import my iMovieProject files from iMovie HD (the one that came pre-installed with tiger in '06) It creates a blank file in iMovie '08. Any ideas?

  • Best Way to Set up Wired and Wireless with Junction Box

    I have searched but not found my exact situation. I have a cable modem in a junction box in the laundry room. I have wired ethernet access in three rooms. I would like to set up a wireless network. If I use a WRTG54 wireless router inside the junctio

  • How can I combine Apple IDs so all devices are same

    Somehow I ended up with 2 apple ID's and my devices wont share from Mac to Iphone, Ipad and mini...... How can I change them.  Changing Apple ID wont work as rescue email is one of the accounts names I want to change.   And cannot get back into "resc