Thanks, Doug. That got me in the right track. I'm using:
<xsl:template match="xhtml:h2">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:if test="$rendertype = 'edit'">
<a name="anchor"> </a>
</xsl:if>
<a name="{.}">
<xsl:apply-templates select="node()"/></a>
</xsl:copy>
</xsl:template>
Can you tell me how this works:
<xsl:if test="$rendertype = 'edit'">
<a name="anchor"> </a>
</xsl:if>
Is this what suppresses the output of the anchors in the editing view?
Sean
On 2005-05-11 11:39:51 -0400, Doug Chestnut <[EMAIL PROTECTED]> said:
Couldn't you just try something like this in xhtml2xhtml.xsl (or other
doctype xsl):
<xsl:template match="xhtml:h2">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:if test="$rendertype = 'edit'">
<a name="anchor"> </a>
</xsl:if>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>
You wouldn't want the anchor to show up in the editor, since you
wouldn't want the anchor to be saved as part of your doc content.
--Doug
Sean Fulton wrote:
I'd like to automatically add an anchor to each h2 tag on a page. Has
anyone tried something like this? Where is the best place to do that?
Doing it in the editor won't work because different people may use
different editors.
Thanks,
Sean
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]