XSLTRANSFORM issue with WELLFORMED xml documents

Solution Verified - Updated -

Issue

  • XSLTRANSFORM doesn't work or return result with newline character. For example, below returns NULL due to new line character \n
select XSLTRANSFORM('<?xml version="1.0" encoding="utf-8"?>\n<a><b/></a>', '<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:template match="/"><xsl:copy-of select="/"/></xsl:template></xsl:stylesheet>')
  • Below returns result correctly.
select XSLTRANSFORM('<?xml version="1.0" encoding="utf-8"?><a><b/></a>', '<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:template match="/"><xsl:copy-of select="/"/></xsl:template></xsl:stylesheet>')

Environment

  • Red Hat JBoss Data Services (EDS) 5.3.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content