<ptr/> in bibliographic references;

20 views
Skip to first unread message

kalkhitash...@gmail.com

unread,
Feb 8, 2022, 3:14:13 PM2/8/22
to EFES users

Dear all, 

Have any of you had similar problem with displaying bibliography? I guess this has to do with html-tpl-struct-sample.xsl?
 
<!-- <ptr/> in bibliographic references; to be adapted to link @target to full bibliographic reference -->

  <xsl:template match="t:ptr[ancestor::t:bibl][@target]">
    <xsl:value-of select="translate(@target, '#', '')"/>
  </xsl:template>



Screenshot 2022-02-09 at 00.10.35.png

Irene Vagionakis

unread,
Feb 8, 2022, 5:08:33 PM2/8/22
to EFES users
You are right, I should have added a `@mode` attribute to limit the `<xsl:template match="t:ptr[ancestor::t:bibl][@target]">` to the 'sample' template (whereas now it is called also outside it), but I am not very practical with `@mode`. Could anyone who is able to use `@mode` properly add it, or otherwise comment that lines out (ll. 494-496 of htm-tpl-struct-sample.xsl)?

Jamie Norrish

unread,
Feb 11, 2022, 4:10:32 PM2/11/22
to efes-...@googlegroups.com
On Tue, 2022-02-08 at 14:08 -0800, Irene Vagionakis wrote:

> You are right, I should have added a `@mode` attribute to limit the
> `<xsl:template match="t:ptr[ancestor::t:bibl][@target]">` to the
> 'sample' template (whereas now it is called also outside it), but I
> am not very practical with `@mode`. Could anyone who is able to use
> `@mode` properly add it, or otherwise comment that lines out (ll.
> 494-496 of htm-tpl-struct-sample.xsl)?

I've looked a little at this and I don't have enough information to
proceed.

The struct-* XSLT should, I think, contain only named or moded
templates. By (my) preference only named temples, indeed, unless you're
overriding general display in very specific contexts (because otherwise
you either are applying the mode to a bunch of material you haven't
written templates for, or you're repeating a lot of existing code with
the only difference being the mode).

t:ptr isn't applied to directly in the sample XSLT, so I can't simply
add a mode to that template (and to all of the xsl:apply-templates in
the named templates) - that will remove the standard rendering from
everything else.

But really, the struct-* XSLT are for the overall structure of the
display and not for the fine details. Those should go in the
appropriate XSLT for the type of markup, and if distinctions need to be
made there based on the structure, then the following construction is
used:

<xsl:template ...>
...
<xsl:param name="parm-edn-structure" required="no" tunnel="yes"/>
...
<xsl:choose>
...
<xsl:when test="$parm-edn-structure = (...)">
...
</xsl:when>
...
</xsl:choose>
...
</xsl:template>

You can see an example of this in teigap.xsl, among other places.

I hope this helps!

Jamie

Irene Vagionakis

unread,
Feb 12, 2022, 3:32:45 AM2/12/22
to EFES users
Thanks, Jamie! Right, so, for the time being the easiest thing seems to be to comment out those lines, which are not essential at all.

Irene Vagionakis

unread,
Feb 21, 2022, 1:19:54 PM2/21/22
to EFES users
I have tried to clean up all the unnamed templates, so that conflict with <ptr/> should be fixed: I hope I have not broken anything else!
Reply all
Reply to author
Forward
0 new messages