Subject: Re: disable-output-escaping From: "Evan Lenz" <elenz@xxxxxxxxxxx> Date: Tue, 1 Aug 2000 18:49:27 -0700 |
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 < 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
disable-output-escaping, Evan Lenz | Thread | RE: disable-output-escaping, Chris Bayes |
Re: Novice, Melvyn Rosengarden | Date | Re: node-set() function in MSXML?, Steve Muench |
Month |