Re: (dsssl) RE: (dsssl) siblings

Subject: Re: (dsssl) RE: (dsssl) siblings
From: Brandon Ibach <bibach@xxxxxxxxxxxxxx>
Date: Thu, 28 Feb 2002 08:56:39 -0600
Quoting Javier Farreres de la Morena <spanish@xxxxxxxxx>:
> Just a question on this thread.
> What is the siblings procedure you are talking about?
> In the DSSSL standard there is a rsiblings (reflexive siblings) procedure,
> and in some points of the standard there is an error and some undefined
> siblings procedure is used, where rsiblings should be used.
> Why you want to use siblings method when the name in DSSSL is rsiblings?
> 
   The (siblings) procedure we were referring to is part of the DSSSL
Procedure Library, which can be found at mulberrytech.com.  This
library includes implementations (mostly taken right from the DSSSL
standard) of standard procedures which, at some point in time, were
not implemented by Jade/OpenJade (though I think most of them are now
built in to newer versions of OpenJade).  It also contains useful
procedures which are not part of the standard.
   The procedure in question is defined as such:
	(define (siblings #!optional (osnl (current-node)))
		(children (parent osnl)))
   So, (siblings) uses the "parent" property of the node to go up one
level in the grove, then uses the "children-property-name" property of
the parent to find the "siblings" of the original node (which would
include the node itself).
   The (rsiblings) procedure, on the other hand, goes up one level in
the grove using the "origin" property, then gets the "siblings" using
the property of the origin node specified by the original node's
"origin-to-subnode-rel-property-name" property.
   The difference would have to do with what are considered to be the
"children" of a node.  For instance, an element node has subnodes,
usually text and other elements, that are considered its children.  It
also has subnodes, such as attribute nodes, which are *not* considered
to be its children.  So, if you had an attribute node, and you wanted
to get all of the other attribute nodes of the containing element, the
(siblings) procedure would not work, but (rsiblings) would.

-Brandon :)

 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist

Current Thread