3 users online. Create an account or sign in to join them.Users
I've forgotten how to call-template
This is an open discussion with 6 replies, filed under XSLT.
Search
Is the context for the call template at /data? If it's not then you'll need to add it in to your copy-of tag: <xsl:copy-of select="/data/taglines/entry[0]/fields/tag-line" />.
I tried that, earlier... and just now as well. It didn't seem to take. Maybe I've got some caching going on that I don't know about.
this seems to work. Although I'm pretty sure that's not supposed to.
<xsl:copy-of select="/data/taglines/entry/fields/tag-line" />
It could be that positions in XPath start at 1 not 0:
taglines/entry[1]/fields/tag-line
really? I did not know that.
true story.
Create an account or sign in to comment.
Hey All -
Technically, I'm still running 1.7, since there's no simple upgrade. So this is technically a S1.7 question, but I'm hoping that there are enough similarities to S2 to make this applicable in this forum.
I'm in the middle of a redesign, and I'm getting stuck calling a template that prints out a simple tag line for my site.
The XSL (in my default stylesheet),
And the XSL in the tagline document:
<xsl:template name="tagline"> <xsl:copy-of select="taglines/entry[0]/fields/tag-line" /> </xsl:template>XML:
<data> <taglines section="taglines" section-id="7"> <entry id="164" handle="maintenance" linked-count="0"> <fields> <tag-line word-count="5"><p>Currently undergoing maintenance & stuff</p></tag-line> </fields> </entry> </taglines> </data>Can anyone tell me what I'm doing wrong?