Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

xsl:copy-of output without linebreak

Attackwave ORDIXDec 7 2011 — edited Dec 7 2011
Hi,

I have trouble with the copy-of element. If I try to output a node fragment then the output is done with linebreaks. How can I do this without breaks?

XML:
<MESSAGE><USERCONTENT><b101>Hello World</b101><l100>Line1</l100></USERCONTENT></MESSAGE>

XSL:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" version="1.0"/>

<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="USERCONTENT">
<xsl:copy-of select="node()"/>
</xsl:template>

</xsl:stylesheet>

OUTPUT ACTUAL:
<b101>Hello World</b101>
<l100>Line1</l100>

OUTPUT TARGET:
<b101>Hello World</b101><l100>Line1</l100>


Attack
This post has been answered by odie_63 on Dec 7 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 4 2012
Added on Dec 7 2011
4 comments
398 views