Page 1 of 1

Customizing author view

Posted: Fri Aug 09, 2013 5:08 pm
by Susanne
Hello,

I'm currently trying to customize the author view for a TEI5-XML file.

In my XML file, I have an element with the following attributes:

Code: Select all


<form type="hyperlemma" xml:lang="grc" xml:id="hl_grc-4">
While I was able to make appear all <form>-Tags with the attribute "hyperlemma" bold and italic by adding

Code: Select all


form[type="hyperlemma"] {
display: inline;
font-style: italic;
font-weight:bold;
}
to .\Oxygen XML Editor 15\frameworks\tei\xml\tei\css\tei.css,

I wasn't able to address a second attribute at the same time, because

Code: Select all


form[type="hyperlemma"][xml:lang="grc"] {
display: inline;
font-style: italic;
font-weight:bold;
}
doesn't work.

What do I have to add to the .css file in order to make <form>-Tags of type="hyperlemma" AND xml:lang="grc" boldface?

I would appreciate any hint in the right direction.

Thanks,
Susanne.

Re: Customizing author view

Posted: Fri Aug 09, 2013 5:15 pm
by Radu
Hi Susanne,

Actually there was a similar situation on the TEI users list a couple of months ago:

http://listserv.brown.edu/archives/cgi- ... atches&z=4


In the tei.css after all the imports you should add this declaration:

Code: Select all

@namespace xml "http://www.w3.org/XML/1998/namespace";
and then modify the CSS selector to be something like:

Code: Select all

form[type="hyperlemma"][xml|lang="grc"]
So instead of ":" you will need to use "|" in the selector which matches a certain attribute with a certain prefix.

This is in accordance with the CSS 3 namespaces specification:

http://www.w3.org/TR/css3-namespace/

Regards,
Radu

Re: Customizing author view

Posted: Mon Aug 12, 2013 9:34 am
by Susanne
Hi Radu,

thanks a lot for your quick answer and also for pointing me to the solution.

Your suggestions did the trick!

Regards,
Susanne.