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] ulink doesn't show as footnote when using XSL-NS Stylesheets


Hi Mike,

I had a chance to test out the changes you made and so far everything looks very good. I tested the snapshot XSL stylesheets against both DocBook 4 and DocBook5 and also tested the XSL-NS stylesheets against DocBook 5. Both the links and the footnotes are now working properly.

Thanks Mike!

Ken


On 9/10/07, Michael(tm) Smith <smith@sideshowbarker.net> wrote:
On 9/6/07, Ken Morse <kenneth.morse@gmail.com > wrote:
> The additional twist I've found to this is that even with the patch, the
> footnote numbers are not output.

Yeah, after looking at the code a bit, I could see that this
problem is a bit more complicated than I had first thought. One
issue is that link is not the only element in DocBook 5 that can
be used to mark up hyperlinks; the xlink:href element is allowed
on all (or almost all) elements -- which means that any element in
DocBook 5 can potentially generate a hyperlink.

The existing XSL stylesheets already supported generating
hyperlinks for elements other than the "linking" elements (ulink,
link, olink) -- not for all elements, but at least for most
inline ones (I think the template that causes the hyperlinks to be
generated, the simple.xlink template, currently gets called only
for inline elements that are processed using the various inline.*
named templates.

The problem is that the simple.xlink template was not called the
same hyperlink-display code that the ulink template was calling.
So I updated the simple.xlink template to do that, and also update
the xsl:number instances that generate the footnote numbers. So
now, at least for the cases I've tested so far, footnote numbers
do get generated as expected for hyperlinked inline elements
(including the link element).

So please either download the latest snapshot or use the attached
patch to update youe 1.73.2 stylesheets, then test and let me know
if it works for you as expected.

> How can we change the footnote number so that links to external sites are
> counted, but internal links are not? (I'm not familiar enough with XPATH
> expressions and predicates to do this properly).

Yeah, the XPath expression for determing whether a particular
xlink:href instance is an external link or not is a bit
complicated; take a look at the patch. I'm not certain I got it
completely right yet, so we may need to make some further
refinements to it after more testing gets done.

> If we do change the non-namespaced XSL stylesheets source as you suggest,
> then the footnote count would need to handle both ulink (as it does now) as
> well as handling the link changes. Can we do this with a single
> <xsl:number.../> or would we have to split things up?

I have been testing the generated XSL-NS stylesheets in my
workspace and they seem to now be working as expected after the
change I made. But if you test and find any problems, definitely
let me know.

  --Mike




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