Burnard Towers | 1 Aug 2003 10:54
Picon
Picon

Re: Sample Article/Bibliography TEI-XML/XSL "kits" announced

Chuck asks for comments on these resources, so I hope he will accept these
brief remarks in the spirit of constructive criticism intended. As others
have already remarked, it's really important to have simple sample demos of
the power and simplicity  of TEI/XML+XSL/T which are focussed precisely  on
the kind of stuff that specific user communities do, and I will certainly be
linking to these resources from the TEI website at the next update. That
said,  doing things in an exemplary fashion does mean Doing Them Right, and
there are a couple of nits I'd like to pick in the approach adopted here.

(a) There are two ways of doing HTML-style links in TEI. You can follow the
letter of P3, predeclare an entity for each web page you want to link to,
and use <xptr> or <xref> with a DOC attribute. Or, with considerably less
effort, you can add a new attribute (e.g. URL or HREF)  to the existing
<xptr> or <xref> declarations and use that. What you *can't* in my opinion
do is use the REND attribute for this purpose. That's tag (or rather
attribute) abuse. (See further 14.2.4 of P4,
http://www.tei-c.org/Guidelines/SA.html#SAHTML )

(b) In general, the content of an element should be exactly what the
element's GI claims it is. I am not sure I'd agree that "---"  is an author
name. In particular, the "----" who happens to come after "Aaadvark, Antony"
in the author-sorted list is definitely not the same as the "----" who comes
after "Zoroaster, Xenia". This approach also ensures that all  sorts of
things will go wrong when I start doing interesting things with my
bibliography other than print it all out in alpha order. I think that the
way to do this is to put the full author name in every time, and suppress
the duplication in the stylesheet.
Advocates might be found for using the existing TEI copyOf attribute, or
even for some such weirdness as "rend='suppress'" I suppose...

(Continue reading)

Charles Muller | 1 Aug 2003 17:16

Re: Sample Article/Bibliography TEI-XML/XSL "kits" announced

Lou wrote,

> (a) There are two ways of doing HTML-style links in TEI. You can follow the
> letter of P3, predeclare an entity for each web page you want to link to,
> and use <xptr> or <xref> with a DOC attribute. Or, with considerably less
> effort, you can add a new attribute (e.g. URL or HREF)  to the existing
> <xptr> or <xref> declarations and use that. What you *can't* in my opinion
> do is use the REND attribute for this purpose. That's tag (or rather
> attribute) abuse. (See further 14.2.4 of P4,
> http://www.tei-c.org/Guidelines/SA.html#SAHTML )

Understood, but let me then please ask for your advice. The instructions
at that link offer the example of

     <p>This is discussed in
     <xref url="http://www.tei-c.org/TEI/Guidelines/SA.html">the
      chapter on linking</xref>.

I can understand this. In my style sheet I had this:

    <!-- Xref (1) To select a bracketed URL -->
    <xsl:template match="xref[ <at> type='url']">
    <xsl:variable name="url" select="."/>
    <a href="{$url}"><xsl:apply-templates/></a>
     </xsl:template>

   <!-- Xref (2) To take the rend attribute as the URL to be appled to bracketed text -->
    <xsl:template match="xref[ <at> rend]">
    <xsl:variable name="hlink" select=" <at> rend"/>
    <a href="{$hlink}"><xsl:apply-templates/></a>
(Continue reading)

Burnard Towers | 2 Aug 2003 11:14
Picon
Picon

Re: Sample Article/Bibliography TEI-XML/XSL "kits" announced

>
> But in case (1) where the content of the node is itself a URL and we
> want to have that as the content of the node as well as the href
> attribute value,
>
>      <p>This is information can be found at
> <xref>http://www.tei-c.org/TEI/Guidelines/SA.html</xref>.
>
> what do you suggest as a more appropriate way of
> handling it?
>

This seems rather odd to me. The *content* of <xref> (like <ref>) is meant
to be used where you simply want to indicate that something is a reference,
but don't intend to supply any way of following it. So I might say

As <ref>Tomkinson 1968</ref> remarks

during an early stage in my writing when I know that there's a reference
somewhere in Tomkinson, but I haven't actually tracked it down nor got <bibl
id="Tomk68"> properly set up in my bibliography yet. Or even

This is discussed in <ref>P4 somewhere</ref>

This is discussed in <xref>the Programming Primates Homepage</xref>

In short, the content of an <xref> doesn't have to be a URL, and there's no
easy way of telling whether or not it does.
Moreover, if you decide that it always will in your case, you are making it
difficult to use the very natural idiom
(Continue reading)

Michael Beddow | 1 Aug 2003 16:19

Re: Sample Article/Bibliography TEI-XML/XSL "kits" announced

Lou Burnard wrote:
>
> (b) In general, the content of an element should be exactly what the
> element's GI claims it is. I am not sure I'd agree that "---"  is an
author
> name. In particular, the "----" who happens to come after "Aaadvark,
Antony"
> in the author-sorted list is definitely not the same as the "----" who
comes
> after "Zoroaster, Xenia". This approach also ensures that all  sorts of
> things will go wrong when I start doing interesting things with my
> bibliography other than print it all out in alpha order. I think that the
> way to do this is to put the full author name in every time, and suppress
> the duplication in the stylesheet.
> Advocates might be found for using the existing TEI copyOf attribute, or
> even for some such weirdness as "rend='suppress'" I suppose...

This is an important point, because it brings out that authoring directly in
TEI isn't merely a masochist's alternative to using a plain text editor. Not
even if the process is expensively hidden behind XMetallic WYSIWYG-ery.

The thought process that got the learned gentlepersons apparently called
"----" into the document is easy enough to understand. After all, if I were
editing a bibliography in MS Word following a house style that used this
notation for repeated author names, I would just type the dashes into the
document. So why not do the same when creating the document in an XML
editor?

Lou's comment indicates the answer: because SGML/XML tagging not only
describes data: it makes assertions about it. And on the whole, the exercise
(Continue reading)

Charles Muller | 1 Aug 2003 17:28

Re: Sample Article/Bibliography TEI-XML/XSL "kits" announced

Michael Beddow wrote:

> The thought process that got the learned gentlepersons apparently called
> "----" into the document is easy enough to understand. After all, if I were
> editing a bibliography in MS Word following a house style that used this
> notation for repeated author names, I would just type the dashes into the
> document. So why not do the same when creating the document in an XML
> editor?

I know Michael's point is more profound, but I should make clear that
the real reason for the ---. author names has nothing do to with a
decision made in the process of XML authoring. It has to do with the
fact that that particular article is a reworking of one of the chapters
of my dissertation, which was therefore probably written in
WordPerfect 5.0/5.1 or some such before I knew of the Internet, and so
that section of the bibliography is just sort of sitting there as a
remnant of ages past.

If you look instead at the bibliography package, which is newly created,
all the names are listed fully. But of course, I would like them to be
transformed as ---. !

Regards,

Chuck

---------------------------
Charles Muller  <acmuller <at> gol.com>
Faculty of Humanities,  Toyo Gakuen University
Digital Dictionary of Buddhism and CJKV-English Dictionary [http://www.acmuller.net]
(Continue reading)

Charles Muller | 1 Aug 2003 16:11

Re: Sample Article/Bibliography TEI-XML/XSL "kits" announced

Lou wrote:

> Chuck asks for comments on these resources, so I hope he will accept these
> brief remarks in the spirit of constructive criticism intended.

No please, fire away! It's exactly for the purpose of getting this kind
of input that I made the announcement on the TEI list. And the
shortcomings that have been pointed out both here and in Sebastian's
subsequent message are all related to nothing else but ignorance on my
part--regarding both TEI and XSLT, so all is very useful. I'm working
very hard now at learning both, so I think I will be able to absorb most
of these instructions. Those of you who are on the XSL list know that
I've been getting a fair amount of help there as well.

Regarding specifics:

> (a) There are two ways of doing HTML-style links in TEI. You can follow the
> letter of P3, predeclare an entity for each web page you want to link to,
> and use <xptr> or <xref> with a DOC attribute. Or, with considerably less
> effort, you can add a new attribute (e.g. URL or HREF)  to the existing
> <xptr> or <xref> declarations and use that. What you *can't* in my opinion
> do is use the REND attribute for this purpose. That's tag (or rather
> attribute) abuse. (See further 14.2.4 of P4,
> http://www.tei-c.org/Guidelines/SA.html#SAHTML )

I did a little bit of checking around on this, and could not figure out
the right way of handling it. I'll check the link you have offered, and
if I can't figure it out, I'll come back with questions.

> (b) In general, the content of an element should be exactly what the
(Continue reading)

Michael Beddow | 1 Aug 2003 17:52

Re: Sample Article/Bibliography TEI-XML/XSL "kits" announced

Charles Muller wrote:

> I assume that you are speaking here of the bibliography
> at the back of the sample article? Yes, I am aware of this
> problem, but have not yet been able to figure out what the
> technique is for dealing with this in XSLT (in fact, before
> reading this message, I had spent about two hours tonight
> with my XSL books and on the web trying to crack this one) so if
> a small bit sample XSLT might be provided, I'd much appreciate it.

OK, I'll bite in the hope of not getting bitten...

Since I expect many denizens of this list won't want to learn how to use the
patch utility on a standard diff at the end of a doubtless hard-working
week, here's the hand-crafted version.

In global-body.xslt, find the comment <!-- Bibliographical renderings -->
and below it, immediately after the opening element of
<xsl:template match="author">
add the following:

<!-- MB 2003-08-01
* * If our author name is the same as the preceding one, output
** a string of dashes in its place. NB this presupposes that identical
**  names are indeed entered identically! It might also be a wise
** precaution to normalize-space both the string values we are
** comparing. Also, the "suppression marker" perhaps ought to be
** in a variable rather than hard-coded as here.
-->

(Continue reading)

Charles Muller | 2 Aug 2003 08:17

Re: Sample Article/Bibliography TEI-XML/XSL "kits" announced

Michael Beddow wrote:

> Since I expect many denizens of this list won't want to learn how to use the
> patch utility on a standard diff at the end of a doubtless hard-working
> week, here's the hand-crafted version.

Obviously, this works well, and deep gratitude to Michael, as usual.

I re-uploaded all the
files immediately to reflect this change, but will be doing a lot more
work in coming days to reflect other helpful advice that I have
gotten--including the application of this same model to <editor> and the
rethinking of my way of applying CSS.

Regards,

Chuck

---------------------------
Charles Muller  <acmuller <at> gol.com>
Faculty of Humanities,  Toyo Gakuen University
Digital Dictionary of Buddhism and CJKV-English Dictionary [http://www.acmuller.net]
H-Buddhism List Editor [http://www.h-net.org/~buddhism/]
Mobile Phone: 090-9310-1787

Rafal T. Prinke | 1 Aug 2003 16:57
Picon

Re: Sample Article/Bibliography TEI-XML/XSL "kits" announced

Charles Muller wrote:
>
> Lou wrote:

> > (a) There are two ways of doing HTML-style links in TEI. You can follow the
> > letter of P3, predeclare an entity for each web page you want to link to,
> > and use <xptr> or <xref> with a DOC attribute. Or, with considerably less
> > effort, you can add a new attribute (e.g. URL or HREF)  to the existing
> > <xptr> or <xref> declarations and use that.

> I did a little bit of checking around on this, and could not figure out
> the right way of handling it. I'll check the link you have offered, and
> if I can't figure it out, I'll come back with questions.

I adopted the "less effort" (obviously!) solution for my
purposes when it was suggested on the list some time ago.
I use this extension to the DOCTYPE declaration:

<?xml version='1.0' encoding='UTF-8'?>
<?xml:stylesheet type='text/xsl' href='d:\dtd\sendix6.xsl' ?>
<!DOCTYPE TEI.2 SYSTEM 'D:/dtd/myPizza.dtd' [
  <!ATTLIST xptr  url CDATA #IMPLIED >
  <!ATTLIST xref  url CDATA #IMPLIED >
  <!ATTLIST figure  url CDATA #IMPLIED >
  <!ATTLIST text  xml:space (preserve | default) "preserve" >
  ]>

The last line is for EOL space preservation - also one of
the list members' suggestions to my query.

(Continue reading)


Gmane