Get the xml comment previous xml element in the document

Hello

I need to get the previous indesign document xml comment element.  My selection is an xml comment. I need to select the previous item (author) xml (basic book) comments.  How can I get this xml elemant?

Screen shot 2015-08-27 at 11.05.44 AM.png

Thanks in advance,

Sudha K

Yes, all THE namespaces must be declared. And especially in the loop, the problem is that evaluateXPathExpression does not' see 'declatration of the namespace of the parent tags.

Workaround: temporary namespace statement

_tempNSDeclaration = _comments[i].parent.xmlAttributes.add( "xmlns:cl", "http://www.namespace.xyz" );
_precTags = _comments[i].parent.evaluateXPathExpression("child::comment()/preceding-sibling::*[position() = 1]");
_tempNSDeclaration.remove();

Or course _comments [i].parent.xmlElements

Moreover, it is easier to help you if you provide a test with the whole of the structure file.

Roland

Tags: InDesign

Similar Questions

  • Until a few days ago I was able to print a PDF from Acrobat Reader ms in Windows 7.  Now I get "the document could not be printed."  The next panel says "there are no pages selected to print," even if all the pages have been selected.  Thoughts?

    Until a few days ago I was able to print a PDF from Acrobat Reader ms in Windows 7.  Now I get "the document could not be printed."  The next panel says "there are no pages selected to print," even if all the pages have been selected.  I've uninstalled Reader and reinstalled, but the problem remains.  I also tried to repair the installation and that doesn't work anymore.

    Thanks for the tip.  It turned out that kind Reader has been commissioning in protected mode.  I changed the setting and it prints now as before.

    Thank you

  • No way to distinguish between failure and normal when to get the document of the UCM?

    Hello

    I use the service GET_FILE below to get the document from the Complutense University of MADRID

    request.putLocal (IdcService.NAME, IdcService.GET_FILE);
    request.putLocal (IdcDocumentAttribute.DOCUMENT_ID, dID);
    request.putLocal (IdcDocumentAttribute.NAME, dDocName);

    and then the output stream:
    ServiceResponse response = client.sendRequest (context, dataBinder);
    InputStream inputStream = response.getResponseStream ();

    they work most of the time very well.
    However, in this case, exception that I can't file, rather than receive exception, I always get a steady stream until I got out of the stream as a string, I realized that this is a format string HDA indicating failure.

    I wonder if there is no way to distinguish between failure and normal exit without open the output string stream?
    Thank you.

    We expect that the user can download the document so successfully in the form of output stream.

    It's probably a bad support, as you have already seen ;-)

    Is the output as string-HDA when the expected of the UCM rather than throwing exception failure?

    It should be pretty easy parse the real answer to retrieve the status code the system riser. You should not need to open the file to find the error.

    Something like

    response.getLocal("StatusCode")
    

    should tell you if the file has been found. A-16 status code means that the file could not be found. In the case of a successful GET_FILE, it does appear that a status code is still present, so test just for the mere presence of a status code should be sufficient.

  • How to get several xml elements in a relationship 1: n without using xmlaggregation

    I need to create the following xml structure from an oracle database

    where each survey can multiple deelnemers (participants)

    I'm not sure create this use of XMLElement without getting the message "ORA-01427 subquery returns more then one line."

    I could try to use dbms_xmldom (never done that before) but I wonder if anyone knows how to generate this just using the plain Oracle SQL-XMLfunctions (XMLElement, XMLAggr)

    < NieuweSurveys >

    < survey >

    < Surveynaam > 2013 - 02 - 01 < / Surveynaam >

    < Months > 2013 - 02 - 01 < / months >

    < Einddatum > 2013 - 02 - 15 < / Einddatum >

    < Deelnemer >

    Tilde < Chairwoman > < / Chairwoman >

    < Tussenvoegsel / >

    DeelnemerA < Achternaam > < / Achternaam >

    man < Geslacht > < / Geslacht >

    < Emailadres > [email protected] < / Emailadres >

    < Voorkeurstaal > nl < / Voorkeurstaal >

    Schouten < account > & Nelisen < / account >

    bouwer < function > < / function >

    < / Deelnemer >

    < Deelnemer >

    Tilde < Chairwoman > < / Chairwoman >

    < Tussenvoegsel / >

    DeelnemerB < Achternaam > < / Achternaam >

    Vrouw < Geslacht > < / Geslacht >

    < Emailadres > [email protected] < / Emailadres >

    < Voorkeurstaal > nl < / Voorkeurstaal >

    Schouten < account > & Nelisen < / account >

    Tester of < function > < / function >

    < / Deelnemer >

    < / inquiry >

    < / NieuweSurveys >

    What is your version of the database? (SELECT * FROM version$ v)

    The query does not match the output that you claim that it produces.

    In any case, the problem is the following:

    ) as "deelnemers.

    Put an alias here should not generate an element - unless you are using XMLForest in your actual query without your telling us.

    That's why I ask about the version of db, it could be an old bug that's been fixed now (I have not to reproduce the behavior on 11.2).

    What happens when you delete the alias?

  • Get all XML elements

    Hi guys,.

    I need to get all of the XML elements in the InDesign using JS documents (InDesign 5.0.4 - windows), the code below, it shows only the first node.

    for (var i = 0; i < app.activeDocument.xmlElements.length; i ++)
    {

    Alert (App.activeDocument.xmlElements.markupTag.Name);
    }

    Help me to anybodies,

    Nanan

    Hi Julie

    Try this

    aDoc var = app.activeDocument;

    getTags (aDoc)

    function getTags (ele)
    {
    If (!) ELE.xmlElements.Length) {return ;}
    for (var i = 0; i)<>
    {
           
    xrefId = ele.xmlElements [i].markupTag.name;
    $.writeln (xrefId);
               
           
           
    getTags (ele.xmlElements [i]);
    }
    }

  • How do to get the documents after the computer has been infected by a virus and wiped

    Hello

    My laptop works most completely and there was a humming noise whenever I tried to start. I learned that the laptop was corrupt. I was informed by the customer service to clean the laptop. In doing so, all parameters resumed those available at the time of the purchase in 2008.

    How can I recover all my documents, pictures, etc.?  I take the laptop to a computer technician to help with this.

    Can also advise you how to make a backup of all items stored on my laptop please.

    Kind regards

    J.

    Wiping the phone clean and restore to factory condition as advised by "customer service" (that may be), you actually deleted all the files that were on the computer. Recovery, even by a specialized at great expense data recovery company will be at best fragmentary.

    I'm moving your question to the forum space Windows for system repair and recovery, where it is possible that you may receive some additional tips, but I think that you can simply cut your losses at this point. If there is a hardware problem that caused the initial symptoms, it is likely that you will face more questions and data loss unless you get the hardware repaired/replaced.

    -steve

  • In Windows 7, if I have several documents open in Microsoft Word, how can I get the documents that appear side by side (although reduced)

    When I was with Windows XP & I opened several Word documents, the documents would appear side by side on the taskbar, although that reduced to a minimum. In Windows 7, is it possible for me to get there instead of the documents that appear on top of the other? I hope you understand what I'm describing. Thank you.

    Right click on a box empty spots in your bar and select Properties, then select the option or "combine when taskbar is full".  This means that each document or file you have open will get its own key, as long as there is place so that it fits.

  • Get the documents returned with switched fields.

    When we send a document must be signed, they are returned to us all the fields under tension. i.e. name of previous work, name is the last name of the employer. Phone numbers will be incorrect.  Nothing will be correct.

    Hello Seanh31959027,

    I recommend you contact support and provide the details of the document of the transaction in question:

    Support | services of Adobe eSign

    -Usman

  • Do not get the document.getElementById("FrameID").contentWindow in BB10 document object

    Hello

    I'm object window without property by the following code.

    document.getElementById("FrameID").contentWindow

    but the same code works for IPhone and Android.

    He is given no defined by document.getElementById("FrameID").contentWindow.document.

    any help

    This is the WINDOW (not intentionally shouting - highlighting - done myself)

    for example

    Window.frames ['frameid']

    Gets a complictaed bit of here in

    For example an application called __ebook that this mess give me a DIV in a frame INA

    EB var = $(frames ['appframe'].document.getElementById ('__ebook'));

    From there I can ' t mess with __ebook

  • How to get the documents and pictures off dead PC with Windows XP to Windows 7?

    have a computer laptop w / W7 and a pc with XP that does not work. on the laptop, I can only find documents/photos for the user of the original laptop. We use msn as our Internet service provider. can I get my documents/pictures power off the pc dead to show on the laptop. I get my mail and I know it's on the storage of Ms do not know what can be done on the other info. I have a driver to drive external but not ready to be the pc immediately. There is an icon on the desktop page original user ID but have not been able to get an icon for my log show.

    Hello

    1. you try to transfer data from the laptop XP to Windows 7 computer?

    2. What do you mean by icon storage and user of MS?

    3. what exactly happened to the XP computer?

    Be more specific to help you better. Visit this link: http://support.microsoft.com/kb/555375

  • You try to download another version of adobe reader and get an error. I need 11.0.10 to get the document I need.

    He says I have 2015.0102006, but I get an error every time I try to change it.

    Hi sowingseeds,

    Please try to run the cleanup tool "Download Adobe Reader and Acrobat tool - Adobe Labs" on your machine to remove all traces of the reader.

    Then, restart your machine and install the latest version of the player from here:

    Adobe Acrobat Reader DC install for all versions

    Also please check with the account of another user if the problem persists.

    Let me know how it goes.

    Kind regards

    Christian

  • get the documents in the file specific to the Complutense University of MADRID

    Hi all

    We use the UCM 11 g.

    I have a requirement, please tell me which is the best way to do so conditionally.

    Every night a simultaneous program runs on the side of the EBS, which creates around 20 k bills and pushes them into the local directory. Each invoice record stores the name of the invoice pdf file.
    In the local directory invoices are stored based on the area code.

    (* 1) how can we move these files from the local folder to the AAU? *
    (* 2) this file transfer procedure is triggered when updated local folder, how AAU know set local folder to update? *


    Thank you

    It's really a matter of "Crystal eye-ball shot". What kind of documents? What is their size? Convert you? You full text index? What is you architecture (sizing, CPU power, memory, logical architecture such as clustering, or to have separate servers for the task as the conversion)? What is your version of the UCM? Can you afford to "fast-upload" (disable verification during download, then turn them on again when it ends)?

    I think it will be easier for you to give it a try and you'll see.

    However, 25K documents (unless they are really big) isn't so much - we have a project where we check in some 800K documents in one working day (this is a project of 10g and we had to write our own batch charger to make it - the default is 2 - 3 times slower;) Yes, given that estimate that you should be able to complete your task in one hour maximum).

    I recommend a slightly different approach:
    -Get your quote
    -If it is considerably slower than what you need try optimizing the process
    -State of ALS, IE. "the upload always finishes last in X minutes/hours.

    Note that some tasks like indexing may require some 'cleaning' from time to time - otherwise, your performance tests could get more slowly you get more data.

  • try to get the document wordpad on my email

    shipping option I tried, but he says smpt is not found

    I don't know if Hotmail allows you to send attachments. I would look on (x) for their support.

    MSN Hotmail: main problems and Support information - http://support.microsoft.com/kb/316659
    Contact Hotmail (MSN) - http://www.hotmail.msn.com/cgi-bin/dasp/ua_info.asp MS - MVP - Elephant Boy computers - don't panic!

  • Modify the HTML of the document of the rendered page and reload

    Currently I am loading a url into javafx through webengine.load (url). My requirement is to keep the style in tact with the original page. However, once the page is rendered, the fonts are not loaded, and I cannot increase the font sizes. I worked through the following steps to achieve this.

    1 Add a listener via the method getLoadWorker for web engine and recover the document object when the State is MANAGED.

    2 transform a html string that gives me the whole HTML code of the page in a string including the css.

    3. then I do a replacement on the part of css by the actual location of the font (absolute path url) files and reload the HTML through loadContent method.

    With that, I'm able to get properly loaded fonts.

    Problem:

    1. I find myself with an infinite loop when I use the "webEngine.loadContent (string," text/html")" inside the getLoadWorker method.

    2. I tried to do that, outside the method getLoadWorker before the webEngine.load (url) , but in this case the string replacement body html is coming as null.

    Any help on how to achieve this? Here is my code:

    webEngine.getLoadWorker () .stateProperty () .addListener (new ChangeListener < Worker.State > () {}

    String htmlBody = null;

    @Override

    public void changed (ObservableValue <? extends Worker.State > observableValue, Worker.State prevState, Worker.State newState) {}

    To change the body of the methods implemented using file | Settings | Templates files.

    String htmlBody = null;

    int count = 0;

    If (newState == Worker.State.SUCCEEDED) {}

    browser.requestFocus ();

    Get the document of the engine object.

    Doc document = webEngine.getDocument ();

    try {}

    Transformer allows you to convert the object HTML from a string format top of page document.

    Transformer transformer = TransformerFactory.newInstance () .newTransformer ();

    transformer.setOutputProperty (OutputKeys.OMIT_XML_DECLARATION, "no");

    transformer.setOutputProperty (OutputKeys.METHOD, "html");

    transformer.setOutputProperty (OutputKeys.INDENT, 'yes');

    transformer.setOutputProperty (OutputKeys.ENCODING, "UTF - 8");

    transformer.setOutputProperty ("{http://xml.apache.org/xslt} dash-amount","4" ');

    OutWriter StringWriter = new StringWriter();

    transform. Transform (new DOMSource (doc), new StreamResult (outWriter));

    StringBuffer sb = outWriter.getBuffer ();

    htmlBody = sb.toString ();

    Replace the attribute of the font family of the style section to the actual URL of the font used.

    htmlBody = htmlBody.replace ("font family: way", "font family: url (http://1.10.30.45:8080/fonts/Md.ttf)" ");

    Load the new HTML string to the engine.

    webEngine.loadContent (htmlBody, "text/html");

    } catch (Exception ex) {}

    ex.printStackTrace ();

    }

    }

    }

    });

    webEngine.load (url);

    Add the display of web pages to the scene

    getChildren () .add (browser);

    What is a single page load?

    If so, you should be able to solve the problem with

    observableValue.removeListener(this);
    

    just before calling

    webEngine.loadContent(htmlBody, "text/html");
    

    Otherwise, you may have to do something pretty ugly: for example, to have a "loadingTransformedHTML" that is false at the start flag. Then in your method changed (...) do

    if (newState == WorkerState.SUCCEEDED) {
         if (loadingTransformedHTML) {
              loadingTransformedHTML = false ;
         } else {
              browser.requestFocus();
              // ...
              loadingTransformedHTML = true ;
              webEngine.loadContent(htmlBody, "text/html");
              // ...
         }
    }
    
  • "File not found" error message when you save the document

    Hello

    Oddly enough, whenever I click on 'save' in CS6, it opens a window "save under", (which shouldn't happen), then I click on save witht the existing file name (he said then the doc exist already), I click on OK, (and then on OK to the next popup window) do get the message "file not found".  I have to click on 'ok' and the document is not saved.  I tried to register differently in previous versions, and it still does not work.  I recorded a video of this behavior. You can see here - http://screencast.com/t/W1GYK0zsrk

    Why would he try to find a file?  Looks like an error message when you try to open a doc, does not save a doc.

    Help, please!  I can't stop my station until I get the document to save.

    Yes, Mohit1233 - happened with each file yesterday. Finally, I closed the doc (make me lose my job requires), then restarted my computer and now, that problem has disappeared. I work on a PC (HP);

    Barblove - I tried to do that yesterday (copy and paste into a new doc) and still nothing. I also tried to copy the work in a CS3 doc (but got an error message).

  • How to display the document toolbar

    I can't get the document toolbar to show.  Help, please

    Go to view > toolbars > check Document.

Maybe you are looking for

  • can I move my itunes music on external drive

    Hello world I want to make space on my internal hard drive. Is it possible to get out all my itunes music on an external hard drive? If so, how do you? Many thanks and best wishes Jim

  • Re: Portege R830 - cannot find my model on the list of Product Support

    Hello world I recently bought a Portege R830 and was trying to find support for my model page. However, on the list of Product Support, where you choose the model, I can't find which is mine. My model is displayed as * R830-1056UB * in the box your l

  • Its too strong Apple Watch after alarm or timer

    Hi all I noticed something very odd on the Apple Watch, whenever I put a timer or a clock radio, when it sounds to wake me up or to tell me that the timer is finished. It makes the sound on Apple Watch very strong after that. For example, when you re

  • the screen is turning and turning gray

    My screen jumps and starts fading to gray or completely black.

  • Microsoft Arc Touch Mouse will do nothing

    I went through all of the suggestions posted previously in the past problems with the Microsoft Arc Touch mouse, but nothing works. I went through all the steps in the troubleshooting provided guides, but still nothing. The IntelliPoint software inst