Task table XML element extract
What would be the easiest way (inside or outside IDM) to extract an XML element from the task table?
I have some records that need some text manipulation so I need to convert strings of text (or xml elements) to new values...
Similar Messages
-
Moving an existing xml element into aTable
Hi Everyone,
After importing the xml I need to place or convert the xml elements into the table. Is there any way to do this by JS?
Here is the sample Table xml elements....
<table-wrap id="ch3_t1">
<label>Table 3.1</label>
<caption>
<title>Anatomy and Classification of Major Hepatic Resections</title>
</caption>
<table>
<thead>
<tr>
<th align="left" valign="top" colspan="5">Anatomic Classification</th>
</tr>
<tr>
<th align="left" valign="top">Couinaud</th>
<th align="left" valign="top" colspan="2">Goldsmith and Woodburne</th>
<th align="left" valign="top">Brisbane</th>
<th align="left" valign="top">Segments resected</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">Right hepatectomy</td>
<td align="left" valign="top" colspan="2">Right hepatic lobectomy</td>
<td align="left" valign="top">Right hemihepatectomy</td>
<td align="left" valign="top">V, VI, VII, VIII</td>
</tr>
<tr>
<td align="left" valign="top">Right lobectomy<sup>a</sup>
</td>
<td align="left" valign="top" colspan="2">Extended right hepatic lobectomy</td>
<td align="left" valign="top">Right trisectionectomy</td>
<td align="left" valign="top">IV,V,VI, VII, VIII<sup>b</sup>
</td>
</tr>
<tr>
<td align="left" valign="top">Left hepatectomy</td>
<td align="left" valign="top" colspan="2">Left hepatic lobectomy</td>
<td align="left" valign="top">Left hemihepatectomy</td>
<td align="left" valign="top">II, III, IV</td>
</tr>
<tr>
<td align="left" valign="top">Extended left hepatectomy<sup>a</sup>
</td>
<td align="left" valign="top" colspan="2">Extended left lobectomy</td>
<td align="left" valign="top">Left lateral sectionectomy</td>
<td align="left" valign="top">II, III, IV, V, VIII<sup>b</sup>
</td>
</tr>
<tr>
<td align="left" valign="top">Left lobectomy</td>
<td align="left" valign="top" colspan="2">Left lateral segmentectomy</td>
<td align="left" valign="top">Left trisectionectomy</td>
<td align="left" valign="top">II, III</td>
</tr>
</tbody>
</table>
</table-wrap>
Looking forward your replies... Your help will be thankful....You may want to look again, specifically section 20.11 Moving Oracle Enterprise Content Management to a Production System, Task 4.
The same basic steps would apply to 10g, minus the WebLogic parts. (Also note that prior to 11g, what you are attempting is really a non-supported configuration. In 11g, Oracle at least gives this set of supported pointers.) -
Out XML element values extract
hi their
How can I out XML element the values extract and in a loop in variable and/or in an array store?
Example:
[loop]
<SA>'MS','GYM'</SA>
Values 'MS' and 'GYM' should be in variables e.g var1='MS' and var2='GYM'
[end loop]
Please, help me!!!! Urgent
thanx you for advice
kind regards
Holgercreate or replace procedure spTestXML is
xml xmltype;
test varchar2(100);
test2 xmltype;
cursor lvCur_GetAllSecGrps is
SELECT extractValue(value(asec), '/SEC_GRP/NAME') as Name
FROM table(xmlsequence(xml)) a,
table(xmlsequence(extract(value(a), '/EVENT/SEC_GRP_LIST/SEC_GRP'))) asec;
begin
xml := xmltype('<EVENT>
<SWTSUPDATE TYPE="1">
<MEMBERID>9822598</MEMBERID>
<DATETIME>Fri Jun 09 14:51:33 CDT 2006</DATETIME>
<USERID>W951FVK</USERID>
</SWTSUPDATE>
<CONTACT_HISTORY>
<USER>
<USER_ID>W951FVK</USER_ID>
<FIRST_NAME>John</FIRST_NAME>
<LAST_NAME>Givens</LAST_NAME>
</USER>
<USER>
<USER_ID>W951FNN</USER_ID>
<FIRST_NAME>Mary</FIRST_NAME>
<LAST_NAME>McNair</LAST_NAME>
</USER>
<CONSUMER>
<CONS_SEQ_NBR>1387445</CONS_SEQ_NBR>
<FIRST_NAME>SPRINGHOUSE</FIRST_NAME>
<LAST_NAME>ELLIS</LAST_NAME>
</CONSUMER>
</CONTACT_HISTORY>
<SEC_GRP_LIST>
<SEC_GRP><NAME>cspupdatecustpayee</NAME><DESCRIPTION>Add/Update/Delete CSP Customer Payees</DESCRIPTION></SEC_GRP>
<SEC_GRP><NAME>cspupdatepayment</NAME><DESCRIPTION>Add/Update/Delete CSP Payment</DESCRIPTION></SEC_GRP>
<SEC_GRP><NAME>adminreports</NAME><DESCRIPTION>Administrate Reports</DESCRIPTION></SEC_GRP>
<SEC_GRP><NAME>billopscsr</NAME><DESCRIPTION>Bill Operations CSR</DESCRIPTION></SEC_GRP>
</SEC_GRP_LIST>
</EVENT>');
if xml.existsNode('/EVENT/SEC_GRP_LIST/SEC_GRP/NAME') != 0 THEN
for lvAllSecGrps in lvCur_GetAllSecGrps loop
dbms_output.put_line('Found: '||lvAllSecGrps.Name);
end loop;
end if;
end spTestXML;gives
Found: cspupdatecustpayee
Found: cspupdatepayment
Found: adminreports
Found: billopscsrhth -
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
JanFound 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 -
Extracting the Attributes values of an XML Element
Dear Forum Members
Please tell me any XML Function which is used to extract the Attribute value of an XML Element.
Given below
<BRKCD_STREDSWTINVIN_C Key="6708">
is an Element With some Key value.
I want to have that Key value.
Using Extract and Extractvalue I am not able to get the Attribute value.
Is there any way..
Regards
Madhu KYour xml is not really complete ;), but this should get you started:
michaels> with t as
(select xmltype('<BRKCD_STREDSWTINVIN_C Key="6708"></BRKCD_STREDSWTINVIN_C>') xml from dual)
select d.xml, d.xml.extract('//BRKCD_STREDSWTINVIN_C/@Key') key
from t d
XML KEY
<BRKCD_STREDSWTINVIN_C Key="6708"></BRKCD_STREDSWTINVIN_C> 6708 -
Hi guys,
I am new to indesign scripting using applescript.
my code is shown in below, my problem is can't set xml element for table
tell application "Adobe InDesign CS6"
tell active document
set rootele to associated XML element of story 1
if rootele = nothing then
set rootele to XML element 1
end if
tell story 1
select text 1
set markup tag of selection to "table" -----------------> this is my problem please help me.
end tell
end tell
end tell
this code is right or not. please help me.The metadata about the table mappings are also stored in the compiled XML Schema document. If you lookup the schema document located at /sys/schemas/.... , you will see that the element with SQLInline=false will have a xdb:defaultTable attribute which provides the name of the table used to store the element.
- Ravi -
How can we get the reference of XML element on frame as soon as frame is created in Document?
Hi,
When ever we copy any text/table cells from any frame, and paste it directly on page, A new Frame is created and the pasted text is placed inside that frame.
Now to capture this frame creation, We have two possible solutions:
1) Attach Observer on Document 'kDocBoss' on IID_IHIERARCHY_DOCUMENT and it will notify on frame creation in update function.
2) Notification event on new story creation.
Now, I need to perform some changes in the newly created table, for example:
a) Need to delete XML tags from newly created frame
b) Need to perform action on table cells if any in the created frame.
But the problem is, when the event comes, I can access basic properties of frame like it's name, type etc, but it does not give me the
XML element on frame or tables in frame until the event is com pleat.
I know it's quite a specif requirement, but I guess many of you might have faced these kind of challenges, while processing the event.
Does any one has any idea how I can get the reference of XML element on frame as soon as it is created?Hi Kapoor,
please give also others a chance, and excuse that I get up late on vacation ;-)
Anyway, I'd keep the story creation responder to recognize the copy, then combine it with an observer on the backing xml story to catch the associated XML element which is created there. Something like below:
UIDRef xmlStoryRef = Utils<IXMLUtils>()->GetBackingStore(doc);
InterfacePtr<ISubject> subject ( xmlStoryRef,IID_ISUBJECT );
subject->AttachObserver(observer,IID_IIDXMLELEMENT,observer->GetAttachIID()); -
Hiding XML elements in the structure view – scripting influence to the structure view?
Hi
Is there a way to hide specific XML elements (really the elements and not the attributes) in the structure view?
I am asking this question to know if it is possible to influence the structure view by scripting.
Many elements are indeed used as a kind of help for constructions which have nothing to do with the actual contents especially in the case of tables.
You inflate the the structure view unnecessarily and the author will lose track of the real contents. It would be nice if there was a possibility to hide those help construction elements.
Thank you for any hints.
Regards
Apollo102Hello Apollo,
There is a way to hide elements from the Structure View (one such method is offered by the free AXCM plug-in). What happens when you use AXCM (or other methods to hide elements) is that the elements get wrapped into hidden content. This might make the structure view less complex for your authors, but has a number of disadvantages and dangers.
1. The structure is normally invalidated, as the helper elements are usually required.
2. Accidentally deleting hidden content may make the invalidation permanent and render your documents useless.
It is NOT good practice to hide elements from authors in the structure view. Instead, you should either teach authors about the structure, or let them work in the Author View while adding sufficiently clear formatting to show them the underlying structure. In some cases, it might be better to create an authoring structure which is automatically transformed into the required full structure using an XSLT or other processing step. I have created a couple of such environments and they work fine. It just depends on the difference between the structure required for further processing and the structure that would be optimal for your authors (which in turn depends on the level at which your authors are experienced in working with structured content).
I hope this helps you solve your problem without having to tweak the structure view.
Kind regards
Jang -
Generate xml element from Union of 2 Select queries
Do you know ho I can get the union result of 2 queries and put them in xml result, but I want each query to be in seperate xml element.
I don t want to put 1 single xmlelement and do a From then construct a virtual table uniting the 2 subqueries
I mean I don t want something like the following:
(Select
XMLAGG(
XMLELEMENT("credit",
XMLForest(field1 "detail")
FROM
--SubQuery1
Select field1 from myTable1
union
--SubQuery1
Select field1 from myTable2
) "credits"
I want something like here:
XMLELEMENT("credits",
(SELECT
XMLAGG(
XMLELEMENT("credit",
XMLForest(field1 "field1")
FROM
myTable1
(SELECT
XMLAGG(
XMLELEMENT("credit",
XMLForest(field1 "field1")
FROM
myTable2
Except the 2nd alternative is not working Sad
I get error message:
"SQL command not properly ended"
Thanks a lottry
SELECT XMLElement("file",
XMLForest( -- File details
FILETABLE.ID_FILE "fileNumber",
FILETABLE.ID_PRET_CLT "loanID"), -- new
-- Debits are pulled from both myTable1 and myTable2 tables
-- First: fetching debits from myTable1 table
(Select XMLELEMENT("debits",
(SELECT XMLAGG(XMLELEMENT("debit",
XMLELEMENT("referenceNumber",
NUM_REFERENCE)))
FROM myTable1
Where ID_FILE =
FILETABLE.ID_FILE),
-- Second: fetching debits from myTable2 table
(SELECT XMLAGG(XMLELEMENT("debit",
XMLELEMENT("referenceNumber",
NUM_REFERENCE)))
FROM myTable2
Where ID_FILE =
FILETABLE.ID_FILE))
from dual) /*as XXXX)*/) xml
FROM FILETABLE -
SELECT Fails for a WITHIN clause if the xml element have a DASH
I am using a context index on a CLOB Column and one of my records is like this.
?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cid-spf xmlns="java:com.verid.ident">
<tran-id>1020022445889</tran-id>
<tran-time>1187984936000</tran-time>
<mode>3</mode>
<spoofer>
<name/>
<ph>
<number>12106337000</number>
</ph>
</spoofer>
<spfd>
<name/>
<ph>
<number>13173708869</number>
</ph>
</spfd>
<st-time>1187984936000</st-time>
<dest-number>12106878012</dest-number>
</cid-spf>
When I run a query
SELECT * FROM identity_event
WHERE contains (identityeventdata,'1187812924000 WITHIN ST-TIME')>0
All my other xml elements works just fine.
I get this error.
[1]: (Error): ORA-12801: error signaled in parallel query server P003, instance maralpinor03.trogdor.com:maralpin3 (3) ORA-29902: error in executing ODCIIndexStart() routine ORA-20000: Oracle Text error: DRG-50901: text query parser syntax error on line 1, column 24The dash or hyphen (-) has special meaning to Oracle text. It means MINUS. Any time that you want Oracle Text to treat such a special character as regular text, you need to escape it, either by putting a backslash (\) in front of each special character or by enclosing a whole word or phrase within curly brackets ({}). Please see the demonstration below.
SCOTT@10gXE> CREATE TABLE identity_event
2 (identityeventdata CLOB)
3 /
Table created.
SCOTT@10gXE> INSERT INTO identity_event VALUES
2 ('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
3 <cid-spf xmlns="java:com.verid.ident">
4 <tran-id>1020022445889</tran-id>
5 <tran-time>1187984936000</tran-time>
6 <mode>3</mode>
7 <spoofer>
8 <name/>
9 <ph>
10 <number>12106337000</number>
11 </ph>
12 </spoofer>
13 <spfd>
14 <name/>
15 <ph>
16 <number>13173708869</number>
17 </ph>
18 </spfd>
19 <st-time>1187984936000</st-time>
20 <dest-number>12106878012</dest-number>
21 </cid-spf>')
22 /
1 row created.
SCOTT@10gXE> CREATE INDEX your_index ON identity_event (identityeventdata)
2 INDEXTYPE IS CTXSYS.CONTEXT
3 PARAMETERS
4 ('FILTER CTXSYS.NULL_FILTER
5 SECTION GROUP CTXSYS.AUTO_SECTION_GROUP')
6 /
Index created.
SCOTT@10gXE> -- wrong:
SCOTT@10gXE> SELECT * FROM identity_event
2 WHERE contains (identityeventdata,'1187812924000 WITHIN ST-TIME')>0
3 /
SELECT * FROM identity_event
ERROR at line 1:
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-50901: text query parser syntax error on line 1, column 24
SCOTT@10gXE> -- correct:
SCOTT@10gXE> SELECT * FROM identity_event
2 WHERE contains (identityeventdata,'1187984936000 WITHIN {ST-TIME}')>0
3 /
IDENTITYEVENTDATA
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cid-spf xmlns="java:com.verid.ident">
<tran-id>1020022445889</tran-id>
<tran-time>1187984936000</tran-time>
<mode>3</mode>
<spoofer>
<name/>
<ph>
<number>12106337000</number>
</ph>
</spoofer>
<spfd>
<name/>
<ph>
<number>13173708869</number>
</ph>
</spfd>
<st-time>1187984936000</st-time>
<dest-number>12106878012</dest-number>
</cid-spf>
SCOTT@10gXE> SELECT * FROM identity_event
2 WHERE contains (identityeventdata,'1187984936000 WITHIN ST\-TIME')>0
3 /
IDENTITYEVENTDATA
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cid-spf xmlns="java:com.verid.ident">
<tran-id>1020022445889</tran-id>
<tran-time>1187984936000</tran-time>
<mode>3</mode>
<spoofer>
<name/>
<ph>
<number>12106337000</number>
</ph>
</spoofer>
<spfd>
<name/>
<ph>
<number>13173708869</number>
</ph>
</spfd>
<st-time>1187984936000</st-time>
<dest-number>12106878012</dest-number>
</cid-spf>
SCOTT@10gXE> -
hi there
Does anyone know if Oracle has removed the Extend XML element from the Funds Capture Extract data definitions. I can see the document (oracle Payments Implementation guide) showing that the Extend element should at all levels but when I look at the iby package/views that build the extract does not have that element in the structure??
Can anyone tell me how to get custom data in the XML so I can use it in my funds capture output.
thanks.Hi,
You could try one thing.
Instead of taking the xml from PI , just check out if the proxy works with the auto generated xml in test.
If required, could edit the values only.
If it works, then compare both the xml.
Also, try regenerating the proxy.
Regards,
Manjusha -
Default XML element - Sample Code
Hi,
I am trying to use the sample code for the article "How to default an XML element in an XML document before inserting it into database".
I am using database 9.2.0.3 and when I try to insert the record into the table, only up to "<Action>" part is inserted into the table and the rest of the XML document is truncated. I've tried inserting the record by disabling the trigger too - but it didn't help.
Can someone please let me know what could be the problem? Thanks in advance.
Regards,
JatinderHi,
Could you please tell me you have the queried the inserted record?
I presume this happens when you issue the query from SQL*Plus to view the inserted record. Let me know if it is otherwise.
Going by the same example used in the article, just do the following before you issue the query.
-- you need to set the LONG environment variable to view the full contents in SQL*Plus.
SQL> set long 20000
SQL>SELECT VALUE(t) FROM purchaseorder t;
Hope that helps.
Savitha. -
[JS-CS4] Associated XML element...
Hi,
I'm going crazy with this.
I have a table built with XML import and I need to get the XML element associated with a cell.
I use this code:
cell.associatedXMLElement
but it always returns "null".
Obviously that cell has a content in XML structure...
Any idea why?
Thanks.Here's my script:
var my_doc = app.activeDocument;
var my_table = my_doc.pages.firstItem().textFrames.firstItem().tables.firstItem();
my_table.columns.firstitem().select();
var my_selection = doc.selection;
for(var c = 0; c < my_selection.length; c++){
if(my_selection[c].associatedXMLElement.xmlAttributes.itemByName("type").value != "house"){
my_selection[c].appliedCellStyle = doc.cellStyles.itemByName("column");
my_selection[c].clearCellStyleOverrides(true);
This will run once the table is placed through XML import
I need to check the "type" XML attribute value for every XML cell, that's why I'm performing that if statement.
Basically if a cell's XML element has a "type" attribute with "house" value the script will not apply the "column" style.
The problem is that
my_selection[c].associatedXMLElement
always return null.
The XML data structure is:
<List><Category><Table><Cell/><Cell/>....</Table></Category></List>
So I have a simple table inside a textFrame.
I know what I'm doing could sound weird, but I experienced it's the most quick way to handle a big table within ID.
Here's the background story
Thanks again. -
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
SmileHi,
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. -
Dealing with optional XML elements
We have a template that will print certain tables based on whether or not an element is present in the incoming XML file.
I have no problem displaying these tables conditionally on XML elements that are always present (i.e. I can say <?if:element='Y'?>) but I'm running into problems when I need to display a table/field based on whether or not an element is present.
Also, when the element in question is not present, the template ignores my page break and prints the remainder of the document on the same page.
Can anyone recommend a way to accomplish the above?
Thanks.You should use <?if:element = ''?> or <?if:element != ''?>
This should work also:
<?if:text(element)?> or <?if:not(text(element))?>
The condition is always true (false) when either the element is empty or does not
exist. Let me know, if you need to differentiate between both (probably using name() instead of text will work in this case).
If a pagebreak is inside the if statement than it is only shown when the condition is satisfied.
Hope that helps,
Klaus
Maybe you are looking for
-
Pages will not print via network printer
I have purchased and installe Pages and Numbers and neither one will print to my network printer. I have been using my DeskJet 970 on my network without trouble. I can print from other apps installed on my iPad via this same printer. In support of pr
-
How can I remove the Quick Launch area from a SharePoint site
We have a SharePoint site that includes a Quick Launch area by default. We know how to add and delete items from the Quick Launch area but how can we delete the Quick Launch space (this would shift the main body portion over to the left and taking o
-
Bought fce 3.5 week before 4.0 release
how do i go about getting newer version of FCE without paying since i upgraded to 3.5 a week before new release. i would have waited if apple rep would have told me it was on its way.
-
Hi all, I am trying to link Webcenter Content with P6 and PCM. Would you please share the steps to link? Emmran
-
Importing new Address Book into Address Book but keeping it separate.
I have an existing Address Book on my MacBook Pro and would like to import my office Address Book - BUT keep it as a separate group. The office Address Book has over 1,000 names so it is a lot of work to import it and then, one by one, find, separat