How to add parent XML tag in ID CS5
Hi,
I have the following xml structrure in the InDesign cs5 document.
<para>
<link>
<insert>
I want to add <xref> tag within this structure as parent to <insert>, like below:
<para>
<link>
<xref>
<insert>
can anybody help me on this.
Thanks,
Krishnan
Hi,
First Select <insert> tag,
var parentTagName = app.selection[0].associatedXMLElements[0].markupTag.name;
if(parentTagName.toString() == "insert"){
app.selection[0].associatedXMLElements[0].xmlElements.add("xref", app.selection[0]);
Regards,
Bala.
Similar Messages
-
How to add Multiple XML Tags for a single column for an RDF
Hi Gurus,
I have Requirement in the Oracle D2k Report from which we are generating the xml tags.
My Requirement is in a table i have 2 columns say A and B.
i am able to generate three xml tags separately using the report builder by clicking on the column name and in the xml setting giving the xml tag.
eg: table Acount contains 2 columns A and B with respective data
A B
QT 1
QTS 0
QTR 2
i am able to general xml tags like this
<ACount>
<AStatus>QT</AStatus>
<HeadCount>1</HeadCount>
</ACount>
<ACount>
<AStatus>QTS</AStatus>
<HeadCount>0</HeadCount>
</ACount>
my requiremnt for the xml tags is
<ACount>
<AStatusQT>1</AStatusQT>
<AStatusQTS>0</AStatusQTS>
</ACount>
kindly help me out how to achieve this requirment in the rdf file mulitple xml tags.
all your input are most valuable to me, thanks in advance
Edited by: 909577 on Apr 9, 2012 3:10 PMI'm sorry for being so dense, but I'm not quite following, although what I've tried makes me think if I can follow you, it will work :)
To answer your initial questions, you are correct with both your assumptions:
1) detailType is the parameter that specificies YTD/Weekly, this is a "report defined" parameter that I am using to determine which Row Group to display (either YTD or Weekly)
2) SchoolDaysActiveWeek is the parameter that is being set to either true or false -- this is a field in the cube that states whether that record is for the current week or not
So in following your instructions, well that's the problem I'm not quite following :)
1) When you say Delete the SchoolDaysActiveWeek parameter from the report only, do you mean to mark the parameter as Hidden? If so, I've done this.
2) I'm not quite sure where to use the statement you provided me. You said to put it in the dataset, but I don't know which dataset. I assume you mean the "main" dataset (as opposed to the hidden dataset that gets generated when you mark a field
as a parameter). If this is the case, the only place I could see that would allow you to use such a statement is in the Filter section of the properties. I tried this, and it did not generate any errors, but it also kept my report groups from displaying
-- it just showed a blank report, so I think it probably wasn't bringing back any rows to populate them with.
I also tried going into the Expression section for the SchoolDaysActiveWeek parameter in the second screenshot and placing the statement there. When I did this and ran the report, I would get the following error:
The 'SchoolDaysActiveWeek' parameter is missing a value
So what am I missing!?
Also, thanks for taking the time to respond!! -
How to add new xml item(BAPI requset)?
Hello
i want to create bom to ERP from mii
how to add new xml item(BAPI requset)?
i use bapi CAD_CREATE_BOM_WITH_SUB_ITEMS
this bapi's format is
<table>
<item>
<col1>1111</col1>
<col2>bbbb</col2>
</item>
</table>
i want to add <item>
like this
<table>
<item>
<col1>1111</col1>
<col2>bbbb</col2>
</item>
<item>
<col1>22222</col1>
<col2>bbbb</col2>
</item>
</table>
how to set trx?
i tryed
SAP_JCo_Interface_0.Request{/CAD_CREATE_BOM_WITH_SUB_ITEMS/TABLES/BOM_ITEM/item[2]/SORTF}
when error occured
use MII12.0
Edited by: Atsushi Iwasaki on May 18, 2010 6:22 AMHi,
You can try this alternative
Step 1) Create XML Document with required structure which you want to pass it to BAPI request.
Step 2) Populate the XML Row with required contents and map it to above created XML document
Step 3) Map above created XML Document to BAPI request (use assign XML option dfrom link editor rather tha assign value)
This will help to map dynamic contents to your BAPI request.
Regards,
Shalaka -
Hi All,
I have selected myElement. Then how to add new parent Element in indesign cs3 using Javascript. pls suggest.
Regards,
KAn.Well, you'll need to add a new element at the right place in the hierarchy, and then move myElement there.
So something like (untested):
var oldParent = myElement.parent;
var newParent = oldParent.xmlElements.add(oldParent.tag);
myElement.move(LocationOptions.AT_BEGINNING, newParent);
But you don't specify what the new parent node should have or where it should be in the hierarchy, so there'll need to be some adjustment. -
How to get the XML TAG name itself instead of TAG value
Hi All,
I have a question here
I want to retrieve the XML tag from a XML file instead of its value.
Example:
<item>Colgate</item>
Now I want to retrieve "item" as output from XPath expression, I dont want its value as "colgate"
How to do that...?
Thanks
-PraveenYou can do this with an axes XPatch expression:
child::node()/name()
For more info see: http://www.w3schools.com/xpath/xpath_axes.asp
HTH,
Bas -
How to reveal XML tags in InDesign CS5.5?
I'm trying to tag a business catalog for an XML export. I've never done it before - but our sister company has done the same task with a similar catalog. I can view their catalog in InDesign CS5.5 for Windows over a VPN connection in order to see how they tagged their catalog.
I'm doing this task on a Mac using InDesign CS4. The interfaces are not the same. The biggest problem is the sister company is in Czech and so is InDesign. I need to open the tags pane. On the Mac, its just "Window>>Tags." There is a "Window" (Okna) menu, but I'm not seeing a "Tags" choice. I have the structure open, but I want to see all the little colored tags. How do I reveal these on the Windows CS5.5 version?
ThanksWouldn't it be View > Structure > ... ?
-
How to Find the XML Tag in indesign
HI!!<br /><br />We are working with XML work flow in indesign. In indesign how could we find the XML Tag in indesign.<br /><br />Example::<br />In the Below list we could have to find the xml tag <chapter> in story editor or in the main text frame in indesign using find option. Kindely sent if any Plugins is available.<br /><br />For exmaple:<br />************<br /><book><br /> <part><br /> <chapter><br /> <head><br /> <para><br /> <bold><br /><br />Thanks,<br />C.K.Venkatesan
I imported the xml file in vb.net. now i want to find the number of pages and no. of elements. i found out it. but i was not able to find which elements are placed in which page. i want that information. plz kindly help. i am using vb.net. for eg. <ce:figure> placed in which page no., <ce:sections> placed in which page no., etc..,
-
How to read duplicate XML tag?
Hi to all gurus,
Currently I am working on XSLT transformation. I encountered a problem when I have to read a random number of xml tag with the same names.
sample:
<product_code_list>
<product_code>12345</product_code>
<product_code>12333</product_code>
<product_code>12233</product_code>
</product_code_list>
My xslt can only manage to read the 1st row. How can it be possible to read all the 3 rows?
xslt:
<product_code_list>
<xsl:for each select-value-of='product_code_list'>
<product_code_list1>
<product_code><xsl: select-value-of ='product_code'></product_code>
</product_code_list1>
</xsl:for each>
</product_code_list>
Many thanks in advance for reading this. Please assist to solve this. Point will be generously awarded!Hi Mr Raja!
Thanks again for your help. I felt so embarrassed.
The product is produced from another source dynamically. Hence the list can contain from 1 to any number of products.
I tried to use the for-each but another problem arise. the structure is created for the products, but it is all empty inside when i used the debugger to go through the code.
TYPES:
TPRODUCT(10) OCCURS 0,
BEGIN OF PRODUCT_LIST,
PRODUCT TYPE TPRODUCT,
END OF PRODUCT_LIST,
PL TYPE PRODUCT_LIST OCCURS 0.
DATA:
VENDOR TYPE STANDARD TABLE OF PRODUCT_LIST INITIAL SIZE 0,
XML_STRING TYPE STRING,
xslt_error TYPE REF TO cx_xslt_exception,
xslt_message TYPE string.
CLEAR xml_string .
CONCATENATE
`<myXML>`
`<PRODUCT_LIST>`
`<PRODUCT>12345</PRODUCT>`
`<PRODUCT>12333</PRODUCT>`
`<PRODUCT>62233</PRODUCT>`
`</PRODUCT_LIST>`
`</myXML>`
INTO XML_STRING.
CLEAR VENDOR.
TRY.
CALL TRANSFORMATION ('ZTESTCHINXSLT')
SOURCE XML XML_STRING
RESULT VENDOR = VENDOR.
CATCH
cx_xslt_exception INTO xslt_error.
xslt_message = xslt_error->get_text( ).
ENDTRY.
XSLT:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/abapxml" version="1.0">
<xsl:template match="/">
<asx:abap xmlns:asx="http://www.sap.com/abapxml">
<asx:values>
<xsl:for-each select="myXML">
<VENDOR>
<xsl:for-each select="PRODUCT_LIST">
<PRODUCT_LIST1>
<PRODUCT>
<xsl:for-each select="PRODUCT">
<P>
<xsl:value-of select="PRODUCT"/>
</P>
</xsl:for-each>
</PRODUCT>
</PRODUCT_LIST1>
</xsl:for-each>
</VENDOR>
</xsl:for-each>
</asx:values>
</asx:abap>
</xsl:template>
</xsl:transform>
Message was edited by:
swee chin -
How to add the "EXPLICIT" tag on my music (not pirated)
Hello (i'm French, so i'm sorry for my English)
Well, when sometimes i buy some musics, i can see the red tag "EXPLICIT" & my question is (after many research) is:
How to add this tag on my own music (music that i bought in a store & ripped into Apple Lossless [.m4a])
Thank you very much.
Message was edited by: Haaghunhttp://hints.macworld.com/article.php?story=20070616175442397
http://mac.majorgeeks.com/download5526.html -
How to filter particular xml tag value using -DBMS_XMLGEN / DBMS_XMLSTORE
Hi,
I am using dbms_xmlgen and dbms_xmlstore package to extract xml datafile tag value from file server to oracle database table.
I have used the below pl/sql program to extract the xml tag values to oracle relational table.Its working fine for me.
But I would like to extract the values based on particular filter condition.
The following xml program I have 3 rows I would like extract the xml data based on the following condition .
Filter condition
==============
the tag <STATE_ABBREVIATION> value shuold be 'CA' and the <CITY> tag value should be Palo_Alto then I will store the ZIPCODE
ZIP_CODE_EXTN,STATE_ABBREVIATION tag values in the Oracle Relational table.
The below pl/sql program storing all the three rows but I required the values based on the filter condition that I mentioned earlier.
Kindly assist me what are the steps that I need to change in this program.?
XML Program file content.
======================
<ZIPCODES>
<mappings>
<STATE_ABBREVIATION>CA</STATE_ABBREVIATION>
<ZIPCODE>94301</ZIPCODE>
<ZIP_CODE_EXTN>9277</ZIP_CODE_EXTN>
<CITY>Palo_Alto</CITY>
</mappings>
<mappings>
<STATE_ABBREVIATION>CA</STATE_ABBREVIATION>
<ZIPCODE>95302</ZIPCODE>
<ZIP_CODE_EXTN>9279</ZIP_CODE_EXTN>
<CITY>LA</CITY>
</mappings>
<mappings>
<STATE_ABBREVIATION>TX</STATE_ABBREVIATION>
<ZIPCODE>75038</ZIPCODE>
<ZIP_CODE_EXTN>7837</ZIP_CODE_EXTN>
<CITY>DALLAS</CITY>
</mappings>
</ZIPCODES>
PL/SQL Program for XML extract.
==========
declare
charString varchar2(80);
finalStr varchar2(4000) := null;
rowsp number;
insCtx DBMS_XMLStore.ctxType;
ctx dbms_xmlgen.ctxHandle;
v_FileHandle UTL_FILE.FILE_TYPE;
begin
v_FileHandle := utl_file.fopen('XMLTEST','XML_NEW_CITIES.XML','r') ;
loop
BEGIN
utl_file.get_line(v_FileHandle, charString);
exception
when no_data_found then
utl_file.fclose(v_FileHandle);
exit;
END;
dbms_output.put_line(charString);
if finalStr is not null then
finalStr := finalStr || charString;
else
finalStr := charString;
end if;
end loop;
insCtx := DBMS_XMLStore.newContext('SYS.ZIPCODES');
dbms_xmlgen.setRowsetTag(insCtx,'ZIPCODES');
dbms_xmlgen.setRowsetTag(insCtx,'mappings');
DBMS_XMLStore.clearUpdateColumnList(insCtx);
DBMS_XMLStore.setUpdateColumn(insCtx,'ZIPCODE');
DBMS_XMLStore.setUpdateColumn(insCtx,'ZIP_CODE_EXT N');
DBMS_XMLStore.setUpdateColumn(insCtx,'STATE_ABBREV IATION');
rowsp := dbms_xmlstore.insertXML(insCtx,finalstr);
end;
Thanks,
natThanks for your reply. :)
Its working fine in the DBMS_XMLSTORE package. Here I have given the code
CREATE OR REPLACE TYPE typ_dummy AS OBJECT
( "@ENO" NUMBER,
"@ENAME" VARCHAR2(100),
eno NUMBER,
ename VARCHAR2(100));
CREATE TABLE EMP
empno VARCHAR2(25),
sal NUMBER,
hiredate DATE,
typ TYP_DUMMY
DECLARE
insCtx DBMS_XMLStore.ctxType;
rows NUMBER;
xmldoc CLOB :=
'<ROWSET>
<ROW num="1">
<SAL>1800</SAL>
<EMPNO>739</EMPNO>
<HIREDATE>27-AUG-1996</HIREDATE>
<TYP ENO="739" ENAME="Nazurullah">
<ENO> 1 </ENO>
<ENAME> ALDRIN </ENAME>
</TYP>
</ROW>
<ROW>
<SAL>18000</SAL>
<EMPNO>7369</EMPNO>
<HIREDATE>27-AUG-1996</HIREDATE>
<TYP ENO="7369" ENAME="PEPPIN" />
</ROW>
<ROW>
<SAL>37000</SAL>
<EMPNO>20701</EMPNO>
<HIREDATE>27-AUG-1996</HIREDATE>
<TYP>
<ENO> 20701 </ENO>
<ENAME> VENKATACHALAM </ENAME>
</TYP>
</ROW>
</ROWSET>';
BEGIN
insCtx := DBMS_XMLStore.newContext('emp'); -- get saved context
-- Now insert the doc.
-- This will only insert into EMPNO, SAL and HIREDATE columns
rows := DBMS_XMLStore.insertXML(insCtx, xmlDoc);
-- Close the context
DBMS_XMLStore.closeContext(insCtx);
END;
SELECT * FROM emp;
EMPNO SAL HIREDATE TYP(@ENO, @ENAME, ENO, ENAME)
739 1800 27-AUG-96 TYP_DUMMY(739, 'Nazurullah', 1, ' ALDRIN ')
7369 18000 27-AUG-96 TYP_DUMMY(7369, 'PEPPIN', NULL, NULL)
20701 37000 27-AUG-96 TYP_DUMMY(NULL, NULL, 20701, ' VENKATACHALAM ') -
How to get all xml tags in a text frame?
I want to get all the xml tags of the text in a text frame. I had tried the following methods but always get the tag binding the frame itself. <br /><br />1) XMLReference objXMLRef = Utils<IXMLUtils>()->QueryXMLReferenceData(textModel, 1);<br /><br />2) XMLReference objXMLRef = Utils<IXMLUtils>()->GetStoryThreadXMLReference(textModel, textIndex);<br /><br />Thanks in advance.
I would think if you intanciate the XMLReference and use IIDXMLElement GetChildCount / GetNthChild would do what you are looking for.
Ian -
How to add a br tag in headerText attribute in af:column in jdeveloper
Hi,
I want to add a <br> tag in headerText attribute of <af:column> in jdeveloper 11.1.1.5.0. I want to add this in a String getting from a java bean.
for eg. i have month and Year so i want to print it in the format given below
2012
Jan
and for taht i hav to add a <br> tag in the headerText attribute of <af:column>. for eg.
String month= "2012" + "<br>" +"Jan";
bt this is printing as it is in the header text .
thnx.Bind the headerText property to the managed bean for the taskflow / jspx.
Write the code in the getter of the headerText.
Alternatively you can use EL in the headerText property on the jsff/jspx .. for e.g if there are different attributes for the month and the year you can use
headerText="#{bindings.month.inputValue} #{bindings.year.inputValue} " -
How to Add Multiple Meta tags?
I work for a large state educational orgranization that needs
to add meta tags to the header as part of the
Dublin Core Metadata Initiative.
In this case, not having meta tags is not an option.
The meta data has to be unique to each page. Using the
Keywords / Description parameters provided in the menu will not
work.
Hacking the "ccKeywordsAndDescription.js"
"ccKeywordsAndDescription.htm" files is not an option as different
meta data tags are required on each page and sometimes several of
the same meta data tags are required on one page
(ex: <meta name="DC.Subject" scheme="Keyword"
content="####">
Because of this, adding a template parameter for each
editable meta data tag appears not to work as well.
This issue was brought up once before in this form by some
one else but not answered. I figured I would check again.It does not look like this is doable within Contribute, so we
are going outside for a solution.
The users create the page they need in Contribute from a
template with an editable region in the header. Then the users go
back in to the page with a Meta tag creation program called Tag Gen
which has the same editable region defined in its preferences. They
can add the needed tags save and close the page without ever
dealing with the page code. Then they go back into Contribute to
publish the page.
It is kind of alot of Micky Mouse work but it is the only
solution we could find. -
Help: How do we retain XML tags inside BPEL
I have scenario where the entire input (XML) needs to be converted as string object and passed to Java service (WSIF). getVariableData is removing XML tags.
Input is a XML document with XML Signature in it. Without tags, Java code is not able to verify the signature.
I am using Apache XML Security libraries. In order for me to verify, code creates Document object (org.w3c.dom.Document) from an inputstream.
Any help is much appreiciated.Hi Clemens,
First of all, thanks for the quick response. I would appreciate if you could help me little more to understand your suggestion. Currently, my BPEL process input is coming in with a structure, which includes XML information to load invoice along with its digital signature.
Currently, I am trying to include an activity of Assignement after receiveInput activity to create an Xpath expression of something like this..
concat(concat("<SignedInvoice>",concat(orcl:get-content-as-string(bpws:getVariableData('inputVariable','payload','/client:SignedInvoice/ns2:EM_VOUCHER_IN')),orcl:get-content-as-string(bpws:getVariableData('inputVariable','payload','/client:SignedInvoice/ns3:Signature')))) , "</SignedInvoice>")
Where would I be implementing your suggestion of casting with org.w3c.dom.Element? would it be in the expression builder or does it need to be done somewhere else.
Thanks again..
Ramesh -
Iterate through XML tags of file (CS5)
Hello!
I'd like to iterate through an XML file, but I am not sure how to do this, since the import is mostly done automatically.
This is how I load and import the file:
var f = new File('~/Desktop/test.xml');
app.activeDocument.importXML(f);
But how can I now iterate through its tags using JavaScript?Hallo,
Thank you for the resource!
However, I was not able to implement any of the example because of an error "__processRuleSet is not a function".
My code is:
//Setup.jsx
mainSetup();
function mainSetup(){
var myDocument = app.documents.add();
myDocument.xmlImportPreferences.allowTransform = false;
myDocument.xmlImportPreferences.ignoreWhitespace = true;
var myFilePath = '~/Desktop/test.xml';
myDocument.importXML(File(myFilePath));
var myBounds = myGetBounds(myDocument, myDocument.pages.item(0));
myDocument.xmlElements.item(0).placeIntoFrame(myDocument.pages.item(0), myBounds);
function myGetBounds(myDocument, myPage){
var myWidth = myDocument.documentPreferences.pageWidth;
var myHeight = myDocument.documentPreferences.pageHeight;
var myX1 = myPage.marginPreferences.left;
var myY1 = myPage.marginPreferences.top;
var myX2 = myWidth - myPage.marginPreferences.right;
var myY2 = myHeight - myPage.marginPreferences.bottom;
return [myY1, myX1, myY2, myX2];
// Test, Add return character after every XML Element
mainTest();
function mainTest(){
if (app.documents.length != 0){
var myDocument = app.documents.item(0);
//This rule set contains a single rule.
var myRuleSet = new Array (new AddReturns);
with(myDocument){
var elements = xmlElements;
__processRuleSet(elements.item(0), myRuleSet);
else{
alert("No open document");
//Adds a return character at the end of every XML element.
function AddReturns(){
this.name = "AddReturns";
//XPath will match on every XML element in the XML structure.
this.xpath = "//*";
// Define the apply function.
this.apply = function(myElement, myRuleProcessor){
with(myElement){
//Add a return character after the end of the XML element
//(this means that the return does not become part of the
//XML element data, but becomes text data associated with the
//parent XML element).
insertTextAsContent("\r", XMLElementPosition.afterElement);
//To add the return at the end of the element, use:
//insertTextAsContent("\r", XMLElementPosition.afterElement);
return true;// Succeeded
} //End of apply function
Do you have any ideas?
Kind regards,
mannyk
Maybe you are looking for
-
The thing is, I DO have a credit card field info page in it, but I cannot download anything...not even anything for free...and when I fill the fields up with all the correct information it still claim my security code is wrong when it's right. Please
-
How to cancel changes that were made via transport request importing?
Hi! Could you please tell me whether it is possible to cancel changes that were made via importing of transport request into the system? Thanks and Regards, Siarhei
-
Setup WLAN using 802.1X Windows PKI
Is it possible to setup the WLC 2504 to use Windows 2008 PKI to authenticate domain machines automatically to WLAN?
-
IDVD 11 Themes won't load?
I just purchased Ilife (old version) so I could load IDVD. It loaded fine but when I try to use the program it can't load the themes and ends the program. I located themes version 6 and 7 on the HD in application suppoprt, but even if I try to open
-
i am living in germany. I enter my visa card informations to setup Apple ID. but it says this is not valid. but it is valid. may be it is not accepting the german card system. what is the problem. please help