9 Replies Latest reply on Feb 11, 2015 1:14 AM by Comms Mike

    Issue with paragraph style changing after deleting element

    Comms Mike

      Hi,

       

      I've setup a text frame that imports an xml file (based on a number of products and prices listed under different categories) and applies a number of paragraph styles.

       

      I positioned my tags using the story editor and when importing the xml everything displays exactly how I intend it to. The issue is when I delete one of the categories - once deleted it changes the paragraph style at the end of the story editor leaving unwanted styling. (replaces the paragraph style "subcategories" with "subcategory_title")

       

      The "subcategory_title" style is the first style in the structure. When I delete a subcategory I am deleting it using the structure panel rather than deleting within story editor (this is because there will eventually be a large number of subcategories so it would be easier to use this)

       

      After a fair bit of searching through my styles and structure I can't come up with a solution...is there a fix to this? (I have attached images of before and after the deleting process below)

       

      1-preview.jpg

      1-structure.jpg

      2-wrong preview.jpg

      2-wrong structure.jpg

        • 1. Re: Issue with paragraph style changing after deleting element
          MW Design Level 4

          It would be helpful if you could ZIP up the example and upload it to dropbox.com or what have you and provide a link. I generally do all my editing in the XML. Even so, I cannot remember that happening.

           

          Mike

          • 2. Re: Issue with paragraph style changing after deleting element
            Comms Mike Level 1

            Cheers for your reply, I have uploaded a copy of the indesign file as well as the xml file.

             

            https://www.dropbox.com/sh/zzs03wd13ucx6f7/AADROLE8QDJTluqO-QYqp82La?dl=0

             

            Give me a shout if you need any more information on the file or the structure I've used.

            • 3. Re: Issue with paragraph style changing after deleting element
              MW Design Level 4

              Thanks for the files.

               

              It took a while to replicate the issue, but I couldn't replicate the problem via the Structure Pane at all, I had to accidentally miss something inside the Story Editor (which I never use for XML per se). so I may not be understanding the problem you are experiencing correctly.

               

              I added a couple sub-categories so I had more to play with. And I numbered them 1-4. I have the second sub-category selected in the Structure Pane.

               

              capture-002627.png

               

              And this is following pressing the delete key:

               

              capture-002626.png

               

              Mike

              • 4. Re: Issue with paragraph style changing after deleting element
                Comms Mike Level 1

                Thanks for taking a look, strange that you're not coming across the same issue. As mine seems to leave the "subcategory_title" tag behind leaving the unwanted box.

                 

                If you were to delete the last subcategory from the structure does the styling still act correctly for you?

                 

                Regards,

                Mike

                • 5. Re: Issue with paragraph style changing after deleting element
                  MW Design Level 4

                  Hi Mike,

                   

                  Naw, deleting the last element was the first thing I tested. Here's fresh screen shots with (still 4 elements) with the last element being deleted, and post delete.

                   

                  capture-002628.png

                   

                  capture-002629.png

                   

                  I also retried it with your original XML, same result.

                   

                  I'll keep looking at it a bit and see if I can force the problem again.

                   

                  Mike

                  • 6. Re: Issue with paragraph style changing after deleting element
                    Comms Mike Level 1

                    Hi Mike,

                     

                    Have you ever come across tags randomly duplicating information after importing an XML file?

                     

                    The structure of the document pretty much follows what I had above (with the addition of a couple of parent elements)

                     

                    Have pulled in my real data and it autoflows and formats on the pages correctly...the first 3 subcategories display as expected, but once it gets onto page 2 indesign appears to duplicate 1 particular product constantly at the end of each subcategory.

                     

                    I have checked my XML file and every tag is laid out exactly how I wanted it to be; I've checked my styles and found no irregularities there either. Had a look round the forum and not found any suggestions to what could cause this.

                     

                    Cheers,

                    Mike

                    • 7. Re: Issue with paragraph style changing after deleting element
                      MW Design Level 4

                      Hi Mike,

                       

                      I'll try a larger sample file, but in general, no I haven't had the dup issue. If I cannot replicate it, if you are willing to, it may take your actual XML file to do so. Because I suspect it is confidential, do consider sending a private message with a download link to it.

                       

                      But first I'll give it a whirl here with a much larger file. The give a heck is that I'll only really be able to make it larger by duplication of elements in the test file and so may not be apples to apples.

                       

                      I'll be back with a report in a bit.

                       

                      Mike

                      • 8. Re: Issue with paragraph style changing after deleting element
                        MW Design Level 4

                        Hi Mike,

                         

                        If by "indesign appears to duplicate 1 particular product constantly at the end of each subcategory" as meaning what is between the <product> tags, I am not seeing that here with my test file. I modified the test file so there were varying numbers of <product> in each Sub Category. I cannot see any duplication.

                         

                        It likely is going to come down to either something malformed in the XML or gremlins. I'm having one of those days that is one step forward, two steps back myself for seemingly no reason. But there will be a reason I have yet to discover.

                         

                        Point being, if you would like me to take a look, I think I am going to need the actual XML and your ID template.

                         

                        Mike

                        • 9. Re: Issue with paragraph style changing after deleting element
                          Comms Mike Level 1

                          Thanks for your reply Mike,

                           

                          I'll continue to try find the error myself for now; but will bear that in mind. I have since found if I alter my XML import options to delete parts of the structure that don't match up then the data reacts fine, though the downside to this is that extra tags I've setup do get removed so will look to add these into my XML structure.

                           

                          Must admit this forum has been brilliant in helping to develop my knowledge within inDesign.

                           

                          Cheers,

                          Mike