Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] Control line breaks by xslt

From: "Michael Kay" <mike@------------>
To:
Date: 11/1/2007 8:32:00 AM
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: [xsl] 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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent