Map Styles to XML Tags

Hi,
My InDesign cc2014 freezes when I apply manually  'mapStylestoXMLTags' to a document. any idea?
Thank you,

+1 for Harb's reply.
As for an answer, as much as it is, if indesign freezes when manually mapping styles to tags (or the other way around), there is not much you can do. In my experience that always happens if the indesign document is large. Most you can do is post a bug report with Adobe and hope for the best.
As a workaround, you can iterate through the textStyleRanges, test each one and create the xml structure, but it's not a easy solution.

Similar Messages

  • 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

  • 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

  • How do I export character styles as XML?

    I have a load of InDesign CS4 files. They contain paragraph styles, but do not appear to have any explicit character styles, though do contain content that is rendered as italic, bold, superscript content etc.
    I have associated the paragraph styles with some imported tags and exported them successfully as XML, BUT I can't find a way of grabbing hold of the character styles in the same way.
    Very grateful for some guidance on this.
    Thank you
    Brad

    It sounds like your problem is that the character styling has been applied ad hoc - i.e., without character styles.
    I would suggest creating all the character styles you need/want first. Then, you can use the Find/Change feature to find all text with a certain styling, and apply the appropriate character style to it. You'll need to think through the order in which you do the various Find/Change operations. For example, you will want to find all cases of Bold + Italic and replace with a Bold + Italic character style before you carry out the process for text that is simply either Bold or Italic.
    Once you have the Character Styles applied, you can map them to XML tags just as you did with the Paragraph Styles.

  • INDESIGN GLITCH: Creating an XML file from Indesign Layout - Issue "Using more than one line of GREP" & "Map Styles to Tags"

    I currently create XML from InDesign CC by Mapping Style to Tags.
    - The Paragraph Styles are manually apply to text. These styles include multiple lines of GREP to automatically apply character styles.
    - I map some of the paragraph and character styles to prebuilt tags that have the same name "Map Styles to Tags".
    I have found through trouble-shooting that InDesign is unable to "Map Styles to Tags" for more than one line of GREP. I therefore have to chose which line of GREP to automatically tag and which lines to manually tag.
    Please can anyone help, I need to automatically map tags to at least two character styles in one paragraph via GREP.
    Thanks,

    OK. The best I can suggest is running a Find/Change like this:
    Which will actually apply the character style to the italics (and I would do the bold as well just to make certain). Then run the Map Styles to Tags again, using the Apply by Name. Which will tag the italics.
    I don't know why ID can map to the bold and not the italic character style. It either should do them both (as in this instance) or none at all as the character styles are not actually applied by the grep, just the styling from the character styles.
    Mike

  • Script to map xml tags to para styles

    I am using the 'FindChangeByList.jsx' to format a series of text files.
    I realise that I can map tags to styles using the 'Tags" palette.
    But I wondered, if it is possible, if someone would be able to show me the syntax to include in my list (.txt file) to map xml tags to paragraph styles assigned in the list as it runs the script?
    Steve

    If you want through find and change here below is a function for apply tag on paragraph style
    var myDoc = app.activeDocument;
    addtags("A Head", "Head");
    addtags("Text", "P");
    function addtags(stylename, tag)
    if(myDoc.paragraphStyles.item(stylename) != null)
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.findWhat = '.+';
    app.findGrepPreferences.appliedParagraphStyle = stylename;
    app.changeGrepPreferences.markupTag = tag;
    myDoc.changeGrep();
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    Shonky

  • How to apply multiple styles for nested tags in XML?

    Say you import this XML into InDesign:
    <Root>
      <strong>
        <em>Bolded and Italicized</em>
      </strong>
    </Root>
    And you have two character styles, bold and italics, to map to strong and em tags respectively.
    You will see that the text appears italicized not bolded and italicized as expected. Generally, only the innermost tag will get the style and will overwrite its parent styles.
    Notice the XML is generated dynamically and tags order is not enforced. Also, there's an additional underline tag that can be nested with these two.
    So far I have tried to use GREP styles (with paragraph styles), but these do not have effect in the XML tags.
    Other possible options not tried yet:
    Create new tags for every formatting combination. Not what I really want because I could en up with a lot of tags each one with a corresponding styles.
    Create InDesign XML rules to apply character styles automatically based on the tags
    Use character styles in the XML with the aid namespace referencing InDesign styles. Will this really work?
    What do you suggest to go for? See any other option?
    Thank you in advance.
    Juan

    I'd say that you should create tags not for appearances, but for semantic content. Specifying formatting styles in your XML betrays your lack of familiarity with the format, because the last thing you'd want to do would be to use HTML markup in the middle of your XML. If you have content that's supposed to be both bolface and oblique - say, a warning - then it's marked up as
    <warning>Never refer directly to formatting in your XML markup, only to content types!</warning>
    If I had a document that was written in the style you suggest - one with lots of overlapping local formatting - I'd look at developing a better style guide that told the writers that doing so would be bad form. Because, you know, many of the writers I deal with are addicted to forms of emphasis that do nothing useful whatsover for their readership - they only serve to overemphasize the authorial voice of the writers.
    Maybe you could tell us why you need these overlapping forms of styling, and we could suggest other InDesign formatting tools (like line styles or nested styles) that would help you get the appearance you want without crowding styling markup into your XML - where, strictly speaking, it doesn't really belong.

  • [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

  • 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

  • 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

  • Problem mapping styles to tags

    How do I prevent creation of the "Story" tag during mapping of styles to tags?
    I need to achieve the following using a script:
    I have two XMElements in the structure view, say Title and Body as follows:
    <Root>
      <Title/>
      <Body/>
    </Root>
    Also, I have two text frames in a document. The first text frame has text with parastyle named "titlestyle".
    And the second text frame has text with parastyle named "bodystyle".
    What I need is when I do mapping of styles to tags (mapStylesToXMLTags) then the text with "titlestyle" should be placed as contents of title tag and the text with "bodystyle" should be placed as contents in body tag.
    The problem is that when I map styles to text a Story tag is created for each text frame and the original Title and Body tags remain as it is, i.e, empty.
    I get:
    <Title></Title>
    <Body></Body>
    <Story><Title>here are the contents</Title></Story>
    <Story><Body>here are the conents</Body></Story>
    NOTE: If you select the text in text frame and then click the tag in structure view, then the contents are placed correctly. This is what I need as follows:
    <Title>here are the contents</Title>
    <Body>here are the contents</Body>
    Regards,
    Vinoth

    Hi,
    Can you provide some text examples from your xml file. This because to identify the concern in the xml coding.
    Regards
    Thiyagu

  • Error messages when using Mapping Styles to tags

    We are using the XML Export from Indesign as part of our translation workflow. This has been fine until today. I am trying to tag an older document and when I use the Mapping Styles to Tags option I get the following error message:
    "Cannot tag the selected text because the text contains part of a hyperlink or cross reference. Change the text selection to include the entire hyperlink or cross-reference"
    I have no text selected, and I have tried tagging each Cross-Reference in the document and then repeating the map styles to tags all with no result. I don't really understand the message. Can anybody help me?
    I'm using InDesign CS6 Verison 8.0.1 on a MacBook Pro OSx 10.6.8
    Thanks
    Steve M

    Do you still have the original version of ID in which the file was made? If so, try the export to interchange from that. It frequently works better than after conversionin a new version. Open the exported file in CS6 and try your mapping again.
    If that still doesn't work, we'll need someone else to step in who has some XML experience.

  • Getting unwanted values between the XML tags in XSLT mapping

    Hi Folks
    I have come across a very strange situation with my xslt mapping.
    I am getting unwated values "11" between xml tags
    as follows
    <Tag>0001</Tag>
    11
    <DataID>3</DataID>
    I am not sure why I am getting these values in between the tags. Any suggestions would be appreciated.

    Hi David,
    Here is the code fragment where these 2 tags are mapped, FYI, the source is an IDOC message. The unwanted "11" is coming After the <Tag></Tag> and <DataID></DataID>. FYI, Fof the element <Tag></Tag> its a default value. But for <DataID> </DataID>  I have the mapping logic.
    <Order>
                <OrderHeader>
                  <Tag>009</Tag>
                  <xsl:for-each select="E1EDKA1">
                    <xsl:choose>
                      <xsl:when test="normalize-space(PARVW) = 'WE' and normalize-space(LIFNR) = 'U960'">
       <DataID>
                        <xsl:value-of select="'1'" />
       </DataID>
                      </xsl:when>
                      <xsl:when test="normalize-space(PARVW) = 'WE' and normalize-space(LIFNR) = 'U300'">
       <DataID>
                        <xsl:value-of select="'3'" />
           </DataID>
                      </xsl:when>
       <xsl:when test="normalize-space(PARVW) = 'WE' and normalize-space(LIFNR) = 'U930'">
       <DataID>
                        <xsl:value-of select="'1'" />
       </DataID>
                      </xsl:when>
       <xsl:when test="normalize-space(PARVW) = 'WE' and normalize-space(LIFNR) = 'U400'">
       <DataID>
                        <xsl:value-of select="'3'" />
       </DataID>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:value-of select="'1'" />
                      </xsl:otherwise>
                    </xsl:choose>
                   </xsl:for-each>

  • Mapping of XML tags with column

    My xml structure is :
    <PARAMS>
    <ROWSET>
    <ROW NUM="1">
    <SID>man123</SID>
    <PO>
    <PO>OBJ1</PO>
    <PI>
    <PI>PARENTOBJ1 INSTANCE</PI>
    </PI>
    </PO>
    </ROW>
    </params>
    My table structure is :
    CREATE TABLE TEMP(SID VARCHAR2(20),PO POBJECT_T)
    where Object types are:
    CREATE OR REPLACE TYPE PINSTANCE_T AS OBJECT (PI VARCHAR2(255),CO COBJECT_T);
    CREATE OR REPLACE TYPE POBJECT_T AS OBJECT (PO VARCHAR2(255),PI PINSTANCE_T);
    To store this XML directly into table i have to have Column with name "PO" (same as XML tag).I am using this same table to store other XML with same tags . With this limitation its difficult to do so.Is there any way to map XML tag to column with different name????
    Thanks

    Hi,
    thx for your Reply,
    seems to work basicly but i get now in the IDE warnings with:
    "Data binding will not be able to detect changes when using
    square bracket operator. For Array, please use
    ArrayCollection.getItemAt() instead. "
    And how can i access the next item something like this didnt
    work right
    try someniceid.lastResult["some-root"]["someother-root"]
    I had to use single quotes (') to get it to work.
    Any ideas?
    Kind regards,
    Marko

  • Map styles to tags v. Map tags to styles

    Hi everyone,
    Indesign CS4 has an option in the tags panel to:
    1) Map styles to tags
    and
    2) Map tags to styles
    Does anyone know what the difference between these two options are?
    Appreciate any help.

    Tags and Styles serve two separate functions.
    A Tag defines data that belongs to a specific element and is enclosed with an opening and closing tag.
    example:  <element>  This copy will be used for a headline  </element>
    A Style defines how that data will appear with specific attributes: font, font size, color, etc.
    So, say I have an Indesign document that has a predefined paragraph style named: Headline (with attributes of Times New Roman Bold, 18 Point) and I import a file that is tagged like my example. I can map the tag "element" to the style "Headline" and the import can automate the process like this:
    This copy will be used for a headline

Maybe you are looking for

  • Error  while creating a JCO Connection

    Hi i am trying to create a JCO Connection from sapj2ee engine my problem is i am getting an error  connection to msg server host failed .. When i select the Message Server the System Name and Logon Group fields are disabled and cannot be modified and

  • Ipod Touch - cannot find server

    Hi, I am having desperate trouble in trying to connect wirelessly to an Airport extreme base station. All seems to be working, with itouch offering connection to Airport. We have a whirring spinner, then I get the infernal message "Safari can't open

  • Knowing which Row was selected when Hide/Show is clicked

    Hi everyone, I have an advanced table, with some search criteria that works. I have added a "detail" flag and when I click the link Hide/Show, the details are displayed. How can I get in the code which Hide/Show link was clicked? I am more interestin

  • FSCM 9.0: COBOL Process GLPPPOST does not post Journal Entry correctly

    Folks, Hello. I am workin on FSCM 9.0 General Ledger module. "Edit Journal" is AE program that works correctly. But "Post Journal" is a COBOL program that does not works correctly. COBOL process GLPPPOST posts only debit accounts of a Journal entry i

  • Best Hard Drive Size, Brand, etc.

    I just purchased two Seagate 400gb external firewire hard drives (model#ST3400801CB-RK), one for storing my analog video footage and allowing me to have several imovie projects available at one time, and the second hard drive for backing up my 80gb m