Next in thread →
Next in month →
Re: [docbook-apps] Creating HTML Links that Open in a New Window
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 < > 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: For additional commands, e-mail:
Next in thread →
Next in month →