docbook-apps message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: Re: [docbook-apps] Creating HTML Links that Open in a New Window
- From: "Colin Shapiro" <cmshapiro@gmail.com>
- To: Raymond <support@wintunnel.com>
- Date: Mon, 19 Mar 2007 22:06:58 -0600
Hi Raymond,
If I was faced with this problem, I'd try solving it through a customization layer.
You could copy the template that matches "ulink" in xref.xsl, and add an attribute to the html element <a> (as I have written on the last line in the below example):
<xsl:template match="ulink" name="ulink">
<xsl:param name="url" select="@url"/>
<xsl:variable name="link">
<a>
<xsl:if test="@id or @xml:id">
<xsl:attribute name="name">
<xsl:value-of select="(@id|@xml:id)[1]"/>
</xsl:attribute>
</xsl:if>
<xsl:attribute name="href"><xsl:value-of select="$url"/></xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
...
Or, if you don't want this behavior for all of your links, you could make a new template that matches a ulink with a given role attribute:
<xsl:template match="ulink[@role='newwindow']">
Hope this helps.
Colin
If I was faced with this problem, I would
On 3/17/07, Raymond <
support@wintunnel.com> wrote:How does one create links than open in a new window for html output of
<a href=""document.html"" target="_blank">external link</a>
or
<a href=""document.html"" rel="external">external link</a>
in DocBook 5?
<article ... xmlns:ns1="http://www.w3.org/1999/xlink">
...
...
<link ns1:type="simple" ns1:show="new" ns1:href=""document.html"
">external
link</link>
...
...
</article>
does not produce the desired result (no new window)
Using most current releases of docbook-xml (rng) and docbook-xsl
Raymond
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]