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] | [List Home]

Subject: Re: [docbook-apps] olink for generating href links

Actually, your application is not what olinks are for.  Olinks are for
linking from one DocBook document to an id in another DocBook document.  You
are linking to a zip file, not a DocBook document.

The element used for linking to non-DocBook documents is ulink.  But the
current ulink element's linking mechanism is a url, not an entity reference.
You would have to customize the template that processes ulink to treat the
url attribute as if it were an entityref.  Instead of:

<xsl:value-of select="@url"/>

you would instead use:

<xsl:value-of select="unparsed-entity-uri(@url)"/>

But if the url for one ulink contains an actual url instead of an entity
name, then this simple change will fail.  You would need to make it
conditional, perhaps by setting a role attribute.

Bob Stayton
Sagehill Enterprises
DocBook Consulting

----- Original Message ----- 
From: "Webmaster" <Webmaster@comtrol.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Thursday, July 14, 2005 9:42 AM
Subject: [docbook-apps] olink for generating href links

> Hello.
> I'm using 1.68.1 stylesheets, and saxon.
> I would like to generate HTML href links using the olink element. My paths
> for the target are specified as external entity:
> Example (one out of 400):
> <!ENTITY e1800001 SYSTEM "/path/to/file.zip" NDATA SGML>
> and I'm calling out the olink:
> <olink targetdocent="e1800001">Device Driver</olink>
> and it's generating this:
> <a href="/cgi-bin/olink?sysid=" class="olink">Device Driver</a>
> I want this:
> <a href="/path/to/file.zip" class="olink">Device Driver</a>
> I don't know if this is what olinks are for, but I didn't want to have to
> thru all my xml to update links when they change. Instead, I pull a report
> from our database, and it gives me the about 400+ entities that then I
> into my entitiy section. (the ids won't change). By doing this, it changes
> 1 day job into a 5 minute task.
> How can I get this to work?
> Thanks!
> LN
> ---------------------------------------------------------------------
> 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]