Print

Print


Ethan's solution works fine, but it still displays the heading "Sponsor:"
when the field is empty. I would like the heading to disappear as well.

Tamara

Tamara Gaydos, CA
NHPRC Grant Project Manager and Manuscript Processor
Phillips Library | Peabody Essex Museum
East India Square | Salem, MA 01970
978-542-1510 [log in to unmask]


On Tue, Jan 21, 2014 at 2:19 PM, Nathan Tallman <[log in to unmask]> wrote:

> Could it be a CSS issue that relies on some part of the sponsor output for
> display?
>
> Nathan
>
>
> On Tue, Jan 21, 2014 at 1:59 PM, MicheleR <[log in to unmask]> wrote:
>
>> That shouldn't matter, should it?  If there's no sponsor in the EAD, then
>> the output would have an empty <h5></h5> which shouldn't cause the problem
>> she's seeing.
>>
>>
>> On 1/21/2014 1:47 PM, Ethan Gruber wrote:
>>
>>> Put a test around the h5 so it only appears when there is content in
>>> sponsor:
>>>
>>> <xsl:if test="string(filedesc/titlestmt/sponsor)">
>>> <h5 style="text-align:center">
>>>              <xsl:value-of select="filedesc/titlestmt/sponsor"/>
>>> </h5>
>>> </xsl:if>
>>>
>>>
>>>
>>> On Tue, Jan 21, 2014 at 1:43 PM, Tamara Gaydos <[log in to unmask]
>>> <mailto:[log in to unmask]>> wrote:
>>>
>>>     Hi all,
>>>
>>>     I have a stylesheet that works fine when the <sponsor> element is
>>> filled in.
>>>     But now I want to encode some finding aids that have no sponsor. If
>>> I try to
>>>     eliminate the <sponsor> element, the header information becomes
>>> centered and
>>>     looks awful. The only bit of code that references <sponsor> is this:
>>>
>>>     <!--Suppreses all other elements of eadheader.-->
>>>          <xsl:template match="eadheader">
>>>          <h2 style="text-align:center">
>>>              <a name="{generate-id(titlestmt/titleproper)}">
>>>                  <xsl:value-of select="filedesc/titlestmt/titleproper"/>
>>>              </a>
>>>          </h2>
>>>          <h5 style="text-align:center">
>>>                  <xsl:value-of select="filedesc/titlestmt/sponsor"/>
>>>          </h5>
>>>          <br></br>
>>>          </xsl:template>
>>>
>>>     I want to be able to use sponsor when I need it and eliminate it
>>> when I
>>>     don't. Anyone able to help?
>>>
>>>     Tamara Gaydos, CA
>>>     NHPRC Grant Project Manager and Manuscript Processor
>>>     Phillips Library | Peabody Essex Museum
>>>     East India Square | Salem, MA 01970
>>>     978-542-1510 <tel:978-542-1510> [log in to unmask]
>>>     <mailto:[log in to unmask]>
>>>
>>>
>>>
>>
>> --
>> +==+==+==+==+==+==+==+==+==+
>> Bottom line is, even if you see 'em coming, you're not ready for the big
>> moments. No one asks for their life to change, not really. But it does.
>> So what are we, helpless? Puppets? No. The big moments are gonna come.
>> You can't help that. It's what you do afterwards that counts. That's when
>> you find out who you are.
>> +==+==+==+==+==+==+==+==+==+
>>
>
>