[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Control line breaks by xslt

Subject: RE: Control line breaks by xslt
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 1 Nov 2007 08:31:12 -0000
RE:  Control line breaks by xslt
Saying indent="yes" in xsl:output allows the processor to indent the output
any way it chooses. If you don't want that, don't specify indent="yes"; you
will then get no extra whitespace in the output unless you create it
explicitly using <xsl:value-of> or <xsl:text>.

If you want more intelligent formatting, you can use Saxon in schema-aware
mode, validating the output against a schema. It will then avoid applying
indentation to elements that are defined in the schema to have a mixed
content model, which seems to be the effect you are looking for here.

Michael Kay
http://www.saxonica.com/



> -----Original Message-----
> From: J. S. Rawat [mailto:jrawat@xxxxxxxxxxxxxx] 
> Sent: 01 November 2007 04:50
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Control line breaks by xslt
> 
> Hi Group!!!
> Can we control line breaks by xslt. My conversion processor 
> is Saxon.exe.
> 
> INPUT
> <note>
> <title>Nets Notes</title>
> <para><link linkend="nets_S2">NETS <emphasis 
> role="italic"><emphasis role="bold">S</emphasis></emphasis> 
> 2</link></para> </note>
> 
> OUTPUT
>           <box>
>              <title>Nets Notes</title>
>              <para>
>                 <xref pointer="nets_S2">NETS <i>
>                       <b>S</b>
>                    </i> 2</xref>
>              </para>
>            </box>
> 
> Desired OUTPUT
>           <box>
>              <title>Nets Notes</title>
>              <para><xref pointer="nets_S2">NETS <b>S</b> 
> 2</xref></para>
>           </box>
> 
> XSL
> <xsl:output method="xml" indent="yes"/>
> 
> thanks
> ...JSR

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.