Jump to content
Server Maintenance This Week. ×

Help with a simple (I think) Stylesheet


Zippy Aus

This topic is 5559 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi all

Can anyone tell me how to do a stylesheet that will replace some text with a carriage return or other character?

I have a field that I am exported with

representing the returns required. I would like to end up with a text file with the

text replaced with a return or ^m ... is this possible.

At the moment my style sheet does nothing to format the text file outputted. This is my first attempt at a stylesheet.

Any help would be greatly appreciated.

Cheers

ZP

Link to comment
Share on other sites

....Me either but try this page. I think you can make it work just looking at it quikly.

http://www.xml.com/pub/a/2002/06/05/transforming.html

Scroll down to 'search and replace'

PS: Post the file or some of the code...

Edited by Guest
Link to comment
Share on other sites

Thanks you so much ... that was exactly what I was after.

What a great resource, even found the correct code for the carriage return.

Below is the code for the StyleSheet to replace **BR** with a carriage return.

<?xml version="1.0" encoding="UTF-8"?>

"concat(substring-before($outputString,$target),

$replacement)"/>

select="substring-after($outputString,$target)"/>

select="$replacement"/>

Thanks again

ZP

Link to comment
Share on other sites

Huummmm

As I don't deal with this part much do you have a sample file of the pre-xsl html or text being used?

Ps even in code the return won't show most times. I just put spaces in between when needed.

Edited by Guest
Link to comment
Share on other sites

  • 1 year later...

It is an old thread, but in case someone needs help removing the leading zero from the text output, the following should do the trick.

Insert this code anywhere in the XSL file to remove the zero:


The 0 is a value of the tag that is present in the fmpxmlresult output.

Cheers,

Andreas

Link to comment
Share on other sites

This topic is 5559 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.