This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Attributes, modes and templates


At 05:16 PM 4/28/00 -0600, you wrote:
>The best description I can think of for my requirement, is exactly
>this: I want to be able to mimic the behaviour of the DSSSL fragment:
...[DSSSL elided]...
>in XSL with the minimum of fuss.  
>
>In DSSSL, with the above fragment, if the element is listed in the
>`mode' then you get that behaviour, if it's not then you always
>default to the rule in the imported/included stylesheet.
 ...

(But you kick back into the mode as soon as you have a DSSSL construction
rule in the mode again, don't you.)

>In XSL it appears that that is not the semantics of processing the
>modes.

That is correct, modes do not operate the same way in XSL. See 5.7 in the
spec, where it says "if an xsl:apply-templates element does not have a mode
attribute, then it applies only to those template rules that do not have a
mode attribute." So XSL templates are not quite as "fluid" as DSSSL element
construction rules. Your trouble is here: unless you change the templates
in the imported stylesheet, there's no way to get back into the mode once
you've exited it.

I can envision ways of engineering the behavior you want (passing
parameters down through the processing, that kind of thing), but nothing
that respects the requirement to use the imported templates unchanged.

I wonder if any DSSSL wizards on this list can think of an elegant way to
do this in XSL. Or maybe someone who knows no DSSSL and thus doesn't expect
modes to work the way they do there. Bother.

--Wendell



======================================================================
Wendell Piez                            mailto:wapiez@mulberrytech.com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]