How the elements tag with two tags?

With the following function I can tag with bold and italic tags xml elements. The problem is, I also need '< b > < i >' for example. Now my question is, how is that possible?

function tagStyles (myXmlElement) {}

app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;

app.findChangeTextOptions.caseSensitive = false;

app.findChangeTextOptions.includeFootnotes = app.findChangeGrepOptions.includeFootnotes = false;

app.findChangeTextOptions.includeHiddenLayers = false;

app.findChangeTextOptions.includeLockedLayersForFind = false;

app.findChangeTextOptions.includeLockedStoriesForFind = false;

app.findChangeTextOptions.includeMasterPages = false;

app.findChangeTextOptions.wholeWord = false;

objectToTag = myXmlElement;

italic conversion

need to be developed for other styles

attention to the problems of nested xml tags

app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;

app.findGrepPreferences.findWhat = '. '. + » ;

app.findGrepPreferences.fontStyle = "italic";

var myFindTexts = myXmlElement.findGrep ();

If (myFindTexts.length > 0) {}

for (var j = 0; j < myFindTexts.length; j ++) {}

var myText = myFindTexts [j];

var myStartIndex = myText.characters [0] .index;

var = myText.characters [-1] .index myEndIndex;

objectToTag = objectToTag.xmlElements.add ({markupTag: "i", xmlContent:myText});})

myShift += 2;

}

}

conversion "BOLD"

need to be developed for other styles

attention to the problems of nested xml tags

app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;

app.findGrepPreferences.findWhat = '. '. + » ;

app.findGrepPreferences.fontStyle = "Bold";

var myFindTexts = myXmlElement.findGrep ();

If (myFindTexts.length > 0) {}

for (var j = 0; j < myFindTexts.length; j ++) {}

var myText = myFindTexts [j];

var myStartIndex = myText.characters [0] .index;

var = myText.characters [-1] .index myEndIndex;

objectToTag = objectToTag.xmlElements.add ({markupTag: "b", xmlContent:myText});})

}

}

bold italics conversion

need to be developed for other styles

attention to the problems of nested xml tags

app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;

app.findGrepPreferences.findWhat = '. '. + » ;

app.findGrepPreferences.fontStyle = "Bold Italic";

var myFindTexts = myXmlElement.findGrep ();

If (myFindTexts.length > 0) {}

for (var j = 0; j < myFindTexts.length; j ++) {}

var myText = myFindTexts [j];

var myStartIndex = myText.characters [0] .index;

var = myText.characters [-1] .index myEndIndex;

objectToTag = objectToTag.xmlElements.add ({markupTag: "b", xmlContent:myText});})

}

objectToTag = myXmlElement;

for (var j = 0; j < myFindTexts.length; j ++) {}

var myText = myFindTexts [j];

var myStartIndex = myText.characters [0] .index;

var = myText.characters [-1] .index myEndIndex;

objectToTag = objectToTag.xmlElements.add ({markupTag: "i", xmlContent:myText});})

}

}

}

When there is an element with the "Bold Italic" style it looks like this: 'my element with < b > < /b > < i > "BOLD" and the italic text < /i > '. There it looks like this: ' my element with < b > < i > bold and italic < /i > < / b > text.

Does anyone have an idea on this?

Thanks in advance!

Dear Stamm,

Try this...

objectToTag = objectToTag.xmlElements.add ({markupTag: "b", xmlContent:myText});})

App.Select (objectToTag.texts);

App.Selection [0] .associatedXMLElements [0].xmlElements.Add ("i", app.selection [0]);

Kind regards

Bala

Tags: InDesign

Similar Questions

  • How I find myself with two passwords to iCloud for the same account?

    How I find myself with two passwords to iCloud for the same account?

    For security reasons, I only use iCloud for Contacts and "find my iPhone".

    Several months ago Apple forced me to change my password to iCloud.  So I did this.   In the last months, I used successfully the new password to 10 or 12 times when asked without problem.

    However, I received a notification of a software update for my Apple Watch. I did the update without problem. However, after completing the update my iPhone asked me to connect to my iCloud account. When I did this, she rejected my password. I made 4 attempts typing very slowly and with care for you sure I did it right.

    Then, operating under a hunch, I decided to enter my old password to iCloud. It worked?  I'm confused about this, any ideas would be appreciated.

    I had a similar problem last year. I had to call Apple. Contact is a bottom of this page.

  • How can I work with two icloud ID on the same pc?

    How can I work with two icloud ID on the same pc?

    Define "work".

    What exactly do you want to accomplish?

    You can use the iCloud Panel to connect to iCloud account and use a browser to go to icloud.com and sign in with another account.

  • LR and PS will not update 'Download error' 49 customer service contact? anyone had this problem and how to solve? was running windows 8.1 and now running windows 10 but had the same problem with two BONES

    LR and PS will not update 'Download error' 49 customer service contact? anyone had this problem and how to solve? was running windows 8.1 and now running windows 10 but had the same problem with two BONES

    Check your hosts file.  to help with this and more:

    Log, activation, or connection errors. CS5.5 and later, Acrobat DC

  • When you add pictures to the Vista image folder it creates a folder HIDDEN of the same name with two copies of the same image inside

    I use Vista 32 bit. I started to see this problem when I recently copy photos from an SD card.

    When you add pictures to the Vista image folder it creates a folder HIDDEN of the same name with two copies of the same image inside

    I saw hidden files enabled in folder options.

    Any help is appreciated.

    Hey guys... I found the answer... Problem is with the software vaio content analyzer that comes with the vaio...

    It just search for Vaio Content Analyzer (parameters) and deselect

    Video analysis
    image analysis
    analysis of the music

    I went looking for this crazy thing... used almost all types of online scan, and finally to find that it is caused by an internal software only...
    anyway thanks to all... Hope it helps someone in the future :)
  • What is the name of the circular icon with two swings in the content panel?

    Adobe Bridge CS5

    Win 7 Pro 64-bit

    What is the name of the circular icon with two swings in the Panel content above the thumbnail image of a raw file? I can't find documentation about it.

    Thanks in advance.

    Thanks for the keyword "badge".

    With that, I found it's called a

    "Badge of parameters.

    There is also a badge of culture which has an icon of culture.

  • How the conditional tags can be viewed without installed RH?

    Hello

    I use RH9 to create chm HTML Help files. I have two tags conditional configuration. Everything works fine to build the chm. I would like to somehow show the content of each conditional tag.  This isn't a problem for someone who has RH9 you can go to the reports to see the topics that are associated with each tag and then display the topic that presents the text associated with a tag.

    However, if a manager needs to review that which accompanies each tag but isn't RH9, how I would give them something that shows them the content that goes with each tag?  Which gives them 2 different chm files to compare it won't because there is just too happy to determine the differences.

    Thank you

    John

    Good, a few thoughts...

    For the tags applied to all subjects, you could create a set of frameworks that would allow the two subjects to be displayed simultaneously. Each side-by-side or up and down. Which could allow an easy comparison.

    And I thought that for content, you could code the text color. But it would probably be a little a lot of work. My thought was that you could create and apply styles that cause the color coding to occur. Only set them in a sheet of unique style that would apply only to generate the file CHM 'review '. Then, you must use the original style sheet required during the generation of the final output.

    See you soon... Rick

  • How does integrate the Elements 9 with Lightroom?

    I use Lightroom, but wants to recover a part of the Assembly of the Elements 9 power but while staying in Lightroom.

    I've noticed in Adobe, Lightroom information. There is integration between CS5 and Lightroom but Adobe says nothing on the elements.

    How do, or only the 9 elements fit into Lightroom?

    You will be editing an RGB-converted in PSE, not the NEF image - nothing can change the NAVE, but because of the integration, LR will not need to create to TIF on the path by PSE because it uses silently ACR to open the EPS file.  When you save off PSE, you save like some other filetype that NAVE, TIF, PSD, JPG, or your choice, and LR must stack as you do with your workflow "Topaz".

    The integration will work better if you're in the same compatible version of LR and ACR, where the latest versions of each are 3.4.1 LR and ACR 6.4.1.

  • Can't hide from the elements without/with jQuery

    I created new Addon for my Firefox I use myself, but can't get it hide items with or without jQuery. It does not matter at all to use jQuery together.

    XUL file creates the toolbar with a button that have "oncommand ='Unlock ()" "" and it also includes the .js file that have function Unlock()

    Well. in any case, I think that my default files has been implemented correctly, because I have "alert ('Starting...');" before the line item to hide and he says 'go '. "with alert, but after that it is not made effects for the element in the example 'idofelement '.

    js file contains "document.getElementById('idofelement').style.visibility ="hidden"
    I tested different types of methods that hide the element in the example style.display = 'none', but none of them works.

    He always says 'go '. "so he runs the function properly, but nothing happens after that.

    Found the solution. I googled this for several days, but did not find a solution. Just used keywords "firefox addon getelementbyid" and selected "disorders" with it and found the solution. I had to use:

    content.document.getElementById ("id") so in other words I had to add the word 'content' in the front of the document.

    Thank you!

  • Oracle Text returns no results when the string begins with two consecutive vowels

    Hello

    I hope someone can shed some light on a strange problem, that we face.

    Oracle Database 11 g R2 (11.2.0.4) EE 64 bit running on Windows 2008 Server R2.

    When I create an index of context on a column varchar2 (surname), it works fine when the surname begins with a consonant or a vowel. But when the family name starts with two vowels, that it fails to return the file?

    Please see example below:

    create table t1 (surname varchar2(50));
    
    insert into t1 values ('OURS');
    insert into t1 values ('JOURS');
    insert into t1 values ('ONES');
    
    commit;
    
    -- sync every 10 mins
    CREATE INDEX PERSON_SURNAME_IDX ON t1
    (SURNAME)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('MEMORY 50M sync (every "SYSDATE+10/1440")')
    NOPARALLEL;
    
    -- no rows
    SELECT surname 
    FROM t1
    WHERE CONTAINS(surname, 'OURS') > 0;
    
    -- 1 row
    SELECT surname 
    FROM t1
    WHERE CONTAINS(surname, 'JOURS') > 0;
    
    -- 1 row
    SELECT surname 
    FROM t1
    WHERE CONTAINS(surname, 'ONES') > 0;
    

    Any help or advice greatly appreciated.

    Thank you

    Ours is in the list of default stoplist (list of words that are ignored)

    http://docs.Oracle.com/CD/B19306_01/text.102/b14218/astopsup.htm#CEGBGCDF

  • ID edge include the name of the element prefixed with Stage_.  Why isn't it documented?

    Suppose that there is a symbol with the name 'mySymbol' with a text called 'text' element it contains.  To change the value of the 'text' element, the documentation would he do in this way:


    sym.getSymbol("mySymbol").$("text").html ('new world');

    Using 'Stage_' rating, the text element can also be changed as well:


    $("#Stage_mySymbol_text").html ("new world")

    Note the underscore (_) between "'Stage_mySymbol ' and the element of text." This creates a kind of notation 'dot '. Instead, underscore 'point' is used.  "Stage_mySymbol" represents the symbol "mySymbol" and "_text" the text element it contains.

    For me, on the conceptual level, using "Stage_" is better and seems closer to the syntax of jquery.

    Since it is not mentioned in the documentation, I'm afraid that it could become obsolete.

    Any ideas why "Stage_" notation for IDs is not documented?

    Is there a chance that it will become obsolete?

    Thanks a lot for your answer. You are absolutely right. Apparently, you can't get an answer from Adobe support on this forum so I called 1-800-833-6687 and was able to get help free well as them. Their response has been almost exactly yours. They plan no change in this. If by chance slim there is a change, they do things backward compatible.

    Thanks again,

    Mark

  • How does the sum function in the element tag?

    Hello!

    I am new to XML Publisher and I need help to understand how my definition of data.

    In my xml file, I have this piece of code
    <group name="G_ACCOUNT" source="Q_REGISTER">
         <element name="COST_ACCOUNT" value="COST_ACCOUNT"/>
         <element name="ACC_DESC" value="ACC_DESC"/>
         <element name="YEAR" value="YEAR"/>
         <group name="G_COST" source="Q_REGISTER">
              <element name="COST_CENTER" value="COST_CENTER"/>
              <group name="G_TAG_NUMBER" source="Q_REGISTER">
                   <element name="TAG_NUMBER" value="TAG_NUMBER"/>
                   <element name="ASSET_NUMBER" value="ASSET_NUMBER"/>
                   <element name="DESCRIPTION" value="DESCRIPTION"/>
                   <element name="ASSET_ID" value="ASSET_ID"/>
                   <element name="ASSET_NUMBER" value="ASSET_NUMBER"/>
                   <element name="COST" value="COST" dataType="number"/>
                   <element name="YTD_DEPRN" value="YTD_DEPRN" dataType="number"/>
                   <element name="DEPRN_RESERVE" value="DEPRN_RESERVE" dataType="number"/>
                   <element name="DEPRN_RESERVE_BY" value="DEPRN_RESERVE_BY" dataType="number"/>
                   <element name="NET_VALUE" value="NET_VALUE" dataType="number"/>
                   <element name="DPIS" value="DPIS"/>
              </group>
              <element name="SUM_ACCOUNT_COST" function="sum" dataType="number" value="G_TAG_NUMBER.COST"/>
              <element name="SUM_ACCOUNT_YTD_DEPRN" function="sum" dataType="number" value="G_TAG_NUMBER.YTD_DEPRN"/>
              <element name="SUM_ACCOUNT_DEPRN_RESERVE" function="sum" dataType="number" value="G_TAG_NUMBER.DEPRN_RESERVE"/>
              <element name="SUM_ACCOUNT_DEPRN_RESERVE_BY" function="sum" dataType="number" value="G_TAG_NUMBER.DEPRN_RESERVE_BY"/>
              <element name="SUM_ACCOUNT_NET_VALUE" function="sum" dataType="number" value="G_TAG_NUMBER.NET_VALUE"/>
         </group>
    </group>
    and now, I have problem with element with functions sum, because it returns like for example. 21356,15. all other components (COST, YTD_DEPRN, DEPRN_RESERVE, DEPRN_RESERVE_BY, NET_VALUE) return values such as 21356.15.

    Can you tell me why sum function does not return to the same value?

    Kind regards
    drama9346

    As I expected wrong since this isn't a RAW number his tent for formatting. You can change this value and format or just go for the sum of RTF, or the SUM of your SQL query.

    Sum in RTF: for SUM_ACCOUNT_COST

    I have given how you use grouping in this case, based on what you might change the code slightly.

    Published by: amri on 9 April 2013 14:28

  • Sustain the elements tags/legends

    I am interested in using Photoshop Elements to label and to caption my 11000 photos with details of names and places, but I can commit the changes on the image files so that they are available outside the environment of elements? I don't want to spend a lot of effort and have tags/caption available only in elements, I want to integrate the details in my photo collection.

    Yes, you can select the individual or a batch of images and write metadata to the file.

  • How to align the elements (groupItem) with clipping masks?

    I have a script which aligns a groupItemToBeAligned on a layer to an another referenceGroupItem on another layer, well. Problem comes when the groupItemToBeAligned consists of elements that have a clipping, masks just to help

    groupItemToBeAligned.position = referenceGroupItem.position;
    
    

    Does not work, he takes the position of all, what is the best method to align what is actually visible? I tried to use:

    var vBounds = referenceGroupItem.visibleBounds;
    x1 = vBounds[0];
    y1 = vBounds[1];
    x2 = vBounds[2];
    y2 = vBounds[3];
    groupItemToBeAligned.position = [x1, y1];
    
    

    Produces the same results unfortunately.

    Huzzah, once again! I can't express how much it helps to have the file you are editing. This version is perfectly aligned all work plans. I would like to know if you have any other questions. =)

    function align(){
        var myDoc = app.activeDocument;
        var aB = myDoc.artboards;
        var layers = myDoc.layers;
    
        for(var a=0;a0){
                        for(var b=0;b topMost.top){
                            topMost = masks[b];
                        }
                    }
                    return topMost.top;
                }
    
                //searches masks array for clipping mask with farthest left value
                function findLeft(masks){
                    var leftMost;
                    for(var b=0;b		   
  • How to tour calculations with two decimal places (scaling of the form)

    Hello

    I created an order form where customers enter the amount of product that they want to order and the form shows the total amount payable (including transport and sales tax). According to the user input, the amount total resulting sometimes contains more than two decimal places. How do I turn calculations to two decimal places? Is it possible to do this form on the scale?

    I'm new to using Acrobat for calculations. Any help would be greatly appreciated! Thank you...

    This should be:

    Event.Value = util.printf ("%.2f", event.value);

Maybe you are looking for

  • Standby mode battery discharge rate

    Hello Has anyone else noticed that their battery loses about 4% per day, even if the machine is turned off completely and not used? Is it normal for a laptop? If I disconnect the battery then it loses charge to about 3% per week - which seems reasona

  • HP OfficeJet Pro 8000 Wireless: Can I get some help here? Yellow ink will not print - HP OfficeJet Pro 8000 Wireless

    No matter what I do, ink yellow does not print, or stops at halfway printing on the page. I use genuine HP cartridges. There is a lot of ink - in fact, I just installed a new cartridge in the case where a previous (almost complete) was defective. No

  • Can anyone unlock my profile

    Hello I'm on my last bit of patience. I'm so close to switching to SONY! My account has been soberly block. I don't know why it would be, I had problems with my console, it's self due not not reading the disc is another who is starting to get on my l

  • Z3 = water resistant?

    Hello everyone My Xperia Z3 is now 1 month old. I washed today for the first time, and after 5 min, anything more. After 30 minutes, the phone vibrated for 5 min and then died completely. I closed all closures! And this is not the first time, with my

  • T42 driver help

    Hello I did a new install of XP SP2 on an IBM T42 (serial number 2374-Q21) After you install all the drivers I could find, I find myself with 2 with yellow? the other two aircraft. Network controller Unknown device. I can access the internet via an E