This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Hierarchy problem
- From: DPawson at rnib dot org dot uk
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 22 Jul 2002 15:38:16 +0100
- Subject: RE: [xsl] Hierarchy problem
- Reply-to: xsl-list at lists dot mulberrytech dot com
David C wrote:
> you are a member of the set of all men
> (item being a member of a set)
> the set consisting of you is a subset of the set of all men
> (singleton set being a subset of a set)
And the empty set is also a valid subset of any set?
>
> In some sense these have the same meaning but
>
> > Also, if $y is a node which doesn't exist (or is higher in
> the doc tree than
> > $x) surely the statement would come back true?
>
> higher up the node tree it would be false.
I guess this is coming down to the example you posted?
I *could* create a nodeset such as
value-of select="* |//node[2]"/>
which could be of that form?
Just that we were talking about descendant and child axis
selectors, hence your comment?
empty set it wuld be true
> which is part of the difference between "subset" and member of.
empty set is a subset of, but not a member of, set X.
(ignoring difference between {x} and x)
> if y is the empty set and x is a set then y is a subset of x.
Thanks, that clarifies.
> if you want to check that it is a proper subset (ie not empty and not
> the whole thing) you need to test for that as well, so
>
> test="$y and count($x/*|$y) = count($x/*)"
This (for the variables we defined), tests that y exists and is none empty.
>
> or if you don't want the sets y and x to be equal
>
>
>
> test="$y and count($x/*|$y) = count($x/*) and
> not(count($x)=count($y))"
My head hurts, I'll think on that one :-)
Thanks David.
Regards DaveP
-
NOTICE: The information contained in this email and any attachments is
confidential and may be legally privileged. If you are not the
intended recipient you are hereby notified that you must not use,
disclose, distribute, copy, print or rely on this email's content. If
you are not the intended recipient, please notify the sender
immediately and then delete the email and any attachments from your
system.
RNIB has made strenuous efforts to ensure that emails and any
attachments generated by its staff are free from viruses. However, it
cannot accept any responsibility for any viruses which are
transmitted. We therefore recommend you scan all attachments.
Please note that the statements and views expressed in this email
and any attachments are those of the author and do not necessarily
represent those of RNIB.
RNIB Registered Charity Number: 226227
Website: http://www.rnib.org.uk
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list