Hi Chris,
Regarding id matching, the id() function works with attributes that are specified in the DTD as attribute type ID. Just because an attribute is named "id" does not make it of type ID. If the DTD is not specified or is not read, then that association does not work.

The stylesheets needed to handle documents that did not have a working reference to the DTD, so they use an XSL key (whose name happens to be "id") to create an index to all attributes with name "id" or "xml:id" (so it works with DocBook 4 and 5). You can use this key in a customization layer as follows to get the node containing the id value specified by a linkend:

select="key('id',@linkend)"

I'm not sure it will help in your case, but this is more efficient than a global search for an id value using // in the xpath.

Bob Stayton
Sagehill Enterprises
[email protected]


----- Original Message ----- From: "Chris Yocum" <[email protected]>
To: "DavePawson" <[email protected]>
Cc: <[email protected]>
Sent: Monday, March 02, 2009 6:36 AM
Subject: Re: [docbook-apps] MHRA and Docbook XSL


On Mon, Mar 2, 2009 at 2:22 PM, DavePawson <[email protected]> wrote:
Chris Yocum wrote:

Hi All,
I just wanted to let everyone know that I have written up a first
crack at MHRA styling in footnotes for Docbook.

What's MHRA please, for others as ignorant as myself?

Ah, Sorry.  MHRA stands for the Modern Humanities Research Association
(http://www.mhra.org.uk/).



There are a few limitations at the moment. Everything is linked
to the book tag at the top of the document and thus can only support
books at the moment. This is because I couldn't use the ancestor axis
to match the linkend attribute of the biblioref tag to something in
the bibliography as the bibliography is not an ancestor (it is an
ancestral sibling). I am casting about for ways to allow articles to
join the fun.

Are you using <link linkend=''> ?
http://www.docbook.org/tdg/en/html/link.html

No, I am using biblioref which as a linkend attribute.  I link the
linkend attribute with the xml:id of the biblioentry in the
bibliography.


In which case you should be able to use the id function?
( id(@linkend) to get to the target)

I tried that and it didn't seem to work so I ended up using
@i...@linkend, which did seem to work.






Anyway, if anyone has any thoughts or feedback, I would be very
grateful to hear them. Also, I can provide an example bibliography on
request. Thank you very much for your time.


Since I'm in no position to say it's 'correct' or not,
I'll leave that to others!

That's ok.  Thank you for your questions and interest!

All the best,
Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to