Unmapping styles to remove XML tags

I have an AppleScript that sets up an XML Export Map for style to tag mapping, using a known set of customer styles, and I'm adding a check for non-standard (unmapped) styles to include those as well as unknownstyle tags. This is all working well.
What I'd like to do now is create an Unmap script that would remove all style level tags, leaving just frame level tags. The customer is working with K4, and sometimes articles will be reworked after initial processing, or be copied to start a new version of the file. So we'd like tags out for a cleaner file at that stage, which they'll then retag at the end of the editing prior to export.
While this is easy through the UI (edit style to tag mapping, and choose [Not Mapped] as the target tag for a given style sheet), I can't find any way of doing the same through AppleScript. I have tried setting the markup tag property to "", null, 0, [Not Mapped], and a few other things, without success.
Does anyone know of a way of doing this, or know if it is unsupported on the script side so I can stop looking?
Thanks, John

Hi Marc,
It looks like that is the way to go. I was hoping to find a way to unmap specific style sheets, since that would be the direct opposite of the process used to add style sheet level tags in the first place. (And the articles also contain frame level tags, which I do not want disturbed by this process.) But while that action is possible through the UI, it does not appear to be supported via scripting.
However, by looping through and untagging XML elements of XML elements of the main XML element, the result appears to be correct. I'm not entirely clear why this is working, since the second level is not just the frame level tags, but the results look good, so as long as this keeps working I won't worry about exactly why.
Thanks,
- John

Similar Messages

  • Remove XML tags from XML element in Oracle

    Hi,
    I have a requirement where I have to remove all the xml tags from xml element with banks, currently I'm using replace 4 times to replace all different types of xml tags, performance is really bad. is there any better option to remove xml tags from xml data leaving the actual data. please find the example data below.
    select
    TO_CLOB(REPLACE(REPLACE(REPLACE(REPLACE
    ('<Concatcolumn><ConcatGroupID>MyText Data goes here </ConcatGroupID><ConcatGroupID>Data agian</ConcatGroupID></Concatcolumn>','<ConcatGroupID>'),'<Concatcolumn>'),'</ConcatGroupID>',';'),';</Concatcolumn>')) AS Concatcolumn
    from dual
    **************Out put*************
    MyText Data goes here ;Data agian

    One way is to use xquery:
    SQL> with t as
    select xmltype('<Concatcolumn>
                          <ConcatGroupID>MyText Data goes here </ConcatGroupID><ConcatGroupID>Data agian</ConcatGroupID></Concatcolumn>'
       ) xml from dual
    select xmlquery('string-join(//text(), ";")' passing xml returning content).getclobval() xml from t
    XML                                                              
    MyText Data goes here ;Data agian                                
    1 row selected.

  • Remove XML Tags with White space.

    Hi All, I have a scenario like the below code where I have empty spaces in few columns of my tables. I create XML of the data and send it. There is a lot of code such and I can't add ISNULL() on each and every column. Is there any simple one line code working
    with the XML so that I can remove the tags with only empty spaces. TIA.
    DECLARE @xml1 VARCHAR(max)
    DECLARE @xml2 VARCHAR(max)
    set @xml1 = (SELECT 1 AS Col11, ' ' AS Col21, 'ABC' AS Col31 FOR XML RAW, ELEMENTS)
    set @xml2 = (SELECT 2 AS Col12, ' ' AS Col22, 'ABC' AS Col32 FOR XML RAW, ELEMENTS)
    DECLARE @xml xml;
    SET @xml = Cast('<ROOT>' + ISNULL(@xml1, '') + ISNULL(@xml2, '') + '</ROOT>' as xml)
    SET @xml.modify('delete //*[not(node())]');
    -- Some Way to Remove the XML Tags with Empty space here.
    select @xml as XMLString
    /* Output of the Above script.
    <ROOT>
    <row>
    <Col11>1</Col11>
    <Col21> </Col21> -- This XML Tag with a white space should be removed
    <Col31>ABC</Col31>
    </row>
    <row>
    <Col12>2</Col12>
    <Col22> </Col22> -- This XML Tag with a white space should be removed
    <Col32>ABC</Col32>
    </row>
    </ROOT>
    Welcome to MSDN Forums.
    Feel free to ask your questions and Please Note to Vote all helpful topics and
    Mark all answering posts.
    You Value Community's efforts and Community values your faith.
    - Arun Kumar Allu

    It would have helped if there had been a trim() function in XQuery.
    With some trial and error and inventive thinking I came up with this:
    <span style="color:Blue">SET</span> @xml.modify(<span style="color:#A31515">'delete //*[. <= " "]'</span>);
    As they say: it seems to work. But I leave no warranties.
    Erland Sommarskog, SQL Server MVP, [email protected]
    Wow Erland  this
    seems to work, I need to test it against my data and update on this. Thanks again.
    Welcome to MSDN Forums.
    Feel free to ask your questions and Please Note to Vote all helpful topics and
    Mark all answering posts.
    You Value Community's efforts and Community values your faith.
    - Arun Kumar Allu

  • Remove XML tags in the File Adapter

    Hi,
    I have a JDBC to File interface. However, there is a requirement to remove some of the XML tags from XML produced by the File Adapter.
    For example,
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_XML xmlns:ns0="namespace">
       <XMLIntegration>
             <Prices COLUMNS="Index, Date, Price">
             <Index>Fuel</Index>
             <Date>2007-05-01 00:00:00.0</Date>
             <Price>0</Price>
            </Prices>
          <Prices COLUMNS="Index, Date, Price"/>
      </XMLIntegration>
    </ns0:MT_XML>
    needs to be changed to
       <XMLIntegration>
             <Prices COLUMNS="Index, Date, Price">
             Fuel, 2007-05-01 00:00:00.0, 120.65
            </Prices>
      </XMLIntegration>
    Does anyone know how to do this? I'm using the File Content Conversion Message Protocol but I'm not having much success

    hi,
    you just need to have this:
    <XMLIntegration>
             <Prices COLUMNS="Index, Date, Price">
             Fuel, 2007-05-01 00:00:00.0, 120.65
            </Prices>
      </XMLIntegration>
    as your target message in your mapping
    and map all values to Prices tag
    you don't need no content conversion - just the mapping
    Regards,
    michal

  • Facing problem while removing XML tags which has been generated from SAP

    Hi All,
    I am facing problem in MII, while i trying to remove 1st 2 XML tags of XML as generated from SAP.
    Here is XML which has been generated from SAP
    u201C<?xml version="1.0"; encoding="UTF-8"?>
    <ZCIFSCHEDULE>
    <SCHEDULE>
    <MESSAGE_TYPE/>
    <SITE>A300</SITE>
    <SHOP_ORDER>2012020856</SHOP_ORDER>
    <QTY_TO_BUILD>6.000<;/QTY_TO_BUILD>
    <DATE_TIME>08-FEB-2012 20:57:21 +05:30</DATE_TIME>
    <OPERATION>PRS</OPERATION>
    <ITEM>IN-CT00228</ITEM>
    <DPICS_CODE>1229</DPICS_CODE>
    <REVISION/>
    <CYC_TIME_CURING/>
    <FLAG_AGING/>
    <AGING_MIN/>
    <PRODUCTION_VERSION/>
    <CYC_TIME_OC/>
    <CYC_TIME/>
    </SCHEDULE>
    </ZCIFSCHEDULE>u201D
    From above i want to remove 1st 2 tags and last one tag i.e.  u201C<?xml version="1.0"; encoding="UTF-8"?> , <ZCIFSCHEDULE> and last tag ZCIFSCHEDULE>u201D
    Its urgent!
    Did anyone done regarding this issues. Thanks in advance.
    Kind Regards,
    Praveen Reddy

    Hi Praveen,
    Are you trying to make the xml into a string?  I think if you remove the first tag, it will either automagically reappear or it will throw and error as being poorly formed xml. 
    In general, you can remove the nodes by the use of indexes.  Since you are operating at the root level, I am not sure how well it will work, but if your xml is in a property, you can reference the specific nodes by something like this:  myXML.Output{/*[1]} which if you put it in a tracer will display the contents of the first node (or blank if there are child nodes).  The node index can be dynamically set, but start with the simple hard coded one.  I would also start at the lowest child level to verify that it is working properly (a tracer will display the contents specified by the index).  You can also google xml indices (or indexes) and it will point to some other useful xml operators.
    I suggest that you play around with it and also work with the Link Types (hint: removeXML).
    Regards,
    Mike

  • Multiple Return to Single Return is Removing XML Tag

    Dear All,
    I'm Using  -  InDesignCS3 + WinXP + VB6.
    I've a InDesign file which is created by XML Import (Our Customers needs XML Output also at the End).
    After importing i've done few modifications (Moved Figs & Captions to frames by PlaceXML method).
    At this stage an Extra Paragraph Return (where the Figure placed while import, before moving to frame) is available.
    When i tried to remove this by replace, XML Tag for the Figures are also deleted from the XML Structure of the Document.
    Is there any other way to do this? - Please Suggest
    Thanks in Advance,
    SaRaVaNaN.N...

    Hai,
    Here is a Simple Example for my Question.
    Ex: Import the following XML and from the XML Structure (Ctrl+Alt+1) Move <figure> to a new Frame.
          You'll see an extra paragraph return between those two paragraphs.
              <root><para>...text 1...</para>
              <figure><title>fig.1</title><img href="myFig1.jpg"/><caption>about the figure</caption></figure>
              <para>...text 2...</para></root>
    GoTo Story Editor (Ctrl+Y). You'll see as follows:
              [x]para>...text 1...<para[x]
              [x]figure]
              [x]para>...text 2...<para[x]
    After Replacing '^b^b' to '^b' it looks like below:
              [x]para>...text 1...<para[x]
              [x]para>...text 2...<para[x]
    Figure Tag is removed from the XML Structure and Story Editor. Is there any way to remove this extra pragraph reture with keeping the XML Structure?
    Thanks...

  • Help in removing XML tag !!!1

    Hi All,
    i have wrote the following query
    SELECT '<ns0:Employee_Details xmlns:ns0="http://BizTalk_Server_Project1.Employee_DesirableFormat">'
    ||chr(10)||dbms_xmlgen.getxmltype('SELECT xmlforest(emp_id, name, dept_id, xmlforest(add1,add2) AS Address,city) As Employees
    FROM EMPLOYEES WHERE EMP_ID =' ||101)||chr(10)|| '</ns0:Employee_Details>' AS XML
    from Dual;
    and out put is :
    - <ns:Emp xmlns:ns="http://BizTalk_Server_Project1.Employee_DesirableFormat">
    - <ROWSET>
    - <ROW>
    - <EMPLOYEES>
    <EMP_ID>101</EMP_ID>
    <NAME>KING</NAME>
    <DEPT_ID>10</DEPT_ID>
    - <ADDRESS>
    <ADD1>PH-1</ADD1>
    <ADD2>SEC-2</ADD2>
    </ADDRESS>
    <CITY>abcd</CITY>
    </EMPLOYEES>
    </ROW>
    </ROWSET>
    </ns:Emp>
    Now i want to remove the <Rowset> and <Row> tag in my result...... can i do from above query by making any changes.....or if there is another way ...please let me know.....
    Thanks

    Now i want to remove the <Rowset> and <Row> tag in my resultJust use EXTARCT:
    SQL> select '<ns0:Employee_Details xmlns:ns0="http://BizTalk_Server_Project1.Employee_DesirableFormat">'
           || dbms_xmlgen.getxmltype (
                 'select xmlforest(empno, ename, deptno, xmlforest(job) as job,sal) as employees from emp where empno ='
                 || 7788).extract ('ROWSET/ROW/*')
           || '</ns0:Employee_Details>' as xml
      from dual
    XML                                                                            
    <ns0:Employee_Details xmlns:ns0 = "http://BizTalk_Server_Project1.Employee_DesirableFormat">
        <EMPLOYEES>
            <EMPNO>7788</EMPNO>
            <ENAME>SCOTT</ENAME>
            <DEPTNO>20</DEPTNO>
            <JOB>
                <JOB>ANALYST</JOB>
            </JOB>
            <SAL>3000</SAL>
        </EMPLOYEES>
    </ns0:Employee_Details>
    1 row selected.

  • Pretagging text with ID styles without using XML tags

    I just wanna pretag some text with ID styles, such that when I place the text, it joins the layout already formatted.
    But how? Can I do this without drinking from the XML cup?
    Thx.

    Many thanks for your reply.<br /><br />When I export tagged copy (either verbose or abbreviated methods), the resulting text document is complex -- all kinds of coding. Yet, when placed back into ID, it appears correctly formatted.<br /><br />But my attempts to pretag new text with, say, <ParaStyle:New subsubcat> (one of the exported tags), brings in the tag itself, not correctly formatted new text. What to do?<br /><br />I was unable to locate the PDF document about tagged text that you referenced. My upgrades are downloads, not discs.<br />Any further suggestions on where to find the PDF document.<br /><br />Thanks again.

  • 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

  • Assign paragraph-styles to xml-tags correctly. How to?

    Hi,
    I want to assign xml-tags to existing paragraph styles in InDesign CS6 on a Mac 10.6.8. The xml itself is organized like this:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <katalog>
    <artikel id="32434">
    <img href="/bilder/32434.tiff" />
    <artikeltextgruppe>
    <artikelmarke>DieselGabana</artikelmarke>
    <artikelheadline>Jeans ist super</artikelheadline>
    <artikeltext>Superjeans knallt rein.</artikeltext><artikelnummer>70238</artikelnummer>
    <artikelmaterial>100% Jeans</artikelmaterial>
    <artikelgroesse>Uni</artikelgroesse>
    <artikelfarbe>Uni</artikelfarbe>
    </artikeltextgruppe>
    </artikel>
    </katalog>
    By selecting the option "Assign formats per name to the tags" (translated from German) I wanted to generate the desired look. But if I start this all I get is the whole textblock of <artikeltextgruppe> assigned to 1 formatstyle. And besides that the whole content of <artikeltextgruppe> looks like one single paragraph without any structure (no linebreaks) The content though is correctly structured because I can highlight the value of e.g. <artikelmarke>separately by doubleclicking this tag in the structure-view.
    a) What can I do to assign the formats correctly AND to have correct linebreaks?
    b) If I drag my node <img href="/bilder/32434.tiff" /> iin the layout I get a message displayed to search again for the correct reference location. And that happens independently on using relative or absolute references (Although I need to use relative ones) What can I do here?
    thanks so much

    First, I would probably do a search and replace to remove the group element using a text editor (the <artikeltextgruppe> and </artikeltextgruppe> elements). They really are not needed.
    Second, I usually create my styles with the same names as the elements themselves. Then, after the XML is imported, I use the "map tags to styles" command from the Structure pane.
    I copied and pasted the single artikel element to create 4 records, added a varition of an image to each element record. Once the paragraph styles were mapped, your XML looked like this in a two column format (to get all 4 records on a page)...
    By default, ID will create a single line to a single line in the XML. So if you desire elements to be on their own line, the XML needs to be formatted that way. If you need different styling within a paragraph, you need to create character styles and alter the elements within an XML group and or paragraph and add the code in the XML accordingly or post process once inside of ID.
    I always need to take the XML I am given and reformat, move elements with the tree, change links to images, remove tabs and or spaces where I do not want them, tag for character styles, etc., to get close to how I want the initial format to be.
    Mike

  • Remove Empty XML Tags using module parameters

    Hi All,
    In my lanscape I have two PI Systems.
    My scenario is an IDOC reaches 1st PI system gets converted into an EDIFACT and then goes to the 2nd PI and from there it gets routed to the respective AS2 Party.
    I am using SOAP to pass message between the PI systems and B2B Toolkit's AS2 Adapter for the communication with AS2 party.
    The issue is when the message is getting converted from IDOC to EDIFACT there are a few feilds with occurence 1..1 and due to these fields i get an empty XML tag at the output. These empty XML tags give me an error in the B2B Toolkit's AS2 Adapter Receiver Channel
    I cannot change the occurence in the structure of the EDIFACT nor can I use an XSLT mapping to remove empty tags before the message reaches the Communication Channel.
    I want to know if there are any module parameters which i can use either in SOAP Channel or the AS2 Channel to remove the XML Tags.

    Hi Muni,
    "1..1 means, you must send some values for that fields. try to find out why these are not getting any values."
    This empty tag is expected. Before using B2B Toolkit's AS2 Adapter we used to use Seeburger's AS2 Adpater and the message used to get executed successfully with these empty tags.The issue is coming only when we are using B2B Toolkit's AS2 Adapter.
    "if you want to stop sending(the fields which are not needed in target) you can you can disable the fields in the message mapping."
    I cannot disable the feild in the mapping as some other message may use this field.
    Thanks,
    Farhaan

  • [CS5 JS] Problem in Applying character styles xml tag names

    Hi,
    e.g. 1
    <italic>This is a italic text with <sup>superscript value</sup></italic>
    e.g.2
    <sup>This is a superscript text with <bold>Bold superscript</bold></sup>
    <italic>  mapped to character style "italic" and
    <sup> mapped to character style "sup"
    In my java script I already mapped the xml tags to specific character styles. In some of the cases (see e.g.1 and e.g.2) I need to map it to other character styles.
    In e.g.1 I need to apply a new character styles "italicSup" for the text "superscript value" same way
    In e.g.2 I need to apply a new character styles "BoldSup" for the text "Bold superscript".
    Can any know how to do this?
    Green4ever

    FYI, I am using
    Win Xp-SP2, CS5 7.0.3

  • Autogenerate XML tag names from other style palettes

    Map Styles to Tags works great when you already have a bunch of tags named identically to the other styles you want to map. Today, however,  I had to manually create and type in tag names to match about 25 paragraph styles. Ick!
    It would be really neat if you could select a bunch of styles in the Para or character Styles palettes and have a "Create Matching Tags" command that would automatically add tags matching those style names to your Tags list. No muss, no fuss, no typos.
    Thanks! The XML fuctions are mostly extremely cool!

    FYI, I am using
    Win Xp-SP2, CS5 7.0.3

  • How to apply paragraph styles to xml tag?

    Hi All,
    How to apply paragraph style to xml tag?

    Hi Learner,
    Try the below js code.
    var myDoc = app.activeDocument;
    try{
        mySel=app.selection[0];
        myDoc.xmlElements[0].xmlElements.add({markupTag:"TEST", xmlContent:mySel});
        }catch(e){
            alert(e);
    var myDocument = app.activeDocument;
    app.findGrepPreferences.appliedParagraphStyle = "test";
    app.findGrepPreferences.findWhat = ".+(?=\\r)"
    var mySearch = myDocument.findGrep(false);
    for (a=0; a<mySearch.length; a++){
        myDocument.xmlElements[0].xmlElements.add({markupTag:"TEST", xmlContent:mySearch[a]});
    thx,
    csm_phil

  • Removing XML definition & XML tage from the XML message....

    Dear All,
    We are using PI 7.1 and implementing a scenario in which we need to send a signed payment message to our partner, our implemented scenario goes as follows:
    1) We are using SOAP without header to send the message.
    2) We are signing the payload using our own java code as UDF in graphical mapping.
    3) the main issue that we have is that in the final XML message which is being sent to our partnet, XMl definition and the topmode XML tage are again added to the signed message. Please see the following for reference:
    Source Message:
    We are using only I node in the graphical mapping and one UDF to sign in between the source and the target node. So after signingwe get the following in the target node:
    Signed Message
    0u201A#u0152# *u2020Hu2020÷ ### u201A#}0u201A#y###1#0 ##+######0u201A#h# *u2020Hu2020÷ ### u201A#Y#u201A#U
    u201A#ý0u201A#¸0u201A#  ######5gu0152yu2022ݬ½´b#¿#u2019 u01780 # *u2020Hu2020÷ #####0�Ý1#0 ##U####US1#0###U# ##VeriSign, Inc.1#0###U####VeriSign Trust Network1;09##U### BLAH BLAH BLAH SOME VERISGIN CERTIFICATE SIGNING INFORMATION
    but the final message that get through the SOAP and reaches our partner look liks the following:
    , as all this is appearing twice in our final message.
    I'll appriciate if anyone can help us finding a solution for that, as we tried to remove it in our java class at the adapter level in the module tab, but that produces java error.
    Regards,

    Vijaya, we already have solved this problem by creating an EJB and adding it to SOAP Adapter processing modules, so rather signing our payload in the UDF in graphical mapping we are now signing the payload in the SOAP adapter module and removing any unwarranted characters etc over there as well. We cannot send SOAP with header in our scenario as it is adding hell lot of extra bites that our partner system cannot understand, so we have adapted the EJB way of solving it. Thanks anyways for your suggestion.
    Athar Ullah Khan

Maybe you are looking for

  • Adobe Acrobat Pro X

    I need help finding out how to download Adobe Acrobat Pro X? I bought it on CD with my CS6 but I cannot find those disks.  I bought a new computer and want to put it on there, but I cannot find it anywhere on line to download.  I can find the Pro XI

  • Inbound IDOC not getting posted in database

    Hello All, I have a similar problem below: http://www.sapfans.com/forums/viewtopic.php?t=59840&highlight=inboundaleconfiguration Currently, I have distributed exchange rates from my sending system to my receiving system. When I check on the IDOC stat

  • Duplicate titled dvd's won't load in organizer

    I have multiple DVD's to import to Elements Organizer.  They are all titled the same (vts_01_1_vob) though they all have different content.  Organizer says "this file already exists in catalog," though it acutally doesn't.  How can I override this so

  • How can I create a generic service by emcli

    Hi, I have a generic service associated with a simple jdbc test and wanna create similar items by emcli. I tried to create a generic service by emcli create_service -name="xxx" -type="generic_service" -availType="test" -availOp="or" -timezone_region=

  • Why DECODE can only be used in sql statement

    Hi, Why the sql1 works but sql2 doesn't. sql 1 ) Select decode(1,0,0,1) into var from dual; sql 2 ) var = decode(1,0,0,1); Kindly clarify. Regards, Kishore