Re: Side-effects, state, internal references

Subject: Re: Side-effects, state, internal references
From: Norman Walsh <ndw@xxxxxxxxxx>
Date: Thu, 16 Apr 1998 14:46:43 -0400
| > Where the number between brackets is generated automatically.
| This is a symptom of a general problem with XSL right now.  The functions
| available (e.g. childNumber) count relative to the SOURCE element, not to
| the output elements.
| Another example of this problem would be a rule that produced numbered
| output for your <scrap> elements while filtering out or reordering some of
| them.  For instance, if some criteria filtered out the second <scrap>,
| childNumber would still give "1,3" instead of "1,2".  Likewise, if my XSL
| reordered <scraps> in reverse, the numbers would still be "3,2,1".  Not very
| useful.
| One solution might be to build counting behavior directly into the flow
| objects, such as the HTML <OL> provides.  A more general solution would be
| for XSL to provide counting functions relative to the output tree, e.g.
| flowObjectChildNumber().

Those are both possibilities, but it's also possible to simply
calculate the number correctly from the source grove.  After
all, if your stylesheet is doing the reordering, it knows what
reordering it's doing, right? ;-)

In the reverse case, the proper number for an element in the list

I've never written a DSSSL stylesheet where I felt that I needed
either a flow object that could do enumeration automatically or
the ability to count sosofos.  Which isn't to say that either or
both of those features might not be useful.

| > A second more tricky problem is that several production rules
| > refer to each other...
| > 
| This also is a deficiency in XSL, it is hard to follow references.  Adding
| an ID/IDREF navigation capability within the query (<select-elements>) might
| provide an adequate basis for a solution.

We definitely need to add builtin functions to access ID/IDREF
links (and maybe other sorts of links, too).

Remember, everyone, the submission is not a spec.  It's just a
starting point.

Norman Walsh <nwalsh@xxxxxxxxxxxxx> | Any sufficiently undocumented
Senior Application Analyst          | code is indistinguishable from
ArborText, Inc. ( | magic.
413.549.3868 Voice/FAX              | 

 XSL-List info and archive:

Current Thread