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

Similar Messages

  • 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

  • Problem Mapping Tags to Styles in CS2

    Hello, I am running CS2 (V4.0.5) on XP SP2. I have XML-tagged text that I am mapping to styles/map by name. While the paragraph styles apply correctly, character style sheets that shouldn't apply are being applied as well. I have replicated this multiple times.

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

  • Can a DTD map custom styles to standard HTML tags?

    Hi,
    Every week the publishing house I work for has to manually copy the entire content of a weekly magazine on an article-by-article basis into an online database, the web version of the magazine. This means copying the styled InDesign content and inserting it into the database as plain text, re-finding all those italics (and any other styling) and putting it all back manually.
    I already know that I can create tags with all the basic HTML styles needed in the 'Tags' palette in InDesign, and then export that.
    The trouble is that when I re-import the XML file, I have to laboriously map the custom house-styles (there are many of them and they're boiler-plate, i.e. consistent, across all the magazine's InDesign styles) to the imported HTML styles.
    So here's my question:
    Am I wrong to believe that it's possible to create a DTD that would import not only the HTML tags but their relationship to the existing, custom-named InDesign tags that are common to all the magazine's documents?
    As an InDesign wish-feature, what's missing from the 'Tags' corner-menu is 'Export DTD' - if that was available, I could map the whole relationship between Indesign Styles/HTML styles just one time and later import the DTD on other articles; which would tell the Structure View how to convert our custom house-styles (both Paragraph Styles and Character Styles) into HTML tags and cut this time-consuming task in half.
    Thanks!
    EDIT: I perhaps should have mentioned that obviously the final stage after this 'dream conversion' is to export the XML from the Structure View. Then I can just open the saved XML file and paste it into the CMS with formatting intact.
    Added extra explanation of the workflow.

    geekbelief wrote:
    Googling XSLT and InDesign, it seems that such a stylesheet, if I were to create it, possibly couldn't handle spaces in the original InDesign style-names..? If anyone knows that for a fact, I'd be glad to be aware of it before starting down a long path to a roadblock.
    That's a good question. Let's find out together, shall we. I just created a text frame with Lorem Ipsum text, and created "a style" (with space) and "bstyle" (without). Now ... Map Style to Tag doesn't work, presumably because the tags don't exist and I assumed this would *create* them. And if you create one, ID complains "tags cannot contain tabs or spaces". (So can you have a Tab in your paragraph style name then? Gosh.)
    ... Forcing in a Non-breaking Space (#160) also doesn't work, this time ID simply says "A tag name cannot contain the character ' '."
    I think that's one you have to do manually.
    geekbelief wrote:
    I'm guessing that if I wanted to change the InDesign style 'Subheader' into 'h2', that snippet of the XSLT would be like this...?
    <xsl:template match="Subheader"><h2><xsl:apply-templates /></h2></xsl:template>
    Yeah, that's the correct syntax. But you cannot use an XSLT for mapping InDesign styles to tags. The process as I described works when importing your XML into InDesign, and changes the tags in the XML file to match InDesign styles. That's the other way around.
    I don't expect anyone to write this for me, but any hints or links to tutes that I haven't yet found would be appreciated!
    For a simple one-to-one translation of tag names, you can use this all the way. You only need any other XSL command if you want to do more than simple translation, such as filtering, moving, combining, or separating tags or their contents.
    There are lots of good tutes on the 'web for XSLT, although it seems interest has diminished lately. Half a decade ago XSLT was "hot"; nowadays the iPad is. Is there any news on improvements for ID's native XSLT support in CS6? I dare bet there are none at all -- it's already been deemed "yesterday's technology" by Adobe's Dev Team, just as Flash was discarded per CS5.5. I'm sure next year DPS will follow; and the year after that EPubs will be gone for good as well, replaced by holograms, transmitted live from your local library.

  • Map XML tag to an object style

    Hi everyone!
    I am not sure this is the correct place to post it, but i didn't find any "tagging" department of the forums.
    I do import some XML into ID document.
    Text nodes of my XML are imported properly, and i can map any tag of XML to one of the paragraph or table styles.
    But, when i import any images (or another ID documents) with <... href="..." />, how can i map that tag to an object style?
    ///////////// It would be very helpful for example when i'm going to set the stroke of 1pt to all of inline images of text frame.
    Please any feedback would be helpful.
    Alex.

    I will try to give an example, just to give a kick start ........... you need little bit of tweaking to meet your actual requirement:
    suppose you have an xml element "tag" having an attribute "@href" with object style name defined as  it's value. 
    <tag href="object_style_name">
    "object_style_name" is a object style and should exist in your document. To map the tag with the corresponding object style value you can use XMLRules in JS:
    //NOTE: NOT TESTED, BUT SHOULD WORK
    #include "glue code.jsx"
    main();
    function main(){
    if (app.documents.length != 0){
    var myDoc = app.activeDocument;
    var myRuleSet = new Array (
    new findObjAttribute("//*[@href]")
    with(myDoc){
    var elements = xmlElements;
    __processRuleSet(elements.item(0), myRuleSet);
    else{
    alert("You have no document open!");
    exit();
    function findObjAttribute(XPATH){
    this.name = "findObjAttribute";
    this.xpath = XPATH;
    this.apply = function(myElement, myRuleProcessor)
    //Just to check whether the collect element is selected
    var elmName=myElement.markupTag.name;
    var styleName=myElement.xmlAttributes.itemByName("href").value;
    with(myElement){
    try {
    applyObjectStyle(myDoc.objectStyles.item(styleName), true);
         } catch(e){};
    return true;
    HTH,
    Pankaj Chaturvedi

  • Mapping InDesign style names to PDF tags

    I've mapped style sheet names to tags in InDesign, and they display correctly in the InDesign structure panel, but when I export a PDF, it is my style sheet names that persist in the PDF tag window. Any ideas how to fix this?

    Hi Jongware
    Many thanks once again for your help. I have one more tweek to make to this code and that is to define which page I want to start loading pdfs from. The original script this is based on does ask me, but the code below does not and I am not sure which line of code I need to do this.
    //DESCRIPTION:Place PDF pages 2-up
    // Jongware, 22-Sep-2009
    // (based on PlaceMultipagePDF.jsx)
    //Make certain that user interaction (display of dialogs, etc.) is turned on.
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
    //Display a standard Open File dialog box.
    var myPDFFile = File.openDialog("Choose a PDF File", "PDF files:*.PDF");
    if(myPDFFile == "" || myPDFFile == null)
      exit(0);
    myDocument = app.activeDocument;
    myPage = myDocument.pages.item(0);
    myPlacePDF(myDocument, myPage, myPDFFile);
    function myPlacePDF(myDocument, myPage, myPDFFile){
    var myPDFPage;
    app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;
    var myCounter = 1;
    var myBreak = false;
    while(myBreak == false){
      if(myCounter > 2 && (myCounter & 1)){
       myPage = myDocument.pages.add(LocationOptions.after, myPage);
      app.pdfPlacePreferences.pageNumber = myCounter;
      if (myCounter & 1)
       myPDFPage = myPage.place(File(myPDFFile), )[0];
      else
       myPDFPage = myPage.place(File(myPDFFile), )[0];
      myPDFPage.horizontalScale = 90;
      myPDFPage.verticalScale = 90;
      if(myCounter == 1){
       var myFirstPage = myPDFPage.pdfAttributes.pageNumber;
      else{
       if(myPDFPage.pdfAttributes.pageNumber == myFirstPage){
        myPage.remove();
        myBreak = true;
      myCounter = myCounter + 1;
    I need to import more than one document into my A3 document, so I need to be able to determine where to start placing.
    Then the script will be perfect - many thanks - hope you can help.
    Regards
    G

  • Mysterious FM- RH style mapping override with span tag

    I have been working in a super clean FM and RH project that is has one to one mappings for all my styles in the FM to same named styles in RH, just to be sure I do not mess up. Still, though, I seem to get a mystery mapping.  For my bullets and lists, RH is adding a span tag with font set to Times Roman.  I cannot find *any* css that has Times Roman. I've checked things like my character tags, my cross reference tags, etc and cannot find a correlation.  Where would this be added if it's not in my FM Format definitions and not in my RH Style definitions. I tried reimporting the book to see if it needed a tickle of the project mappings template but that didn't help.
    I'm attaching some images in hopes someone has ideas. The example does not appear to be times roman in Design view, but in more complex topics it's pretty obvious.
    I have so many hacks for single sourcing now, about ready to give up.
    Got help?
    FM 10
    RH 11

    Thanks for the fast reply Arnis,
    I did not even notice that the span tag ended on the spaces, so it can't be what's causing the odd previews I'm seeing.  So it seems my original question is not well thought out, so I'm going to retest with some other style changes.
    Still, though I'm wanting to follow up on getting rid of the Times tag anyway.  The bullets are always defined as Verdana. Bullet is set to use "Default Font" while BulletLevel2 uses "Bold" (the char def for Bold is also Verdana).  Is there some place I have to map "tabs" to not be Times? I dont think it's the Default Font issue because bullet 2 uses Bold.
    Here are some screenshots.

  • Js for Structure; XML; Map Tags to Styles...

    Hi all
    I am trying this forum entry again under a different heading. I may have confused readers.
    I have a ID file that contains XML content and lots of Character and Paragraph Styles.
    There is a map that connects Tags <-> Styles.
    This file is working fine. This file is now my "Template File"
    I have written a script that imports XML content of the same kind into a new file.
    The script also imports or loads all the Character and Paragraph Styles from the "Template File" into the "New File".
    Now I would like to import the maping between Tags <-> Styles into my "New File".
    Manually this is an easy process in ID, in the Structure pane, top right corner, is a pulldown, one of the commands is called "Map Tags to Styles..."
    I load the map and my "New File" looks perfect.
    I would now like to include this function into my script.
    So far I could not find any code samples for this.
    Can anybody help?
    Thanks Romano

    Thank you Fred
    No this imports the Tags only...
    what I am looking for is this:
    My script needs to "call this menu, press the Load... button, choose a file, import from that file"
    It would be some simple thing like loading the colour swatches from another file...
        app.activeDocument.loadSwatches(myStyleFile);  
    but would say something like     app.activeDocument."loadTagsStylesMap"(myStyleFile);  
    Romano

  • Map tags to styles (CS6, Applescript)

    I want to map a series of tags to styles in InDesign, but this seems not to work.
    The inverse, mapping styles to tags, works!
    Any idea? Thanks for your help!
    tell application "Adobe InDesign CS6"
              tell active document
      make XML export map with properties {markup tag:"Header", mapped style:"Header"}
      map XML tags to styles
              end tell
    end tell

    Hello, try
    tell application "Adobe InDesign CS6"
        set myDocument to active document
        tell myDocument
            set tList to name of every XML tag
            set tNumItems to count of tList
            -- XML tag to style mapping by name.
            repeat with j from 1 to tNumItems
                set tStyle to item j of tList
                make XML import map with properties {markup tag:tStyle, mapped style:tStyle}
            end repeat
            --Map tags to styles.
            map XML tags to styles
            --Map styles to XML tags by name
            repeat with j from 1 to tNumItems
                set tStyle to item j of tList
                make XML export map with properties {markup tag:tStyle, mapped style:tStyle}
            end repeat
            --Map styles to tags.
            map styles to XML tags
        end tell
        --Export xml para desktop para pasta a designar
        tell active document
            export to "xxxxxxxxx:aaaaaaaaa.xml" format "XML"
        end tell
    end tell

  • 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

  • Map tags to style problem.

    Hello!
    I have a problem with indesign that i cannot understand. On the picture below, you can see my structure. PARAGRAPH is the tag of the text frame. Inside the text frame i have tagged the text. The things that should be paragraph style 1 (bröd) is tagged "PARAGRAPH1". The things that should be  paragraph style 2 (bröd_start) is tagged "PARAGRAPH2".
    I use map tags to style to map the different tags to a specific style. It looks like this:
    When I run the cursor over the text I can see the tags changing to the correct one in the tags panel. But the paragraph style is always "Bröd". It seems as if the tags to style is not applied!
    The reason that I want to to this is so I can manage first lines better. I map the first word of a "new" line to "Bröd_Start" so that the first line is aligned flush left. Like this:
    Anyone has any ideas why this is not working like it should?!
    Tank you!
    Regards,
    Lukas

    Hi,
    Thanks for sharing the document. I tried with your file and scrolling is working fine. I could choose and select the styles also.
    Did the bug happen after importing XML or before as well?
    Do you have other documents open while you are working on this document?
    Did you try cleaning your preferences and cache? If not, you can give this a try and let me know if the problem still remains.
    Regards,
    Pooja

  • Map by name, Tags to Styles

    In JavaScript, I can map Styles to Tags using autoTag but how do I map Tags to Styles by name?
    Thank you,
    Richard

    #target indesign
    #include "/Applications/Adobe InDesign CS3/Scripts/Xml Rules/glue code.jsx"
    var myDocument = app.activeDocument;
    var myRuleSet = new Array (new ProcessAll);
    with(myDocument){                   
       var elements = xmlElements;
       __processRuleSet(elements.item(0), myRuleSet);
    myDocument.mapXMLTagsToStyles();
    function ProcessAll(){
       this.name = "ProcessAll";
       this.xpath = "//*"; 
       this.apply = function(myElement, myRuleProcessor){
          with(myElement){
             $.writeln(markupTag.name);
             var myParagraphStyle = myDocument.paragraphStyles.itemByName(markupTag.name);
             if (myParagraphStyle != null){
                myDocument.xmlImportMaps.add(markupTag.name, markupTag.name);
       return true;

  • [CS2][JS] Map tags to styles

    Hi
    I would like to map styles to tags and map tags to styles using a predefined file....
    I've tried using ...
    var thepath="/Volumes/test/Mapping.indd";
    var myImportfile=new File(thepath);
    app.activeDocument.xmlImportMaps.add(myImportfile);
    app.activeDocument.xmlExportMaps.add(myImportfile);
    ... but it raises an error... missing parameter...
    Does anyone have an idea?
    Thanx
    Tim

    Hi Eric,
    I just checked the link, and it's working fine. Try again?
    Also, I'd missed this thread earlier--what Tim is asking about (loading a tag to style mapping from a file) can't be done directly in the user interface (as far as I can tell), so it can't be done directly from scripting. Instead, you'd have to open the file containing the tag to style mapping, then transfer the mapping one import/export map at a time to the target file.
    Thanks,
    Ole

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

  • Map Tags to Style Pallet Issue

    When in the 'Map Tags to Style' pallet I can't scroll by either moving the scroll bar or clicking up/down arrows. Also the only way to select a style sheet is to click exactly on the paragraph icon. The scrolling is driving me crazy, anyone else have this issue in this pallet in ID CC (using ID from cloud and all updates have been run)?

    Hi,
    Thanks for sharing the document. I tried with your file and scrolling is working fine. I could choose and select the styles also.
    Did the bug happen after importing XML or before as well?
    Do you have other documents open while you are working on this document?
    Did you try cleaning your preferences and cache? If not, you can give this a try and let me know if the problem still remains.
    Regards,
    Pooja

Maybe you are looking for

  • BEx Analyzer Error while generate pdf sap

    In BI 7.0 NW2004s I am getting an error while I am tyring to print and it convert PDF file... Report opend in Excel fine, very strange becuase some time it open in PDF and mostally time not... Is anyone please tell me where may found out ADS Adboe Do

  • Web content interactivity puzzler

    Hi all, Hope someone can offer me a way forward on something I'm puzzling over. We're currently developing an App which (we hope!) involves a clickable map with various points of interest, so that when the user taps on one, the visible content in a s

  • Blob Type, is necessary any code to exhibit it ?

    I did : Create a table with only one row(one of the columns is a blob type) drag the table onto a datatable, deploy and run, then i got: Exception Details: javax.faces.FacesException org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544329. inva

  • HT201328 When I unlock can i use both the AT&T SIM and also the new carrier which I got unlocked to

    If I unlock through AT&T can I use both AT&T carrier as well as the new carrier

  • IPhoto Crashes on startup

    Hi, iPhoto has started crashing everytime I start it up. I have tried all the reccomended solutions I could find: - repaired and then rebuilt the libraries - made a new library - used iPhoto library manager to make a new library - removed the ~/libra