Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 3rd, 2006, 01:29 AM
Registered User
 
Join Date: Jan 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kanchan_b
Default Extra line Break

I m trying copy the input as it is to the output using the following XSLT. But an extra linebreak is appearing for the comment.
----------------Input-------------------
<root>
<mapping sourcev ....>
 <keylist>
   ..
 </keylist>
....
-----------------Output--------------------
<root>
<mapping source=...>

  <keylist>
   ..
------------------XSLT-----------------------

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" media-type="text/xml"/>
   <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>


--------------------------------------------------

Awaiting your response. Thanks in advance

Happy Weekend
Kanchan

 
Old February 3rd, 2006, 09:11 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

When you specify indent="yes" the processor is allowed to add newlines wherever it wants.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Line Break in CrossTab timothyc Crystal Reports 0 March 12th, 2008 09:25 PM
line break Cyber Shiva HTML Code Clinic 1 May 17th, 2007 06:04 AM
Line break on mail sent Maxxim ASP.NET 1.0 and 1.1 Basics 3 September 4th, 2006 11:45 AM
line break problem XSLT 1 February 20th, 2006 11:18 AM
break up line crmpicco Javascript How-To 1 June 6th, 2005 06:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.