Subject: [xsl] plain txt output tips From: Nathan Shaw <n8_shaw@xxxxxxxxx> Date: Tue, 16 Apr 2002 07:29:59 -0700 (PDT) |
Hi all, I am attempting my first real plain txt transformation and think that I have it going in the right direction, but I have a few questions. 1) What is the best way to force line breaks? Right now, I am using <xsl:text>
</xsl:text> to do it. 2) How can I limit the line length? I have run across several templates that break your lines at xx num of characters, but none of them a) consider breaking right in the middle of words nor b) how you handle breaking in a mixed content model, which is what I am working with. I appreciate your help! --Nate FYI: Here is a snippet of the XML I am working with: <Section Title=""> <Media type="image" id="issrail" file="http://www.nasa.gov/images/031902_issrail.jpg" align="left" width="110" height="83" border="0" alt="Space Railroad"> <Caption align="bottom">Space Railroad</Caption> <Link type="internal" url="http://spacerailroad.nasa.gov/" /> </Media> <p><strong>Expanding</strong> the new frontier just as they did the old, railroads will take flight next month as the first space railroad is launched aboard Space Shuttle Atlantis.</p> <p><em>Circling Earth</em> aboard the International Space Station, the car on this railway will have a top speed of only 300 feet per hour, but the entire line -- tracks and all -- will travel almost nine times faster than a speeding bullet, over 17,000 miles per hour, in orbit. The rail line eventually will stretch almost 100 yards along the structural backbone of the station, serving as a mobile base from which the station's Canadian-built robotic arm can assemble and maintain the complex.</p> <List type="unordered"> <ListTitle><Link type="external" url="http://www.yahoo.com">My UnOrdered List</Link></ListTitle> <ListItem>This is list item 1</ListItem> <ListItem>This is list <Link type="external" url="http://www.google.com">item 2</Link></ListItem> <ListItem>This is <strong>list</strong> <em>item 3</em></ListItem> </List> <List type="ordered"> <ListTitle>My Ordered List</ListTitle> <ListItem>This is list item 1</ListItem> <ListItem>This is list <Link type="external" url="http://www.google.com">item 2</Link></ListItem> <ListItem>This is <strong>list</strong> <em>item 3</em></ListItem> </List> <Media type="video" id="issrailvid" file="http://www.nasa.gov/images/031902_issrail.mpg" align="right" width="250" height="100" alt="Space Railroad Video"> <Caption align="right"><strong>Space Railroad</strong> <em>Video</em>. Download <Link type="external" url="http://www.real.com">Real Player</Link> to view it.</Caption> <Link type="external" url="http://www.real.com" /> </Media> <p>"To build the rails that linked the east and west coasts of the United States, thousands of workers endured desert heat, frigid mountains and countless obstacles. These rails in space will run in temperatures far hotter than any desert and far colder than any mountain," said NASA Mobile Transporter Subsystem Manager Tom Farrell at the Johnson Space Center in Houston. "And just like the transcontinental rails pulled together our country, these rails pull together 16 nations around the world, cooperating in orbit." </p> <p><Link type="external" url="http://www.Atlantis.org">Atlantis</Link> will launch the railcar, called the Mobile Transporter, and an initial <strong>43-foot section</strong> of track as it delivers the first segment of the International Space Station's exterior truss. Designated "S0 (S-zero)," the first section of truss will be carried aloft by Atlantis on shuttle mission STS-110 in April. More sections of track will be added during the next two years as eight segments of the girder-like truss are launched aboard the shuttle. By the end of this year, the tracks already will stretch more than 130 feet. When completed, the truss will stretch over 360 feet, the longest structure ever built in space.</p> </Section> ===== ---------------------------- Nathan Shaw Senior Web Applications Developer iaffect, Inc. http://www.iaffectonline.com ---------------------------- __________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Str:tokenize modification, Vasu Chakkera | Thread | Re: [xsl] plain txt output tips, David Carlisle |
Re: [xsl] Performance Issue using c, Johannes Döbler | Date | Re: [xsl] Using Include File.., Jeff Kenton |
Month |