Get the first instance of XML elements
Hi all
My XML tag looks like this:
< Xref RID = Ref "id001' type = 'Test' >
< Xref RID = ref "id002' type = 'Test' >
< Xref RID = ref "id003' type = 'Test' >
< Xref RID = ref 'id004' type = 'Test' >
Code:
var root = app.activeDocument.xmlElements [0];
(var xrefRid = root.evaluateXPathExpression('//xref[@rid]');
(var xrefType = root.evaluateXPathExpression('//xref[@ref-type]');
for (i = 0; i < xrefRid.length; i ++)
{
var refTypeValue is xrefRid [j].xmlAttributes.itemByName ("ref-type") .value;.
var ridValue is xrefType [j].xmlAttributes.itemByName ("rid") .value;.
If (refTypeValue is "Test")
{
Alert (ridValue);
}
}
In my multiple number same document 'RID' is here, but I want the first occurrence of the xref tag.
By example, if < Xref RID = Ref "id001' type = 'Test' > occur on different pages of a book, but I need the first occurrence of the elements.
Hope someone can help me...
Vandy
If your structure is constructed in the same manner as above , XPath works very well:
_root var = app.activeDocument.xmlElements.firstItem ();
var _firstXrefID001andID002 = _root.evaluateXPathExpression ("//p [position () = 1] / xref [@ RID ="id001"] |") [/ / p [position () = 2] / xre f[@rid='id002'] ");"
App.Select (_firstXrefID001andID002);
If further stations of are possible, for example
Sample text sample text sample
Sample text sample text sample
Sample text sample text sample
Example of example text text
Example of example text text
Example of example text text
Example of example text text
Example of example text text
Example of example text text
Example of example text text
Example of example text text
Example of example text text
Example of example text text
Example of example text text
Example of example text text
You can try these XPathsExpressions and take the first element of tables resulting:
_root var = app.activeDocument.xmlElements.firstItem ();
[var _firstXrefID001 = _root.evaluateXPathExpression("//p/xref[@rid='id001']"); "
App.Select(_firstXrefID001[0]);
[var _firstXrefID002 = _root.evaluateXPathExpression("//p/xref[@rid='id002']"); "
App.Select(_firstXrefID002[0]);
Roland
Tags: InDesign
Similar Questions
-
I'm new in indesign scripting, please tell me how to write a script to get the contents of an XML element and then sort all the content
Hello
Can the code below is useful for you, but I do not know how to sort.
Change the tag based on your employment application.
-
How to get the value of an xml element attributes
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
I'm trying to parse an XML document
< response >
< well uwi = "102112900816W400" > < / well >
< production >
< PRODUCING_ENTITY >
< NUMBER YEAR = '2009' >
< NUMBER of MONTHS = LAST_DAY '1' = "31" / >
< NUMBER of MONTHS = LAST_DAY '2' = "28" / >
< NUMBER of MONTHS = LAST_DAY "3" = "30" / >
< / YEAR >
< NUMBER YEAR = '2010' >
< NUMBER of MONTHS = LAST_DAY '1' = "31" / >
< NUMBER of MONTHS = LAST_DAY '2' = "28" / >
< NUMBER of MONTHS = LAST_DAY "3" = "30" / >
< / YEAR >
< NUMBER YEAR = '2011' >
< NUMBER of MONTHS = LAST_DAY '1' = "31" / >
< NUMBER of MONTHS = LAST_DAY '2' = "28" / >
< NUMBER of MONTHS = LAST_DAY "3" = "30" / >
< / YEAR >
< NUMBER YEAR = '2012' >
< NUMBER of MONTHS = LAST_DAY '1' = "31" / >
< NUMBER of MONTHS = LAST_DAY '2' = "28" / >
< NUMBER of MONTHS = LAST_DAY "3" = "30" / >
< / YEAR >
< / PRODUCING_ENTITY >
< / production >
< / well >
< well uwi = "100092900816U400" > < / well >
< production >
< PRODUCING_ENTITY >
< NUMBER YEAR = "1999" >
< NUMBER of MONTHS = LAST_DAY '1' = "31" / >
< NUMBER of MONTHS = LAST_DAY '2' = "28" / >
< NUMBER of MONTHS = LAST_DAY "3" = "30" / >
< / YEAR >
< NUMBER YEAR = '2000' >
< NUMBER of MONTHS = LAST_DAY '1' = "31" / >
< NUMBER of MONTHS = LAST_DAY '2' = "28" / >
< NUMBER of MONTHS = LAST_DAY "3" = "30" / >
< / YEAR >
< NUMBER YEAR = '2001' >
< NUMBER of MONTHS = LAST_DAY '1' = "31" / >
< NUMBER of MONTHS = LAST_DAY '2' = "28" / >
< NUMBER of MONTHS = LAST_DAY "3" = "30" / >
< / YEAR >
< NUMBER YEAR = "2003" >
< NUMBER of MONTHS = LAST_DAY '1' = "31" / >
< NUMBER of MONTHS = LAST_DAY '2' = "28" / >
< NUMBER of MONTHS = LAST_DAY "3" = "30" / >
< / YEAR >
< / PRODUCING_ENTITY >
< / production >
< / well >
< / answer >
For the purposes of the practice, I have saved this in my table tdw_test_xml_files;
My goal is to get the /WELL/@uwi and /YEAR/@NUMBER
UWI YEAR
------ ---------------
102112900816W400 2009
102112900816W400 2010
102112900816W400 2011
102112900816W400 2012
100092900816U400 1999
100092900816U400 2000
100092900816U400 2001
100092900816U400 2003
I tried this... but I can't get the value of the attribute for the element < YEAR >
Select r.uwi, r.year
of tdw_test_xml_files.
XMLTABLE
(
"for $WELL in $ response/WELL/good.
for $DEPT to $UWIIDX in $WELL, Production, PRODUCING_ENTITY, YEAR
return < RESULT >
University of the West Indies West <>{fn:data($WELL/@uwi)} < / UWI >}
{
$WELL/production/PRODUCING_ENTITY/YEAR [$UWIIDX]-> (I don't know how to extract the value of the attribute here)
}
< / RESULT > '
passing FILECONTENT as 'GOOD '.
columns
UWI VARCHAR (50),
YEAR vARCHAR2 (24)
) r
/
If I do this; I get the Cartesian plan result set, which is not my goal
SELECT xtab.*, xtab2.*
OF tdw_test_xml_files, XMLTable (' for $i in/Response/Well)
Return $i"
PASSAGE filecontent
Uwi varchar2 COLUMNS (50) PATH'@uwi'
rn for ORDINALITE
) xtab
, XMLTable (' for $i in/Response/Well/Production/PRODUCING_ENTITY/YEAR)
Return $i"
PASSAGE filecontent
COLUMNS year varchar2 (50) PATH'@NUMBER'
) xtab2;
Any help will be highly appreciated thanks...I'm just curious to know how make the query now in unique XMLTable, not that I am forced by using x number of xmltable; - P, just look more clean...
Here goes:
SQL> SELECT x.* 2 FROM tdw_test_xml_files t 3 , XMLTable( 4 'for $i in /Response/Well 5 , $j in $i/Production/PRODUCING_ENTITY/YEAR 6 , $k in $j/MONTH 7 return element r { 8 $i/@uwi 9 , element year {data($j/@NUMBER)} 10 , element month {data($k/@NUMBER)} 11 }' 12 passing t.filecontent 13 columns uwi varchar2(50) path '@uwi' 14 , yr varchar2(4) path 'year' 15 , mon varchar2(2) path 'month' 16 ) x 17 ; UWI YR MON ------------------------------ ---- --- 102112900816W400 2009 1 102112900816W400 2009 2 102112900816W400 2009 3 102112900816W400 2010 1 102112900816W400 2010 2 102112900816W400 2010 3 102112900816W400 2011 1 102112900816W400 2011 2 102112900816W400 2011 3 102112900816W400 2012 1 102112900816W400 2012 2 102112900816W400 2012 3 100092900816U400 1999 1 100092900816U400 1999 2 100092900816U400 1999 3 100092900816U400 2000 1 100092900816U400 2000 2 100092900816U400 2000 3 100092900816U400 2001 1 100092900816U400 2001 2 100092900816U400 2001 3 100092900816U400 2003 1 100092900816U400 2003 2 100092900816U400 2003 3 24 rows selected
-
How to get the previous group on XML element
My XML structure goes like this.
<? XML version = "1.0" encoding = "UTF-8"? >
< SA321 >
PT BOOK < P_BOOK > < / P_BOOK >
< P_YEAR > 2009 < / P_YEAR >
< LIST_G_FAMILY >
< G_FAMILY >
< PARENT_FAMILY > 2240 < / PARENT_FAMILY >
< FAM_CODE_DESC > Cruiser informatico < / FAM_CODE_DESC >
< SUBTOT_FLAG > Y < / SUBTOT_FLAG >
< NEW_USED > NEW < / NEW_USED >
< LIST_G_ASSET >
< G_ASSET >
< ASSET_DESCR > 2240 - Cruiser informatico < / ASSET_DESCR >
< ACQUISITION_YEAR > 2009 < / ACQUISITION_YEAR >
JANUARY < EFFECTIVE_MONTH > < / EFFECTIVE_MONTH >
< EFFECTIVE_YEAR > 2009 < / EFFECTIVE_YEAR >
< ASSET_AMOUNT > 3000 < / ASSET_AMOUNT >
< EXEMPT_GAIN_AMOUNT > 450 < / EXEMPT_GAIN_AMOUNT >
< EXPECTED_LIFE_YRS / >
< PRV_FY_NBV > 0 < / PRV_FY_NBV >
< RATES_DEC > 37.5 < / RATES_DEC >
< RATE_FROM_LAW > 50 < / RATE_FROM_LAW >
< RATES_DEC1 / >
< 1 > 0 < / 1 >
< FISCAL_LIMIT > 1275 < / FISCAL_LIMIT >
< DEPRN_RATE > 25 < / DEPRN_RATE >
< PY_DEPRN_RESERVE > 0 < / PY_DEPRN_RESERVE >
< YTD_DEPRN > 749.99 < / YTD_DEPRN >
< ACCUM_DEPRN > 749.99 < / ACCUM_DEPRN >
< NET_BOOK_VALUE > 2250.01 < / NET_BOOK_VALUE >
< YTD_IMPAIRMENT > 0 < / YTD_IMPAIRMENT >
< IMPAIRMENT_RESERVE > 0 < / IMPAIRMENT_RESERVE >
< ACCUM_LOST_RATES > 0 < / ACCUM_LOST_RATES >
< DEPR_REINT_LOSS_NOTEXP > 0 < / DEPR_REINT_LOSS_NOTEXP >
< GAIN_AMOUNT > 600 < / GAIN_AMOUNT >
< GAIN_YEAR > 2006 < / GAIN_YEAR >
< > 110270 ASSET_ID < / ASSET_ID >
< > 110270 ASSET_ID < / ASSET_ID >
< REINT_NOT_ACC > 437.5 < / REINT_NOT_ACC >
< PY_COL15 > 0 < / PY_COL15 >
< LIST_G_COL15 >
< G_COL15 >
< COL15_TOT > 0 < / COL15_TOT >
< COL16_TOT / >
< COL_16 > 0 < / COL_16 >
< / G_COL15 >
< / LIST_G_COL15 >
< / G_ASSET >
< G_ASSET >
< ASSET_DESCR > 2240 - Cruiser informatico < / ASSET_DESCR >
< ACQUISITION_YEAR > 2009 < / ACQUISITION_YEAR >
JUNE < EFFECTIVE_MONTH > < / EFFECTIVE_MONTH >
< EFFECTIVE_YEAR > 2009 < / EFFECTIVE_YEAR >
< ASSET_AMOUNT > 1500 < / ASSET_AMOUNT >
< EXEMPT_GAIN_AMOUNT > 0 < / EXEMPT_GAIN_AMOUNT >
< EXPECTED_LIFE_YRS / >
< PRV_FY_NBV > 0 < / PRV_FY_NBV >
< RATES_DEC > 40 < / RATES_DEC >
< RATE_FROM_LAW > 50 < / RATE_FROM_LAW >
< RATES_DEC1 / >
< 1 > 0 < / 1 >
< FISCAL_LIMIT > 750 < / FISCAL_LIMIT >
< DEPRN_RATE > 20 < / DEPRN_RATE >
< PY_DEPRN_RESERVE > 0 < / PY_DEPRN_RESERVE >
< YTD_DEPRN > 316.95 < / YTD_DEPRN >
< ACCUM_DEPRN > 166.95 < / ACCUM_DEPRN >
< NET_BOOK_VALUE > 1333.05 < / NET_BOOK_VALUE >
< YTD_IMPAIRMENT > 150 < / YTD_IMPAIRMENT >
< IMPAIRMENT_RESERVE > 150 < / IMPAIRMENT_RESERVE >
< ACCUM_LOST_RATES > 2.92 < / ACCUM_LOST_RATES >
< DEPR_REINT_LOSS_NOTEXP > 0 < / DEPR_REINT_LOSS_NOTEXP >
< GAIN_AMOUNT > 0 < / GAIN_AMOUNT >
< GAIN_YEAR / >
< > 110289 ASSET_ID < / ASSET_ID >
< > 110289 ASSET_ID < / ASSET_ID >
< REINT_NOT_ACC > 89,32 < / REINT_NOT_ACC >
< PY_COL15 > 0 < / PY_COL15 >
< LIST_G_COL15 >
< G_COL15 >
< COL15_TOT > 0 < / COL15_TOT >
< COL16_TOT / >
< COL_16 > 0 < / COL_16 >
< / G_COL15 >
< / LIST_G_COL15 >
< / G_ASSET >
< / G_FAMILY >
< / LIST_G_FAMILY >
< / SA321 >
Now, I have a query like the following.
Select *.
FROM (SELECT sap_getFileContent ('o5875854.xml', 'DIR') report_data)
T FROM dual)
xmltable)
"SA321/LIST_G_FAMILY/G_FAMILY/LIST_G_ASSET/G_ASSET.
by the way of xmltype (t.report_data)
path of VARCHAR2 (50) column column1 ' / SA321, LIST_G_FAMILY, G_FAMILY, PARENT_FAMILY.
, path VARCHAR2 (100) Column2 "ASSET_DESCR."
, Column3 VARCHAR2 (50) path 'EFFECTIVE_MONTH '.
, NUMBER column4 path 'EFFECTIVE_YEAR '.
, path NUMBER column 5 "ASSET_AMOUNT".
, path NUMBER column6 "EXEMPT_GAIN_AMOUNT".
, path NUMBER column7 'EXPECTED_LIFE_YRS '.
, path NUMBER column8 'YTD_DEPRN '.
, path NUMBER column9 "PY_DEPRN_RESERVE".
, path NUMBER column10 'RATE_FROM_LAW '.
, column11 NUMBER path '1 '.
, path NUMBER column12 'FISCAL_LIMIT '.
, path NUMBER column13 'YTD_IMPAIRMENT '.
, path NUMBER column14 'ACCUM_LOST_RATES '.
, path NUMBER column15 'YTD_IMPAIRMENT '.
, path NUMBER column16 ' LIST_G_COL15/G_COL15/COL_16.
) x ;
the query always returns NULL for collumn1. Can someone help me please.
Concerning
SAPHello
Your example of XML code is not correct, there is no LIST_G_ASSET element closing tag.
But I guess that's not the real problem.the query always returns NULL for collumn1.
The important thing to understand is that the paths that you declare in the COLUMNS clause are relative to the context item is past the main XQuery expression. He knows more about the rest of the document, in particular of his ancestors.
In this case, you try to process a node whose absolute path would be/SA321/LIST_G_FAMILY/G_FAMILY/PARENT_FAMILY
in a document which the node root is G_ASSET.
The solution is to divide the query into two parts, the first one finds PARENT_FAMILY and the collection of G_ASSET and the second more shreds the collection G_ASSET is passed the first XMLTable in relational lines:
SQL> SELECT x1.column1 2 , x2.* 3 FROM XMLTable( 4 '/SA321/LIST_G_FAMILY/G_FAMILY' 5 passing xmltype(bfilename('TEST_DIR','o5875854.xml'), nls_charset_id('AL32UTF8')) 6 columns 7 column1 VARCHAR2(50) path 'PARENT_FAMILY' 8 , assets XMLType path 'LIST_G_ASSET' 9 ) x1 10 , XMLTable( 11 '/LIST_G_ASSET/G_ASSET' 12 passing x1.assets 13 columns 14 column2 VARCHAR2(100) path 'ASSET_DESCR' 15 , column3 VARCHAR2(50) path 'EFFECTIVE_MONTH' 16 , column4 NUMBER path 'EFFECTIVE_YEAR' 17 , column5 NUMBER path 'ASSET_AMOUNT' 18 , column6 NUMBER path 'EXEMPT_GAIN_AMOUNT' 19 , column7 NUMBER path 'EXPECTED_LIFE_YRS' 20 , column8 NUMBER path 'YTD_DEPRN' 21 , column9 NUMBER path 'PY_DEPRN_RESERVE' 22 , column10 NUMBER path 'RATE_FROM_LAW' 23 , column11 NUMBER path 'CASE1' 24 , column12 NUMBER path 'FISCAL_LIMIT' 25 , column13 NUMBER path 'YTD_IMPAIRMENT' 26 , column14 NUMBER path 'ACCUM_LOST_RATES' 27 , column15 NUMBER path 'YTD_IMPAIRMENT' 28 , column16 NUMBER path 'LIST_G_COL15/G_COL15/COL_16' 29 ) x2 30 ; COLUMN1 COLUMN2 COLUMN3 COLUMN4 COLUMN5 COLUMN6 COLUMN7 COLUMN8 COLUMN9 COLUMN10 COLUMN11 COLUMN12 COLUMN13 COLUMN14 COLUMN15 COLUMN16 ---------- -------------------------------- ----------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- 2240 2240-Equipamento informatico JANUARY 2009 3000 450 749,99 0 50 0 1275 0 0 0 0 2240 2240-Equipamento informatico JUNE 2009 1500 0 316,95 0 50 0 750 150 2,92 150 0
-
original title: install the first instance of adobe photoshop.
When I try to install 2 a trial version of Adobe photoshop cs5 I get a message "your administrator set the strategy to block this program.
Perhaps the publishing server has been blocked. To unlock a software publisher:
1.
In Internet Explorer, click Tools and then click Internet
Options.2.
On the content tab, in the certificates section, click certificates.3.
The Untrusted Publisher tab.4.
Select the editor you want to unlock, and then click Remove.I hope this helps.
Good luck!
Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.
-
Get the first item in the data model
I'm trying to get the first item in a data model. I expect the following to work, but it returns-1
var firstItem = myDataModel.indexOf(0)
Row is a table, and data() must return a specified row element:
if (myDataModel.size() > 0) { var firstItem = myDataModel.data([0]) }
indexOf search a value and returns it is row.
UPD:
In ArrayDataModel, there is also. value() function which takes a simple index.
Data() is more generic function inherited from DataModel.
So, it can be simplified to:
var firstItem = myDataModel.value(0)
-
I have some days left in Illustrator in the first instance and I just downloaded today.
I have some days left in Illustrator in the first instance and I just downloaded today. It was my sisters laptop (now it's mine) and she had her own creative cloud before here. It download the illustrator of the trial at the time (with its own Adobe account) but now there just decided to learn Illustrator - I download the program and it says the trial expired from the moment that I installed it! I was about to pay for a month, but I'm not enough, confident that will happen if I don't? It is said in the contract that if I cancel my order on the first 14 days my money will be found. 14 days this account as part of the trial days? Or will be returned my money even if I have no trial days remaining for a reason that I don't undestand.
Your sister has already exhausted the allotment of the trial so that the machine when it has installed and used the trial. You don't get a second chance with the same machine. The duration of the trial is not considered for the duration of subscription use. What you might not be aware of, is that you normally are not only subscribe for a month... you can pay for a month, but it is usually part of a one year subscription, for which you are responsible and cannot drop without penalty after the 14 day period. There is an option to get a subscription per month for a higher cost, so be careful what plan you choose if you don't know that you can find both within 14 days to try out the software.
-
Hello
Is it possible in OSB, such that I can get the name of an XML tag for example if I want to assign the name of tag transactionType of the below mentioned XML to a variable, can I do it using an XQuery function?
<? XML version = "1.0" encoding = "UTF-8"? >
< tns:sandstonetns xmlns:tns = "http://sandstone.response.transactionHistory.app.nab.cz.fc.ofss.com" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "http://sandstone.response.transactionHistory.app.nab.cz.fc.ofss.com Sandstone_Data_Transaction_History_Response.xsd" > ""
< tns:listOfTransactions >
< tns:transactions >
< tns:clients >
< tns:clientID > tns:clientID < / tns:clientID >
< / tns:clients >
< tns:timestamp > 2001-12-31 T 12: 00:00 < / tns:timestamp >
< tns:sequenceNumber > tns:sequenceNumber < / tns:sequenceNumber >
< tns:description > tns:description < / tns:description >
< tns:amount > 0 < / tns:amount >
< tns:accountNumber > tns:accountNumber < / tns:accountNumber >
< tns:debitOrCreditFlag > tns:debitOrCreditFlag < / tns:debitOrCreditFlag >
* < tns:transactionType > all < / tns:transactionType > *.
< / tns:transactions >
< / tns:listOfTransactions >
< tns:returnResponse >
< tns:returnCode > 0 < / tns:returnCode >
< tns:returnDescription > tns:returnDescription < / tns:returnDescription >
< / tns:returnResponse >
< / tns:sandstonetns >
Published by: rahulc on January 19, 2011 04:43You can use fn:local - name ().
http://www.xqueryfunctions.com/XQ/fn_local-name.html
Kind regards
Anuj -
GREP: Applies to the first instance only
Hello
Another GREP question for you if you can help.
Situation is applying a character style before specific a Word, i.e. Apply character Style of "four"...
There are 4 words (lets call them: one, two, three, four) which are a common occurrence and must always appear after the text that should have the style applied character, but my question cultures when one of the four words appear twice or more times in a row and the GREP applies to 2 or more instances of this word , i.e. the character Style applied random text 'a' "'we '"
I use these greps in the same paragraph style:
^. *(?= one)
^. *(?= two)
^. *(?= three)
^. *(?= four)
I just want the GREP to be applied to the first instance only - hope that this kind of things above is logical?
Thank you
This is because GREP is greedy, by default.
The expression
^. * (something more)
always take as many characters as possible, before processing the "something more": indeed, it will not match what whatsoever until the last occurrence of this text.
You can specify GREP not greedy match by adding a '?' after the command repeat the code:
^.*? (? = \b(one|two|three|four)\b)
-the question mark can be added to each of the 'repeat-this' codes: +, *, and? (« ! ? ("would mean: ' match'!' zero or one time, but uses the most short as possible match to).
I condensed your four commands into one list, because it seems that each of them would get matched in turn, leading to problems when you have 'one' and 'two' in the same sentence. With your GREPs, firstly everything up to 'one' would get marked, then all up to "two". Mine uses "whatever first".
(I've also added "word boundaries" \b before and after, because you wouldn't want to match the "one" in "Mr. Jones".)
-
How can I recover my windows vista serial, the tile is broken and im missing some numbers...
I lost my toshiba recovery CD, it is an a135/s4677, I reinstalled vista, but in the first instance. I am already taking pictures of the sticker and serial No. my laptop if you need if you can help me please write me * address email is removed from the privacy * thank youIf you had not reinstalled Vista, we helped you recover the product key of Vista for running old, Vista activated using specific programs.
But, as you have wiped the hard and reinstall Vista, we will not help you recover the product key.
http://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/home.jsp
Contact your computer manufacturer and ask them to send a recovery disk/s Vista set.
Normally, they do this for a cost of $ small.
Using recovery disks is normally not need to insert a product key.
See you soon. Mick Murphy - Microsoft partner
-
Mr President
Jdev worm is 12.2.1
How to add two lines when the second row is not visible, but also gets the first data line too?
I want to add two lines like below picture, but want the second to remain invisible.
I asked this question but my way of asking was wrong, that's why for me once again.
Concerning
Try to follow these steps:
1. in the database table to add the new column "JOIN_COLUMN" and add the new sequence "JOIN_SEQ".
2. Add this new column in the entity object. (You can add this in entity object by right clicking on the entity object and then select "Synchronize with database" then the new column and press on sync)
3. in your bookmark create button to create only one line NOT 2 rows.
4 - Open the object entity--> java--> java class--> on the entity object class generate and Tick tick on the accessors and methods of data manipulation
5 - Open the generated class to EntityImpl and go to the doDML method and write this code
protected void doDML(int operation, TransactionEvent e) { if(operation == DML_INSERT) { SequenceImpl seq = new SequenceImpl("JOIN_SEQ", getDBTransaction()); oracle.jbo.domain.Number seqValue = seq.getSequenceNumber(); setJoinColumn(seqValue); insertSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn()); } if(operation == DML_UPDATE) { updateSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn()); } super.doDML(operation, e); }
private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn) { PreparedStatement stat = null; try { String sql = "Insert into table_name (COLUMN_1,COLUMN_2,COLUMN_3,JOIN_COLUMN, HIDDEN_COLUMN) values ('" + value1 + "','" + value2 + "','" + value3 + "','" + joinColumn + "', 1)"; stat = getDBTransaction().createPreparedStatement(sql, 1); stat.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { try { stat.close(); } catch (Exception e) { e.printStackTrace(); } } } private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn) { PreparedStatement stat = null; try { String sql = "update table_name set column_1='" + value1 + "', column_2='" + value2 + "', column_3='" + value3 + "' where JOIN_COLUMN='" + joinColumn + "'"; stat = getDBTransaction().createPreparedStatement(sql, 1); stat.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { try { stat.close(); } catch (Exception e) { e.printStackTrace(); } } }
-
Is there a way to get the first Pro CS6 with still now I can't find the previous, offered versions with the subscription of the CC 2015? What is recommended for creating DVDs with interactive menus?
Instructions again, cloud or version https://forums.adobe.com/thread/1992717 serial number
-a of notes on different versions of cloud and step by step on these differences
-contains information about the separate library download which is necessary
-CS6 is the last reminder, see here #8 why http://forums.adobe.com/thread/1337952?tstart=0Still and 10 Windows https://forums.adobe.com/thread/2015461 use the compatibility mode of Windows 8
problem/solution to install Encore CS6 https://forums.adobe.com/thread/1934087 -
How to pass the content of an xml element in the text frame in inDesign Script
var XMLFile = File.openDialog ("select XML Files... ») ;
var doc = app.activeDocument;
If (!) App.Documents.Length)
{alert ("ERROR: Document not opened");}
return;
}
doc.importXML (XMLFile);
var firstFigureNode = doc.xmlElements [0] .xmlElements [1] .xmlElements [0];
var lableNode = firstFigureNode.xmlElements [0];
var lableNodeText = lableNode.contents;
myFrame var = doc.textFrames.add ({geometricBounds: [-13, 13, 3, -3]});
lableNodeText.move (LocationOptions.AFTER, myFrame.texts [0]);
========================================================
My requirement is: == > > move the content of an xml element in the text by inDesign Script block, but XML InDesign file Structure should not be change & data in the XML Structure should remain as it was before...
I tried to code above, but it does not work...
Please can someone help me in solving this problem...
It does not work correctly...
It moves firstFigureNode in myFrame...
firstFigureNode.placeXML (myFrame);
===>> For Apple Script try below Code ===>>
myFrame markup using firstFigureNode
-
I have subscription for adobe cc and when I try to get the first he comes up with an unusable version of first cs6 for some reason, I can't change it, please help me
Your system meets the criteria for more recent versions of first?
Premiere Pro - http://helpx.adobe.com/premiere-pro/system-requirements.html
-
Installation of Adobe met an unexpected failure when you attempt to install the first instance of AdobeAcrobatPro DC. It is the exact error message and seems to be the case for a number of users. I am running Windows 7 and was already able to install Adobe Acrobat Reader DC and have Adobe Flash Player 10 ActiveX installed successfully. It's the exact error message, there is NO error code! It seems as there is no support number to contact Adobe to, and the only way to receive the 'support' is through the forum. PLEASE ANSWER!
Hi tracyes31040766,
If it you please run this tool cleaner Download Adobe Reader and Acrobat cleaning - Adobe Labs tool to remove the old Acrobat, retsrat your system plates & then try to install it again using this link Download Adobe Acrobat free trial | Acrobat Pro DC.
Let me know how it goes.
Kind regards
Nicos
Maybe you are looking for
-
Calendar view bad Cougar on iMac
Recently (finally!) updated in early 2009 iMac to Mountain Lion. A few things have caused problems, but it is coming along. However, the calendar date, display on the dock (bottom of screen) keeps failing to 17 July and I can't seem to view the curr
-
MacBook Pro screen turns blue!
How can I solve this problem?
-
Using numbers to create a table where the value of the line increases automatically
Hello I created a table (pictured below) to help calculate my self-employed income: INDEX DATE HAVING RETURNED TO THE SELF-EMPLOYED £ A1 I want to create an index / of reference for each line so that I can connect to receipts. I like the index / refe
-
Portege M750 WIFI disconnects all about 30 minutes on its own
Hello I recently bought a new M750 and made a clean installation of vista on the system. I downloaded all the drivers from the Toshiba support website and everything works fine. However, the WIFI connection drops every 30 minutes and takes about 2-3
-
Precision M3800 screen flashing/flickering after reactivation
Hello Sometimes (often) when I wake up my Prcission M3800 of sleep, I see flashing/flickering of the screen for 1 minute or 2. It's as if a refresh rate is poor at this time - it reminds me of very old monitors. After these 2 minutes until it stops.