Skip to content

Unexpected output when transforming #74

@boozedog

Description

@boozedog

XML:

<?xml version="1.0" encoding="UTF-8"?>
<problem/>

XSLT:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/problem">
    <div>
      <div>
        <table>
          <tr>
            <th>A</th>
            <th>B</th>
            <th>C</th>
          </tr>
          <tr>
            <td>AA</td>
            <td>BB</td>
            <td>CC</td>
          </tr>
        </table>
      </div>
    </div>
    <div>
      <div>
        should be below table rite??!
      </div>
    </div>
  </xsl:template>
</xsl:stylesheet>

output (pretty-printed for legibility):

<div>
  <div>
    <table>
      <tr>
        <th>A</th>
        <th>B</th>
        <th>C</th>
      </tr>
      <tr>
        <td>AA</td>
        <td>BB</td>
        <div>CC<div>
            should be below table rite??!
          </div>
        </div>
      </tr>
    </table>
  </div>
</div>

Is there something wrong with my XSLT? Somehow the CC ends up in a <div> tag.

I'm using xslt-processor@2.0.0 on node@18.16.1

Thanks!

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions