none
XSLT - End tag 'xxxx' does not match the start tag

    Question

  • Hi

    Does anyone who why i get this message from msxsl.exe ?

    URL:    file:///D:/Projects/XLSTProcessing/sample.xsl
    Line:   29
    Column: 3
    End tag 'body' does not match the start tag 'br'. The html this came from displayed OK..

    I thought it was perhaps due to some bug because <br> is allowed to exist by itself, i.e. it does not need a <br />
    However if i remove all <br>'s i just get another similar error .

    Thanks in advance

    <xsl:stylesheet version="1.0"
                   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:date="http://exslt.org/dates-and-times"
                    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
                    extension-element-prefixes="date msxsl">
    
      <!-- This file is to format bugzilla output into release notes in html -->
    
      <xsl:output method="html"/>
     
    <html>
    <head>
      <title>MyTest</title>
    </head>
    <body>
    <span
     style="font-weight: bold; text-decoration: underline; color: rgb(51, 51, 255);">This
    is the header</span> <br>
    <br>
    The details are <br>
    <br>
    <hr style="width: 100%; height: 2px;">
    <br>
    Other stuff here<br>
    <br>
    <hr style="width: 100%; height: 2px;">
    <br>
    OK Done
    </body>   <===  Error here, line 29 
    </html>
    
     
    </xsl:stylesheet>
    NB: msxsl.exe  showing as 3.0 version

    Friday, September 27, 2013 6:05 AM

Answers

  • Yes, I download it and test, and have the same error output.

    So it should an issue as you mentioned.

    And I highly recommend we use proess the XSL file by hand beause it is more control as I said at anther post.

    Reagrds.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Greg B Roberts Wednesday, October 02, 2013 11:08 AM
    Wednesday, October 02, 2013 9:57 AM
    Moderator

All replies

  • Hello,

    I copy the code and change it to be below, and it works fine.

    <xsl:stylesheet version="1.0"
    
                   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    
                    xmlns:date="http://exslt.org/dates-and-times"
    
                    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    
                    extension-element-prefixes="date msxsl">
    
    
      <!-- This file is to format bugzilla output into release notes in html -->
    
    
      <xsl:output method="html"/>
    
      <xsl:template match="/">
    
        <html>
    
          <head>
    
            <title>MyTest</title>
    
          </head>
    
          <body>
    
            <span
    
             style="font-weight: bold; text-decoration: underline; color: rgb(51, 51, 255);">
    
              This
    
              is the header
    
            </span>
    
            <br>
    
              <br>
    
                The details are <br>
    
                  <br>
    
                    <hr style="width: 100%; height: 2px;">
    
                      <br>
    
                        Other stuff here
    
                        <br>
    
                          <br>
    
                            <hr style="width: 100%; height: 2px;">
    
                              <br>
    
                                OK Done
    
                              </br>
    
                            </hr>
    
                          </br>
    
                        </br>
    
                      </br>
    
                    </hr>
    
                  </br>
    
                </br>
    
              </br>
    
            </br>
    
          </body>
    
        </html>
    
      </xsl:template>
    
    </xsl:stylesheet>
    

    The html needs be in the <xsl:template>…</xsl:template>

    Regards.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, September 30, 2013 9:09 AM
    Moderator
  • I added these and same issue, NB: i am using msxls.exe 

    I wonder if it is an encoding issues ?

    I have placed a zip file here with the input and the result.

    http://sdrv.ms/15EwZ2L

    D:\Projects\XLSTProcessing>msxsl sample_test.trx  sample.xsl -xw -v -o sample.ht
    m

    Error occurred while parsing document.

    Code:   0xc00ce56d
    URL:    file:///D:/Projects/XLSTProcessing/sample.xsl
    Line:   30
    Column: 3
    End tag 'body' does not match the start tag 'br'.

    Thanks

    Monday, September 30, 2013 1:44 PM
  • Yes, I download it and test, and have the same error output.

    So it should an issue as you mentioned.

    And I highly recommend we use proess the XSL file by hand beause it is more control as I said at anther post.

    Reagrds.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Greg B Roberts Wednesday, October 02, 2013 11:08 AM
    Wednesday, October 02, 2013 9:57 AM
    Moderator
  • Thanks

    I am developing an automated script so hand procesing is not an option.

    Wednesday, October 02, 2013 11:09 AM