xsl-list
[Top] [All Lists]

RE: Nodesets handling (getting subsets)

2004-05-23 08:08:01
Use "current()/@number"

Michael Kay 

-----Original Message-----
From: Marco [mailto:brbromo(_at_)tin(_dot_)it] 
Sent: 20 May 2004 13:35
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Nodesets handling (getting subsets)

I have a nodeset parameter called $selected-slides. It is a set of
'slide' elements with a 'number' attribute.

I would like to remove from that nodeset those elements whose 'number'
attribute is not associated with any draw:page element in the xml
source. In other words, those 'slide' elements whose 'number' 
attribute
is not the position number of any draw:page element in the source xml.

But if I create a new variable with the select expression:

$selected-slides[count(document('#content.xml')/office:documen
t-content/office:body/draw:page[position() 

= number(@number)]) > 0]

I get no $selected-slides elements because (IMHO) @number 
does not refer
  to the 'slide' element inside $selected-slides.
How could I solve this problem?

Thanks in advance,
Marco




--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--





<Prev in Thread] Current Thread [Next in Thread>