Filtered nodes with template/param, but xsl:number still counts them?

Hi, I posted this today on the xsl-list, but no takers so I thought I'd
try here. If nothing else, I would appreciate someone pointing me in the
right direction.

The following is just a portion of a longer template.  I have varying
levels of <step> elements with potential customer and assembly
attributes. I select the <step>s I want (using the xsl:if and 2 params I
declare earlier), then need to create the variable "id" and number the
steps in my table -- applying numbers ONLY to those <step>s selected
with the IF test.

With the following structure, the numbering includes the
"unseen"/unselected elements. How can I do this please? If not possible
this way, would I have to FIRST filter the xml source into another file,
and THEN apply this stylesheet? I've never done that and can't find too
much info/examples. Any help greatly appreciated.

Thanks, Kat

<xsl:if test="(not(@customer) or (@customer=$customer)) and
	(not(@assembly) or (@assembly=$assembly))">
   <xsl:variable name="id">
	<xsl:number level="multiple" count="step"
              format="1.1"/>
   </xsl:variable>
	
<table width="100%" border="0" cellpadding="0">
<tr>
<td valign="top">
    <xsl:number level="multiple" count="step"
              format="1.1"/>
      <xsl:if test="not(ancestor::step)">
	   <xsl:text>.</xsl:text>
      </xsl:if>
</td>
<td><xsl:apply-templates select="*[not(self::substeps)]"/>
</td></tr>

ETC...




Thanks, Kat

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
0
nospam9092 (38)
10/21/2003 11:37:54 PM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
476 Views

Similar Articles

[PageSpeed] 29

KatB wrote:

> With the following structure, the numbering includes the
> "unseen"/unselected elements. How can I do this please?
Set count attribute appropriatively to count only elements you need.

> 	<xsl:number level="multiple" count="step"
>               format="1.1"/>

<xsl:number level="multiple"
count="step[(not(@customer) or (@customer=$customer)) and
	(not(@assembly) or (@assembly=$assembly))]" format="1.1"/>

-- 
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

0
Oleg
10/22/2003 10:48:11 AM
Reply:

Similar Artilces:

FREE Tutorials on HTML XHTML CSS JavaScript XML XSL ASP SQL ADO VBScript, SAP
FREE Tutorials on HTML XHTML CSS JavaScript XML XSL ASP SQL ADO VBScript, SAP - ABAP visit ebooks.univdatabase.com ...

New to XSLT and can't select even the first node... Any Help?
Hey, brand new to XSL and XSLT. I've downloaded an evaluation copy of XML Spy to debug my transformation, but I can't get to frist base. Can anyone help my get straightened out? My XSLT is: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" /> <xsl:template match="/"> <xsl:for-each select="DataSet_Studio_Appt_Dates/Studio_Appt_Date_Times"> <ItWorked>YEAH</ItWorked> </xsl:for-each> </xsl:t...

Envelope Template
Anyone have or know where I can get a Word templates for a 6.5 X 9.5 envelope? Thanks in advance In Tools | Envelope, you can click on Page Setup to choose a different size (there are terms I don't understand in there, which may include a 6.5x9.5 envelope), or you can click on Custom to set up your own envelope. Once setup, click OK and save the resulting document as a template. mgauf wrote: > Anyone have or know where I can get a Word templates for a 6.5 X 9.5 > envelope? > > Thanks in advance > > In article <1180997480.783709.257530@m36g2000hse.googlegroup...

add number to existing text numbers
I have 2000 columns with accounting type text numbers in each cell, i.e. 0345999, 058956, ect. I want to add an "0" in front of each account number. Anyone know how to do this withount going into each cell and doing it by hand? Hi one way: use a helper column with the formula ="0" & A1 copy this down for all rows, copy this column and insert it with 'Edit - Paste Special - Values' -- Regards Frank Kabel Frankfurt, Germany Stacy wrote: > I have 2000 columns with accounting type text numbers in > each cell, i.e. 0345999, 058956, ect. > > I wan...

Phone field should allow for 5 digit extension number.
Many companies, including Microsoft, have 5 digit extensions for their phone numbers. i.e xxx-xxx-xxxx ext. xxxxx Dynamics is limited to 4. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/...

Number Problem #2
D'all, In a column, I hav 16 digits numbers. But when I add 4 digit number after last digit of that number becomes 4 zeros at last. e.g. 9503170011002910 (16 digit number) 1425 (4 digit number) becomes 95031700110029100000 whether it should be 95031700110029101425 Excel can only handle 15 digit numbers, after that everything gets shown as 0. If you want 20 digits you will have to hold it as text. -- __________________________________ HTH Bob "Sandeep Jangra" <SandeepJangra@discussions.microsoft.com> wrote in message news:8E87C8C7-8CBC-4CF8-9E0A-F222DD023255@mi...

Counting Text Cells #2
Hi Guys, How can I determine the most common occurence of a word in a lis formatted as text in Column A. I would like a function that simpl returns the word that occurs the most to appear in cell D1. Also, i there are two words that occur the same number of times in this list, would like both words to be shown (one in D1, one in D2). Any suggestions? Thanks, Be -- Message posted from http://www.ExcelForum.com Hi to get the most frequent text entry try the following array formula (entered with CTRL+SHIFT+ENTER): =INDEX($B$1:$B$20,MODE(MATCH(IF($B$1:$B$20<>"",$B$1:$B$...

Custom Workspace Template Not Linking to Projects
Experts, I publised a test project on PWA for Project Server 2007. I then went to that new Workspace and made several changes to the Issues and Risks columns and over all views. I then saved the site as a template, sent the .stp file to our sharepoint admin and she executed the STSADM command to load new the template. I then went to PWA Site Provisioning setting and switched the default template to the new one. so far so good? When I went to create a new project schedule and published, i created the schedule and workspace but they're not linked. Meanining that I dont see t...

counting rows wen 2 arguments are true
is there any way i can create a formula to count the amount of rows when 2 arguments are true? i have two columns with text in them, say A1:A10 and B1:B10 id like to find a way of counting the rows when both ranges have specific text in them. eg ACCOUNT TYPE[/B] [B]FULLTIME/PARTIME ordinary Fulltime ordinary Partime ordinary Fulltime ordinary Fulltime ordinary Fulltime student Fulltime say i wanted to count the rows wen account type = ordinary and fulltime/partime = Fulltime. is this ...

Junk Mail Filter Rule
Is there a way I can set up a rule that looks for an attachment, "DELETED.TXT", for the email and the attachment to be deleted. (So far I find a rule that searches for an attachment but it just looks for any and all.) TIA What version of Outlook? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, RFJ asked: | Is there a way I can set up a rule that looks for...

Advanced "mixed" filter possible?
Is it possible in Outlook 2003, to make an advanced filter so that I filter out every mail with attachments (to my unwanted-email folder), except those emails from my friends ...? Regards Morten ...

Microsoft Excel Template
Sorry I don't see much discussion going on at Office community so pardon me for posting it here. I downloaded a template from office download center for excel. I saved the template in "c: program files>Microsoft Office>templates>1033" where other templates are. I tried opening it from excel by "File>New>template on my computer.." but don't see my newly added one. Please help. Danny "Danny" <Danny@discussions.microsoft.com> wrote in message news:1A265283-EED3-4EBA-AA0E-F55F3EA8460D@microsoft.com... > Sorry I don...

Numbering of duplicates
Hi. I need to do numbering of duplicate values and assign these numbers to a table. Example: Table: Field1 1 2 3 2 3 2 4 1 Reult I need: Field1::Field2 1::1 2::1 3::1 2::2 3::2 2::3 4::1 1::2 where "::" is a field separator. Additional assumptions: - Field1 is a text field - Updating is necessary (new data will appear in Field1 and should also be numbered) Thanks for help Kamil Something like SELECT (SELECT COUNT(*)+1 FROM P1 WHERE P1.ID < P.ID AND P1.FIELD1=P.FIELD1) AS ROWNUM, P.* FROM P HtH Pieter <kamil.jedrzejewski@gmail.com> wrote in message news:1193131909....

Mail header contain physical node IP instead virtual IP
Hello I have exchange 2003 with SP1 on windows 2003 cluster. When we sending to internet from exchange cluster the mail header contain the physical node IP instead of exchange virtual IP, and cause our mail rejected remote host because they are doing reverse lookup Any Idea how I force to exchange that it will put the virtual IP in sending mail header instead physical Nagori Second result on Google http://groups-beta.google.com/group/microsoft.public.exchange.clustering/browse_thread/thread/4191473d1dc25394/b1190f4f791ab372?q=virtual+ip+node+smtp++group:microsoft.public.exchange.*&...

Filtering a combo box
I have a spreadsheet with 2 combo boxes. The first box calls from a list of 5 items. The second box calls from a list of 50, and they are related to combo box 1. How do I filter combo box 2 so that only items related to combo box 1 show in the list? These combo boxes will be copied down the page for multiple selections. Is this possible and if so how ? .....Thanks Hi Steve, I don't know if you're committed to a combo box or not. If not you might consider using data validation, which will probably work much faster than a combo box. Debra Dalgleish has an excellent websi...

Filter a List Box Using a Combo Box
I have a dialog box that contains a list box of all my records; basically this is used as a way for a person to find/edit a previously-entered record (select from list box and click to edit/view). The list box is based on a simple query. I want to add a combo box that will allow me to filter the list box by one of the fields - so the user could select what type of record he/she would like to see, and the list box would automatically filter. I know I need an After Update event on the combo box, but I can't figure out the code. The complicating factor is that there are other filter...

Custome number format help
I have a series of cells that will hold values such as 350,000.00. This value is entered by the user and entire amount is used in calculations across the worksheet. I want the output to be 350k. This way, more columns can be viewed at a time and makes for easier reading than a number with all the zeros. I can't get the customer number format to "hide" the zeros. WB Thanks, yes it did. "Carmen" <hovendic@yahoo.com> wrote in message news:Od0aSCQrGHA.4356@TK2MSFTNGP02.phx.gbl... > WB, I put > > #,k > > in the custom formatting box and it looks ...

Disable Typesetting Quotes in a Template
Is there any way to disable typesetting quotes in a template rather than globally? I have some templates where I would like there to only be straight quotes and others templates where I'd like typesetting quotes. You could use a macro to toggle between straight quotes and smart quotes, though the macro cannot account for missing quotes when straight quotes are converted to smart quotes and may thus produce incorrect results. http://www.gmayor.com/installing_macro.htm Sub ReplaceQuotes() Dim vFindText As Variant Dim vReplText As Variant Dim sFormat As Boolean Dim sQuotes...

is there a template to use pc as cash register
i am just trying to figure it all out and cant seem to get it to do it properly so i was hoping someone already worked out all the bugs and have a template ...

Is there an Excel template to reconcile business bank statments?
I am looking for a template that will simplify the bank reconciliation process? Acct Rep wrote: > I am looking for a template that will simplify the bank reconciliation process? How do you mean "simplify"? You will still need to manually tick off the bank statements against the cashbook entries. If you're looking for an AUTOMATED bank rec, then you're looking at comparisons of lists, and that gets complicated if (say) the bank has entered a cheque number correctly but with the wrong amount or vice-versa. It DOES happen - I've seen it. Also that assumes you can d...

Frequency per month (advanced filtering?)
Hi, I have a long list looking like this: Box number Ship date Dealer code 343 2008-12-12 SE1212 344 2008-12-12 SE1212 345 2008-12-12 SE1212 346 2008-12-12 SE1212 348 2008-12-12 SE1213 349 2008-12-12 SE1213 350 2008-12-12 SE1213 351 2008-12-12 SE1213 352 2008-12-12 ...

Is it possible to change the "result of a formula" to a "number? #2
Is it possible to change the "result of a formula"... to a number? Hi yes, choose the cell(s) you want to do this to and copy them then choose edit / paste special - values this will change the formals to the result. Cheers JulieD "Renee R." <Renee R.@discussions.microsoft.com> wrote in message news:E99C248C-B6AC-416D-BA24-1302BC503B50@microsoft.com... > Is it possible to change the "result of a formula"... to a number? ...

Opening XLS file directly and getting params
All, I am working on a .NET application sued to "index" our many (+300) Excel 2000 reports. The users log in and get a list of reports that they are allowed to run. When they click on the "link", the app starts the appropriate spreadsheet. We are current doing this by running: Excel.exe "FILENAME" /e/PARAMETERS As you can see above, we are sending params (in this case, a connect string) into the spreadsheet (not my design, I inherited it...) and using some API calls that were found here to read the command line. This is working correctly, However, one of our...

numbering pages in footer
In the old excel, 1997, we could start a new page with a different page number rather than 1. I have many pages in one worksheet and many worksheets. I want the numbering footer to continue with each worksheet I prepare, and print them out at different times. I will finish one worksheet and print, and use this while working on a new worksheet, but want the next page to start where the last worksheet ended. I know you can do this by added all the worksheets together on a single worksheet and group them, however I work them at different times. On the 1997 version, you would simple ...

Office 98 workgroup templates tab
Hello, I was wondering if someone could please advise me on a problem I'm having. I'm trying to configure a set of workgroup templates on my Mac (office 98 & OS 9.1). I've successfully specified the network folder where the templates reside, however when I hit FILE - NEW in word there are no new tabs indicating my workgroup templates. Any help would be appreciated a lot. Thanks. ...