Node Elements Order in the structure pane

0

Learn / Forums / InDesign Add-ons (Scripts, Scripting, and Plug-ins) / Node Elements Order in the structure pane

Viewing 4 reply threads
  • Author
    Posts
    • #57155

      Hello everyone,
      First of all congratulations for the quality of posts.

      This is my question:
      I have a document with some text frames manually tagged. The aim is to export the xml.
      The order of nodes in the structure pane is different from the “visual” order of text frames on the page.

      Is there a way to reposition text frames to match the order of structure pane nodes with the order of text frames on the page?

      I understood that the order of nodes depends on the timeline of creating objects on the page.

      I hope I've explained myself well.

      Thanks to all

    • #57164

      Marco

      Not sure whether you are trying to make the text frames reflect the node order of the xml or the node order of the xml to reflect the text frame order of the document. Are you wanting the xml to cascade in the order of the text frames on a page top to bottom? It might help to describe what you are trying to do.

      Is there a way to reposition text frames to match the order of structure pane nodes with the order of text frames on the page?

    • #57181

      Thank you,

      I want the node order of the xml reflect the text frame order of the document, top to bottom, left to right as you say.

      I thought about a script that cut and paste in place each text box, starting from top left to restore the order of creation. Then i can redo the tagging and the nodes will respect the order of layout position…but I have little knowledge of scripting.

      Any ideas?

    • #57190

      I am fairly new to InDesign’s XML so take what I say with a large pinch of salt.

      Moving the placement of text frames in the layout will not shift the content in the xml structure. However juggling the some elements within the XML structure using the Structure View will change the order of the XML and MAY affect the placement of content.

      This is because InDesign tags not only content but also the objects that contain content, these have special meaning for InDesign. If you look at the XML in the Struture Pane you will see different icons for different 'types' of XML elements. Text frames or threaded text frames (which are treated as one XML element) by default are usually called 'story'.

      My experience is that you can shift elements around in the XML structure without moving things in the layout — as long as you avoid moving things at the text element level eg. elements that contain sentences or words. If these are moved elements will change relationship in the page layout.

      As an example. You have a 4 page spread in a magazine layout. The main content is in a threaded set of frames. The pages also contain photographs and captions which were imported much later in the design process. At the end of the editing process, you map paragraph and text styles and tag your photographs.

      Everywhere text is autotagged the text frame/s will also be tagged with an InDesign XML story element. Wherever there is tagged text it will be enclosed within the story xml element, which you can rename, but it remains a story element. The large threaded story will show up contained within one long story element, your captions which are tagged will show up in different parts of the xml structure in story elements and the photograph details will be in photo or image elements.

      You can now manipulate the XML, create a new element and pull all of the tagged elements of 4 page spread into this new element and order the story and other element to the way you want them to appear in the XML output, even placing elements such as images and other 'story' elements within the flow of enclosing story elements all without changing the appearance of the layout. As long as you do not move text elements around, the appearance of the page layout will not change but exported XML will have the same structure you see in the structure pane.

      This is my experience, big caevat, I have not had any experience with XML tables in InDesign.

      Essentially you manage two separate documents, one is the page layout, the other XML layout. You cannot juggle the page layout to affect the XML structure, you can, within restrictions, juggle the XML around without affecting the page layout.

    • #96406

      Hi,

      sorry for waking an old thread, but this might be useful for others struggling with dynamically filling text and what determines the proper filling order.

      I had a similar problem as you described and xml nodes were populated with text programatically through InDesign API using C#. I was actually trying to adjust the node filling to match the visual order of the elements on the page (each dynamic text element was in its own frame) but then I found a way of handling it by ordering the layers using the layer pane to match the node order.
      To conclude: as Frederick said, the visual order on the page layout doesn’t have much to do with node layout.
      You actually have to match the layer order with the node order, but keep in mind that the layer order is in reverse sequence from XML nodes.

      Hope this helps.

      Cheers

Viewing 4 reply threads
  • You must be logged in to reply to this topic.
>