It seems to me that the problem with this solution which automatically
inserts quotes is that one may not always want a title to be quoted but
rather bold and underlined or with some other display. A citation in a
<unittitle> may include both the title of an article and that of the journal
in which it appeared, for example.
Since you have gone to the bother of including the render attribute in your
markup, why not use it to signal that quotes are desired in this particular
situation.
I would replace this template
<xsl:template match="title">
"<xsl:apply-templates/>"<xsl:text/>
</xsl:template>
with this one
<xsl:template match="title[@render='quoted']">
"
<xsl:apply-templates/>
"
</xsl:template>
and this one and/or some variants
<xsl:template match="title[@render='bold']">
<b>
<xsl:apply-templates/>
</b>
</xsl:template>
I do not understand the function of the string <xsl:text/>.
Michael
Michael J. Fox
Assistant Director for Library and Archives
Minnesota Historical Society
345 Kellogg Blvd West
St. Paul, MN 55102-2409
651-296-2150 (phone)
651-296-9961 (fax)
[log in to unmask]
-----Original Message-----
From: Lawrence Mielniczuk [mailto:[log in to unmask]]
Sent: Friday, August 17, 2001 10:48 AM
To: [log in to unmask]
Subject: Re: comma and a space with quoted elements
Hello Amy,
This can be a tricky issue. Ending the <title> element with
`comma-space' means that they will both
be included within quotes. I generally omit spaces within tags like that.
The problem is the comma. It can't
go after the </unittitle> because text is not allowed there. So it can only
go between the </title> and
</unittitle>.
An alternative would be to leave out the comma altogether and put it in
using your stylesheet. But it is
possible to get the formatting you want with the comma in as follows:
.
.
.
<c level="file">
<did>
<unittitle>
<title render="quoted">Happy Hooligan at
Work Again. He Is Employed
as a Guard at the
Penitentiary</title>,</unittitle>
<origination>Opper, Frederick Burr.</origination>
</did>
</c>
using the following stylesheet:
<?xml version="1.0" encoding="utf-8"?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="unittitle">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="title">
"<xsl:apply-templates/>"<xsl:text/>
</xsl:template>
<xsl:template match="origination">
<xsl:apply-templates/>
</xsl:template>
</xsl:transform>
Hope this helped.
> I'm encoding some items and need to know how they will display in a
> browser. I can't use Page Preview right now, so I'm unable to find this
> out myself.
>
> My question involves the use of a comma and a space at the end of one
> element and right before another. The "Application Guidelines" (section
> 4.3.5.1) advise always including a single space after an inline element,
> since a style sheet cannot always be counted on to supply whitespace where
> needed. In my case, the encoded elements are a comic strip title,
followed
> by the name of its creator. The tags are <title>, rendered in quotes,
> within a <unittitle>, followed by a name tagged as <origination>. My
> uncertainty has to do with how the single space and the quotation marks
> will sort themselves out. The coding looks like this:
>
> <c>
> <unittitle><title render="quoted">Happy Hooligan at Work Again. He Is
> Employed as a Guard at the Penitentiary, </title></unittitle>
> <origination>Opper, Frederick Burr.</origination>
> </c>
>
> I have included a single space after the comma. The desired result is:
>
> "Happy Hooligan at Work Again. He Is Employed as a Guard at the
> Penitentiary," Opper, Frederick Burr.
>
> But I wonder if I might instead end up with the single space in the wrong
> place:
>
> "Happy Hooligan at Work Again. He Is Employed as a Guard at the
> Penitentiary, "Opper, Frederick Burr.
>
> Does anyone know how elements rendered in quotes behave in this
> instance? If the answer to this is not known, would someone be kind
enough
> to try this out in their own copy of XMetaL and tell me the results?
>
> With thanks in advance,
>
> Amy McCrory
> Cartoon Research Library
> Ohio State University
> (614) 292-0538
-------------------------------------
Lawrence Mielniczuk
Room 314
Bodleian Library
Oxford OX1 3BG
Tel: (01865) 277 114
Mobile: 0794 101 5689
-------------------------------------
|