[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

Similar Messages

  • 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

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

  • 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

  • Map tags to styles by javascript

    Hi All,
    I need to ‘Map Tags to Styles’ is this possible by javascript?
    By
    hasvi

    Hello hasvi,
    What I understood in Jongware & Everyone statement. You expect everything into this forum, I seen you every post you always expecting or requesting any one to create the script or help. This is not good path to develop to your career. First you have learn then come to forum, then you have any problem, everybody ready to help to you share their knowledge.
    See your below threads Titles. You not share your any ideas to any one also your score is 0. You only get everything into this forum but you not share any small request also.
    How to import tables without 'xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/' this format.
    https://forums.adobe.com/thread/1534167
    How to import tables without 'xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/' this format.
    https://forums.adobe.com/thread/1533132?sr=stream&ru=2170596
    XML structure validation by javascript
    https://forums.adobe.com/thread/1533131?sr=stream&ru=2170596
    Please correct this script for call xml element
    https://forums.adobe.com/thread/1471266
    How to 'import xml' in my script
    https://forums.adobe.com/thread/1531896?sr=stream&ru=2170596
    Need script for "Convert bullets and numbering to text"
    Need script for "Convert bullets and numbering to text"
    Overflow text copy on next page with same anchore box by script
    hasvi
    Again I tell you that don't miss use this forum pls change the attitude. Everybody sharing their thoughts and Ideas to develop only.....
    I hope you understand?
    thx,
    csm_phil

  • 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

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

  • How to handle paragraph styles in imported text with no tagged paragraph styles

    Hi
    Im currently trying to import a file (word file / excel I have both formats) into an indesign book and formatting the text automatically!
    My question is: How is it possible to reflow text into frames and when changing frame it changes paragraph?
    Or how is it possible to change paragraph style when forcing a line break when using text reflow?
    I have already figured out how to reflow the text, and actually also managed to relow text into the frames and change paragraph style. I know how to use the keep option, and by this change the paragraph style when e.g. changing frame break/page break etc.  (but if the content being flowed-in is not tagged with style names then I cannot figure out how to do it) The document and its content I whish to import do not have any tagged paragraphs!
    Then I tried to look into "object styles" and format a text frame on a master page with an object style, and by using a "dilimiter character" forcing the text to start in a new frame when bringing the frame into live on a page. But here I cannot make the "text frame/object style" to apply or to work.
    If any of you have a hint, I would be more than happy to hear from you
    This picture are illustrating the outcome I would to get to....

    If the incoming text does not have styles, or has only one style, there is really not much you can do other than assign styles after the import. If there are recognizable patterns in the formatting, a lot of that can be done with Find/Change, and there are a few scripts floating around that can help automate some of that.
    Also, if your styles have a a good "next style" heirarchy built in, you can select large blocks of text (up to the point where applying next style would be incorrect), then right click the style name in the paragraph styles panel and choose apply style and next style (remove overrides). Warning. Removing overrides will remove any locally applied formatting like bold or italics, so local formatting should be converted to character styles first. Applied character styles are not overrides and will be preserved.

  • Map tags to object styles?

    Hello ID users & developers!
    Well, now i know that tags from imported xml can be mapped to corresponding paragraph or table styles of ID document.
    But, if i have to map any tag to an object style?
    I import images with <Image href='image_path' /> tag.
    Now, how can i bind it to Image object style?
    Thanks in advance, Alex.

    It does not.
    It would be nice though some day.

  • Tagging character styles and paragraph styles in inDesign

    I'm working on a complex book in which everything on the pages is styled.
    I've been asked to tag the vocabulary terms in the text, so that the correct page number shows up in the index.
    I've been asked to tag the folios as well, for the table of contents.
    The folios are a paragraph style.
    The vocabulary terms are styled with a character style.
    How do I do this?
    Any help much appreciated.

    InDesign's built-in Table of Contents function picks up text based on paragraph styles. I'm not sure you really men, though, that you want to pick up the folios, if you are using the term as I understand it, to mean the page numbers. You really want to pick up the various headings used to identify the topics or titles. ID will supply the page numbers.
    As for the indexing, there may be a script that can find text with a particular character style assigned and add it to an index (you should ask over in the scripting forum: InDesign Scripting) but you should also read the Help on Indexes and learn more about how they operate.

  • Help needed for Graphical mapping.Tag only once produces

    Hello experts,
    I have a problem in my graphical mapping.This is the example:
    from each segment A in IDOC has to be made Tag A or Tag B in output XML.
    Segment A has a field USER_STATUS and if it is X than Tag B has to be made otherwise Tag A.
    Segment A is 0..9999999. occurence
    Tag A  0..unbounded
    Tag B 0..unbounded.
    I made a mapping
    mapping for Tag A:
    USER_STATUS -> mapwith default(empty)->length->EqualsA (with Constant =0)-> createif->Tag A
    for Tag B as following:
    USER_STATUS -> mapwith default(empty)->EqualsS (with Constant =X)-> createif->Tag B
    The problem is that in output XML, I have only one Tag A or B (depending on field USER_STATUS in first occurence of the segment) while in inbound IDOC 5 segments are with different value of the field: USER_STATUS.
    Does anyone idea to solve this problem!
    Thank you very much for your effort.
    King regards,
    Danijela Zivanovic

    HI,
    CAn you try this way,
    Use Maping Node UseOneAsMany for Tag B
    and pass 3 inputs as
    Constant[]----
    >
    USER_STATUS -> mapwith default(empty)->EqualsS (with Constant =X)----
    >
    USER_STATUS -> mapwith default(empty)->EqualsS (with Constant =X)----
    >
    Same way try for Tag A also.
    Thanks
    Swarup

  • Parsing XML with html tags for style

    I'm using flash to pull in XML data, but I want to use html
    tags to be able to style the text. When I add any html, it treats
    it as a sub-node and ignores the data. Also, line breaks in the xml
    are being converted to double spaced paragraphs? The relevant code
    is basically this:
    if (element.nodeName.toUpperCase() == "TEXT")
    {//add text to text array
    ar_text[s]=element.firstChild.nodeValue;
    textbox1.text = ar_text[0];

    try to use htmlText instead text... like this:
    textbox1.htmlText = ar_text[0]
    adam

  • HTML Map tag zoom problem.

    Hi,
    We have discovered a problem with our webpage that only occurs on safari. We have an image with an image where we use an <map><area> tags to indicate click-able hot spots on the image. When you change the zoom level in the browser, increasing or decreasing the size of the image the relative location of the hot spot changes within the image.
    This problem happens in both windows and mac versions of safari. IE, Chrome and FireFox handle this correctly.
    Does anybody know how to fix this?

    Hi
    a webkit nightly from http://webkit.org will likely fix it on an individual machine - but afaik, apple didn't include the fix in the recent safari updates.

Maybe you are looking for

  • Link customer submitted web app to another web app

    Hi, Just wondering if there is a way to insert data from one web app into another. I have 2 web apps - one for business info (submitted and updated by the business), the other for recipes (submitted by the business).  They are both linked to the same

  • Part1 is not Generating for Vendor Subsequent Delivery

    Hi ASAP I hope you must be doing great; steps are as follow which Iu2019m following for vendor return and subsequent delivery for Raw / Capital goods. 1. PO -> MIGO (101) -> Excise capture & Posting using J1IEX -> MIRO. For excise, part1 & 2 to relev

  • Combining a JSPDynpage and a Dynpage into one iView

    Hi! Does anyone have any idea if it is possible (and if yes, how) to display a JSPDynpage and a Dynpage in the same iView in different trays. Not a page with two iViews though, basically one component containing both of them. I know it's a bit tricky

  • How to use BAPI_CUSTOMERRETURN_CHANGE

    Hi I have used BAPI_CUSTOMERRETURN_CHANGE to modify an return order. It works fine, except than new quantity for w_schedule-req_qty is added, instead of replaced it. I suppose that w_headerinx-updateflag must be 'U', but I don´t know if is needed ano

  • Default username and password for acs 3.2.3

    Hi All What is the default username and password to login to a newly built ACS Server V3.3.2 ? Thanks in advanced. Darren