Unused XML Tags in InDesign CS2.....

Hi all,
Using Javascript i need to generate a report for all unused XML Tags in InDesign CS2.
Please help it is very urgent...
Thanks in advance...
Regards
Subha

Hi,
John Hawkinson thank you so much your suggestion.
I am new  this type of discusion (on this page). So i think anybody could not replay my answer. So i repost my question.
I want insert tags in my Indesign CS4 files. Is this posible when i select my powermath equaiton then run script. Script add tags automatically before/after my equation. Please ignore IDML word.
Yes i an comfortable with XSLT presently i working with Pearson ETMV2.
I have one more question when i past my snapshot its appear properly but when i agin see my commant then my snapshot disappear (see small blue rectangle).
Thank you John again i am new in this industry please guide.
snegig

Similar Messages

  • How to Find the XML Tag in indesign

    HI!!<br /><br />We are working with XML work flow in indesign. In indesign how could we find the XML Tag in indesign.<br /><br />Example::<br />In the Below list we could have to find the xml tag <chapter> in story editor or in the main text frame in indesign using find option. Kindely sent if any Plugins is available.<br /><br />For exmaple:<br />************<br /><book><br /> <part><br /> <chapter><br />  <head><br />   <para><br />    <bold><br /><br />Thanks,<br />C.K.Venkatesan

    I imported the xml file in vb.net. now i want to find the number of pages and no. of elements. i found out it. but i was not able to find which elements are placed in which page. i want that information. plz kindly help. i am using vb.net. for eg. <ce:figure> placed in which page no., <ce:sections> placed in which page no., etc..,

  • Attaching XML tags to paragraphs (CS2/VB)

    Hi everybody,
    I need to build an Indesign document from several Word documents, attach XML tags to those document parts and also to retain Word's paragraph styles.
    I use temporary textframes and copy & paste to put the Word stuff together into one large textframe. Works fine so far. Paragraph styles remain intact:
    InDesign.XMLElement xch = root.XMLElements.Add("XML_" + Convert.ToString(cnt), "");
    InDesign.InsertionPoint ip = (InDesign.InsertionPoint)txt.InsertionPoints.LastItem();
    ip.Select(InDesign.idSelectionOptions.idReplaceWith);
    id4.app.Paste();
    But as soon as I call Markup() to add the XML tag to this part of the document, all paragraph style information gets lost:
    ip.Markup(xch);
    This is most certainly some kind of RTFM error, but since there's no really detailed documentation for scripting (at least I couldn't find one yet - hints are welcome), I'm stuck.
    Thanks a lot.
    Hans

    Hi Hans,
    The InDesign CS2 Scripting Guide and Scripting Reference PDFs are on your InDesign CS2 installation CDs.
    Many things in scripting did not change between CS2 and CS3--and there are more XML examples in the CS3 version of the Guide (though you should note that CS2 does not have the XML rules feature at all). You can find the InDesign CS3 Scripting Guide: VBScript at:
    http://www.adobe.com/products/indesign/xml_scripting.html
    (you'll need to click the Scripting Resources tab to get to the relevant page)
    The Markup.vbs example script (a fragment is shown on page 119 of the Guide; you can find the full script in the associated Zip archive of scripts) shows you the general approach to marking up page items or text. The basic form is:
    Rem Where "myXMLElement" is a reference to an XML element
    Rem and "myText" is a reference to a text object...
    myXMLElement.markup myText
    Here's a more complete script (VBScript form):
    Rem MarkupText.vbs
    Rem An InDesign CS2/CS3 VBScript
    Rem
    main
    Function main()
    Rem Use "InDesign.Application.CS2" to target CS2
    Set myInDesign = CreateObject("InDesign.Application.CS3")
    mySetup myInDesign
    mySnippet myInDesign
    End Function
    Rem mySetup function creates an example document.
    Function mySetup(myInDesign)
    Set myDocument = myInDesign.Documents.Add
    Rem Create some paragraph styles.
    Set myBodyText = myDocument.ParagraphStyles.Add
    myBodyText.Name = "BodyText"
    Set myHeading = myDocument.ParagraphStyles.Add
    myHeading.Name = "Heading"
    myHeading.PointSize = 24
    Rem Add XML elements
    Set myRootXMLElement = myDocument.XMLElements.Item(1)
    Set myXMLTag = myDocument.XMLTags.Add("xml_element")
    Set myXMLElementA = myRootXMLElement.XMLElements.Add(myXMLTag)
    Rem Create a text frame
    Set myTextFrame = myDocument.Pages.Item(1).TextFrames.Add
    myTextFrame.GeometricBounds = myGetBounds(myDocument,myDocument.Pages.Item(1))
    myString = "This is the first paragraph in a text frame." & vbCr
    myString = myString & "This is the second paragraph in a text frame." & vbCr
      myString = myString & "This is the third paragraph in a text frame." & vbCr
      myString = myString & "This is the fourth paragraph in a text frame." & vbCr
    myTextFrame.Contents = myString
    Rem Use ApplyParagraphStyle in CS3.
    myTextFrame.Texts.Item(1).ApplyStyle myBodyText
    myTextFrame.Paragraphs.Item(1).ApplyStyle myHeading
    End Function
    Rem mySnippet shows how to use the XMLElement.Markup method.
    Function mySnippet(myInDesign)
    Set myDocument = myInDesign.Documents.Item(1)
    Rem Have to associate the Root XML element with the story
    Rem before associating child elements.
    myDocument.XMLElements.Item(1).Markup myDocument.Pages.Item(1).TextFrames.Item(1)
    Rem Now we can associate XML elements with individual paragraphs.
    Set myXMLElement = myDocument.XMLElements.Item(1).XMLElements.Item(1)
    Set myText = myDocument.Pages.Item(1).TextFrames.Item(1).Paragraphs.Item(1)
    myXMLElement.Markup myText
    End Function
    Rem Utility function for getting the bounds of the "live" area
    Rem (the area inside the page margins) of a page.
    Function myGetBounds(myDocument, myPage)
    myPageWidth = myDocument.DocumentPreferences.PageWidth
    myPageHeight = myDocument.DocumentPreferences.PageHeight
    Rem Page.Side is a CS3 property. In CS2, use:
    Rem If myPage.DocumentOffset Mod 2 = 0 Then
    If myPage.Side = idPageSideOptions.idLeftHand Then
      myX2 = myPage.MarginPreferences.Left
      myX1 = myPage.MarginPreferences.Right
    Else
      myX1 = myPage.MarginPreferences.Left
      myX2 = myPage.MarginPreferences.Right
    End If
    myY1 = myPage.MarginPreferences.Top
    myX2 = myPageWidth - myX2
    myY2 = myPageHeight - myPage.MarginPreferences.Bottom
    myGetBounds = Array(myY1, myX1, myY2, myX2)
    End Function
    As to style information getting lost--it probably has to do with your Tag to Style/Style to Tag mapping. The above script demonstrates that it is possible to mark up text without losing the style.
    You might also consider using tag to style or style to tag mapping after pasting the text from Word.
    Hope this helps!
    Thanks,
    Ole

  • Add xml Tags in Indesign CS4 by Apple/Java script

    Hi,
    All, I'm new to Indesign Scripting, and I'm hoping someone can help me with the following add xml tags in my xml indesign cs4 files.
    I have IDML (ETMV2) xml Indesign CS4 files. But i have lots of powermath equation without xml tags. So i want how i can insert xml tags.
    My probleam like this =>
    <no open xml tags>[&x^{2}+y_{3}&]<no close xml tags>
    I want like this (But i do manualy)
    <inlineequation><inlinemediaobject><textobject role="xpressmath">[&x^{2}+y_{3}&</textobject></inlinemediaobject></inlineequation>
    Can anyone write/suggest me how i can add xml Tags. By Apple/Java Script
    Any insight is appreciated!
    snegig

    Hi,
    John Hawkinson thank you so much your suggestion.
    I am new  this type of discusion (on this page). So i think anybody could not replay my answer. So i repost my question.
    I want insert tags in my Indesign CS4 files. Is this posible when i select my powermath equaiton then run script. Script add tags automatically before/after my equation. Please ignore IDML word.
    Yes i an comfortable with XSLT presently i working with Pearson ETMV2.
    I have one more question when i past my snapshot its appear properly but when i agin see my commant then my snapshot disappear (see small blue rectangle).
    Thank you John again i am new in this industry please guide.
    snegig

  • Search for, edit, and delete XML tag (Adobe InDesign Server CS5)

    Hi all,
    I'm working with Indesign Server CS5 and JavaScript, though having some trouble coming up with a solution to a problem...
    I need to build a JS script (called through SOAP) that will enable me to search an InDesign file for a given XML tag.
    Upon finding the XML tag, if the 'action' variable is set to delete, it should delete the tag and its contents.
    If the action is set to edit, it should change the contents of the tag to some user-specified content.
    The primary caveat is that the XML tag is variable, as is the XML structure of the InDesign file.
    Here's what I have in mind, in pseudocode:
    function findXMLTag(tag, action) {
         app.searchForTag(tag);
         if (tagIsFound) {
              if (action == "delete") {
                   tag.delete;
              } else if (action == "edit") {
                   tag.contents = "Updated content";
    Any help would be greatly appreciated!
    Thanks,
    Ben Kay

    'searchForTag' can be implemented as a recursive function.
    Recursion is defined like this: I thought, "I'll just search this forum for 'recursion'." The first post I found was one of my own, suggesting that the poster should search the forum for 'recursion'.
    Here is an example: find the XML Element [<email>]
    And another: Remove xml element using JS[CS3] (read carefully, as the OP got stuck on how to successfully remove an element and continue)
    And one, using XML Rules -- which I'm totally unfamiliar with, but may work for you: Changing Values in XML tags

  • How to reveal XML tags in InDesign CS5.5?

    I'm trying to tag a business catalog for an XML export. I've never done it before - but our sister company has done the same task with a similar catalog. I can view their catalog in InDesign CS5.5 for Windows over a VPN connection in order to see how they tagged their catalog.
    I'm doing this task on a Mac using InDesign CS4. The interfaces are not the same. The biggest problem is the sister company is in Czech and so is InDesign. I need to open the tags pane. On the Mac, its just "Window>>Tags." There is a "Window" (Okna) menu, but I'm not seeing a "Tags" choice. I have the structure open, but I want to see all the little colored tags. How do I reveal these on the Windows CS5.5 version?
    Thanks

    Wouldn't it be View > Structure > ... ?

  • Unused xml tags being printed in xsl transformation

    Hi,
    I'm just starting out with xslt, and I am have a small problem with unused data being added into the html output from an xsl transformation. The data set is very small and the transdorm is not complicated, but when I do a
    <xsl:template match="aa/bb/cc">
    <title><xsl:value-of select"."/></title>
    </xsl:template>
    cc will be used as the title, but aa/bb/dd and aa/bb/ee will be printed to the output stream directly after the </title> as standard text.
    <title>cc</title>ddee
    I have include the xml, the transform and the html source recieved at the end of this mail.
    Any help would be appreciated.
    Cheers
    Simon
    <webpage>
      <project>
        <title>Katrin</title>
        <version>Version 1.0</version>
        <start_date>01/01/2003</start_date>
      </project>
    </webpage>
    <xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:fo="http://www.w3.org/1999/XSL/Format">
        <xsl:output method="html"/>
        <!-- template rule matching source root element -->
        <xsl:template match="/">
            <html>
                <head>
                    <xsl:apply-templates mode="head"/>
                </head>
                <!-- Construct main body of page -->
                <body>
                    <xsl:apply-templates/>
                </body>
            </html>
        </xsl:template>
        <!-- Head -->
        <xsl:template match="webpage/project/title" mode="head">
            <title><xsl:value-of select="."/></title>
        </xsl:template>
        <!-- Body -->
        <xsl:template match="webpage/project/title">
            <h1><xsl:value-of select="."/></h1>
        </xsl:template>
        <xsl:template match="webpage/project/version">
            <div align="right" style="font-size : 8pt; font-family : Times serif; padding-top : 4; padding-bottom : 4; color : red"><xsl:value-of select="."/></div>
        </xsl:template>
        <xsl:template match="webpage/project/start_date">
            <div align="left" style="font-size : 8pt; font-family : Times serif; padding-top : 4; padding-bottom : 4; color : blue"><xsl:value-of select="."/></div>
        </xsl:template>
    </xsl:stylesheet>
    <html xmlns:fo="http://www.w3.org/1999/XSL/Format">
       <head>
          <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
          <title>Katrin</title>Version 0.101/01/2003</head>
       <body>
          <h1>Katrin</h1>
          <div align="right" style="font-size : 8pt; font-family : Times serif; padding-top : 4; padding-bottom : 4; color : red">Version 0.1</div>
          <div align="left" style="font-size : 8pt; font-family : Times serif; padding-top : 4; padding-bottom : 4; color : blue">01/01/2003</div>
       </body>
    </html>

    You had a couple of errors in your xsl. It should read something like:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:template match="*|/"><xsl:apply-templates/></xsl:template>
    <xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>
    <xsl:template match="*|/">
    <html>
    <head><title>Greeting</title></head>
    <body>Words of greeting:
    <b><i><u><xsl:value-of select="greeting"/></u></i></b>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    This produces the result you are looking for:
    <html>
    <head>
    <title>Greeting</title>
    </head>
    <body>Words of greeting:
    <br>
    <b>
    <i>
    <u>Hello World.</u>
    </i>
    </b>
    </body>
    </html>
    null

  • Add xml Tags by Apple/Java script

    Hi,
    All, I'm new to Indesign Scripting, and I'm hoping someone can help me with the following (add xml) problem.
    Can anyone write/suggest me how i can add xml tags. By Apple/Java Script
    My Probleam =>
    [&x+2, y+3&]
    Solution => (But its manual)
    <inlineequation><inlinemediaobject><textobject role="xpressmath">[&x+2, y+3&]</textobject></inlinemediaobject></inlineequation>
    I want add xml tags on my powermath equaiton. Its ETMV2 xml tags.
      Any insight is appreciated!
    Thank you so much
    snegig

    Hi John,
    (1) Without xml tags my InDesign file
    (2) After add tags my file (its manually)
    Is this any script when i select my power math equation data then add xml tags automatically
    Thank's any suggestion

  • XML in InDesign CS2 and Visual Studio 2005

    Hello!
    A year ago I made a plug in to InDesign CS1 with the purpose of importing an XML file and create a lay outed table of its contents. The reason I choose to make a plug in was because I didn't find InDesign very dynamic in its XML support.
    Now I'm being asked to do a similar but more complex solution for InDesign CS2, which I never used before, and I understand a lot has happened since CS1.
    How is the XML support in CS2 now a days?
    And by the way, is there any problems with Visual Studio 2005 and the InDesign SDK that you know of?
    Best Regards
    Kristoffer

    I'm sorry, I posted this thread in the wrong area. I will repost in the InDesign SDK area. My bad.
    Best Regards
    Kristoffer

  • How to find the selection character is xml tag or not?(CS2-js)

    I have a xml tagged indesign document, when i select a tag in paragraph i cant able to find it as xml tag, it only shows me the character contents as small box, is there any way to find the selected item is xml tag or not ?
    thanks
    subha

    I have a xml tagged indesign document, when i select a tag in paragraph i cant able to find it as xml tag, it only shows me the character contents as small box, is there any way to find the selected item is xml tag or not ?
    thanks
    subha

  • How to set xml tag to nothing in indesign using applescript?

    Hi guys,
    I need set xml tag to nothing(for tables)  in indesign using applescript.
    Please help me.

    Hi,
    tell application "Adobe InDesign CC 2014"
        tell active document
            if (count of story) > 0 then
                tell story 1
                    if (count of tables) > 0 then
                        tell table 1
                            set tag_name to associated XML element ----------------> i can't get xml  tag, i am receiving the  xml tag is nothing.
                            if (tag_name = nothing) then
                                display dialog ("This table has no tag")
                            else
                                set markup_tag to markup tag of tag_name
                                set n to name of markup_tag
                                display dialog ("Tag name is " & n)
                            end if
                        end tell
                    end if
                end tell
            end if
        end tell
    end tell
    I can't get xml tag for table,  i am received nothing

  • InDesign crashes when I add xml tag

    I have some groups (image + text) inside text.
    When I try to add xml tags with a grep query InDesign crashes.
    If I try to manually add xml tag to the text in a group, for example "evitare l'umidità", InDesign give me a message error.
    I think it's a bug
    Here there is the document Dropbox - ProblemaTag.idml
    Thanks
    Ivan

    I haven't done a Book in CS6 yet, but I'm starting to wonder if there might be some sort of bug (not extremely likely, but....) that's new. We had another post yesterday where ID crashed when trying to move a particular file into the chapter 5 position.
    Can you add this file first, then move it to the correct spot after the other files are added?

  • How to display xml attributes in Layout (indesign cs2)

    Hi,
    Javascript
    Indesign CS2
    PC Version
    Any one tell me, i want to display the ids in the margin. i read xml attribute, but i didn't know how to display to the margin. Help me.

    One way of doing that is to use JDOM...
    u create an xml tree, and then output using XMLOutputter class...it will be displayed in text...im not sure if thats what u want...however, if u do want to represent it visually then u may need to draw a tree...u may use the Graphics2D for that...there are alot of ways to do such thing, and the 2 possibilities arent the best...depends on what u want...elaborate more pls.

  • Adobe InDesign CS5 Server JavaScript: Get rectangle by XML tag

    Hi,
    Current set-up:
    Adobe InDesign Server CS5 scripted through ExtendScript via PHP SOAP
    The problem:
    I'm currently placing an image file into a rectangle using the following code:
    frame     =   doc.rectangles[0];
    imgList   =   frame.place(new File(img));
    This works fine; the img file is placed into the rectangle as expected. However, this only refers to the first rectangle in the document: if I have two rectangles in the document, the image is placed into the last created rectangle.
    What I'd ideally like to be able to refer to the rectangle by its XML tag - something like:
    frame     =   doc.getRectangleByTag('Pic'); // <Pic> being the name of the XML tag
    imgList   =   frame.place(new File(img));
    Does anyone have any advice as to how this can be achieved? I realise this is rudimentary question, but am finding no joy after several hours of searching.
    Many thanks

    What I'd ideally like to be able to refer to the rectangle by its XML tag - something like: 
    frame     =   doc.getRectangleByTag('Pic'); // <Pic> being the name of the XML tag
    imgList   =   frame.place(new File(img));
    Are you sure you want to do it this way?
    Could you explain why? I suspect there is a better solution.
    In any case, at least in my test case, the XML tag is associated with the image inside the frame and not the frame itself. So if you want the frame, you must get the image associated with the tag and then go up to the parent. This works in a simple test:
    var frame =
        app.activeDocument.xmlElements[0].
        evaluateXPathExpression("//tennis")[0].
        graphics[0].parent;
    [object Rectangle]

  • [JS] Find & Replace attribute in xml tags (InDesign CS4)

    Hi all,
    Can anyone help me please who i can find and change attribute in xml tags (InDesign CS4) files. I have both link tags but its other attribute different but one attribute same. So who i can change attribute preference.
    (1) one is
    (2) second is
    I want change link preference = 0 but only (2 number,  second) screen shoot. First screen shoot preference = 1 as it is.
    I want this but its manually
    Help me please. Thank you so much adv.
    Regard
    snegig

    Hi John Hawkinson,
    Thank you so much for replay. I am try Jeff, absqua code technique it is simply greet. But my problem is that my both tags link preference = 1 same and other link attribute almost same. So i am unable to change attribute.
    John my code below =>
    var doc = app.activeDocument,
    attNodes = doc.xmlElements[0].evaluateXPathExpression("//link[@preference = '1' or @role = 'generated']"), i, l;
    for (i = 0, l = attNodes.length; i < l; i++) {
    attNodes[i].xmlAttributes.item("preference").remove();
    John please update my code.
    Thank you so much adv.
    Regard
    snegig

Maybe you are looking for