Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-1469

XSLT - Transformation with usage of default TransformerFactory does not work if namespaces are used without prefixes.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • M1, jboss-fuse-6.2
    • jboss-fuse-6.1
    • None
    • None
    • % %
    • Hide

      Route:

      <to uri="xslt:migration.xsl"/>
      

      XSLT stylesheet:

      migration.xsl
      <xsl:stylesheet version="1.0"
      	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns1="http://ws.legacy.jboss.org/">
      <xsl:template match="@*|node()">
         <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
         </xsl:copy>
      </xsl:template>
      </xsl:stylesheet>
      

      input:

      <name xmlns="my-namespace">Martin</name>
      

      output:

      < xmlns="my-namespace">Martin</>
      

      workaround: use saxon transformer factory (option saxon=true)

      <to uri="xslt:migration.xsl?saxon=true"/>
      
      Show
      Route: <to uri= "xslt:migration.xsl" /> XSLT stylesheet: migration.xsl < xsl:stylesheet version= "1.0" xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" xmlns:ns1 = "http://ws.legacy.jboss.org/" > < xsl:template match= "@*|node()" > < xsl:copy > < xsl:apply-templates select= "@*|node()" /> </ xsl:copy > </ xsl:template > </ xsl:stylesheet > input: <name xmlns= "my-namespace" > Martin </name> output: < xmlns= "my-namespace" > Martin </> workaround : use saxon transformer factory (option saxon=true) <to uri= "xslt:migration.xsl?saxon=true" />

    Description

      Transformation with usage of default TransformerFactory does not work if namespaces are used without prefixes.

      Attachments

        Activity

          People

            ggrzybek Grzegorz Grzybek
            mbasovni Martin Basovnik (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: