Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 7th, 2007, 09:49 AM
Authorized User
 
Join Date: Oct 2006
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Format Merged Lines

I'm really hoping someone can help with this..

I am using infopath published to a sharepoint library. One of the columns contains the values of a repeating table merged together when published.

In Sharepoint Designer I've convertedt the view to xslt in order to format some of the columns.

The merged column looks like this:

2007-08-12T00:00:00
2007-08-02T00:00:00

And the code behind it is:

<div dir="{ddwrt:GetVar('Direction')}"><xsl:value-of disable-output-escaping="yes" select="ddwrt:AutoNewLine(string(@LDIPS_x0020_DATE ))" /></div>

In infopath the dates are set to date already so the problem isn't there.

Ideally I want to get rid of the time displayed and display as below:
12-08-2007
02-08-2007

It doesn't have to be a date, I don't mind deconstructing using substring and putting back together but the problem is every time I try I only ever get the first line displayed.

Can anyone please help me with this?


Reply With Quote
  #2 (permalink)  
Old August 7th, 2007, 11:28 AM
Friend of Wrox
Points: 1,676, Level: 16
Points: 1,676, Level: 16 Points: 1,676, Level: 16 Points: 1,676, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2006
Location: , , .
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default

Try changing this line:
<xsl:value-of disable-output-escaping="yes" select="ddwrt:AutoNewLine(substring-before(string(@LDIPS_x0020_DATE), "T"))" /></

Reply With Quote
  #3 (permalink)  
Old August 7th, 2007, 05:25 PM
mhkay's Avatar
Wrox Author
Points: 17,773, Level: 58
Points: 17,773, Level: 58 Points: 17,773, Level: 58 Points: 17,773, Level: 58
Activity: 9%
Activity: 9% Activity: 9% Activity: 9%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,839
Thanks: 0
Thanked 267 Times in 262 Posts
Default

Sorry, you'll have to show more of your input and output and explain what the extension functions do. It's also not clear why you would want to use disable-output-escaping.

In XSLT 1.0 if xsl:value-of is given a node-set as input, it displays the string value of the first node in the node-set. That might be relevant to your problem.

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


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merged cells when exporting a report to excel bea Reporting Services 0 June 22nd, 2007 09:18 AM
Autofit Merged cells mls Beginning VB 6 1 April 29th, 2006 08:26 PM
split cells up if merged crmpicco Excel VBA 4 May 4th, 2005 10:25 AM
Wrap text with merged cells aspadda Excel VBA 4 January 29th, 2004 02:02 PM



All times are GMT -4. The time now is 05:28 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.