XSLT problem
This is an open discussion with 7 replies, filed under XSLT.
Search
So proud of my baby! (a symphony powered version is in the works...)
If I got your question correctly, this could be a possible solution ;)
It looks like Marco found the problem faster than I could. The problem is in your for-each
instruction. This:
<xsl:for-each select="/data/events-by-member/entry/[event-id=.@id]">
Should look like this (remove the slash after the entry
node):
<xsl:for-each select="/data/events-by-member/entry[event-id=.@id]">
Thanks Marco and Stephen. That did indeed do the job. As did Xpathr :-)
Marco, Symposium aside, did you actually tell anyone about Xpathr? I haven't seen any chat on the forum.
No I didn't. I'd like to have a symphony powered version first. I'm not going to wait for it to be completed though (like last time :D)
It. Is. Teh. Awesome.
@alpacaaa nice work! I bookmarked it TWICE it's that good. :P
Thanks guys, we'll release it as soon as possible ;)
Create an account or sign in to comment.
I am going nuts trying to fix this XSLT issue. It should be simple, but its not (for me at least). I'm hoping it might provide some light relief from whatever you are doing ;-)
My XML contains event data
<upcoming-events>
plus data that shows which events the current member is attending<events-by-member>
.Each event has a form so that the user can update their status for that event.
If the member has set their status for the current event, I need to add a hidden id field to the form for that event with the id of the events-by-member entry.
My XML:
My XSLT:
I've also pasted my XSLT and XML code here:
https://gist.github.com/1298446
You can see what happens using @alpacaaa's Xpathr tool here:
http://alpacaaa.net/xpathr/1298446
Any help much appreciated.