morbac / xmltools

XML Tools plugin for Notepad++
GNU General Public License v3.0
257 stars 57 forks source link

choose XSLT processor / transformer engine? #215

Open gbanksy opened 2 months ago

gbanksy commented 2 months ago

Could the transformer in use for XSLT become a user preference / option?

e.g. to be able to use Saxon-HE

Ref: https://github.com/Saxonica/Saxon-HE/

Reason is that the XSLT I am using is producing different results in XML Tools as compared to Saxon

The XSLT is supposed to concatenate first and last names into Full_Name

XML:

<?xml version='1.0' encoding='UTF-8'?><Name_Detail_Data>
  <First_Name>Percy</First_Name>
  <Last_Name>Prehn</Last_Name>
</Name_Detail_Data>

XSL:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="Name_Detail_Data">
  <!-- Output the child elements (First_Name and Last_Name), including both text and tags -->
  <xsl:copy-of select="*"/>
    <!-- For the full name, output the child elements (First_Name and Last_Name) text only -->
    <Full_Name>
      <xsl:value-of select="*"/>
    </Full_Name>
  </xsl:template>
</xsl:stylesheet>