5 Replies Latest reply on May 23, 2010 5:26 AM by metasonix

    Dreamweaver CS5 - XML tag closing error

    metasonix

      When creating/editing xml, tag closing (</ ...) is flawed. Mostly it closes the parent tag instead of the current one.

       

      Florian

        • 1. Re: Dreamweaver CS5 - XML tag closing error
          Randy Edmunds Adobe Employee

          When creating/editing xml, tag closing (</ ...) is flawed. Mostly it closes the parent tag instead of the current one.

           

          It seems to work correctly here. Can you provide an example of some markup that it is not working for you?

           

          Regards,

          Randy

          • 2. Re: Dreamweaver CS5 - XML tag closing error
            metasonix Level 1

            I updated Dreamweaver to V11 Build 4913 yesterday. Also I installed the HTML5 extension, and now the tag closing feature doesn't work at all anymore (XML). However it still works fine in XHTML which I usually work with.

            So tag closing is still enabled in the preferences and I haven't changed anything in the tag library editor.

             

            The xml I work with is really simplistic. Here a fragment:

             

            <?xml version="1.0" encoding="utf-8" standalone="no" ?>

            <gobal>
               
                <head>
                    <en>
                        <lang>switch to</lang>
                        <lang>german</lang>
                        <link>home</link>
                        <link>web design</link>
                        <link>graphics</link>
                        <link>music</link>
                        <link>contact</link>
                    </en>
                   
                    <de>
                        <lang>wechseln zu</lang>
                        <lang>englisch</lang>
                        <link>start</link>
                        <link>web design</link>
                        <link>grafik</link>
                        <link>musik</link>
                        <link>kontakt</link>
                    </de>
                </head>

             

            ...

            ...

            </global>

             

            The full xml also validates fine on w3.org


            Regards,

            Florian

            • 3. Re: Dreamweaver CS5 - XML tag closing error
              metasonix Level 1

              So I just uninstalled the extension and I'm back to the original problem.

               

              in the file fragment from before:

               

              <head>
                      <en>
                          <lang>switch to</lang>
                          <lang>german</lang>
                          <link>home</link>
                          <link>web design</link>
                          <link>graphics</link>
                          <link>music</head></link>
                          <link>contact</link>
                          </head>
                      </en>

              </head>

               

              The red stuff is what code hinting closes. It doesn't matter if the actual tag is closed or not.

               


              ... After writing this, I just played around some more and I figured the problem is with the length of <en> or <de> for that matter. As soon as your tag is only two letters long, it's not recognized as a tag by the engine.

               

              Florian

              • 4. Re: Dreamweaver CS5 - XML tag closing error
                David_Powers Adobe Community Professional

                metasonix wrote:

                 

                ... After writing this, I just played around some more and I figured the problem is with the length of <en> or <de> for that matter. As soon as your tag is only two letters long, it's not recognized as a tag by the engine.

                I don't think that's the cause. I have just done some testing with your XML in the latest build (with the HTML5 extension installed).

                 

                The problem lies in your choice of XML tags, some of which are the same as in HTML. It became clear when I used <link>. It automatically closed the <head> tag. Both <head> and <link> are used in HTML. The <link> tag must appear inside the <head>, and it is an empty tag (no closing tag).

                 

                I think you'll find that XML tag closing works properly if you change your naming convention to use tags that don't clash with HTML, or at least use tags that use both opening and closing tags.

                 

                Randy is a member of the Dreamweaver engineering team, so he can probably log a bug to get this sorted out for a future release.

                • 5. Re: Dreamweaver CS5 - XML tag closing error
                  metasonix Level 1

                  Funny that, when changed to non HTML tags it works properly with two letter tags.

                  However, if as you say it would be a clash of HTML / XML recognition, why should it work properly as soon as <en> is changed to <eng>...

                   

                  Florian