OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: Re: DOCBOOK-APPS: ulink and HTML target

* Bob Stayton <bobs@caldera.com> [020809 10:33]:

> Nothing built in to do this.
> I think you would have to do a customization of
> the ulink template to respond to a target value in the
> role attribute in ulinks.

To share my solution with others, this is what I've done:

  <!-- override ulink template (from xref.xsl):
       generate HTML attribute target="_blank" if role attribute
       of ulink is equal to "newwindow"
  <xsl:template match="ulink" name="ulink">
    <xsl:variable name="link">
        <xsl:if test="@id">
          <xsl:attribute name="name">
            <xsl:value-of select="@id"/>
        <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
        <!-- Begin Change by MW -->
        <xsl:if test="@role = 'newwindow'">
          <xsl:attribute name="target">
        <!-- End Change -->

          <xsl:when test="count(child::node())=0">
            <xsl:value-of select="@url"/>

    <xsl:copy-of select="$link"/>

mw@miwie.in-berlin.de                              http://www.miwie.org

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC