Closed PiperBaron closed 3 years ago
@PiperBaron You've identified the problem--yes! It's getting you a count for ALL of the following-sibling::chapter
elements instead of the very next following sibling. To get that one, realize it is just the first following sibling in the series. You just want a predicate to filter out JUST the very first following-sibling::chapter
.
@ebeshero
Ohhh, I got it! Adding that filter just fixed the whole thing.
<xsl:variable name="YposNext" select="count(following-sibling::chapter[1]/descendant::q[@sp='alice']) * $Ystretcher"/>
Funny how something so small and simple can make or break your code! :P
Hey, everyone!
I was wondering if anyone could help me finish up our second SVG exercise. I'm super close, but there's one thing tripping me up.
I'm at the stage where I'm writing in the lines between the circles. The lines seem to start in the right place, but they mostly end up pointing in random directions. I think the x2 values are correct, but my y2 values are all messed up, and I can't figure out why.
Here's my code:
For my XposNext variable, I just added 1 to the position, which seemed to work. For the YposNext, I've been trying to access the following sibling for each chapter, but it's not working the way I'm expecting it to. It almost seems like it's selecting every sibling after a given chapter, not the direct, following sibling, which is what I need.
Any help would be greatly appreciated!