Burnard Towers | 1 Aug 2003 10:24
Picon
Picon

Re: encoding declarations

Michael Beddow remarks:

> That means that any entities intended as generic
> boilerplate constituents for a wide variety of documents should
> always have
> a (correct!) text declaration. That way, they will be usable no
> matter what
> the encoding of the document into which they are included. Similarly,
> precisely in the context of a corpus where more than one encoding may have
> been employed, it is wise to take precautions against
> hard-to-trace encoding
> muddles by furnishing each entity with an appropriate text declaration.
>

A further aspect of this which has always perplexed me is that (unless I'm
mistaken) the encoding of an entity which embeds another one does *not*
become the default for the embedded entity. In other words, if I have a
corpus of non-UTF-8 encoded entities, it is not enough simply to stick an
appropriate encoding declaration on the outermost entity which embeds all
the others: if they don't have their own declarations, they will default to
UTF8 and things will go Horribly Wrong.

L

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)

Sebastian Rahtz | 1 Aug 2003 14:54
Picon
Picon

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

I noted the same issues as Lou; and in addition, I quibble with a) the
use of both an external CSS file, and embedded CSS in class attributes,
and b) the <p rend="indented"> notation, which I am sure is not needed.

However, I'd also say how pleasant it was

* to open the sample TEI file and see such splendid metadata
* to see XSLT with comments in explaining what is happening
* to see someone who cares about bibliographies
* to open the file in Emacs and see CJK bits actually displaying :-}

more of the same, please....
--
Sebastian Rahtz      Information Manager
Oxford University Computing Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431

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)

Charles Muller | 1 Aug 2003 16:25

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

Sebastian wrote:

> I noted the same issues as Lou;

Again, I'm delighted to have these comments.

> and in addition, I quibble with a) the
> use of both an external CSS file, and embedded CSS in class attributes,

As I noted in my response to Lou's comments, I'm still at a very early
stage with XSLT. I had tried for a couple of years without success to
crack it at a basic level, but until I recently became determined to
work some things through (with a good bit of help from Michael Beddow)
was unable to do anything. So I am still very much a beginner with XSLT.

This being the case, could you just mention briefly why you think the
combination with CSS is not good practice? This is not a challenge, I'm
just trying to learn the Right Way.

> and b) the <p rend="indented"> notation, which I am sure is not needed.

I suspect I'm not getting something here. When I write an article for
paper publication, the first line is supposed to be indented. The
standard <p> element in HTML does not provide this kind of indentation,
so obviously some sort of attribute distinction needs to be made. What
kind of strategy do you recommend?

> However, I'd also say how pleasant it was
>
> * to open the sample TEI file and see such splendid metadata
(Continue reading)

Michael Beddow | 1 Aug 2003 16:23

Re: encoding declarations

Lou Burnard wrote:

>
> A further aspect of this which has always perplexed me is that (unless I'm
> mistaken) the encoding of an entity which embeds another one does *not*
> become the default for the embedded entity. In other words, if I have a
> corpus of non-UTF-8 encoded entities, it is not enough simply to stick an
> appropriate encoding declaration on the outermost entity which embeds all
> the others: if they don't have their own declarations, they will default
> to UTF8 and things will go Horribly Wrong.

Exactly. This is why I wanted to qualify the (intrinsically correct) advice
that entities which are components of a teiCorpus.2 or other composite
document should not have an XML declaration.

The reason why following that advice might lead to trouble is that XML
declarations are often indistinguishable from text declarations, which are
permissible and indeed generally advisable on such entities.

When encoding problems strike, people tend to resort to random fiddling, and
deleting a required text declaration in such circumstances would not be a
good idea (though checking that it tallied with the encoding of the entity
itself might well be).

Michael Beddow

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)

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)

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 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)


Gmane