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

Re: Formatting issue with HTML and TEXT output method

Subject: Re: Formatting issue with HTML and TEXT output method
From: "Senthilkumaravelan K" <skumaravelan@xxxxxxxxxxxxxx>
Date: Thu, 17 Jul 2008 08:28:01 -0700
Re:  Formatting issue with HTML and TEXT output method
Hi Abel,
We have an two xslt, one produces the HTML  output and other produces
the text output for the same xml data.
My xml data has more nodes than I have given in my last example.

Always <cond> node has html content as text node value .
When We render it in html output, base on the formatting elements
being used in html tag
it get displayed properly.

In case of text output,  I loose the formatting attributes of the html
content in the <cond> for the text output method.

Hope I am clear in my question.

Regards,
Senthil

On Thu, Jul 17, 2008 at 12:50 AM, Abel Braaksma <abel.online@xxxxxxxxx> wrote:
> Senthilkumaravelan K wrote:
>>
>> When we write xslt one with "html" as output method and text as output
>> method.
>>
>> for html out method am using
>> <xsl:value-of select="//cond">
>>
>> text output method
>> <xsl:copy-of select="//cond">
>>
>>
>> How to make the text xslt output like formatted text output pretty
>> with alignment.
>
> Hi Senthil,
>
> Text output does what you say it does: it outputs text. No tags, no PI's, no
> comment nodes, just text. It also won't indent. This is per the spec and
> quite obvious when you come to think of it: with text you are in control
> yourself, 100%, so adding whitespace would be a violation of that principle.
>
> Using value-of on a full document (why are you using //?, you could just as
> well use the absolute path) with output method set to html will only include
> the whitespace that is inside the nodes and will not add any extra
> whitespace. This is basically the same as not using any templates at all:
> the default template of any XSLT does exactly that.
>
> Q: what are you after? Can you give an example of what you want so we could
> help you get there, with or without text output?
>
> HTH,
> Cheers,
> -- Abel --

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.