CS3 / javascript / Creating anchor frame and placing xml element

Hi All,
I have a problem with creating anchor frame, that is
Actually i have created anchor frame, but it is not allowing to place the xml element, it shows "inline frame xml elements not allowed" some thing like this.
I have handled anchor frame type is "custom" but it shows "inline frame".
Any of you got better idea about this.
regards,
sudar.

I believe this has to do with you doing a placeXML, where the XML contents does not match the tagged frames in the document.
Again i'm not sure, but i dont think this has to do with what kind of frame you are placing into(inline or custom anchor) rather if your tagged frames and XML match up.
Perhaps this link will help:
http://forums.adobe.com/message/1111773

Similar Messages

  • Hel with modifying cs5/6 script...create anchored frames from text

    hello
    I have one great time saver script for cs5 for create anchored frames from text tagged with/or charachter style/paragraph style. This work in cs6 but have some "bugs" for me. Script need to be compatible with InDesign CS6.
    1. script in original (look bellow) create text frame which is fitted to lenght of the text. I make change and change 466 line:
    AnchoredTextFrame.fit(FitOptions.FRAME_TO_CONTENT);
    now frame is wide as I write in check box, good. But frame not resize to lenght of the text so I add after above lines 466-470:
        var FO = FitOptions.FRAME_TO_CONTENT,
        tfs = ([]).concat.apply([], app.activeDocument.stories.everyItem().textContainers),
        t, i = tfs.length;
    while( i-- ) (t=tfs[i]).overflows && ( t.locked || t.fit(FO) );
    now all is ok but is here better way to make this to work? Simply, i want to spec text frame width in dialog box, frame will resize only verticaly in direction to amount text in frame. I dont want any overset text.
    2. One "bug". For some reason script alter paragraph style of other text which is not subject to be cutted in anchored frame.
    How to resolve this?
    #targetengine "session"
              Automating anchored object creation
              Version: 2
        Script by Thomas Silkjær
              http://indesigning.net/
    Модификация Б. Кащеев, www.adobeindesign.ru
    Скрипт предназначен для создания привязанных фреймов из текста, отформатированного
    каким-либо абзацным или символьным стилем. Эти стили задаются пользователем в диалоговом
    окне скрита. Там же необходимо задать объектный стиль для привязанного фрейма, в котором
    пользователь должен заранее задать оформление и параметры привязки. Далее необходимо
    указать ширину привязанного фрейма, а его высота будет рассчитана автоматически исходя из
    объема текста. При вводе дробных значений ширины привязанного фрейма в качестве
    разделителя целой и дробной части следует использовать не запятую, а точку, следуя западным
    стандартам разработчиков программы  Adobe InDesign. Первоначально идея и скрипт по созданию
    привязанных фреймов принадлежит Thomas Silkjær для версии ID CS4. C появлением версий CS5
    и CS5.5 скрипт перестал в них выполняться, да и в версии CS4 не всегда корректно работал.
    Анализируя недочеты скрипта в данной его версии были исправлены ошибки и внесены
    функциональные дополнения исходя из понимания задачи автором модификации. Добавлена
    возможность выбора стилей, если они они находятся в группах (папках), возможность выбора
    единиц измерения из выпадающего списка, изменены GREP-выражения для поиска текста,
    область действия скрипта ограничена материалом (Story), а не документом.
    var myMeasureUnits = ["Milimeters","Centimeters","Points","Inches", "Picas", "Ciceros"];
    var selectUnits;
    var pStyleIndex = null;
    var cStyleIndex = null;
    var oStyleIndex = null;
    var myH, myW;
    function main()
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
              if (app.documents.length == 0)
                        alert ("Document is not open. Open document first");
                        return;
        var myParaStyleList = myGetParagraphStyleNames();
        var myCharStyleList = myGetCharacterStyleNames();
        var myObjStyleList = myGetObjStyleNames();
        if(app.selection.length && app.selection[0].hasOwnProperty("baseline"))
            var myStory = app.selection[0].parentStory;
            var myWin = myDialog(myParaStyleList, myCharStyleList, myObjStyleList);
            if ( myWin.show()  == 1 )
                var myDocument = app.activeDocument
                with (myDocument.viewPreferences){
                    // Сохраняем старые единицы измерения в переменных myOldXUnits, myOldYUnits
                    var myOldXUnits = horizontalMeasurementUnits;
                    var myOldYUnits = verticalMeasurementUnits;
                    // Устанавливаем новые единицы измерения
                    switch(selectUnits)
                        case 0:                   
                            horizontalMeasurementUnits = MeasurementUnits.millimeters;
                            verticalMeasurementUnits = MeasurementUnits.millimeters;
                            break;
                        case 1:
                            horizontalMeasurementUnits = MeasurementUnits.centimeters;
                            verticalMeasurementUnits = MeasurementUnits.centimeters;
                            break;
                        case 2:
                            horizontalMeasurementUnits = MeasurementUnits.points;
                            verticalMeasurementUnits = MeasurementUnits.points;
                            break;                  
                        case 3:
                            horizontalMeasurementUnits = MeasurementUnits.inches;
                            verticalMeasurementUnits = MeasurementUnits.inches;
                            break;
                        case 4:
                            horizontalMeasurementUnits = MeasurementUnits.picas;
                            verticalMeasurementUnits = MeasurementUnits.picas;
                            break;
                        case 5:
                            horizontalMeasurementUnits = MeasurementUnits.ciceros;
                            verticalMeasurementUnits = MeasurementUnits.ciceros;
                            break;
                        default: break;
                    } // switch
                if(cStyleIndex == null)
                {/*поиск по стилю абзаца*/
                    var pStyle = getParagraphStyleByName(myParaStyleList[pStyleIndex]);
                    resetGREPfindChange();
                    app.findGrepPreferences.appliedParagraphStyle = pStyle;
                    app.findGrepPreferences.findWhat = NothingEnum.nothing;
                else //
                    // поиск по стилю символов
                    var cStyle = getCharacterStyleByName(myCharStyleList[cStyleIndex]);
                    resetGREPfindChange();
                    app.findGrepPreferences.appliedCharacterStyle = cStyle;
                    //app.findGrepPreferences.findWhat = ".+";
                    app.findGrepPreferences.findWhat = NothingEnum.nothing;
                var foundItems = myStory.findGrep();
                if(!foundItems.length) {
                    alert("Found the text to be placed in a linked frames"); exit();
                //alert(foundItems.length);
                //alert (foundItems[0].contents)
                //alert (foundItems[1].contents)
                var oStyle = getObjectStyleByName(myObjStyleList[oStyleIndex]);
                for(var i = foundItems.length-1; i >=0; i--)
                    //alert (foundItems[i].contents)
                    createAnchoredFrame(foundItems[i], oStyle);
                with (myDocument.viewPreferences){
                    try{
                        horizontalMeasurementUnits = myOldXUnits;
                        verticalMeasurementUnits = myOldYUnits;
                    catch(myError){
                        alert("Unable to return to the original unit");
            } //if ( myWin.show()
        } //if(app.selection.length && app.selection[0].hasOwnProperty("baseline"))
        else
            alert("Place the cursor in the text and run the script again")
    } // main
    function myGetParagraphStyleNames()
    // Получаем список стилей абзацев
              var curGroup;
              var curGroupName;
              var curNameInGroup;
              var myParagraphStyleNames = app.activeDocument.paragraphStyles.everyItem().name;
              myParagraphStyleNames.shift(); // удаление стиля No Paragraph Style
              var paraGroups = app.activeDocument.paragraphStyleGroups;
              var paraGroupsLen = paraGroups.length;
              for(var i = 0; i < paraGroupsLen; i++) {
                        curGroup = paraGroups[i];
                        curGroupName = paraGroups[i].name;
                        curGroupStyleNames = curGroup.paragraphStyles.everyItem().name
                        for (j=0; j< curGroupStyleNames.length; j++)
                                  curNameInGroup = curGroupName +":"+ curGroupStyleNames[j];
                                  myParagraphStyleNames.push(curNameInGroup);
              return myParagraphStyleNames;
    function myGetCharacterStyleNames()
    // Получаем список символьных стилей
              var curGroup;
              var curGroupName;
              var curNameInGroup;
              var myCharacterStyleNames = app.activeDocument.characterStyles.everyItem().name;
              myCharacterStyleNames.shift(); // удаление стиля None
              var charGroups = app.activeDocument.characterStyleGroups;
              var charStyleGroupLen = charGroups.length;
              for(var i=0; i < charStyleGroupLen; i++)
                        curGroup = charGroups[i];
                        curGroupName = charGroups[i].name;
                        curGroupStyleNames = curGroup.characterStyles.everyItem().name;
                        for (j=0; j< curGroupStyleNames.length; j++)
                                  curNameInGroup = curGroupName +":"+ curGroupStyleNames[j];
                                  myCharacterStyleNames.push(curNameInGroup);
              } //for
              return myCharacterStyleNames;
    } // fnc
    function myGetObjStyleNames()
        var curGroup;
              var curGroupName;
              var curNameInGroup;
              var myObjStyleNames = app.activeDocument.objectStyles.everyItem().name;
        myObjStyleNames.shift();
        var objGroups = app.activeDocument.objectStyleGroups;
        var objStyleGroupLen = objGroups.length;
        for(var i=0; i < objStyleGroupLen; i++)
                        curGroup = objGroups[i];
                        curGroupName = objGroups[i].name;
                        curGroupStyleNames = curGroup.objectStyles.everyItem().name;
                        for (var j=0; j< curGroupStyleNames.length; j++)
                                  curNameInGroup = curGroupName +":"+ curGroupStyleNames[j];
                                  myObjStyleNames.push(curNameInGroup);
              } //for
        return myObjStyleNames;
    } // fnc
    function myDialog(myParaStyleList, myCharStyleList, myObjStyleList)
        var myDialog = new Window('dialog', 'Create anchored text frames');
        this.windowRef = myDialog;
              myDialog.orientation = "column";
        myDialog.alignChildren = ['fill', 'fill'];
        // добавляем панель 1 с элементами управления
        myDialog.Pnl1 = myDialog.add("panel", undefined, "Move the text in linked frames");
              myDialog.Pnl1.orientation = "column";
        myDialog.Pnl1.alignChildren = "left";
        myDialog.Pnl1.pstyle = myDialog.Pnl1.add('checkbox', undefined, "Text with the paragraph style");
        myDialog.Pnl1.pstyle.value = false;
        myDialog.Pnl1.dropdownParaStyle = myDialog.Pnl1.add("dropdownlist", undefined, myParaStyleList);
        myDialog.Pnl1.dropdownParaStyle.title = "Select the paragraph style ";
        myDialog.Pnl1.dropdownParaStyle.minimumSize = [250,20];
        myDialog.Pnl1.dropdownParaStyle.enabled = false;
        myDialog.Pnl1.dropdownParaStyle.selection = 0;
        if(myCharStyleList.length)
            myDialog.Pnl1.сstyle = myDialog.Pnl1.add('checkbox', undefined, "Text with character style");
            myDialog.Pnl1.сstyle.value = false;
            myDialog.Pnl1.dropdownCharStyle = myDialog.Pnl1.add("dropdownlist", undefined, myCharStyleList );
            myDialog.Pnl1.dropdownCharStyle.title = "Select the character style ";
            myDialog.Pnl1.dropdownCharStyle.minimumSize = [250,20];
            myDialog.Pnl1.dropdownCharStyle.enabled = false;
            myDialog.Pnl1.dropdownCharStyle.selection = 0;
            myDialog.Pnl1.pstyle.onClick = function()
                if(this.value) {
                    myDialog.Pnl1.dropdownParaStyle.enabled = true;
                    myDialog.Pnl1.dropdownCharStyle.enabled = false;
                    myDialog.Pnl1.сstyle.value = false;
                else
                    myDialog.Pnl1.dropdownParaStyle.enabled = false;
                    myDialog.Pnl1.dropdownCharStyle.enabled = true ;
                    myDialog.Pnl1.сstyle.value = true;
            }// fnc
            myDialog.Pnl1.сstyle.onClick = function()
                if(this.value)
                    myDialog.Pnl1.dropdownCharStyle.enabled = true;
                    myDialog.Pnl1.dropdownParaStyle.enabled = false;
                    myDialog.Pnl1.pstyle.value = false;
                else
                    myDialog.Pnl1.dropdownCharStyle.enabled = false;
                    myDialog.Pnl1.dropdownParaStyle.enabled = true ;
                    myDialog.Pnl1.pstyle.value = true;
            }// fnc
        }//  if(myCharStyleList.length)
        else
            myDialog.Pnl1.pstyle.onClick = function()
                if(this.value)
                    myDialog.Pnl1.dropdownParaStyle.enabled = true;
                else
                    myDialog.Pnl1.dropdownParaStyle.enabled = false;
    //  Вторая панель
        myDialog.Pnl2 = myDialog.add("panel", undefined, "Parameters of the text frame");
              myDialog.Pnl2.orientation = "column";
        myDialog.Pnl2.alignChildren = "left"; 
        myDialog.Pnl2.dropdownObjStyle = myDialog.Pnl2.add("dropdownlist", undefined, myObjStyleList );
        myDialog.Pnl2.dropdownObjStyle.title = "Select an object style ";
        myDialog.Pnl2.dropdownObjStyle.minimumSize = [250,20];
        myDialog.Pnl2.dropdownObjStyle.enabled = true;
        myDialog.Pnl2.dropdownObjStyle.selection = 0;
        myDialog.Pnl2.Group1 = myDialog.Pnl2.add( "group" );
        myDialog.Pnl2.Group1.stxt1 = myDialog.Pnl2.Group1.add("statictext", undefined, "The width of the text frame");
        myDialog.Pnl2.Group1.etxt = myDialog.Pnl2.Group1.add("edittext", undefined, "40");
        myDialog.Pnl2.Group1.etxt.characters = 10;
        myDialog.Pnl2.Group1.dropdownMeasurementUnits = myDialog.Pnl2.Group1.add("dropdownlist", undefined, myMeasureUnits );
        myDialog.Pnl2.Group1.dropdownMeasurementUnits.maximumSize = [80,20];
        myDialog.Pnl2.Group1.dropdownMeasurementUnits.selection = 0;
        //myDialog.Pnl2.Group1.stxt2 = myDialog.Pnl2.Group1.add("statictext", undefined, "mm ");
        /*myDialog.Pnl2.Group2 = myDialog.Pnl2.add( "group" );
        myDialog.Pnl2.Group2.stxt1 = myDialog.Pnl2.Group2.add("statictext", undefined, "Высота привязанного фрейма  ");
        myDialog.Pnl2.Group2.etxt = myDialog.Pnl2.Group2.add("edittext", undefined, "30");
        myDialog.Pnl2.Group2.etxt.characters = 10;
        //myDialog.Pnl2.Group2.stxt2 = myDialog.Pnl2.Group2.add("statictext", undefined, "mm ");*/
        myDialog.Pnl2.stxt1 = myDialog.Pnl2.add("statictext", undefined, "Attention! When you enter fractional values as");
        myDialog.Pnl2.stxt2 = myDialog.Pnl2.add("statictext", undefined, "the decimal part, should be used");
        myDialog.Pnl2.stxt3 = myDialog.Pnl2.add("statictext", undefined, "point, not comma.");
        myDialog.Pnl2.stxt1.graphics.foregroundColor = myDialog.Pnl2.stxt1.graphics.newPen (myDialog.Pnl2.stxt1.graphics.PenType.SOLID_COLOR, [1, 0, 0, 1], 1);
        myDialog.Pnl2.stxt2.graphics.foregroundColor = myDialog.Pnl2.stxt2.graphics.newPen (myDialog.Pnl2.stxt2.graphics.PenType.SOLID_COLOR, [1, 0, 0, 1], 1);
        myDialog.Pnl2.stxt3.graphics.foregroundColor = myDialog.Pnl2.stxt3.graphics.newPen (myDialog.Pnl2.stxt3.graphics.PenType.SOLID_COLOR, [1, 0, 0, 1], 1);
        // --------- кнопки --------------
        var myGroup = myDialog.add( "group" );
        myGroup.orientation = 'row';
        myGroup.alignChildren = ['fill', 'fill']; 
        myGroup.okButton = myGroup.add( "button", undefined, "OK" );
        myGroup.okButton.onClick = function()
            if(myCharStyleList.length) // есть символьные стили в документе
                if(!myDialog.Pnl1.pstyle.value && !myDialog.Pnl1.сstyle.value)
                    alert("You must select a paragraph style or character style");
                    return ;
                if(myDialog.Pnl1.pstyle.value) { pStyleIndex= myDialog.Pnl1.dropdownParaStyle.selection.index; cStyleIndex = null;}
                else {cStyleIndex = myDialog.Pnl1.dropdownCharStyle.selection.index; pStyleIndex=null; }
            else // нет символьных стилей
                if(!myDialog.Pnl1.pstyle.value)
                    alert("You must select a paragraph style");
                    return;
                pStyleIndex = myDialog.Pnl1.dropdownParaStyle.selection.index;
                cStyleIndex = null;
            } //  else // нет символьных стилей
           oStyleIndex = myDialog.Pnl2.dropdownObjStyle.selection.index;
           if(myDialog.Pnl2.Group1.etxt.text =="")
               alert("Enter the width of the text frame");
               return;
            else
                myW = myDialog.Pnl2.Group1.etxt.text;
                myH = myW;
            /*if(myDialog.Pnl2.Group2.etxt.text == "")
                alert("Введите высоту привязанного фрейма");
                return;
            else
                myH = myDialog.Pnl2.Group2.etxt.text;
           selectUnits = myDialog.Pnl2.Group1.dropdownMeasurementUnits.selection.index;
            myDialog= this.window.close( 1 );
        myGroup.cancelButton = myGroup.add( "button", undefined, "Cancel" );
        myGroup.cancelButton.onClick = function() { myDialog = this.window.close( 0 ); }
        myDialog.Pnl3 = myDialog.add("panel", undefined, "");
        myDialog.Pnl2.alignChildren = "left";
        myDialog.Pnl3.stxt = myDialog.Pnl3.add("statictext", undefined, "(с) Thomas Silkjær        (с) Борис Кащеев, www.adobeindesign.ru ");
        return myDialog;   
    } // fnc
    function getParagraphStyleByName(myStyleName)
              var DocParaStyles = app.activeDocument.paragraphStyles;
              var DocParaGroups = app.activeDocument.paragraphStyleGroups;
              myStyleName = ""+myStyleName;
              var pos = myStyleName.indexOf(":")
              if(pos == -1)
              // стиль не в группе
              var myStyle = DocParaStyles.item(myStyleName);
                        return myStyle;
              } //if
              else
                        var myGroupAndStyleNames = myStyleName.split(":")
                        var myGroupName = myGroupAndStyleNames[0];
                        var myStyleName = myGroupAndStyleNames[1];
                        var myGroup =DocParaGroups.item(myGroupName);
                        return myGroup.paragraphStyles.item(myStyleName);
    } // fnc
    function getCharacterStyleByName(myStyleName)
              var DocChStyles = app.activeDocument.characterStyles;
              var DocCharGroups = app.activeDocument.characterStyleGroups;
              // Есть ли в имени полученного символьного стиля двоеточие? (двоеточие разделяет название группы стилей и название стиля)
              myStyleName = String (myStyleName);
              var pos = myStyleName.indexOf(":");
              if(pos == -1)
              // стиль не в группе
                        return DocChStyles.item(myStyleName)
              } //if...
              else
              {// Стиль в какой-то группе
                        var myGroupAndStyleNames = myStyleName.split(":")
                        var myGroupName = myGroupAndStyleNames[0];
                        var myStyleName = myGroupAndStyleNames[1];
                        var myGroup = DocCharGroups.item(myGroupName);
                        return myGroup.characterStyles.itemByName(myStyleName);
              } // else
    } // fnc()+
    function getObjectStyleByName(myStyleName)
        var DocObjStyles = app.activeDocument.objectStyles;
        var DocCObjGroups = app.activeDocument.objectStyleGroups;
        myStyleName = String (myStyleName);
        var pos = myStyleName.indexOf(":");
        if(pos == -1)
              // стиль не в группе
                        return DocObjStyles.item(myStyleName);
              } //if...
        var myGroupAndStyleNames = myStyleName.split(":");
        var myGroupName = myGroupAndStyleNames[0];
        var myStyleName = myGroupAndStyleNames[1];
        var myGroup = DocObjGroups.item(myGroupName);
                        return myGroup.objectStyles.itemByName(myStyleName);
    } //fnc
    function resetGREPfindChange()
        app.changeGrepPreferences = NothingEnum.nothing;
        app.findGrepPreferences = NothingEnum.nothing;
        app.findChangeGrepOptions.includeFootnotes = false;
        app.findChangeGrepOptions.includeHiddenLayers = false;
        app.findChangeGrepOptions.includeLockedLayersForFind = false;
        app.findChangeGrepOptions.includeLockedStoriesForFind = false;
        app.findChangeGrepOptions.includeMasterPages = false;
    function createAnchoredFrame(myText, myObjStyle)
        var myGeometricBounds = [];
        var myInsertionPoint = myText.insertionPoints[0];
        myInsertionPoint.select;
        var AnchoredTextFrame = myInsertionPoint.textFrames.add();
        myGeometricBounds = AnchoredTextFrame.geometricBounds;
        //alert(parseFloat(myH) + " " + parseFloat(myW))
        myGeometricBounds[2] = myGeometricBounds[0] + parseFloat(myH);
        myGeometricBounds[3] = myGeometricBounds[1] + parseFloat(myW);
        AnchoredTextFrame.geometricBounds = myGeometricBounds;
        AnchoredTextFrame.anchoredObjectSettings.anchoredPosition = AnchorPosition.anchored;
        myText.move(LocationOptions.before, AnchoredTextFrame.texts[0]);
        AnchoredTextFrame.appliedObjectStyle = myObjStyle;
        AnchoredTextFrame.fit(FitOptions.CONTENT_TO_FRAME);
        var FO = FitOptions.FRAME_TO_CONTENT,
        tfs = ([]).concat.apply([], app.activeDocument.stories.everyItem().textContainers),
        t, i = tfs.length;
    while( i-- ) (t=tfs[i]).overflows && ( t.locked || t.fit(FO) );
    } //fnc
    main();

    Hi Cari,
    I did create a new user account (admin level) and InDesign works like a charm.
    When I went back to the other account, plug-ins gone, I deleted the prefs and caches, restarted and still everything is crashing as before.
    At least I am working on one account and I will contiue to troubleshoot on the other account. And at some point either the new account will crash or the old account will work and I will go from there.
    Thanks for the info about Mac remembering info. Always trying to be helpful these Macs.
    And thanks for getting at least into a workable space!!! I am supremely grateful!

  • Can a Xquery return a concatenated string and an XML element

    Hi,
    My Xquery fucntion is shown below:
    It accepts 4 string parameters and an XML element i.e., $Message which is an XML element(request coming to the service) and i need to log all this information to a log file.
    I am using the below concat fucntion to get a concatenated string of all the parameters but, for $Message i m not able to get the XML payload. How to achieve the same in the Xquery?
    *$Message is the below XML file:*
    <payload>
    <aa>one</aa>
    <bb>two</bb>
    <cc>three</cc>
    </payload>
    My Xquery function is:
    declare function xf:XformLog($Name as xs:string,
    $id as xs:string,
    $Context as xs:string,
    $Annotation as xs:string,
    $Message as element(*))
    as xs:string {
    concat("Name = ",$Name," , ","Id = ",$id," , ","Message Context = ",$Context," , ","Annotation = ",$Annotation," , ","Event Message = ", data($Message/@* , $Message/node()))
    I am trying to achieve the following log:
    Name = xyz, Id = 111, Message Contact = abc, Annotation = ggg, Event Message = <payload>
    <aa>one</aa>
    <bb>two</bb>
    <cc>three</cc>
    </payload>
    How can i achieve the same. Please suggest.
    Thanks in advance.
    Edited by: user9223904 on Mar 18, 2013 3:16 AM

    Hi,
    You have to use a serialization function to convert the element instance to a string.
    Such functionality is not included in the XQuery standard but many implementors provide an extension to do so.
    For example, in OSB, you can use <tt>fn-bea:serialize()</tt>.
    What's your environment and XQuery engine?

  • Anchored Frames and Inserted Tables

    Something has happened.....
    It used to be that I could insert a table (there is an anchor at the insertion point) and follow that with an anchored frame for a graphic and they would display according this order.
    Now, when I do the same sequence, the anchored frame for the graphic always displays before the table.
    Does anyone have a fix for this? Is there a setting somewhere that I need to change to get them to display in the order that I've placed them?
    I installed the 8.0.2 patch, did that break something?
    Dennis

    Sheila,
    The anchored frame for the graphic is set to "Below Current Line" which is what I've always used.
    On rare occasions I have used "At Insertion Point" where I've inserted an icon that I'm describing. Using the "At Insertion Point" requires you to put in a negative number for the Distance above Baseline field. I would rather not do this for all my graphic images.
    My Table Designer properties (Basic tab) are set with Start: Anywhere. Again, this is what I've always used.
    Thanks for your suggestion. If others have experienced the same, please let me know.
    Thanks,
    Dennis

  • Bullet problem when creating text frames and tables in InDesign CS5

    Every time I create a new text frame or table in InDesign CS5 and paste information there, the first row in the table or several lines of text come out with bullet points. I'm sure this is a setting or style at some point I created and now am unsure of how to delete. I would like the new text frames and tables to not include bullet points as a default when imported or pasted. Any thoughts? Thanks!

    Defaults for text in the current document are made with no text selected. Turn off bullets and they should stay off (but check the styles, too, you might have accidentally set a bulleted style as the defualt and you should change the default style instead). If this is happening in all files, you need to do it with nothing open to reset the default for all new documents (existing files, unfortunately, need to be fixed one at a time).

  • Problem in Creating .wsdl file and mapping.xml with ant

    hi
    i am created my .wsdl file and mapping.xml file with wscompile tool but when i run this by ant tool it show a problem.
    the command runs on command prompt but when run throught ant file it shows a following error :-
    Execute failed: java.io.IOException: CreateProces: wscompile -define -mapping build\classes\META-INF\mapping.xml -d . -nd build\.................and so on
    so if anybody have any idea then plz help me asap
    thanx

    The following Ant snippet is the way I've defined my wscompile task. I'm creating a web application and it looks like yours might be an EJB endpoint, but you can adjust where necessary:
    <taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile">
         <classpath refid="compile.classpath" />
    </taskdef>
    <target name="init">
         <echo message="-------- ${appname} --------" />
    </target>
    <!-- This target compiles the server components using an existing WSDL as the driving document.
           The configuration file must use the <wsdl> element giving the location (local file system
           or URL) of the WSDL document.
           Note: the fork argument is needed to over come a bug when using the mapping argument. See
           http://forum.java.sun.com/thread.jspa?threadID=592994&tstart=0
      -->
         <target name="generate-server-from-WSDL" depends="init">
              <wscompile fork="yes"
                           keep="true"
                           base="${basedir}/WebContent/WEB-INF/classes"
                           import="true"
                           features="wsi"
                           xPrintStackTrace="true"
                           verbose="true"
                           mapping="${basedir}/WebContent/WEB-INF/jaxrpc-mapping.xml"
                           sourcebase="${basedir}/src"
                           config="${config.server.doclit.file}">
                   <classpath>
                        <path refid="compile.classpath" />
                   </classpath>
              </wscompile>
         </target>
         <target name="compile-server-from-WSDL" depends="generate-server-from-WSDL">
              <javac srcdir="${basedir}/src" destdir="${basedir}/WebContent/WEB-INF/classes" debug="${compile.debug}">
                   <classpath refid="compile.classpath" />
              </javac>
         </target>Just make sure that the named destination directories exist before you run the script.
    If you'd like more details on the wscompile Ant task, I found the following pages invaluable:
    https://jax-rpc.dev.java.net/whitepaper/1.1/index-part1.html

  • [CS3 JS]  Create a rectangle and set it to cropBox?

    Im very new to illustrator. I have a text file containing the geometricBounds of a rectangle from indesign. (using as my crop guide). Once in illustrator I tryed to assign this to the cropBox but it doesnt take, saying it expects rectangle values. So Im asking how do I create a rectangle (and then reference it to the cropBox)?
    Thanks

    You don't need a rectangle as you do in the UI. Try this:
    var b = app.documents[0].cropBox;
    var mytop = 77;
    var myleft = 5;
    var myright = 405;
    var mybottom = 7;
    var mywidth = myright-myleft;
    var myheight = mytop-mybottom;
    var aRect = app.documents[0].pathItems.rectangle (mytop, myleft, mywidth, myheight, false);
    app.documents[0].cropBox = [myleft, mytop, myright, mybottom];
    The first line tells you what you are looking for: an array of 4 values.

  • Java XML-Reader (SAX)--How to read and display xml-element-data???

    hello all,
    i would like to display just some xml-data
    Which methods in java should i use to select just one character-data of this (for example: "deu" from the element <Language> or the attribut "version" of the element <catalog>).
    Here is the XML-document i want to parse and display it with System.out.print() :
    <BMECAT version="1.2">
         <HEADER>
              <GENERATOR_INFO>
                   e-proCat 2.1, e-pro solutions GmbH
              </GENERATOR_INFO>
              <CATALOG>
                   <LANGUAGE>deu</LANGUAGE>
                   <CATALOG_ID>Katalog 01</CATALOG_ID>
                   <CATALOG_VERSION>001.000</CATALOG_VERSION>
                   <CATALOG_NAME>ETIM</CATALOG_NAME>
                   <DATETIME type="generation_date">
                        <DATE>2002-05-22</DATE>
                   </DATETIME>
                   <TERRITORY>DE</TERRITORY>
                   <CURRENCY>EUR</CURRENCY>
                   <MIME_ROOT>ETIM-Daten</MIME_ROOT>
              </CATALOG>
    </HEADER>
    </BMECAT>
    Here is the java application i wrote and which doesn t work:
    import org.apache.xerces.parsers.SAXParser;
    import org.xml.sax.Attributes;
    import org.xml.sax.ContentHandler;
    import org.xml.sax.Locator;
    import org.xml.sax.SAXException;
    import org.xml.sax.XMLReader;
         public class XmlLeser implements ContentHandler {
    public XmlLeser(String fileName) {
    try {
    XMLReader myParser = new SAXParser(); // SAXParser (Xerces)
    myParser.setContentHandler(this);           
    myParser.parse(fileName);      } catch (Exception e) {
         System.out.println("Erreur " + e);     }
    }// End of constructor
    public void startDocument() {
         System.out.println(" start to parse " );
    } // startDocument()
    public void endDocument() {
    System.out.println(" End of Parse ");
    } // endDocument()
    public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
         System.out.println(localName) ;
    public void endElement(String namespaceURI, String localName, String qName) throws SAXException {           
    }// Endelement()
    public void characters(char ch[], int start, int length) {
    } // endCharacters(char[],int,int);
    public void processingInstruction(String target, String data) {
    } // processingInstruction(String,String)
    public void ignorableWhitespace(char ch[], int start, int length) {
              characters(ch, start, length);
    } // ignorableWhitespace(char[],int,int);
    public static void main(String args[]) {
    String xmlFileName = "";
    if (args.length == 0) {               
    System.out.println("Usage::java XmlLeser path/xmlFilename");
    System.exit(0);      } else {
    xmlFileName = args[0];
    XmlLeser pux = new XmlLeser(xmlFileName);
    }// end main()
    }//endClass

    You need to pass your filename String as a parameter to your functionality. It depends how you're currently set up though. We can't really see the top of your call so it's difficult to determine what you are calling and we don't really know from where you're calling either.
    If you're running standalone, then on launch of the application, you can feed in a file name as an argument that you can read in in String args[] in the main function and pass down to your XML splitter.
    If you're a method in a class that's part of a bigger pile, you can feed the file name as a String to the method from wherever you call from if it makes sense architecturally.
    You might also want to pass down a File object if that makes sense in your current code (i.e. if you're using your file for other purposes prior to the split, to avoid recreating closing/opening for no reason).
    Depends what you're trying to do. If I put together a piece like this, I would probably create an <yourcurrentrootpackage>.xml.splitter package.
    Also, on a side note, you're problem isn't really reading and writing XML in java, but seems more to be making your functionality generic so that any XML file can be split with your code.
    Regards
    JFM

  • To group images with created text frame and apply label for it...

    Hi Everyone,
    We are currently working in auto figure placements for CS3. I have placing the figures into the document. Then i am creating figure caption text frames below the images. Here the concern is i need to group these image and the text box. After this i have to place these images with captions into corresponding pages where the figures have been cited. Also suggest me how to place these images in center of the page as well as in top or bottom of the page margin.
    Can anyone help me for this. Your help will be much appreciated.
    Below is my modified script,
    var myPage;
    main();
    function main(){
        var myFilteredFiles;
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
        myExtensions = [".jpg", ".jpeg", ".eps", ".ps", ".pdf", ".tif", ".tiff", ".gif", ".psd", ".ai"]
        var myFolder = Folder.selectDialog("Select the folder containing the images", "");
        if(myFolder != null){
                if(File.fs == "Macintosh"){
                    myFilteredFiles = myMacOSFileFilter(myFolder);
                else{
                    myFilteredFiles = myWinOSFileFilter(myFolder);
                if(myFilteredFiles.length != 0){
                    for (j=0; j<myFilteredFiles.length; j++){
                        var myImages = myFilteredFiles[j];
                        citePage(j);
                        app.activeDocument.pages.item(myPage.name).place(myImages);
                        alert("Done!");
    function myMacOSFileFilter(myFolder){
        var myFilteredFiles = myFolder.getFiles(myFileFilter);
        return myFilteredFiles;
    function myFileFilter(myFile){
        var myFileType = myFile.type;
        switch (myFileType){
            case "JPEG":
            case "EPSF":
            case "PICT":
            case "TIFF":
            case "8BPS":
            case "GIFf":
            case "PDF ":
                return true;
                break;
            default:
            for(var myCounter = 0; myCounter<myExtensions.length; myCounter++){
                var myExtension = myExtensions[myCounter];    
                if(myFile.name.indexOf(myExtension)>-1){
                    return true;
                    break;           
        return false;   
    //To find cited pages
    function citePage(myInst){
        app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.NOTHING;
        app.findGrepPreferences.findWhat="(?<=Figure \\d\\.)\\d";
        var myFind=app.findGrep(false);
        myPage = myFind[myInst].characters.item(0).parentTextFrames[0].parent;
        return myPage.name;
    Thanks Regards
    Thiyagu

    The shadow effect has to have something to be applied on, but by default text frames borders and fills are invisible.
    If you set the border of your frame to a color & thickness, you'll see it gets a shadow of its own, independent of the text. (Try it with dotted and dashed lines!)
    Additionally, if you set the fill of your text frame to a solid color, you'll see the single solid shadow you were expecting.

  • Print Specific Frames and Dynamic XML content

    Hello, I am trying to print specific frames of my Flash movie
    with the dynamic text loaded from an XML file. The code below only
    prints the current frame I am on and does not print the XML text.
    The dataOK that is commented out is a function I have before that
    loads the XML content. The XML content is loaded to dynamic text
    boxes. Any help on this would be greatly appreciated.

    I am still having difficulty loading the XML data and the
    frameNum parameter does not seem to work. Argghhhh....
    function printTut(myevent:MouseEvent):void{
    var myPrintJob:PrintJob = new PrintJob();
    var mySprite:Sprite = new Sprite();
    var printArea:Rectangle = null;
    var options:PrintJobOptions = null;
    var frameNum:int = 2;
    mySprite.addChild(stage);
    mySprite.rotation=90;
    mySprite.scaleY=.80;
    mySprite.scaleX=.80;
    myPrintJob.start();
    myPrintJob.addPage(mySprite,printArea,options,frameNum);
    myPrintJob.send();
    print_btn.addEventListener(MouseEvent.CLICK,printTut);

  • Problem to create Explain Plan and use XML Indexes. Plz follow scenario..

    Hi,
    Oracle Version - Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit
    I have been able to reproduce the error as below:
    Please run the following code in Schema1:
    CREATE TABLE TNAME1
       DB_ID            VARCHAR2 (10 BYTE),
       DATA_ID          VARCHAR2 (10 BYTE),
       DATA_ID2         VARCHAR2 (10 BYTE),
       IDENTIFIER1      NUMBER (19) NOT NULL,
       ID1              NUMBER (10) NOT NULL,
       STATUS1          NUMBER (10) NOT NULL,
       TIME_STAMP       NUMBER (19) NOT NULL,
       OBJECT_ID        VARCHAR2 (40 BYTE) NOT NULL,
       OBJECT_NAME      VARCHAR2 (80 BYTE) NOT NULL,
       UNIQUE_ID        VARCHAR2 (255 BYTE),
       DATA_LIVE        CHAR (1 BYTE) NOT NULL,
       XML_MESSAGE      SYS.XMLTYPE,
       ID2              VARCHAR2 (255 BYTE) NOT NULL,
       FLAG1            CHAR (1 BYTE) NOT NULL,
       KEY1             VARCHAR2 (255 BYTE),
       HEADER1          VARCHAR2 (2000 BYTE) NOT NULL,
       VERSION2         VARCHAR2 (255 BYTE) NOT NULL,
       TYPE1            VARCHAR2 (15 BYTE),
       TIMESTAMP1   TIMESTAMP (6),
       SOURCE_NUMBER    NUMBER
    XMLTYPE XML_MESSAGE STORE AS BINARY XML
    PARTITION BY RANGE (TIMESTAMP1)
       (PARTITION MAX
           VALUES LESS THAN (MAXVALUE)
    NOCOMPRESS
    NOCACHE
    ENABLE ROW MOVEMENT
    begin
    app_utils.drop_parameter('TNAME1_PAR');
    end;
    BEGIN
    DBMS_XMLINDEX.REGISTERPARAMETER(
    'TNAME1_PAR',
    'PATH TABLE     TNAME1_RP_PT
                              PATHS (INCLUDE (            /abc:Msg/product/productType
                                                                    /abc:Msg/Products/Owner
                                     NAMESPACE MAPPING (     xmlns:abc="Abc:Set"
    END;
    CREATE INDEX Indx_XPATH_TNAME1
       ON "TNAME1" (XML_MESSAGE)
       INDEXTYPE IS XDB.XMLINDEX PARAMETERS ( 'PARAM TNAME1_PAR' )
    local;Then in Schema2, create
    create synonym TNAME1 FOR SCHEMA1.TNAME1
    SCHEMA1:
    GRant All on TNAME1 to SCHEMA2Now in SCHEMA2, if we try:
    Explain Plan for
    SELECT xmltype.getclobval (XML_MESSAGE)
    FROM TNAME1 t
    WHERE XMLEXISTS (
    'declare namespace abc="Abc:Set";  /abc:Msg/product/productType= ("1", "2") '
    PASSING XML_MESSAGE);WE GET -> ORA-00942: table or view does not exist
    whereas this works:
    Explain Plan for
    SELECT xmltype.getclobval (XML_MESSAGE)
    FROM TNAME1 t- Please tell me, what is the reason behind it and how can I overcome it. It's causing all my views based on this condition to fail in another schema i.e. not picking up the XMLIndexes.
    Also
    SELECT * from DBA_XML_TAB_COLS WHERE TABLE_NAME like 'TNAME1';Output is like:
    OWNER, || TABLE_NAME, || COLUMN_NAME, || XMLSCHEMA || SCHEMA_OWNER, || ELEMENT_NAME, || STORAGE_TYPE, || ANYSCHEMA, || NONSCHEMA
    SCHEMA1 || TNAME1 ||     XML_MESSAGE ||          ||          || BINARY     || NO     || YES ||
    SCHEMA1 || TNAME1 ||     SYS_NC00025$ ||          ||          || CLOB     ||     ||
    - Can I change AnySchema to YES from NO for -column_name = XML_MESSAGE ? May be that will solve my problem.
    - SYS_NC00025$ is the XML Index, Why don't I get any values for ANYSCHEMA, NONSCHEMA on it. Is this what is causing the problem.
    Kindly suggest.. Thanks..

    The problem sounds familiar. Please create a SR on http://support.oracle.com for this one.

  • Best approach to create Package Structure and .content.xml

    I am aware that we have a schem.xsd for generic package content.xml creation and neither do vault.xml and other associated xml files in the META-INF folder of the package.
    I want to know if there is some recommended approach to build the package and xml files, specifically content.xml programmatically on the file system. I know that we can use package manager (API not the GUI/screen) but that comes into picture when the folder structure and xmls files are created. I am interested to know a standard procedure of acceptable procedures to build the structure. I have seen folks use JDom/SAX etc to build this and even velocity to try it out using templates but that looks largely as a workaround. Can anyone help with some inputs on this?

    We've been successful at using ANT as a Build tool to run XSLT 2.0 using the Saxon XSL processor.  We have processed both CSV and XML files into packages.  This started out pretty simply, but grew more complex than initially thought.  There are a lot of subtlties that can be overlooked in the package format.  Also if your filters aren't right it will happily delete a lot of data.  Thankfully it appears uninstalling can recover these most times, but I'd recommend testing packages on a throw away instance.
    I've posted an example Ant + XSL that goes from CSV > XML > Many XML Files > CRX Package Zip: https://github.com/odu/crx-package-xsl-example.  There is also some info on some of the complexities of a package mentioned on that page that may be helpful, even if Ant / XSL isn't your route.
    Can you share more about your use for building a package, what format is the source data in, etc?  This example is really only useful for batch loading.

  • Create custom menu and add menu elements to it

    hi,
    i used the sample javacript "ScriptMenuAction.jsx" to create a custom menu.
    that script has this command: var mySampleScriptAction = app.scriptMenuActions.add("Display Message");
    which adds submenu called Display message.
    my question is how to add a submenu to "Display message" submenu...  i mean when we click on "File" menu, it shows "New" as the 1st element..if we click on "New" it shows another window giving option to create a new document, book or library....how to create such structure for my custom menu using javascript?
    thanks

    himanshuXRX wrote:
    that script has this command: var mySampleScriptAction = app.scriptMenuActions.add("Display Message");
    which adds submenu called Display message.
    The command you quoted is not the part of the code that adds a Submenu. This adds a ScriptMenuAction. The key is that actions are decoupled from menu/submenus/menuitem stuff. Take a look at the menu/submenu hierarchy to add the structure you need. This page may help you:
    http://www.indiscripts.com/post/2010/02/how-to-create-your-own-indesign-menus
    @+
    Marc

  • Accessibility: Reading order of tables and anchored frames

    I am creating accessible, tagged (section 508 compliant) PDFs in FrameMaker 9. The reading order for tables and frames is not correct.
    When I view the PDF reading order using Adobe Acrobat Professional or another screen reader, anchored items such as tables and anchored frames are  placed last in the reading order, regardless of where they appear in the document flow or page layout. The reading order skips over all tables and frames, reading all paragraphs on a page first, then reading the tables and frames as the last objects on the page. This logically doesn't make sense to skip over tables/frames as they generally apply to the content that preceeds it.
    For example, the following document structure:
    <Paragraph 1>
    <Table 1>
    <Paragraph 2>
    <Anchored Frame 1>
    <Paragraph 3>
    <Anchor Frame 2>
    <Paragraph 4>
    is being read by assistive technology as:
    <Paragraph 1>
    <Paragraph 2>
    <Paragraph 3>
    <Paragraph 4>
    <Table 1>
    <Anchored Frame 1>
    <Anchor Frame 2>
    I want the document structure to be read correctly as intended.
    In otherwords, the PDFs generated by FrameMaker 9 are not completely accessible because of incorrect reading order output by default. This information is not listed in the VPAT for FrameMaker 9.
    I want to avoid any post processing using Acrobat's Touch Up Reading Order tool. Is there a way to automate updates to reading order?
    Can FrameMaker 9 logically place tables and anchored frames into the correct reading order? How do I adjust these settings?
    Thanks in advance!

    As mentioned above, tables and anchored frames are inserted into thier own paragraph style "Frame". The paragraph style "Frame" is tagged. To my knowledge, there are no options for tagging or not tagging tables or anchored frames.
    Regardless of which paragraph type the table or anchor frame is inserted into, and what that paragraphs tagging settings are, it is still last in the reading order.
    I've tried a variety of options: tagging the "Frame" paragraph style as a sibling, child, and parent of my other paragraphs; I've even tried omitting it from the reading order. None of these options present anchored frames (and tables) in the logical reading order.
    Even images that are inline (within a paragraph; not in thier own paragraph) are not being read as part of the paragraph.  Inline images get skipped over by screen readers and get read at the end of the page, which makes no sense whatsoever.
    All tables and images end up at the end of the reading order (after ALL paragraphs) regardless of the tagging settings.
    Refer to my previous screenshot for a clear diagram of what is happening to the reading order. Each of those anchors is in it's own paragraph style. I want tables and anchored frames to be sequential in the reading order along with paragraphs. (1,2,3,4,5,6 not 1,4,2,5,3,6.)
    I'm using the Tags tab of the "PDF Setup" dialog to adjust these settings. Is there somewhere else I should be making changes to the reading order?
    This is a bit disturbing because FrameMaker touts creating accessible documents and this severe reading order issue impares my ability to do so. I would not consider documents that jump around the page in an illlogical, fixed order, to be accessible. I'm very suprised that no one else has encountered this issue (at least that I can find...)

  • Anchored frame that is run-around AND protrudes into margin?

    Hi,
    FM 8.04, Win XP.
    Is it in any way possible to create a small anchored frame (let's say 10 x 10 mm) that is run-around AND protrudes 1 or 2 mm into the left margin?
    I need it for drop caps and have managed everything except the protrusion into the margin.
    I can get protrusion into the margin by setting the anchored frame to "Outside column" or "Outside text frame" and then setting a negative value for "Distance from text column" - but then it isn't run around by the body text (despite inserting a text frame into the anchored frame and changing run-around properties).
    Any ideas?
    TIA,
    Mats

    Mats,
    Unfortunately, you're hitting the limits of anchored frame behaviour.
    It's an either/or proposition. You can have run-arounds, but you can't
    control the position except for placement at the start or end of a
    paragraph.
    An alternative, but clumsy and labour-intensive, is to set the start
    positions (indents - first & left) of all of the document paratags to
    be the desired offset (1-2mm) of the anchored frame. Then by setting
    the frame to start at the beginning of the anchoring paratag (not set
    with the indents), you will get the equivalent effect.
    If this is just going to be a single location and won't be subject to
    much editing (i.e. document reflow), then you could also consider
    using a graphic frame set with runaround, which you can position
    anywhere.

Maybe you are looking for

  • Email recipients having problems receiving and opening attachments after iOS7 update.  Help!

    I use my iPad for work, and often send emails with multiple PDF attachments via the GoodReader app.  Since updating to iOS7, people are having problems receiving and/or opening my attachments.  All available updates have been installed for both the i

  • ITunes AppStore categories links do not work

    On my desktop, using iTunes, when I go to AppStore>All Categories>no mather which one I choose, the only thing I get is a blank screen. The links simply do not work. Can anyone help me on this one? Thanks!

  • Open Cursor in a procedure

    Hi to all, my problem is to open a cursor into a procedure. The code is the following: PROCEDURE p_selection_customer IS      CURSOR cursor_customer IS           SELECT           c_u.id_customer           FROM           customer_unified_a c_u;      B

  • Migration from Crystal IX to BO-XI using java sdk-- very urgent

    Post Author: Pranav.Sharma CA Forum: Migration to XI R2 Need help in migration from Crystal Report IX to BO-XI. Currently we are using CR IX and Java SDK to access reports from J2ee application. These reports reside on remote server where we have sha

  • HOW TO RUN BODS JOB THROUGH UNIX SCRIPT

    Dear Experts Please provide me the way how to call a job by a script . I have used Export Execution Command as recommended by below links http://scn.sap.com/docs/DOC-34648 http://scn.sap.com/community/data-services/blog/2012/08/22/sap-bods--running-s