Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 1st, 2006, 11:37 AM
dep dep is offline
Authorized User
 
Join Date: Oct 2006
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dep
Default Why would this skip record #1?

Code:
<xsl:variable name="thisSet" select="substring(@series, 0, 7)"/>

<xsl:for-each select="following-sibling::*[substring(@series, 0, 7) = $thisSet]">

in this case, thisSet = "Nov 06"
So yes, if there are 5 matching records, it only displays 2-5. How can I tweak this to display all five?

dep



Reply With Quote
  #2 (permalink)  
Old November 1st, 2006, 12:24 PM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

You seem to have forgotten to include any information about the data you are working on.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote
  #3 (permalink)  
Old November 1st, 2006, 12:30 PM
dep dep is offline
Authorized User
 
Join Date: Oct 2006
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dep
Default

here is the XML i'm working with...
http://www.pecknology.net/storage/ss.gif
Reply With Quote
  #4 (permalink)  
Old November 1st, 2006, 12:33 PM
dep dep is offline
Authorized User
 
Join Date: Oct 2006
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dep
Default

Code:
    <xsl:for-each select="following-sibling::*[substring(@series, 0, 7) = $thisSet]">
        <xsl:choose><xsl:when test="@callBid"><xsl:value-of select="@callBid"/></xsl:when><xsl:otherwise>--</xsl:otherwise></xsl:choose>
    </xsl:for-each>
Reply With Quote
  #5 (permalink)  
Old November 1st, 2006, 01:28 PM
dep dep is offline
Authorized User
 
Join Date: Oct 2006
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dep
Default

I really hate XSLT.

Reply With Quote
  #6 (permalink)  
Old November 1st, 2006, 01:46 PM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Actually, you give me the impression that you really hate programming. Perhaps you're having an off day, but you certainly don't seem to be taking a systematic approach to analyzing your problem and describing it clearly.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote
  #7 (permalink)  
Old November 1st, 2006, 01:58 PM
dep dep is offline
Authorized User
 
Join Date: Oct 2006
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dep
Default

Well, our XSLT expert is on vacation this week. I'm trying to dissect his code and figure it out so I can fix his bug... I'm more the DHTML, Javascript guy...

Do you have any idea what I'm doing wrong? Or what more information I could provide to help?


Reply With Quote
  #8 (permalink)  
Old November 1st, 2006, 02:37 PM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

From your description, I haven't the faintest idea what's wrong. Your snippets of code are meaningless because there's no information about the input document and no context - XPath expressions are very sensitive to context, and many bugs arise from getting the context wrong.

I don't even know what you mean by "record". There's no such thing in XML.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote
  #9 (permalink)  
Old November 1st, 2006, 02:57 PM
dep dep is offline
Authorized User
 
Join Date: Oct 2006
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dep
Default

I'm afraid I just don't know enough about it to form the right question.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to skip errors absu ADO.NET 1 October 6th, 2008 09:56 AM
skip first field gilgalbiblewheel Classic ASP Databases 1 July 7th, 2007 05:10 PM
how to skip from one page to other rashmipant PHP How-To 2 December 8th, 2006 05:20 AM
Skip a row rochak SQL Server DTS 2 September 27th, 2005 11:06 PM
Skip On Refresh Prabhakar_dt Classic ASP Basics 9 September 2nd, 2004 11:44 PM



All times are GMT -4. The time now is 04:28 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.