[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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
idref navigation
| > 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
is (LENGTH_LIST - CHILD_NUMBER + 1).

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.

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


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.