xsl-list
[Top] [All Lists]

RE: [xsl] Conditional Include statements

2009-04-02 05:22:31
-----Original Message-----
From: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com]
Sent: Thursday, April 02, 2009 10:03 AM

what people are usually looking for is some kind of dynamic
despatch mechanism, and of course there are existing ways
of achieving this in XSLT that work perfectly well.

One way to do this with Saxon (that I recently found out thanks
to a reply from Michael) is:

  <xsl:output saxon:next-in-chain="a.xsl" name="a"/>
  <xsl:output saxon:next-in-chain="b.xsl" name="b"/>

  <xsl:result-document href="output.xml" format="{if (condition) then 'a' else 
'b'}">
    <xsl:sequence select="elements_to_be_processed_further_by_either_a_or_b"/>
    </xsl:result-document>

Regards,
EB


--~------------------------------------------------------------------
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>