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 January 6th, 2005, 04:24 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default Content Alignment

I am doing web application for Phone Device.Its resolution is 300 * 200 pixels.I am using XSLT for converting inout XML to HTML and display on the aspx page.This web app. shows News ,stocks info.This is like normal navigation.On click of menu news in the landing page,shows the news listings ,on click of listings shows the headlines story.Here comes the problem.As the screen height is 200 ,we cant show full story.So I am doing paging by extracting only subset of the total characters that fits into the screen.But in display it looks ugly like this

NEW YORK - Robert DE Niro,
BarBara Walters,David
RockeFeller and other members
meetings....

Is it possible to make the content aligned properly that fits height of the screen like below

NEW YORK - Robert DE,
BarBara Walters,David
RockeFeller and other
members meetings....

Can anyone pls send some suggestions for my problem?

 
Old January 6th, 2005, 06:48 PM
Authorized User
 
Join Date: Nov 2004
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to jkmyoung
Default

You could use recursive templates to break it down to a set number of characters per line. If you want to be more complicated and make it look nicer I suppose you could break it down only at the spaces..

Find a space around the 20-25th character of the string, truncate it, add a <br/> tag, and send the remaining string recursively to the function.

would probably require using some of the xpath string functions
http://www.w3schools.com/xpath/xpath_functions.asp


 
Old January 10th, 2005, 01:29 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

Thanks for the reply...
Breaking down only at the spaces also wont solve the problem.It looks the same as the first result.
Is there any function to make the content alignment like in word.

 
Old January 11th, 2005, 09:01 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

Hi Solved the problem.Thanks..
Put the content inside the <Span> tag for display.So justify was not working..






Similar Threads
Thread Thread Starter Forum Replies Last Post
Choosing content depending on content of other ele dsekar_nat XSLT 1 February 27th, 2006 05:58 AM
alignment craziness liquidmillsap HTML Code Clinic 0 June 20th, 2005 12:09 PM
alignment p_gauri7 Crystal Reports 0 May 9th, 2005 01:16 PM
text-alignment anshul HTML Code Clinic 5 July 18th, 2004 01:49 PM
Form alignment cpopham Access VBA 3 January 2nd, 2004 07:21 PM





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