 |
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

November 1st, 2006, 11:37 AM
|
|
Authorized User
|
|
Join Date: Oct 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

November 1st, 2006, 12:24 PM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
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
|
|

November 1st, 2006, 12:30 PM
|
|
Authorized User
|
|
Join Date: Oct 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
|

November 1st, 2006, 12:33 PM
|
|
Authorized User
|
|
Join Date: Oct 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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>
|
|

November 1st, 2006, 01:28 PM
|
|
Authorized User
|
|
Join Date: Oct 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I really hate XSLT.
|
|

November 1st, 2006, 01:46 PM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
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
|
|

November 1st, 2006, 01:58 PM
|
|
Authorized User
|
|
Join Date: Oct 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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?
|
|

November 1st, 2006, 02:37 PM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
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
|
|

November 1st, 2006, 02:57 PM
|
|
Authorized User
|
|
Join Date: Oct 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I'm afraid I just don't know enough about it to form the right question.
|
|
 |