Hi again,
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.
Depending on how the HTML is being served up, it might. For example,
an HTML browser could see <h5 style="text-align:center"/> (an empty
element) and not know that it's empty (there being no end tag) -- so
it proceeds to process everything following (or everything following
up until some later point when it thinks it should stop) as if it were
inside a centered h5.
We can't say for sure without more info and probably testing; but with
a bit of care up front, such problems can usually be avoided.
Cheers, Wendell
Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables
_____oo_________o_o___ooooo____ooooooo_^
>
>
> 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.
> +==+==+==+==+==+==+==+==+==+
|