Opps, I meant
test="$rendertype != 'edit'"

so that in an editor, the anchor would show up.

--Doug

Doug Chestnut wrote:
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]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to