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] mapping urls

Hi Cristina,
You'll need to customize the template that starts with:

<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 

in html/xref.xsl.  This line:

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

just copies through the value of the url attribute.  You can do some string 
processing on the attribute before outputting it.

Bob Stayton
Sagehill Enterprises

----- Original Message ----- 
From: "Cristina Williams" <cristina@isi.edu>
To: <docbook-apps@lists.oasis-open.org>
Sent: Wednesday, January 09, 2008 10:46 AM
Subject: [docbook-apps] mapping urls


I manage a complex tree of release manuals in docbook (for a software
'toolkit' of over 30 projects, each with multiple guides set up as
separate <book>s and put together by xinclude and olinks). I'm very
interested in XMLMind Personal Edition and want to be able to offer it
to some of our users. XMLMind's handling of entities is a big pain
(which I see has been discussed here plenty) but for the most part I've
been able to find ways to work within that limitation with xincludes and
the <phrase role="entity"> workaround.

The one problem I can't figure out is how to substitute values in an
attribute, specifically the url attribute of the ulink element. We use
some urls to other parts of our website that are specific to the version
of the software and I need to map a generic url to a version-specific
one (much like the xml catalog does for system files). I can't use
either xincludes or the <phrase role="entity"> workaround because you
can't use < or > characters within an attribute. Alternatives to
entities have been discussed here but I've done a lot of searching here
and on google and can't find anything that would work within an

Here's an example of what I need:

ulink in the source code:
<ulink url="http://www.foo.com/c-version/path/to/whatever/";>blah</ulink>

becomes this output in html:
<a href="http://www.foo.com/c-4.1.1/path/to/whatever/";>blah</ulink>

Any ideas?

I have about five such urls that need mapping throughout our

I'm using DocBook 4.4 with stylesheets 1.68 with xsltproc for html and
xep for pdf publishing.

Thanks for any suggestions,

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]