Print

Print


Can you please provide an example for this issue?
If you don't want your own changes to be ignored, you can set the 
"!important" value in CSS.
Also this problem can be caused by wrong selectors or you can solve it 
by using more specified selectors (CSS-Path). More specified rules get a 
higher priority.

Best,
Mathias

On 19.11.2013 13:36, Werner Stangl wrote:
> Dear all,
>
>
> thanks for all your input! Problem #1 is now solved sufficiently for 
> my purposes. I now wrote this template in my newly created to.xsl :
>
>    <xsl:template match="tei:hi">
> <xsl:choose><xsl:when test="@rend='superscript'">
> <span class="normal">
>          <xsl:apply-templates/>
>       </span></xsl:when>
>    <xsl:otherwise>
>       <xsl:variable name="rend"><xsl:value-of 
> select="@rend"/></xsl:variable>
>       <span class="{$rend}">
>          <xsl:apply-templates/>
>       </span>
>    </xsl:otherwise>
> </xsl:choose>
>    </xsl:template>
>
> Problem #2 is yet persisting though.
>
> ------------------------------------------------------------------------
> Date: Tue, 19 Nov 2013 12:34:54 +0100
> From: [log in to unmask]
> Subject: Re: AW: TEI->xhtml rend/style questions (other xsl issues in 
> a 2nd post)
> To: [log in to unmask]
>
> Dear All,
>
> Werner, if you use self-made XSLTs, you may just have to add some kind of
>
>     <xsl:template match="hi">
>         <span class="hi">
>              <xsl:apply-templates/>
>          </span>
>     </xsl:template>
>
> and generate your preffered layout with the help of CSS for the class 
> "hi". It definetly make sense to transform TEI elements in html:div or 
> html:span with html:@class named like the TEI element.
>
> If you like to throw away any tei:hi with no attribute or no @rend, 
> the XPATH will do it. Here is an example:
>
>     <xsl:template match="seg[contains(@style, 'underline') and
>     not(@rend)]">
>     [...]
>     </xsl:template>
>
>
> or if any attribute is required connect the predicates as in the 
> example below.
>
>     <xsl:template match="hi[@rend][@rend != 'superscript']">
>     [...]
>     </xsl:template>
>     <xsl:template match="hi[@rend = 'superscript']">
>     [...]
>     </xsl:template>
>
> Add more template instructions as you like, but be aware of |Ambiguous 
> rule match| error.
> (May this solutions are XSLT 2.0 only.)
>
> Kind regards,
> Mathias
>
> On 19.11.2013 11:09, Berg, Olaf wrote:|Ambiguous rule match|
>
>     Hi Werner,
>
>     I am not shure what kind of transformation you are heading for.
>     Xml to html? Or to some printing format? There for first of all
>     some general advice for tweaking with the xslt stylesheets:
>
>     It is a good idea not to change the core.xsl directly but looking
>     for the ../stylesheet/profiles folder in the TEI
>     xslt-transformation system. In there you can find various
>     customizations of the xslt-files that might be helpful to get an
>     idea of what kind of customization is possible. For your own
>     customization you can create an own folder and copy into that
>     folder as a starting point one of the transformation-folder inside
>     the ../stylesheet/profiles/default folder. You will get e.g.
>     something like ../stylesheet/profils/myProfil/html/to.xsl
>
>     The general idea of that approach is: you import into the “to.xsl”
>     the basic stylesheet (e.g. ../../../xhtml2/tei.xsl) and then you
>     can override the template-matches you want to change by copying
>     the relevant match (e.g. “tei:hi”) into your file “to.xsl” and
>     change it. This approach allows for better maintenance: Changes to
>     the underlying basic xslt can be applied easily by importing the
>     updated xsl. You have all you personalization at one place. You
>     can be shure that the changes you made are not overridden in the
>     “import cascade” of the stylesheet set (which maybe is the case
>     with your first problem).
>
>     I hope this was helpful
>
>     Best,
>
>     Olaf
>
>     *Von:*TEI (Text Encoding Initiative) public discussion list
>     [mailto:[log in to unmask]] *Im Auftrag von *Werner Stangl
>     *Gese**ndet:*Dienstag, 19. November 2013 09:08
>     *An:* [log in to unmask] <mailto:[log in to unmask]>
>     *Betreff:* TEI->xhtml rend/style questions (other xsl issues in a
>     2nd post)
>
>     Hi all,
>
>     after finally having encoded  my docs (letters), I'm now working
>     on the visualization part (using OxyGen).
>     I plan two different visualizations, one suited for easier reading
>     (showing ex, corr, reg etc.) and one closer to the original
>     manuscript (showing am, orig, abbreviation endings in superscript
>     etc.)
>
>     I've come quite far, considering my *less than perfect
>     (euphemism)* understanding of xsl. Some problems remained though:
>
>     *_1. change rendering for hi rend='superscript' _*
>     In the "easy-read" version, I managed to get hi rend='superscript'
>     down with some tweaking in core.xsl, but now it's in italics (I
>     want it plain):
>
>     <xsl:template match="tei:hi">
>         <xsl:variable name="rend">
>           <xsl:choose>
>
>               <xsl:when test="@rend*_and not(@rend='superscript')_*">
>           <xsl:value-of select="@rend"/>
>         </xsl:when>
>     <xsl:otherwise>italic</xsl:otherwise>
>           </xsl:choose>
>         </xsl:variable>
>     ...
>
>     I tried some things, but completely failed. What exactly does the
>     xsl:otherwise part do in the script? It seems to be irrelevant - I
>     can put there what I want, no element in my markup is bothered by it.
>
>     *_2. Line Height_*
>     In the "original", the standard transformation causes lines
>     without superscripts or <add place='above'> to have another
>     line-height than those with these elements. I'd like to simply
>     increase the line-height of p alltogether in order to get rid of
>     the problem.
>     I hoped that this would be possible by saving the referred
>     css-file (http://www.tei-c.org/release/xml/tei/stylesheet/tei.css)
>     locally, point to it in the paramenters in oxygen and simply add a
>     css line for p with line-height. The outcome?
>     a)nothing changed for p
>     b)the whole css styling of my body collapsed - this also happens
>     when pointing to the unchanged, but locally stored tei.css . It
>     only works referring to the web-URL, so I can't edit the file.
>
>
>     I'm grateful for every hint to solve these issues.
>     Best,
>     Werner
>
>
> -- 
> Mathias Göbel
> Research and Development
>
> Georg-August-Universität Göttingen
> Göttingen State and University Library
> D-37070 Göttingen
>
> Papendiek 14 (hist. Building, Room 2.207)
> +49 551 39-12238 (Tel.)
>
> [log in to unmask] <mailto:[log in to unmask]>
> http://www.sub.uni-goettingen.de

-- 
Mathias Göbel
Research and Development

Georg-August-Universität Göttingen
Göttingen State and University Library
D-37070 Göttingen

Papendiek 14 (hist. Building, Room 2.207)
+49 551 39-12238 (Tel.)

[log in to unmask] <mailto:[log in to unmask]>
http://www.sub.uni-goettingen.de