xsl-list
[Top] [All Lists]

Re: [xsl] Conditional Include statements

2009-04-02 01:33:06
i can use doc(' ') to get stylesheet itself, then modify it, and at
last apply modified stylesheet to input document

why not?

On Thu, Apr 2, 2009 at 4:21 AM, C. M. Sperberg-McQueen
<cmsmcq(_at_)blackmesatech(_dot_)com> wrote:

On 31 Mar 2009, at 04:07 , Vyacheslav Sedov wrote:

XSLT stylesheets cannot modify themselves at run-time.

what about saxon:transform ;)

http://www.saxonica.com/documentation/extensions/functions/transform.html

That doesn't modify the stylesheet it's in.  It simply
calls a compiled stylesheet to process input and produce
output.  (Even if you call saxon:transform on the stylesheet
containing the call to saxon:transform, the call will have no
effect on the stylesheet containing the call.  As Wendell Piez
put it recently, nothing you do in XSLT ever has any effect on
the source document; the XSLT stylesheet only looks at the
source document to decide what to put into the result
document.)

In other words, saxon:transform() is more like a call to
an external function than like self-modifying code.

And a good thing, too!  (I was once responsible for helping
maintain a complex system that had some self-modifying
code in some modules.  I'll never do that again.)


--
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>