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

Re: disable-output-escaping

Subject: Re: disable-output-escaping
From: "Evan Lenz" <elenz@xxxxxxxxxxx>
Date: Tue, 1 Aug 2000 18:49:27 -0700
disable output escaping nodeset
Okay, I was operating under some wrong assumptions.  It's amazing how
quickly these layers of character escaping can get one confused.  It turns
out I don't need to use disable-output-escaping at all.  I just need to
learn to trust the processor :)  Inserting character entities in an
attribute value is just fine, and where those characters don't need to be
escaped in the output (but do in the input), they won't be.  For example, a
< needs to be escaped in character content, but not in an attribute value.
Thus, I use &lt; in the stylesheet (as a child of xsl:attribute) and it is
outputted as a literal < in the output attribute value, because it doesn't
need to be escaped in that context.  Well, in the process, I learned a
little about the quirks of SAXON vs. xt.

What I'm realizing--and this may be a more interesting issue--is that in
order to write a generic, reusable template rule that will do this escaping
for me, I need to be able to treat the XML to be escaped as a node-set.  So
if I'm getting that node-set directly from the source tree, I'm fine without
any extension functions.  But where I want to first construct an arbitrary
tree (in a variable) and then escape it, I'm out of luck without the use of
a node-set() function.  So, in order to implement what I want to do here
without invoking an extension function, I have to hard-code it to the
various template rules involved, without being able to construct the tree in
its own step before escaping.  The resulting implementation isn't very
reusable.

Evan Lenz
elenz@xxxxxxxxxxx


 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.