|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: More XSL Discussion
/ Sean Mc Grath <digitome@xxxxxx> was heard to say: [...] | Real World Example: [...] | Part : Introduction | Chapter : The Foo Manual | Section : Introduction | 1. The Foo Manual is a work of epic proportions...in the future. | / Norman Walsh [mailto:norm@xxxxxxxxxxxxx] said on Thursday, February 26, 1998 4:40 AM | The only wrinkle at the moment is grabbing the first and last | ten words out of the paragraphs. XSL needs to be able to do | this, but I don't think we've figured out how yet. Sure we have. This is a classic case where escape to script makes sense. This particular formatting operation is not in the 90%-common case (or even 99% case), and so should not result in complicating the declarative parts of XSL. A graceful escape to script for purposes like this should support this kind of customized (in this case string-level) formatting. Something like this: <define-script> function myTextTrimmingFunction(string) { // arbitrary string manipulation goes here return result; } </define-script> <rule> <target-element type="p"> <paragraph> <eval>myTextTrimmingFunction(this.text)</eval> </paragraph> </rule> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








