[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Disable Output Escaping - really useful

Subject: Re: Disable Output Escaping - really useful
From: "Steve Muench" <smuench@xxxxxxxxxxxxx>
Date: Wed, 22 Mar 2000 07:50:38 -0800
disable output escaping alternative
| 
| Any use of disable-output-encoding is _always_ a hack.
| 

Many database-based web sites store HTML or XML markup 
fragments in database columns. The disable-output-escaping="yes"
is the supported way to "pass through" these chunks of 
markup on the way to building a web page to deliver to
the browser. The alternative, some kind of parse-string()
function to parse the document fragment being fetched
as text from the database only to immediately turn
around and serialize it as the "text it came in on"
seems like unnecessary overhead.

_________________________________________________________
Steve Muench, Consulting Product Manager & XML Evangelist
Business Components for Java Development Team

----- Original Message ----- 
From: "David Carlisle" <davidc@xxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxx>
Sent: Wednesday, March 22, 2000 3:47 AM
Subject: Re: Disable Output Escaping - really useful


| 
| 
| > Anyone know a way of doing this without disable-output-escaping? Is using
| > disable-output-escaping like this a bit of a hack?
| 
| Any use of disable-output-encoding is _always_ a hack.
| 
| In a few situations it is useful (I have used it sometimes in my sheets)
| but it is _always_ a bad idea, and means that your output tree will
| not work as expected unless it is going to be reparsed, usually
| it is only needed to overcome unfortunate markup in the input document
| (like useful structure being hidden in a CDATA section).
| 
| > When an item is the 5th, 10th, 15th etc. (using "position() mod 5 =0")
| > it should close this row and start the next.
| 
| Wrong viewpoint! In XSL you should think in terms of constructing a tree
| not of writing out a linear XML syntax. Clearly in a `tree view'
| there is no sense to </tr><tr>.
| 
| What you want to do is select every 5th node, and put that node and its 
| four next siblings into a tr node.
| so (untested)
| 
| <xsl:for-each select="item[position() mod 5 = 1]">
| <tr>
|   <xsl:apply-templates 
|      select=".|following-siblings::item[position() &lt; 5]"/>
| </tr>
| <xsl:for-each>
| 
| David
| 
| 
|  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
| 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.